IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow - Nessus

Medium   Plugin ID: 59846

This page contains detailed information about the IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 59846
Name: IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow
Filename: irfanview_jpeg2000_stack_overflow.nasl
Vulnerability Published: 2012-01-16
This Plugin Published: 2012-07-05
Last Modification Time: 2018-11-15
Plugin Version: 1.12
Plugin Type: local
Plugin Family: Windows
Dependencies: irfanview_installed.nasl
Required KB Items [?]: SMB/IrfanView/Version

Vulnerability Information


Severity: Medium
Vulnerability Published: 2012-01-16
Patch Published: 2012-03-28
CVE [?]: CVE-2012-0897
CPE [?]: cpe:/a:irfanview:irfanview

Synopsis

The remote host has an application installed that is affected by a stack-based buffer overflow vulnerability.

Description

The version of the IrfanView JPEG-2000 plugin (JPEG2000.dll) was found to be less than 4.33. Such versions are affected by a stack-based buffer overflow vulnerability that can be triggered by tricking users into opening a .JP2 file with a specially crafted Quantization Default section. Successful exploitation may allow arbitrary code to be executed on the affected host subject to the privileges of the user.

Solution

Upgrade the JPEG-2000 plugin to version 4.3.3.0 (4.33) or higher.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow vulnerability:

  1. Metasploit: exploit/windows/fileformat/irfanview_jpeg2000_bof
    [Irfanview JPEG2000 jp2 Stack Buffer Overflow]
  2. Exploit-DB: exploits/windows/local/19519.rb
    [EDB-19519: IrfanView JPEG2000 4.3.2.0 - jp2 Stack 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:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:6.8 (Medium)
Impact Subscore:6.4
Exploitability Subscore:8.6
CVSS Temporal Score:5.6 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.6 (Medium)

Go back to menu.

Plugin Source


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

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

include("compat.inc");

if (description)
{
  script_id(59846);
  script_version("1.12");
  script_cvs_date("Date: 2018/11/15 20:50:27");

  script_cve_id("CVE-2012-0897");
  script_bugtraq_id(51426);

  script_name(english:"IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow");
  script_summary(english:"Checks version of JPEG2000.dll");

  script_set_attribute(
    attribute:"synopsis",
    value:
"The remote host has an application installed that is affected by a 
stack-based buffer overflow vulnerability."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The version of the IrfanView JPEG-2000 plugin (JPEG2000.dll) was found
to be less than 4.33.  Such versions are affected by a stack-based
buffer overflow vulnerability that can be triggered by tricking users
into opening a .JP2 file with a specially crafted Quantization Default
section.  Successful exploitation may allow arbitrary code to be
executed on the affected host subject to the privileges of the user."
  );
  script_set_attribute(attribute:"see_also",value:"https://www.irfanview.com/plugins.htm");
  script_set_attribute(
    attribute:"solution",
    value:"Upgrade the JPEG-2000 plugin to version 4.3.3.0 (4.33) or higher."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
  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:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Irfanview JPEG2000 jp2 Stack Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"vuln_publication_date",value:"2012/01/16");
  script_set_attribute(attribute:"patch_publication_date",value:"2012/03/28");
  script_set_attribute(attribute:"plugin_publication_date",value:"2012/07/05");
  script_set_attribute(attribute:"plugin_type",value:"local");
  script_set_attribute(attribute:"cpe",value:"cpe:/a:irfanview:irfanview");
  script_end_attributes();

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

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

  script_dependencies("irfanview_installed.nasl");
  script_require_keys("SMB/IrfanView/Version");

  exit(0);
}

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

plugin = "JPEG2000.dll";
fix = '4.3.3.0';

kb_base = 'SMB/IrfanView/';
appname = "IrfanView " + plugin + " plugin";
path = get_kb_item_or_exit(kb_base + 'Path');

path += "\Plugins\" + plugin;
plugin_version = get_kb_item_or_exit(kb_base + 'Plugin_Version/' + plugin);

if (ver_compare(ver:plugin_version, fix:fix) == -1)
{
  if (report_verbosity > 0)
  {
    report =
      '\n  Path              : ' + path +
      '\n  Installed version : ' + plugin_version +
      '\n  Fixed version     : ' + fix + ' (4.33)\n';
    security_warning(port:get_kb_item('SMB/transport'), extra:report);
  }
  else security_warning(get_kb_item('SMB/transport'));
  exit(0);
}
else audit(AUDIT_INST_VER_NOT_VULN, appname, plugin_version);

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

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

Go back to menu.

How to Run


Here is how to run the IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow 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 IrfanView JPEG-2000 Plugin Remote Stack-based Buffer Overflow plugin ID 59846.
  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 irfanview_jpeg2000_stack_overflow.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a irfanview_jpeg2000_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 - irfanview_jpeg2000_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 irfanview_jpeg2000_stack_overflow.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 84150 - VMware Horizon View Client 3.2.x < 3.2.1 / 3.3.x < 3.4.0 / or 5.x < 5.4.2 Multiple Vulnerabilities (VMSA-2015-0004)
  • 84219 - VMware Player 6.x < 6.0.6 Multiple Vulnerabilities (VMSA-2015-0004)
  • 84220 - VMware Player 7.x < 7.1.1 Multiple Vulnerabilities (VMSA-2015-0004)
  • 84223 - VMware Workstation 10.x < 10.0.6 / 11.x < 11.1.1 Multiple Vulnerabilities (VMSA-2015-0004) (Windows)
  • 63059 - IrfanView < 4.35 Multiple Heap-Based Buffer Overflows
  • 60036 - IrfanView DjVu Plugin DjVu Image File Decompression Overflow
  • 59849 - IrfanView Formats Plugin ECW Plugin File Handling Buffer Overflow Vulnerability
  • 59848 - IrfanView FlashPix Plugin Heap Based Buffer Overflow
  • 59847 - IrfanView Formats Plugin TTF File Buffer Overflow Vulnerability
  • 63303 - IrfanView ImXCF.dll XCF File Handling Overflow
  • 60037 - IrfanView JLS Plugin JLS Compressed Image File Handling Overflow

Version


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

Go back to menu.