Blue Writeup
Without Metasploit
Last updated
Without Metasploit
Last updated
Initial Nmap Scan to find open ports, using treat all hosts as online (-Pn)
Detailed Nmap Scan :‌
Command Breakdown:‌
(-sV): Service version
(-sC): Default nmap scripts
(-p): Specifying ports 135,139,445
(-oN nmap): Saving it into a files called nmap
Lets run a nmap vulnerability script to find vulnerabilities.
We can see that it is vulnerable to ms17-010 , also known as Eternal Blue.
Let us go to searchsploit and search for this vulnerabilities exploit.
We see from the nmap scan that it is Windows 7 machine and there are multiple versions on the exploit we chose, so lets exploit the machine using that. Now we have to copy it to our directory
Lets read the documentation in the script and look at the steps to use this exploit
After reading the exploit, we have 3 steps to do:
Download a script called mysmb.py from the location they provided in the script
Create a reverse shell using MSF Venom.
Add credentials and the reverse shell payload to the exploit
First let us download the script called mysmb.py and rename it to mysmb.py
Next we have to use MSF Venom to create a executable with a reverse shell payload
Now we have to change the exploit by adding credententials. At this moment, we don't know have or know valid credentials, so we can check what login is allowed, we can first test guest or user. We can do this using enum4linux. (-a) for simple enumeration.
We can see that guest is a know username, so lets use that, we have to add that to the USERNAME field in the script.
Now we have to add the reverse shell location and execute the script (*also remove the copy from r'cmd /c , I forgot to take it out while taking this screenshot")
Now, start the listener on your machine
Now run the exploit
And you should get a reverse shell, and as nt authority/system