Hacking Legacy (hackthebox)

 I started by running a SYN scan of all the ports:




Port 139 is used for NetBIOS over IP. This is a security weakness. Port 445 was supposed to make file sharing with Windows more secure, but it also has security problems. Port 445 uses SMB.


This was already looking promising. I thought I might be able to list the NetBIOS shares using smbclient with no password, but this did not work. I therefore enumerated the ports more thoroughly:




I discovered that the machine was running Windows XP as well as NetBIOS over port 139, so I did a quick search and found a possible exploit on Rapid7.




This exploit seeks to bypass the No eXecute bit on the stack. It seems to work well on Windows XP, but it tends to crash Windows 2003.





The target machine was XP, so I decided to fire up msfconsole and search for ms08_067




I set the options and fired up the exploit. This created a meterpreter reverse shell:




I checked the user ID and was happy to see that I had gained access as NT AUTHORITY\SYSTEM which is the most privileged non-interactive session. It is the local system account and is more powerful than local admin accounts.


I dumped the hashes so I could have a go at cracking them with hashcat. Unfortunately, my cracking attempts did not work! Still, retrieving hashes is always useful as they can be used in pass-the-hash attacks.




I then started a regular Windows command line with the shell command and then used the tree command to quickly find the user and root flags:







I enjoyed rooting this machine - thanks to ch4p for creating it, and thank you for reading my write up of it.




Popular posts from this blog

Hacking Reset (thm)

Hacking Year of the Owl (thm)

Simple CTF (tryhackme)