Description: This video is part of the Hack of the Day series. Please begin by watching Part 1 here: http://securitytube.net/hod
In this video, we will look at building an interesting shellcode encoder in Python --- the encoder takes a shellcode, XORs it with a given byte and converts the resultant data into a series of PUSH statements. Now, with the encoded shellcode all on the stack, we write a decoder in assembly to decode the shellcode and then execute it.
The fun of this technique is that rather than pasting the shellcode into the script, it reads it from stdin. This means you can pretty much use any shellcode along with it - including that from Metasploit. Of course, you will need to select an encoder byte for the XOR in such a way that the output shellcode does not have a 0x00 byte in it.
Enjoy and leave behind your comments!
Disclaimer: We are a infosec video aggregator and this video is linked from an external website. The original author may be different from the user re-posting/linking it here. Please do not assume the authors to be same without verifying.