r/ExploitDev • • Aug 02 '23

I am having problems with stack five exercise from exploit exercises, could I have some help? Spoiler

3 Upvotes
I used the \xcc to cause SIGTRAP well the RIP lands on it by overflowing the return address, but when I replace \xcc with \x90 to try a nop sled, it doesn't work. The exploit works in gdb (When I adjust overwritten stack address with the one in gdb as it's different from outside the debugger). The shellcode in the middle will execute the bin/sh shell with execve