Msfvenom

https://tryhackme.com/room/metasploitexploitation task 6

This is a step by step for a task 6 Metasploit: Exploitation - Msfvenom

Step 1 - Accessing the Target Machine

We're given credentials to ssh into the target machine. As you can see in the picture, I have 4 tabs open ( CTRL+SHIFT+T to open a new tab). I'll always give the code to execute, a comment explaining what each command does and a screenshot where I'm doing the same thing. I recommend having 4 named and coloured tabs like I do. Imho it makes the whole process easier to follow. Any text after # is a comment and is grey

# In the Target Machine tab
# Use command ssh to connect to the target machine
ssh murphy@10.10.148.173
# When prompted, type yes to continue connecting
yes
# Enter password 
1q2w3e4r
# Type sudo su to get a root shell, this will give you privileges
sudo su
# Enter password again
1q2w3e4r
step 1 - Target Machine tab

Step 2 - Creating a reverse TCP shell Payload

step 2 - Attack Machine

Step 3 - Creating a server

In the Server tab we start a simple python http server

step 3 - Server Tab

Step 4 - Transfering the payload

Download the payload from the server you set up in the last step

step 4 - Target Machine tab

In the Server tab, you'll see the successful GET request. No need to do anything here, it's just letting you know download was successfull.

step 4 - Server tab

Step 5 - Setting up a Payload Handler

In the msfconsole we'll configure and run the payload handler

step 5 - Msfconsole tab

Step 6 - Executing the Payload

Step 6 - Target Machine tab

In the Msfconsole tab we select the linux/gather/hashdump module, configure it and run it.

Step 6 - Msfconsole tab

Step 7 - Success

We're done

Last updated