Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash) - Nessus

Critical   Plugin ID: 117601

This page contains detailed information about the Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 117601
Name: Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash)
Filename: activemq_5_14_0.nasl
Vulnerability Published: 2016-06-01
This Plugin Published: 2018-09-19
Last Modification Time: 2022-04-11
Plugin Version: 1.5
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: activemq_web_console_detect.nasl
Required KB Items [?]: installed_sw/ActiveMQ, Settings/ParanoidReport

Vulnerability Information


Severity: Critical
Vulnerability Published: 2016-06-01
Patch Published: 2016-08-08
CVE [?]: CVE-2016-3088
CPE [?]: cpe:/a:apache:activemq

Synopsis

The remote host is running a web application that is affected by a remote code execution vulnerability.

Description

The version of Apache ActiveMQ running on the remote host is 5.x prior to 5.14.0. It is, therefore, affected by a remote code execution vulnerability. The Fileserver web application allows remote attackers to upload and execute arbitrary files.

Solution

Upgrade to Apache ActiveMQ version 5.14.0 or later.

Public Exploits


Target Network Port(s): 8161
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash) vulnerability:

  1. Metasploit: exploit/multi/http/apache_activemq_upload_jsp
    [ActiveMQ web shell upload]
  2. Exploit-DB: exploits/java/remote/42283.rb
    [EDB-42283: ActiveMQ < 5.14.0 - Web Shell Upload (Metasploit)]
  3. GitHub: https://github.com/0ps/pocassistdb
    [CVE-2016-3088]
  4. GitHub: https://github.com/1120362990/vulnerability-list
    [CVE-2016-3088]
  5. GitHub: https://github.com/EvilAnne/Python_Learn
    [CVE-2016-3088]
  6. GitHub: https://github.com/ExpLife0011/awesome-windows-kernel-security-development
    [CVE-2016-3088]
  7. GitHub: https://github.com/Kaizhe/attacker
    [CVE-2016-3088]
  8. GitHub: https://github.com/Ma1Dong/ActiveMQ_putshell-CVE-2016-3088
    [CVE-2016-3088: ActiveMQ_putshell直接获取webshell]
  9. GitHub: https://github.com/MrRobotTnT/CVE-2016-3088
    [CVE-2016-3088]
  10. GitHub: https://github.com/NCSU-DANCE-Research-Group/CDL
    [CVE-2016-3088]
  11. GitHub: https://github.com/Ondrik8/exploit
    [CVE-2016-3088]
  12. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2016-3088]
  13. GitHub: https://github.com/VVzv/CVE-2016-3088
    [CVE-2016-3088]
  14. GitHub: https://github.com/YutuSec/ActiveMQ_Crack
    [CVE-2016-3088: ActiveMQ系列漏洞探测利用工具,包括ActiveMQ 默认口令漏洞及ActiveMQ任意文件写入漏洞(CVE-2016-3088),支持批量探测利用。]
  15. GitHub: https://github.com/bigblackhat/oFx
    [CVE-2016-3088]
  16. GitHub: https://github.com/cl4ym0re/CVE-2016-3088
    [CVE-2016-3088: Apache ActiveMQ PUT RCE Scan]
  17. GitHub: https://github.com/coffeehb/Some-PoC-oR-ExP/tree/master/ActiveMQExP
    [CVE-2016-3088]
  18. GitHub: https://github.com/cyberaguiar/CVE-2016-3088
    [CVE-2016-3088: Apache ActiveMQ Remote Code Execution Exploit]
  19. GitHub: https://github.com/gobysec/Goby
    [CVE-2016-3088]
  20. GitHub: https://github.com/gsheller/ActiveMQ_putshell-CVE-2016-3088
    [CVE-2016-3088: ActiveMQ_putshell直接获取webshell]
  21. GitHub: https://github.com/jweny/pocassistdb
    [CVE-2016-3088]
  22. GitHub: https://github.com/pravinsrc/NOTES-windows-kernel-links
    [CVE-2016-3088]
  23. GitHub: https://github.com/pudiding/CVE-2016-3088
    [CVE-2016-3088]
  24. GitHub: https://github.com/vonderchild/CVE-2016-3088
    [CVE-2016-3088]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2016-3088
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


