0
votes

For my hw assignment I am trying to exploit into an overflow c file. I cannot edit the original file, and I also cannot recompile it.

I have gotten as far as to return to my intended address. However after it executed the code for a while I get this:

   0xffffcc38                  pop    %eax
   0xffffcc39                  push   %eax
   0xffffcc3a                  pop    %ecx
 → 0xffffcc3b                  xor    0x30(%ebp), %eax
   0xffffcc3e                  xor    %eax, 0x30(%ebp)
   0xffffcc41                  xor    %esi, 0x30(%ebp)
   0xffffcc44                  xor    0x30(%ebp), %esi
   0xffffcc47                  pop    %ax
   0xffffcc49                  push   $0x68736538
   0xffffcc3b in ?? ()


gef➤

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

It was executing fine from 0xfffcc30->0xffffcc3a but suddenly stopped at 0xffffcc3b. Can I know why this could have happened?

1
How would anybody be able to tell without access to the executable and your code? - Swordfish

1 Answers

0
votes

Can I know why this could have happened?

If this instruction produced a SIGSEGV:

0xffffcc3b                  xor    0x30(%ebp), %eax

then it's a safe bet that $EBP + 0x30 points to inaccessible memory.

Most likely you "stepped" on $EBP earlier in your exploit.