Corelan — Tutorial 9 — Exercise Solution

The Corelan Exploit writing tutorial part 9: Introduction to Win32 shellcoding contains a small exercise to make one of the sample shellcodes null byte free. The sample shellcode will pop a MessageBox with custom title and text and “OK” + “Cancel” button and based on the button you click, something else will be performed. Sounds like a great way to practice shellcode development, so let’s dig in. The source asm is available here.

First compile the sample shellcode:

nasm shellcode.asm -o shellcode.bin