Core Security Technologies - CoreLabs Advisory http://corelabs.coresecurity.com/ Landesk OS command injection 1. *Advisory Information* Title: Landesk OS command injection Advisory Id: CORE-2010-1018 Advisory URL: [http://www.coresecurity.com/content/landesk-os-command-injection-vulnerability] Date published: 2010-11-10 Date of last update: 2010-11-10 Vendors contacted: LANDesk Release mode: Coordinated release 2. *Vulnerability Information* Class: OS command injection [CWE-78] Impact: Code execution Remotely Exploitable: Yes (client-side) Locally Exploitable: No CVE Name: CVE-2010-2892 Bugtraq ID: N/A 3. *Vulnerability Description* The LANDesk division of Avocent Corporation [1] provides systems management, security management, service desk, asset management, and process management solutions to organizations. The company's software is used worldwide. A security vulnerability was discovered in LANDesk Management Suite: The Landesk web application does not sufficiently verify if a well-formed request was provided by the user who submitted the request. Using this information an external remote attacker can run arbitrary code using the 'gsbadmin' user (that is the user running the web-server). In order to be able to successfully make the attack, the administrator must be logged in to the appliance with the browser that the attacker uses to make the attack (for instance, exploiting a XSS in a different tab in the browser). 4. *Vulnerable packages* . LANDesk Management Gateway 4.0 GSBWEB v1.61s . LANDesk Management Gateway 4.2 GSBWEB v1.61 . Older versions are probably affected too 5. *Non-vulnerable packages* . LANDesk Management Gateway 4.0 GSBWEB v1.62 . LANDesk Management Gateway 4.2 GSBWEB v1.62 6. *Vendor Information, Solutions and Workarounds* Workaround for non-patched versions: 1. Launch a SSH console session, or log onto the LDMG console and start a terminal session. 2. Issue the following command: 'mv /usr/LANDesk/broker/webroot/gsb/drivers.php ~' For additional information about this issue, check the LANDesk public announcement [http://community.landesk.com/support/docs/DOC-21767]. 7. *Credits* This vulnerability was discovered and researched by Aureliano Calvo [http://corelabs.coresecurity.com/index.php?module=Wiki&action=view&type=researcher&name=Aureliano_Calvo] from Core Security Technologies. 8. *Technical Description / Proof of Concept Code* The Landesk web application does not sufficiently verify if a well-formed request was provided by the user who submitted the request. Using this information an external remote attacker can run arbitrary code using the 'gsbadmin' user (that is the user running the web-server), but the 'gsbadmin' user has sudo privileges. Looking at '/etc/sudoers', you can see that the attacker can also take down the firewall (injecting: '; sudo /subin/firewall stop' into 'DRIVES') and load arbitrary kernel modules (injecting '; sudo /subin/modprobe /tmp/a_module'), effectively taking complete control of the server. In order to be able to successfully make the attack, the administrator must be logged in to the appliance with the browser that the attacker uses to make the attack (for instance, exploiting a XSS in a different tab in the browser). 8.1. *Proof of Concept* This PoC is an HTML form (that can be hosted on any web site) that makes a request to the '[server]'. The parameter 'DRIVES' contains the actual injection. In the example, we generate the file '/tmp/ATTACKED' to show that arbitrary shell commands can be executed in the server. /-----