Advantech R-SeeNet ping.php OS Command Injection vulnerability
The ping.php script in Advantech R-SeeNet takes the hostname parameter from an HTTP request without sanitisation and passes it directly to a shell command, allowing an attacker to execute arbitrary OS commands. An unauthenticated attacker can send a crafted request to run commands on the server.
An OS Command Injection vulnerability exists in the ping.php script functionality of Advantech R-SeeNet v 2.4.12 (20.10.2020). A specially crafted HTTP request can lead to arbitrary OS 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
The hostname parameter is not sanitised before being used in a popen call that executes a shell command.
Impact
An unauthenticated attacker can execute arbitrary OS commands on the server, leading to full compromise.
What the attacker needed
No authentication required; network access to the web interface
How it was found
- Send an HTTP GET request to /php/ping.php with a hostname parameter containing shell metacharacters and a command.
- The server executes the ping command with the injected command and returns the output in the response.
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.
This is a command injection bug. The web page that runs 'ping' takes a hostname from the user and puts it straight into a system command without checking it. An attacker can add extra shell commands after the hostname, so the server runs those commands too, letting the attacker take control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.