This is the activemq_5_14_0.nasl nessus plugin source code. This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(117601);
  script_version("1.5");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2016-3088");
  script_bugtraq_id(90827);
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/08/10");

  script_name(english:"Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash)");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is running a web application that is affected by a
remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of Apache ActiveMQ running on the remote host is 5.x prior
to 5.14.0. It is, therefore, affected by a remote code execution 
vulnerability. The Fileserver web application allows remote attackers
to upload and execute arbitrary files.");
  # http://activemq.apache.org/security-advisories.data/CVE-2016-3088-announcement.txt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?2581a08b");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Apache ActiveMQ version 5.14.0 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-3088");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'ActiveMQ web shell upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2016/06/01");
  script_set_attribute(attribute:"patch_publication_date", value:"2016/08/08");
  script_set_attribute(attribute:"plugin_publication_date", value:"2018/09/19");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:activemq");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("activemq_web_console_detect.nasl");
  script_require_keys("installed_sw/ActiveMQ", "Settings/ParanoidReport");
  script_require_ports("Services/www", 8161);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("install_func.inc");
include("vcf.inc");

if (report_paranoia < 2) audit(AUDIT_PARANOID);

app_name = 'ActiveMQ';
port = get_http_port(default:8161);
app = vcf::get_app_info(app:app_name, port:port, webapp:TRUE);

constraints = [{"min_version" : "5.0", "fixed_version" : "5.14.0"}];

vcf::check_version_and_report(app_info:app, constraints:constraints, severity:SECURITY_HOLE, strict:FALSE);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/activemq_5_14_0.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\activemq_5_14_0.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/activemq_5_14_0.nasl

Go back to menu.

How to Run


Here is how to run the Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Apache ActiveMQ 5.x < 5.14.0 ActiveMQ Fileserver web application remote code execution (Xbash) plugin ID 117601.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl activemq_5_14_0.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a activemq_5_14_0.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - activemq_5_14_0.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state activemq_5_14_0.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 81374 - Apache ActiveMQ 5.x < 5.10.1 / 5.11.0 Multiple Vulnerabilities
  • 87410 - Apache ActiveMQ 5.x < 5.13.0 Java Object Deserialization RCE
  • 117482 - Apache ActiveMQ 5.14.x - 5.15.2 OpenWire Information Disclosure
  • 112192 - Apache ActiveMQ 5.x < 5.15.5 Multiple Vulnerabilities
  • 45623 - ActiveMQ Double Slash Request Source Code Disclosure
  • 85580 - Apache ActiveMQ Blob Message Directory Traversal
  • 147182 - Debian DLA-2583-1 : activemq security update
  • 90071 - Debian DSA-3524-1 : activemq - security update
  • 86265 - Fedora 23 : activemq-5.6.0-12.fc23 (2015-5622085024)
  • 89280 - Fedora 22 : activemq-5.6.0-12.fc22 (2015-701a1e1a5f)
  • 89297 - Fedora 22 : activemq-5.6.0-14.fc22 (2015-7ca4368b0c)
  • 89455 - Fedora 23 : activemq-5.6.0-14.fc23 (2015-eefc5a6762)
  • 90235 - FreeBSD : activemq -- Unsafe deserialization (a258604d-f2aa-11e5-b4a9-ac220bdcec59)
  • 84960 - Puppet Enterprise 3.x < 3.8.1 Multiple Vulnerabilities (Logjam)
  • 119346 - RHEL 6 : activemq (RHSA-2014:0245)
  • 119347 - RHEL 6 : activemq (RHSA-2014:0254)
  • 117615 - Apache Hadoop YARN ResourceManager Unauthenticated RCE (Remote) (Xbash)
  • 77829 - GNU Bash Environment Variable Handling Code Injection (Shellshock)
  • 82581 - GNU Bash Incomplete Fix Remote Code Injection (Shellshock)
  • 78828 - Cisco Prime Security Manager GNU Bash Environment Variable Handling Command Injection (cisco-sa-20140926-bash) (Shellshock)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file activemq_5_14_0.nasl version 1.5. For more plugins, visit the Nessus Plugin Library.

Go back to menu.