Citar
char shellcode [ ] = "\xeb\x2a\x5e…/bin/ sh ";
void main() {
int *ret;
ret = ( int *)&ret + 2;
(*ret) = ( int)shellcode ; }
Fuente: http://www.google.es/url?sa=t&source=web&cd=1&sqi=2&ved=0CBoQFjAA&url=http%3A%2F%2Fwww.cs.northwestern.edu%2F~ychen%2Fclasses%2Fcs395-w05%2Flectures%2FSmashing%2520the%2520Stack.ppt&rct=j&q=ret%20%3D%20(int%20*)%26ret%20%2B%202%3B&ei=6RAiTYr9A8Ws8gPRz4DvBQ&usg=AFQjCNER0MzcA3Y_0xJwX7rfZNKbEgTKCw&sig2=j6DwqrVTlUi3Q0NvzDATVQ&cad=rjavoid main() {
int *ret;
ret = ( int *)&ret + 2;
(*ret) = ( int)shellcode ; }
Donde dice "\xeb\x2a\x5e…/bin/ sh " deberías colocar tu S.C.
Disculpas por modificar tanto el post