D-LINK DIR-3040 WiFi Smart Mesh information disclosure vulnerability
The D-LINK DIR-3040 router's MQTT service uses hard-coded credentials, allowing any attacker on the network to subscribe and decrypt mesh configuration traffic that includes the root password. An attacker could then log in to the web admin console or telnet service, and also publish commands to reboot or kick devices off the mesh.
Originally disclosed on Cisco Talos
An information disclosure vulnerability exists in the WiFi Smart Mesh functionality of D-LINK DIR-3040 1.13B03. A specially-crafted network request can lead to command execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the MQTT service uses hard-coded credentials stored in a shared library, and the encryption key for sensitive payloads is derived from the sender's MAC address, which is included in the payload itself.
Impact
An attacker could obtain the root password and log in to the web admin console or telnet service, and could also publish payloads to reboot or kick devices off the mesh network.
What the attacker needed
Network access to the MQTT service; hard-coded credentials from the library
How it was found
- Connect to the MQTT service using the hard-coded credentials found in the shared library.
- Subscribe to the 'master' topic to receive mesh configuration payloads.
- Extract the publisher's MAC address from the payload at offsets 0x6 to 0xB.
- Generate the AES key using the MAC address and the format string with 'wrsdd' inserted between bytes.
- Decrypt the payload to obtain the root password and other configuration data.
- Use the root password (optionally with '@twsz2018' appended) to log in to the web console or telnet service.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The router runs a small message service (MQTT) that lets mesh devices talk to each other. That service is protected by a username and password that are baked into the router's software, so anyone who finds them can listen in. The messages include the router's main administrator password, so an attacker can read it and take control of the device.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.