Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Apache ActiveMQ Vulnerability Leads to Stealthy Godzilla Webshell

Trustwave has observed a surge in attacks exploiting vulnerabilities in Apache ActiveMQ hosts. In certain cases, these host malicious Java Server Pages (JSP) web shells.

The web shells are concealed within an unknown binary format and are designed to evade security and signature-based scanners. Notably, despite the binary's unknown file format, ActiveMQ's JSP engine continues to compile and execute the web shell.


ActiveMQ Vulnerability

Over the past few weeks, there has been a notable increase in malicious activity targeting a recent critical vulnerability in the Apache ActiveMQ software. This vulnerability is specifically linked to unsafe deserialization practices within the OpenWire protocol and has been designated as CVE-2023-46604. Exploiting this vulnerability enables threat actors to potentially gain unauthorized access to a target system by executing arbitrary shell commands. Since a PoC of the exploit was made publicly available in October 2023, threat actors have been using it to deploy crypto-miners, rootkits, ransomware, and remote access trojans.


Dropped Payload

Recently, our Global Threat Operations team identified a suspicious JSP file within a client’s server hosting a vulnerable instance of Apache ActiveMQ.


Figure 1 The suspicious file found by Trustwave Global Threat Operations team. Examining the .JSP file reveals that the malicious code is encapsulated within a binary structure of an unidentified file format, marked by the "FLR" magic header.


The malicious file was planted in the “admin” folder within the ActiveMQ installation directory. This folder contains the server scripts for the ActiveMQ administrative and web management console.



Figure 2 The malicious file was planted in the same directory of the Apache ActiveMQ admin page.


Upon further analysis, Trustwave SpiderLabs determined that this JSP code came from an open-source web shell known as the Godzilla Webshell. What makes these malicious files particularly noteworthy is how the JSP code appears to be concealed within an unknown type of binary. This method has the potential to circumvent security measures, evading detection by security endpoints during scanning.

Interestingly, the Jetty JSP engine which is the integrated web server in Apache ActiveMQ, actually parsed, compiled and executed the embedded Java code that was encapsulated in the unknown binary. Further examination of the Java code generated by Jetty showed that the web shell code was converted into Java code and therefore was executed.



Figure 3. Illustrates the Java code produced by the JSP engine, which is generated upon accessing the JSP file.


The unidentified data in the binary is then sent to the client's browser using “out.write()”, resulting in the display of unintelligible characters when accessing the web shell from a browser.



Figure 4. The unidentifiable data in the binary appears as an unintelligible string when accessing the JSP file in the browser. However, the web shell code is now absent, having been transformed into Java code and executed on the server side.


Godzilla Webshell

After a successful exploitation and deployment of the JSP payload, the threat actor can connect to the web shell through the Godzilla management user interface, gaining complete control over the target system.


Figure 5 Godzilla's management user interface available to the threat actor


Once deployed in the target websever, the Godzilla Web Shell features a wide range of functionalities including but not limited to:

  • Viewing network details
  • Conducting port scans
  • Executing Mimikatz commands
  • Running Meterpreter commands
  • Executing shell commands
  • Remotely managing SQL databases
  • Injecting shellcode into processes
  • Handling file management tasks


Affected Apache ActiveMQ Versions

The following Apache ActiveMQ versions are affected. Users are recommended to upgrade both brokers and clients to version 5.15.16, 5.16.7, 5.17.6, or 5.18.3 which fixes this the vulnerability. 

- Apache ActiveMQ 5.18.0 before 5.18.3

- Apache ActiveMQ 5.17.0 before 5.17.6

- Apache ActiveMQ 5.16.0 before 5.16.7

- Apache ActiveMQ before 5.15.16

- Apache ActiveMQ Legacy OpenWire Module 5.18.0 before 5.18.3

- Apache ActiveMQ Legacy OpenWire Module 5.17.0 before 5.17.6

- Apache ActiveMQ Legacy OpenWire Module 5.16.0 before 5.16.7

- Apache ActiveMQ Legacy OpenWire Module 5.8.0 before 5.15.16




  • 5e6993bba5e8e72a4899d6ddfb167972
  • f257b2669b15ca2792625d0bce00d907
  • 5b4871092491a51477a13af5030c76b7



  • 233adf5d3c754ead3f304a4891d367884dd615d74d9983119546bebb346b7bf7
  • 5da5796d407a0099aa624b1ea73a877a5197b3b31529d94f2467dce19fe3a74a
  • f97c6c820694a059c7b0b2f3abe1f614b925dd4ab233d11472b062325ffb67be


Godzilla’s Default Protocol Header:

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2



YARA rule to detect Godzilla Webshell:

rule Godzilla_webshell {


     description = "Detects Godzilla Webshell JSP Code"


     $s1 = "String xc=" ascii wide

     $s2 = "String pass=" ascii wide

     $s3 = "String md5=md5(pass+xc)" ascii wide

     $s4 = "payload" ascii wide

     $s5 = "X(ClassLoader z)" ascii wide


     all of them


Latest SpiderLabs Blogs

Secure Access Service Edge: Another Multi-Tool for the SOC

Over the years, several security defense architectures have merged into a single solution. Endpoint detection tools can perform sophisticated detections and correlations that used to require a...

Read More

Search & Spoof: Abuse of Windows Search to Redirect to Malware

Trustwave SpiderLabs has detected a sophisticated malware campaign that leverages the Windows search functionality embedded in HTML code to deploy malware. We found the threat actors utilizing a...

Read More

The Sentinel’s Watch: Building a Security Reporting Framework

Imagine being on shift as the guard of a fortress. Your job is to identify threats as they approach the perimeter. The more methods you have for detecting those threats, the better your chances of...

Read More