Vulnerabilities > CVE-2016-6563 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Dlink products

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
dlink
CWE-119
critical
exploit available
metasploit

Summary

Processing malformed SOAP messages when performing the HNAP Login action causes a buffer overflow in the stack in some D-Link DIR routers. The vulnerable XML fields within the SOAP body are: Action, Username, LoginPassword, and Captcha. The following products are affected: DIR-823, DIR-822, DIR-818L(W), DIR-895L, DIR-890L, DIR-885L, DIR-880L, DIR-868L, and DIR-850L.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

descriptionDlink DIR Routers - Unauthenticated HNAP Login Stack Buffer Overflow (Metasploit). CVE-2016-6563. Remote exploit for Multiple platform. Tags: Metasploit Fram...
fileexploits/multiple/remote/40805.rb
idEDB-ID:40805
last seen2016-11-21
modified2016-11-21
platformmultiple
port80
published2016-11-21
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/40805/
titleDlink DIR Routers - Unauthenticated HNAP Login Stack Buffer Overflow (Metasploit)
typeremote

Metasploit

descriptionSeveral Dlink routers contain a pre-authentication stack buffer overflow vulnerability, which is exposed on the LAN interface on port 80. This vulnerability affects the HNAP SOAP protocol, which accepts arbitrarily long strings into certain XML parameters and then copies them into the stack. This exploit has been tested on the real devices DIR-818LW and 868L (rev. B), and it was tested using emulation on the DIR-822, 823, 880, 885, 890 and 895. Others might be affected, and this vulnerability is present in both MIPS and ARM devices. The MIPS devices are powered by Lextra RLX processors, which are crippled MIPS cores lacking a few load and store instructions. Because of this the payloads have to be sent unencoded, which can cause them to fail, although the bind shell seems to work well. For the ARM devices, the inline reverse tcp seems to work best. Check the reference links to see the vulnerable firmware versions.
idMSF:EXPLOIT/LINUX/HTTP/DLINK_HNAP_LOGIN_BOF
last seen2020-06-10
modified2018-09-15
published2016-11-07
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/dlink_hnap_login_bof.rb
titleDlink DIR Routers Unauthenticated HNAP Login Stack Buffer Overflow

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/139836/dlink_hnap_login_bof.rb.txt
idPACKETSTORM:139836
last seen2016-12-05
published2016-11-21
reporterPedro Ribeiro
sourcehttps://packetstormsecurity.com/files/139836/Dlink-DIR-Routers-Unauthenticated-HNAP-Login-Stack-Buffer-Overflow.html
titleDlink DIR Routers Unauthenticated HNAP Login Stack Buffer Overflow