Hack the Box: Legacy
May 22, 2023
Today we are going to take a look at an old box Legacy:
From here we start to look at port 445 and see an older version of Windows is running:
Utilizing NMAP scripts we are able to see that SMB is vulnerable to a few different attacks:
Utilizing ms08 and metasploit we get a shell as system:
That was a little too easy. Lets create a python script that will automatically exploit MS08–067 after running an NMAP scan and seeing that it is vulnerable:
Above we are adding arguments and importing libraries, now lets get to the code:
I understand that is a lot to look at, for that reason I also uploaded the script on github: