dimanche 24 juillet 2016

Overwriting the higher bits while executing the shellcode

During my study about Buffer overflow and how to execute a Shellcode, I stuck on overwriting the higher bits of the return address to be pointed to exactly to my shellcode.

All the details are as below:

Shellcode address: 0x6008a0

Return address: 0x0007fff7a57610

The new return address after the execution of the shell code: 0x00007ff006008a0

which give me a segmentation fault!!!.

Code:
char shellcode[]= "--code--"
int main() {
int *ret
ret = (int *)&ret +2;
(*ret) = (int)shellcode;
}

Aucun commentaire:

Enregistrer un commentaire