I wrote an article in Hakin9 magazine how to write shellcode with a C-compiler.
People before me have worked out methods to do this; the advantage of my method is that you can debug your shellcode inside the Visual Studio IDE.
The template can be found here.
[…] Writing WIN32 Shellcode With a C-compiler – didierstevens.com The advantage of my method is that you can debug your shellcode inside the Visual Studio IDE. […]
Pingback by Week 18 in Review – 2010 | Infosec Events — Monday 10 May 2010 @ 11:19
I have one question about this: Why I have to init. “strings” via unbounded individual char array and not like char omg[] = “abc”; (When I use buiilt-in tester it works but shellcode fails in real life scenario that way) Thanks.
Comment by Speed — Saturday 11 August 2012 @ 15:13
@Speed Because if you do a string assignment, the string constant is not stored in the code segment, but in the data segment.
Comment by Didier Stevens — Monday 13 August 2012 @ 9:07