Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution - Nessus

Critical   Plugin ID: 72342

This page contains detailed information about the Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 72342
Name: Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution
Filename: synology_dsm_4_2_3243.nasl
Vulnerability Published: 2014-01-07
This Plugin Published: 2014-02-05
Last Modification Time: 2021-01-19
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: synology_diskstation_manager_detect.nbin
Required KB Items [?]: www/synology_dsm

Vulnerability Information


Severity: Critical
Vulnerability Published: 2014-01-07
Patch Published: 2013-12-19
CVE [?]: CVE-2013-6955
CPE [?]: cpe:/a:synology:diskstation_manager

Synopsis

The remote Synology DiskStation Manager is affected by a remote code execution vulnerability.

Description

According to its version number, the Synology DiskStation Manager installed on the remote host is affected by a remote code execution vulnerability. The issue exists due to improper validation of values submitted in the 'X-TMP-FILE' header field along with the 'X-TYPE-NAME: SLICEUPLOAD' header field to the 'imageSelector.cgi' script.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to 4.0-2259 / 4.2-3243 / 4.3-3810 Update 1 or later, or contact the vendor.

Public Exploits


Target Network Port(s): 5000, 5001
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 Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution vulnerability:

  1. Metasploit: exploit/linux/http/synology_dsm_sliceupload_exec_noauth
    [Synology DiskStation Manager SLICEUPLOAD Remote Command Execution]
  2. Exploit-DB: exploits/unix/remote/30470.rb
    [EDB-30470: Synology DiskStation Manager - SLICEUPLOAD Remote Command Execution (Metasploit)]

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:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)

Go back to menu.

Plugin Source


This is the synology_dsm_4_2_3243.nasl nessus plugin source code. This script is Copyright (C) 2014-2021 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(72342);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_cve_id("CVE-2013-6955");
  script_bugtraq_id(64516);
  script_xref(name:"EDB-ID", value:"30470");
  script_xref(name:"CERT", value:"615910");

  script_name(english:"Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution");
  script_summary(english:"Checks the version of Synology DiskStation Manager");

  script_set_attribute(attribute:"synopsis", value:
"The remote Synology DiskStation Manager is affected by a remote code
execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"According to its version number, the Synology DiskStation Manager
installed on the remote host is affected by a remote code execution
vulnerability. The issue exists due to improper validation of values
submitted in the 'X-TMP-FILE' header field along with the
'X-TYPE-NAME: SLICEUPLOAD' header field to the 'imageSelector.cgi'
script.

Note that Nessus has not tested for this issue but has instead relied
only on the application's self-reported version number.");
  script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/531602/30/0/threaded");
  script_set_attribute(attribute:"solution", value:
"Upgrade to 4.0-2259 / 4.2-3243 / 4.3-3810 Update 1 or later, or
contact the vendor.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  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:'Synology DiskStation Manager SLICEUPLOAD Remote Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/01/07");
  script_set_attribute(attribute:"patch_publication_date", value:"2013/12/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/02/05");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:synology:diskstation_manager");
  script_end_attributes();

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

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

  script_dependencies("synology_diskstation_manager_detect.nbin");
  script_require_keys("www/synology_dsm");
  script_require_ports("Services/www", 5000, 5001);

  exit(0);
}

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

port = get_http_port(default:5000, embedded:TRUE);

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

app = "Synology DiskStation Manager (DSM)";
dir = install["dir"];
install_loc = build_url(port:port, qs:dir + "/");

version = install["ver"];
if (version == UNKNOWN_VER) audit(AUDIT_UNKNOWN_WEB_APP_VER, app, install_loc);

ver = split(version, sep:".", keep:FALSE);
for (i=0; i<max_index(ver); i++)
  ver[i] = int(ver[i]);

if (
  (ver[0] < 4) ||
  (ver[0] == 4 && ver[1] == 0 && ver[2] < 2259) ||
  (ver[0] == 4 && ver[1] == 1) ||
  (ver[0] == 4 && ver[1] == 2 && ver[2] < 3243 )
)
{
  if (report_verbosity > 0)
  {
    report =
      '\n  URL               : ' + install_loc +
      '\n  Installed version : ' + version +
      '\n  Fixed version     : 4.0-2259 / 4.2-3243 or later\n';
    security_hole(port:port, extra:report);
  }
  else security_hole(port);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_loc, version);

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

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

Go back to menu.

How to Run


Here is how to run the Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code 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 Synology DiskStation Manager 4.0-x < 4.0-2259 / 4.1-x / 4.2-x < 4.2-3243 SLICEUPLOAD Function Remote Code Execution plugin ID 72342.
  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 synology_dsm_4_2_3243.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 72345 - Synology DiskStation Manager 4.3-x < 4.3-3810 Update 1 Multiple Vulnerabilities
  • 72343 - Synology DiskStation Manager < 4.3-3776 Update 2 Multiple Vulnerabilities
  • 72346 - Synology DiskStation Manager < 4.3-3810 Update 3 Multiple FileBrowser Component Directory Traversal Vulnerabilities
  • 72347 - Synology DiskStation Manager uistrings.cgi lang Parameter Directory Traversal
  • 72344 - Synology DiskStation Manager < 4.3-3776 Update 3 info.cgi Multiple Parameters XSS

Version


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

Go back to menu.