A high severity remote code execution (RCE) vulnerability affecting the Apache Struts 2 framework has been exploited in the wild, warns Cisco’s Talos intelligence and research group.
The vulnerability, tracked as CVE-2017-5638, can be triggered when performing file uploads with the Jakarta Multipart parser. The security hole, caused due to improper handling of the Content-Type header, allows a remote, unauthenticated attacker to execute OS commands on the targeted system.
The flaw affects Struts 2.3.5 through 2.3.31 and Struts 2.5 through 2.5.10, and it was addressed on March 6 with the release of versions 2.3.32 and 18.104.22.168.
Cisco Talos spotted the first exploitation attempts on March 7, shortly after someone published a proof-of-concept (PoC) exploit. According to researchers, a majority of the exploitation attempts leverage the publicly available PoC code.
Some of the attacks involve the execution of a simple Linux command, likely in an effort to determine if the targeted system is vulnerable. Researchers have observed the use of commands such as “whoami” and “ifconfig,” which allow attackers to see what user is running the service and gather information on the network configuration.
In more sophisticated attacks, threat actors stopped the Linux firewall, downloaded a malicious payload from a web server, and executed that payload. Cisco said the payloads included IRC bouncers, DoS bots, and the BillGates malware.
In other attacks, hackers also attempted to make the malware persistent by copying it to a benign folder from where it would get executed on system boot. These attacks also involved disabling the firewall service on boot.
“It is likely that the exploitation will continue in a wide scale since it is relatively trivial to exploit and there are clearly systems that are potentially vulnerable,” said Cisco’s Nick Biasini.
Biasini said many of the compromised websites have already taken steps to clean the infection. Users are advised to update their Apache Struts installations as soon as possible.