Hi, I’m reading Hacking, The Art of Exploitation and I have a problem with GDB.
Let me put you in situation:
I have a file called bufferoverflow01 which as you can imagine, can be exploited.
So I run:
gdb -q ./bufferoverflow01
Then, so I can read the memory I type:
disas main
And when I’m going to set the breakpoint I see one weird thing:
0x0000000000400626 <+0>: push rbp
0x0000000000400627 <+1>: mov rbp,rsp
0x000000000040062a <+4>: sub rsp,0x40
0x000000000040062e <+8>: mov DWORD PTR [rbp-0x34],edi
0x0000000000400631 <+11>: mov QWORD PTR [rbp-0x40],rsi
0x0000000000400635 <+15>: mov rax,QWORD PTR fs:0x28
0x000000000040063e <+24>: mov QWORD PTR [rbp-0x8],rax
0x0000000000400642 <+28>: xor eax,eax
0x0000000000400644 <+30>: mov DWORD PTR [rbp-0x24],0x5
0x000000000040064b <+37>: lea rax,[rbp-0x20]
0x000000000040064f <+41>: mov DWORD PTR [rax],0x656e6f
0x0000000000400655 <+47>: lea rax,[rbp-0x10]
0x0000000000400659 <+51>: mov DWORD PTR [rax],0x6f7774
0x000000000040065f <+57>: lea rdx,[rbp-0x10]
0x0000000000400663 <+61>: lea rax,[rbp-0x10]
0x0000000000400667 <+65>: mov rsi,rax
0x000000000040066a <+68>: mov edi,0x4007e8
0x000000000040066f <+73>: mov eax,0x0
0x0000000000400674 <+78>: call 0x400500 <printf@plt>
0x0000000000400679 <+83>: lea rdx,[rbp-0x20]
0x000000000040067d <+87>: lea rax,[rbp-0x20]
0x0000000000400681 <+91>: mov rsi,rax
Which are this weird memory numbers???
The are not supposed to start with 0xbf ?
Ok, so after this I try to continue, I set the breakpoint, and when I try to red the memory with:
x/200xw $esp
returns me:
0xffffffffffffdc00: Cannot access memory at address 0xffffffffffffdc00
Please someone help me.