AbstractA command injection vulnerability was found in WebsenseApplianceManager that allows an attacker toexecute arbitrary code on the appliance. This issue can be combined withother vulnerabilities, like Cross-SiteScripting,toperform a remote unauthenticated attacks tocompromise the appliance.
Tested versions
This issue was discovered on WebsenseTriton v7.8.3 and Websense appliance modules V-Series v7.7.Other versions may be affected as well.
FixWebsense released hotfix 02forWebsenseTriton v7.8.4 in which this issue is fixed. More information about this hotfix can be found at the following location:
http://www.websense.com/support/article/kbarticle/v7-8-4-About-Hotfix-02-for-Web-Security-SolutionsThis issue is resolved in TRITONAPXVersion8.0.More information about the fixed can be found at the following location:
http://www.websense.com/support/article/kbarticle/Vulnerabilities-resolved-in-TRITON-APX-Version-8-0IntroductionWebsenseDataSecuritySuite contains three modules -DataSecurityGateway,DataDiscover, and DataEndpoint- that can help manage the risk of losing your data tomalicious users or accidental misuse.
TheWebsenseApplianceManagerGUI has a web-based 'command line utility' that providesthe ability toexecute various network debugging commands, which can be run on any module;ApplianceController,ContentGateway,WebSecurity,NetworkAgent,EmailSecurityGateway. This command line utility is affected by command injection that allows an attacker toexecute arbitrary code on the appliance. This issue can be combined withother vulnerabilities, like Cross-SiteScripting,toperform a remote unauthenticated attacks tocompromise the appliance.
DetailsTheCommandLineServletJavaServlet is responsible for enforcing limitations on the type of network debugging commands users are allowed torun using the GUI. An attacker is able tobypass these limitations by breaking out of any network diagnostics command that requiresa second parameter (in this example Destination).This allows the attacker toinject arbitrary system commands. For example, the pipe character (|) is used toredirect the output from one process into the input of another, enabling multiple commands tobe chained together. An attacker can leverage this behavior toexecute any available system command (such as adduser or nc tostart a reverse shell).The output is returned tothe user, the commands are executed withelevated privileges (root).With a little help of social engineering (like sending a link via email/chat), an attacker may trick authenticated users toexecute arbitrary commands on behalf of the attacker. A more effective attack would be toabuse other Websense vulnerabilities like Cross-SiteScripting.
The following proof of concept will return the contents of /etc/shadow on affected appliances:
https://host:9447/appmng/servlet/CommandLineServlet?type=exec&uuid=asdfasdf&module=na1&command=ping&Destination=127.0.0.1'|cat%20/etc/shadow'
Other attack scenarios are also possible, like creating a backdoor account on the appliance.