Apache Struts 2 CVE-2017-9805 Remote Code Execution

By

A critical vulnerability CVE-2017-9805 (S2-052) on Apache Struts 2 has been reported by security researchers form lgtm.com. This vulnerability is caused by the XStreamHandler in by the REST Plugin. During the process of deserializing the XML formatted packet, XStream failed to filter the file types. An attacker can send a certain crafted XML file to the target server and execute arbitrary code with the privelege of the current service.

The PoC of this vulnerability is already in the wild. By sending the following payload as application/xml, the calc.exe will be executed on the target host.

0 …[truncated]…/Applications/Calculator.app/Contents/MacOS/Calculator…[truncated]…

In this PoC, the “map” class contributed the dangerous methods.

From the patch code on Github (http://bit.ly/2eRD33v), white lists have been applied to the xml data, this is to prevent malicious class and methods been brought in during the processing.

And the filter was added before calling the XStream.fromXML method.

SonicWALL customers are protected against this threat via the following signature:

  • IPS 12968 Apache Struts 2 Insecure Deserialization
Security News
The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.