Exploitation

Metasploit

# Start Metasploit
systemctl start postgresql
systemctl enable postgresql
msfdb init
msfconsole

# Metasploit Modules
Auxiliary:    Scripts for enumeration, scanning, fuzzing, sniffing etc...
Exploits:     Code to exploit the vulnerability and deliver the payload.
Payloads:     The code that executed on the victim.
Encoders:     Encode the payloads to another form.
Post:         Post exploitation scripts.
Nops:         Add nops bytes.
Evasion:      Scripts for evasion.

# Metasploit Commands
help
show {all|exploits|payloads|auxiliary}
search vsftpd
search type:exploit smb
info {ModuleName}
use {ModuleName}
show info | show options
set {Variable} {value}
exploit

# Ex1 SNMP service enumeration
use auxiliary/scanner/snmp/snmp_enum
show info
show options
set rhosts 192.168.1.244
run

# Ex2 SMB version scanning
use auxiliary/scanner/smb/smb_version
info | options
set rhosts 192.168.1.1-254
run

# Ex3 Test FTP anonymous login
use auxiliary/scanner/ftp/ftp_login
info | options
set pass_file /root/pass.txt
set blank_passwords true
set rhosts 192.168.1.0/24
set user_file /root/user.txt
run

Client-Side Attacks

Standalone Payload

Setup Listener

Windows Service Side Attack

Exploit for MS17-010

Manual Exploit for MS17-010

Linux Service Side Exploit

Exploit for vsftpd 2.3.4

Manual Exploit for vsftpd 2.3.4

Last updated