Lecture 7 Metasploit
Lecture 7 Metasploit
vulnerabilities
and penetration
testing
Dr Phillip James
Recap and Last week we explored vulnerabilities and
today penetration techniques for
• Web services
• Web applications
OpenVas
1. Run Metasploit.
2. Identify a remote host and add to the metasploit
database.
3. Identify a vulnerability in the remote host that you wish to
exploit and select exploit.
4. Configure the payload to exploit the vulnerability in the
remote host.
5. Execute the payload against the remote host.
Assuming your using Kali:
Select Exploitation Tools -> Metasploit
Running Or run:
msfconsole
To setup options:
set <option> <value>
exploit
Wallah!
Stuck? You can always get help:
help <command>
Demo: File
upload
The first step in many attacks is to get some code to the
system to be attacked.
Simple idea Then find a way to get the code executed.
Using a file upload helps the attacker accomplish the first step.
Victim connects to
attacker on listening port
Victim IP: Attacker IP:
192.168.1.12 192.168.1.13
Listener port:
4444
Crafting with
Metasploit
Attack:
http://127.0.0.1/delete.php?filename=bob.txt;id
Response:
Please specify the name of the file to delete uid=11(www-data)
gid=11(www-data) groups=11(www-data)
DVWA, of
course has this
We can now run any system command we like.
Hence! web
delivery scripts Wait…