FeDEX

"That's all for now. I hope I managed to prove that exploiting buffer overflows should be an art."


fedex@xps:~/hack_the_world$ gdb ./binary _

GNU gdb (Ubuntu 8.2-0ubuntu1~16.04.1) 8.2

For help, type "help".

gdb-peda$ r _

Starting program: /home/hack_the_world/binary

> Enter Secret Code: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Program received signal SIGSEGV, Segmentation fault.

[----------------------------------registers-----------------------------------]

RAX: 0x0

RBX: 0x0

RCX: 0x7f2f402a82c0 (<__write_nocancel+7>: cmp rax,0xfffffffffffff001)

RDX: 0x7f2f40577780 --> 0x0

RSI: 0x7fff3fbe72a0 ("Nice to meet you, ", 'A' , "!\n")

RDI: 0x1

RBP: 0x4141414141414141 ('AAAAAAAA')

RSP: 0x7fff3fbe9958 ('A' )

RIP: 0x4012dd (: ret)

R8 : 0x7f2f4076c700 (0x00007f2f4076c700)

R9 : 0x72 ('r')

R10: 0x5e ('^')

R11: 0x246

R12: 0x4010a0 (<_start>: endbr64)

R13: 0x7fff3fbe9a30 --> 0x1

R14: 0x0

R15: 0x0

EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)

[-------------------------------------code-------------------------------------]

0x4012d2 : call 0x401060

0x4012d7 : mov eax,0x0

0x4012dc : leave

=> 0x4012dd : ret

0x4012de: xchg ax,ax

0x4012e0 <__libc_csu_init>: endbr64

0x4012e4 <__libc_csu_init+4>: push r15

0x4012e6 <__libc_csu_init+6>: lea r15,[rip+0x2b13] # 0x403e00

[------------------------------------stack-------------------------------------]

0000| 0x7fff3fbe9958 ('A' repeats 54 times)

0008| 0x7fff3fbe9960 ('A' repeats 46 times)

0016| 0x7fff3fbe9968 ('A' repeats 38 times)

0024| 0x7fff3fbe9970 ('A' repeats 30 times)

0032| 0x7fff3fbe9978 ('A' repeats 22 times)

0040| 0x7fff3fbe9980 ('A' repeats 14 times)

0048| 0x7fff3fbe9988 --> 0xd500414141414141

0056| 0x7fff3fbe9990 --> 0x4010a0 (<_start>: endbr64)

[------------------------------------------------------------------------------]

Legend: code, data, rodata, value

Stopped reason: SIGSEGV

0x00000000004012dd in main ()

gdb-peda$ _