Foxit Reader Firefox Plugin URL File Name RCE - Nessus

High   Plugin ID: 64094

This page contains detailed information about the Foxit Reader Firefox Plugin URL File Name RCE Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 64094
Name: Foxit Reader Firefox Plugin URL File Name RCE
Filename: foxit_reader_firefox_plugin_stack_overflow.nasl
Vulnerability Published: 2013-01-07
This Plugin Published: 2013-01-25
Last Modification Time: 2018-08-08
Plugin Version: 1.8
Plugin Type: local
Plugin Family: Windows
Dependencies: foxit_reader_installed.nasl, mozilla_org_installed.nasl
Required KB Items [?]: installed_sw/Foxit Reader, installed_sw/Mozilla Firefox

Vulnerability Information


Severity: High
Vulnerability Published: 2013-01-07
Patch Published: 2013-01-17
CVE [?]: N/A
CPE [?]: cpe:/a:foxitsoftware:foxit_reader

Synopsis

A PDF viewer installed on the remote host is affected by a remote code execution vulnerability.

Description

According to its version, the Foxit Reader installed on the remote Windows host is affected by an boundary error related to the Firefox plugin (npFoxitReaderPlugin.dll) due to improper processing of user-supplied input when handing an overly long file name in a URL query string. An unauthenticated, remote attacker can exploit this, via a crafted URL, to trigger a stack-based buffer overflow, resulting in a denial of service or the execution of arbitrary code.

Solution

Upgrade to Foxit Reader version 5.4.5.0114, and install the latest Firefox Plugin via the internal update mechanism.

Public Exploits


