Rapid7 Vulnerability & Exploit Database

D-Link Devices HNAP SOAPAction-Header Command Execution

Back to Search

D-Link Devices HNAP SOAPAction-Header Command Execution



Different D-Link Routers are vulnerable to OS command injection in the HNAP SOAP interface. Since it is a blind OS command injection vulnerability, there is no output for the executed command. This module has been tested on a DIR-645 device. The following devices are also reported as affected: DAP-1522 revB, DAP-1650 revB, DIR-880L, DIR-865L, DIR-860L revA, DIR-860L revB DIR-815 revB, DIR-300 revB, DIR-600 revB, DIR-645, TEW-751DR, TEW-733GR


  • Samuel Huntley
  • Craig Heffner
  • Michael Messner <devnull@s3cur1ty.de>




Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/dlink_hnap_header_exec_noauth
msf exploit(dlink_hnap_header_exec_noauth) > show targets
msf exploit(dlink_hnap_header_exec_noauth) > set TARGET < target-id >
msf exploit(dlink_hnap_header_exec_noauth) > show options
    ...show and set options...
msf exploit(dlink_hnap_header_exec_noauth) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security