Synopsis
A command injection vulnerability exists in the login module of D-Link DNS-320 ShareCenter firmware version 2.05.B10 and below, specifically in the hidden SSL Login feature where the 'port' parameter is not properly sanitised. An unauthenticated remote attacker can exploit this to execute arbitrary commands with root privileges.
blog.cystack.net
Published on blog.cystack.net
Vendor's announcement | Link |
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The 'port' parameter passed to the login handler is used in a command without proper sanitisation, allowing command injection.
Impact
An unauthenticated remote attacker could execute arbitrary commands with root permission on the device.
What the attacker needed
Device running firmware <= 2.05.B10; Network access to the device's web interface
The fix
The vulnerability was fixed by type casting the 'port' parameter to Integer.
How it was found
- Download the firmware for D-Link DNS-320 version 2.05.B10.
- Extract the firmware using binwalk and firmware-mod-kit.
- Analyse the binary /cgi/login_mgr.cgi, focusing on function cgiMain().
- Identify that when cmd equals 'login', sub_9958 is called, which calls sub_9924 with the 'port' parameter.
- Observe that sub_9924 uses the 'port' parameter in a command without sanitisation.
- Exploit by poisoning the 'port' parameter to execute arbitrary commands.
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 write-up has not been written yet. The Original tab links to the source.
This report describes a security flaw in a network storage device. The device has a login page with a hidden feature that takes a 'port' number, but it doesn't check what the user types. An attacker can type special characters that trick the device into running harmful commands, giving them full control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.