Target Network Port(s): 139, 445
Target Asset(s): N/A
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 Foxit Reader Firefox Plugin URL File Name RCE vulnerability:

  1. Metasploit: exploit/windows/browser/foxit_reader_plugin_url_bof
    [Foxit Reader Plugin URL Processing Buffer Overflow]
  2. Exploit-DB: exploits/windows/dos/23944.php
    [EDB-23944: Foxit Reader 5.4.4.1128 Firefox Plugin - 'npFoxitReaderPlugin.dll' Stack Buffer Overflow (PoC)]
  3. Exploit-DB: exploits/windows/remote/24502.rb
    [EDB-24502: Foxit Reader Plugin - URL Processing Buffer Overflow (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:M/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:7.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.7 (High)

Go back to menu.

Plugin Source


This is the foxit_reader_firefox_plugin_stack_overflow.nasl nessus plugin source code. This script is Copyright (C) 2013-2018 Tenable Network Security, Inc.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(64094);
  script_version("1.8");
  script_cvs_date("Date: 2018/08/08 12:52:14");

  script_bugtraq_id(57174);
  script_xref(name:"EDB-ID", value:"23944");
  script_xref(name:"EDB-ID", value:"24502");

  script_name(english:"Foxit Reader Firefox Plugin URL File Name RCE");
  script_summary(english:"Checks the version of Foxit Reader and its Firefox plugin.");

  script_set_attribute(attribute:"synopsis", value:
"A PDF viewer installed on the remote host is affected by a remote
code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"According to its version, the Foxit Reader installed on the remote
Windows host is affected by an boundary error related to the Firefox
plugin (npFoxitReaderPlugin.dll) due to improper processing of
user-supplied input when handing an overly long file name in a URL
query string. An unauthenticated, remote attacker can exploit this,
via a crafted URL, to trigger a stack-based buffer overflow, resulting
in a denial of service or the execution of arbitrary code.");
  # https://web.archive.org/web/20130111032720/http://retrogod.altervista.org/9sg_foxit_overflow.htm
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?7497e804");
  script_set_attribute(attribute:"see_also", value:"https://www.foxitsoftware.com/support/security-bulletins.php");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Foxit Reader version 5.4.5.0114, and install the latest
Firefox Plugin via the internal update mechanism.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Foxit Reader Plugin URL Processing Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2013/01/07");
  script_set_attribute(attribute:"patch_publication_date", value:"2013/01/17");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/25");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:foxitsoftware:foxit_reader");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

  script_copyright(english:"This script is Copyright (C) 2013-2018 Tenable Network Security, Inc.");

  script_dependencies("foxit_reader_installed.nasl", "mozilla_org_installed.nasl");
  script_require_keys("installed_sw/Mozilla Firefox", "installed_sw/Foxit Reader");
  script_require_ports(139, 445);

  exit(0);
}

include("audit.inc");
include("install_func.inc");
include("misc_func.inc");
include("smb_func.inc");
include("smb_hotfixes.inc");
include("smb_reg_query.inc");
include("smb_hotfixes_fcheck.inc");

ff = "Mozilla Firefox";
fr = "Foxit Reader";

get_install_count(app_name:ff, exit_if_zero:TRUE);
get_install_count(app_name:fr, exit_if_zero:TRUE);

# Leverage the FF install to find the plugins path without additional registry enumeration
ff_install = get_single_install(app_name:ff, exit_if_unknown_ver:TRUE);
ff_path = ff_install['path'];

# Check the version of Foxit Reader without checking the plugin version for non-paranoid
fr_install = get_single_install(app_name:fr, exit_if_unknown_ver:TRUE);
fr_version = fr_install['version'];
fr_path = fr_path['path'];

# previous to 5.4.5 is vuln.
if (report_paranoia < 2)
{
  if (ver_compare(ver:fr_version, fix:"5.4.5", strict:FALSE) >= 0)
    audit(AUDIT_INST_PATH_NOT_VULN, fr, fr_version, fr_path);
}

fixed_version = "2.2.3.111";

plugin_path = ff_path + "\plugins\npFoxitReaderPlugin.dll";

plugin_version = hotfix_get_fversion(path:plugin_path);
if (plugin_version['error'] != HCF_OK)
{
   hotfix_handle_error(error_code: plugin_version['error'],
                      file: 'npFoxitReaderPlugin.dll',
                      appname: 'Foxit Reader Plugin',
                      exit_on_fail: TRUE);
}

hotfix_check_fversion_end();
plugin_version = join(plugin_version['value'], sep:'.');

report = NULL;
if (ver_compare(ver:plugin_version, fix:fixed_version) < 0)
{
  port = kb_smb_transport();

  report =
    '\n  Plugin path    : ' + plugin_path +
    '\n  Plugin version : ' + plugin_version +
    '\n  Fixed version  : ' + fixed_version +
    '\n';

  security_report_v4(port:port, extra:report, severity:SECURITY_HOLE);
  exit(0);
}
else
  audit(AUDIT_INST_PATH_NOT_VULN, fr, fr_version, fr_path);

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

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

Go back to menu.

How to Run


Here is how to run the Foxit Reader Firefox Plugin URL File Name RCE 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 Windows plugin family.
  6. On the right side table select Foxit Reader Firefox Plugin URL File Name RCE plugin ID 64094.
  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 foxit_reader_firefox_plugin_stack_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 154005 - Foxit PDF Editor < 11.1 Multiple Vulnerabilities
  • 157230 - Foxit PDF Editor < 11.2.1 Multiple Vulnerabilities
  • 139315 - Foxit PhantomPDF < 10.0.1 Multiple Vulnerabilities
  • 155706 - Foxit PhantomPDF < 10.1.6 Multiple Vulnerabilities
  • 158564 - Foxit PhantomPDF < 10.1.7 Multiple Vulnerabilities
  • 49808 - Foxit Phantom < 2.2.0.926 Multiple Vulnerabilities
  • 102858 - Foxit PhantomPDF < 8.3.2 Multiple Vulnerabilities
  • 121246 - Foxit PhantomPDF < 8.3.9 Multiple Vulnerabilities
  • 111376 - Foxit PhantomPDF < 9.2 Multiple Vulnerabilities
  • 121045 - Foxit PhantomPDF < 9.4 Multiple Vulnerabilities
  • 140503 - Foxit PhantomPDF < 9.7.3 Multiple Vulnerabilities
  • 139316 - Foxit Reader < 10.0.1 Multiple Vulnerabilities
  • 154004 - Foxit PDF Reader < 11.1 Multiple Vulnerabilities
  • 157229 - Foxit PDF Reader < 11.2.1 Multiple Vulnerabilities
  • 32396 - Foxit Reader < 2.3 Build 2923 util.printf() Floating Point Specifier RCE
  • 45404 - Foxit Reader < 3.2.1 Arbitrary Program Execution
  • 48276 - Foxit Reader < 4.1.1.0805 FreeType CFF Opcodes RCE
  • 49780 - Foxit Reader < 4.2.0.0928 Multiple Vulnerabilities
  • 52458 - Foxit Reader < 4.3.1.0218 Multiple Vulnerabilities
  • 55671 - Foxit Reader < 5.0.2.0718 Multiple Vulnerabilities
  • 86698 - Foxit Reader < 7.2 Multiple Vulnerabilities
  • 102859 - Foxit Reader < 8.3.2 Multiple Vulnerabilities
  • 111377 - Foxit Reader < 9.2 Multiple Vulnerabilities
  • 121046 - Foxit Reader < 9.4 Multiple Vulnerabilities
  • 35807 - Foxit Reader 2.x < 2.3 Build 3902 / 3.x < 3.0 Build 1506 Multiple Vulnerabilities
  • 157114 - Foxit PDF Editor for Mac < 11.1.1 Multiple Vulnerabilities
  • 157115 - Foxit PDF Reader for Mac < 11.1.1 Multiple Vulnerabilities
  • 154013 - Foxit PDF Reader for Mac < 11.1 Vulnerability

Version


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

Go back to menu.