CVE-2023-24762

9.8 CRITICAL

📋 TL;DR

This CVE describes an OS command injection vulnerability in D-Link DIR-867 routers that allows attackers to execute arbitrary commands via a crafted LocalIPAddress parameter in the SetVirtualServerSettings HNAP1 request. Attackers can gain full control of affected routers, potentially compromising network security. All users of D-Link DIR-867 routers with vulnerable firmware are affected.

💻 Affected Systems

Products:
  • D-Link DIR-867
Versions: DIR_867_FW1.30B07 and earlier
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects routers with HNAP1 protocol enabled (default). Remote exploitation requires access to router's web interface or HNAP1 service.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete router compromise leading to network takeover, credential theft, malware deployment, and use as pivot point for attacking internal network devices.

🟠

Likely Case

Router compromise allowing traffic interception, DNS manipulation, credential harvesting, and persistent backdoor installation.

🟢

If Mitigated

Limited impact if router is isolated, has restricted administrative access, and network segmentation prevents lateral movement.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authentication to router's web interface or HNAP1 service. Public proof-of-concept demonstrates command injection via crafted HTTP POST request.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check D-Link website for latest firmware

Vendor Advisory: https://www.dlink.com/en/security-bulletin/

Restart Required: Yes

Instructions:

1. Log into router web interface. 2. Navigate to Firmware Update section. 3. Download latest firmware from D-Link support site. 4. Upload and apply firmware update. 5. Reboot router after update completes.

🔧 Temporary Workarounds

Disable HNAP1 Protocol

all

Disable HNAP1 service to prevent exploitation via this vector

Check router web interface for HNAP1/UPnP settings and disable

Restrict Administrative Access

all

Limit router management interface access to trusted IPs only

Configure firewall rules to restrict access to router management ports (80, 443, 8080)

🧯 If You Can't Patch

  • Isolate router on separate VLAN with strict firewall rules
  • Implement network monitoring for suspicious HNAP1 traffic patterns

🔍 How to Verify

Check if Vulnerable:

Check firmware version in router web interface under System Status or Firmware Update section

Check Version:

Check router web interface or use: curl -s http://router-ip/HNAP1/ | grep -i version

Verify Fix Applied:

Verify firmware version has been updated to latest version from D-Link

📡 Detection & Monitoring

Log Indicators:

  • Unusual HNAP1 POST requests to SetVirtualServerSettings
  • Suspicious command execution in router logs
  • Multiple failed authentication attempts followed by successful login

Network Indicators:

  • Unusual outbound connections from router
  • DNS queries to suspicious domains
  • Traffic patterns indicating command and control communication

SIEM Query:

source="router.log" AND ("SetVirtualServerSettings" OR "HNAP1" AND POST) AND (cmd.exe OR /bin/sh OR wget OR curl)

🔗 References

📤 Share & Export