Reputation: 1027
I stumbled across a simple buffer overflow (hey what do you know?) tutorial and thought that I might try it out. The video is about 20 minutes long but it's really interesting, I would recommend watching it if you are not familiar with the stuff. Here's the URL:
http://www.securitytube.net/video/1752
My problem comes in at around 14:17, at that point he inputs a command to look up the stack pointer, but I input the same command, with almost the same code (different memory locations) and get this:
(gdb) i r esp
Invalid register `esp'
I don't really know why this is happening, I don't know how it works yet. Did I overwrite the stack pointer or something? I'm running the linux actually through Virtual Box on Windows 7, with the most recent release of Backtrack linux.
Upvotes: 2
Views: 104
Reputation: 30449
You need to prefix registers with "$", i. e.
i r $esp
As you are using a 64 bit gdb, the register name is $rsp
.
Upvotes: 1