exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft Internet Explorer 11 MSHTML CPasteCommand::ConvertBitmaptoPng Buffer Overflow

Microsoft Internet Explorer 11 MSHTML CPasteCommand::ConvertBitmaptoPng Buffer Overflow
Posted Dec 21, 2016
Authored by SkyLined

Microsoft Internet Explorer version 11 suffers from an MSHTML CPasteCommand::ConvertBitmaptoPng heap-based buffer overflow vulnerability.

tags | advisory, overflow
advisories | CVE-2014-4138
SHA-256 | a87cc7ee1b4128c1970cd37d32a4008e7291d1981ae935b4ac95c4ed3872d188

Microsoft Internet Explorer 11 MSHTML CPasteCommand::ConvertBitmaptoPng Buffer Overflow

Change Mirror Download
Since November I have been releasing details on all vulnerabilities I
found that I have not released before. This is the 37th entry in the
series. This information is available in more detail on my blog at
http://blog.skylined.nl/20161221001.html. There you can find a repro
that triggered this issue in addition to the information below, as well
as a Proof-of-Concept exploit that attempts to prove exploitability.

If you find these releases useful, and would like to help me make time
to continue releasing this kind of information, you can make a donation
in bitcoin to 183yyxa9s1s1f7JBpAPHPmzAQ346y91Rx5DX.

Follow me on http://twitter.com/berendjanwever for daily browser bugs.

MSIE 11 MSHTML CPasteCommand::ConvertBitmaptoPng heap-based BOF
===============================================================
(MS14-056, CVE-2014-4138)

Synopsis
--------
A specially crafted web-page can trigger an out-of-bounds write in
Microsoft Internet Explorer 11. Code that handles pasting images from
the clipboard uses an incorrect buffer length, which allows writing
beyond the boundaries of a heap-based buffer. An attacker able to
trigger this vulnerability can execute arbitrary code.

Known affected software, attack vectors and potential mitigations
-----------------------------------------------------------------
* **Microsoft Internet Explorer 11.0.9600.16521**

An attacker would need to get a target user to open a specially
crafted web-page. In order to trigger the issue, the web-page needs
to either programmatically copy/paste an image using Javascript or
get the user to do this (for instance by tricking the user into
typing keyboard shortcuts such as CTRL+C/CTRL+V) . By default, MSIE
prompts the user to allow or disallow programmatically copy/pasting
the first time a website tries to do this, so user-interaction is
normally required in such cases. Disabling the `Allow Programmatic
clipboard access` setting in `Internet Options` -> `Security
Settings` -> [Choose a zone] -> `Scripting` should prevent websites
from programmatically copy/pasting an image. Disabling execution of
scripts on web-pages altogether will have the same effect. Please
note that neither option prevents a website from social engineering
the user into typing a keyboard shortcut to copy/paste the image.

Details
-------
When an image is pasted in MSHTML, it gets converted from BMP format to
PNG. This is done in the `MSHTML!CPasteCommand::ConvertBitmaptoPng`
function. This function incorrectly uses the size of the original BMP
image to allocate memory for storing the converted PNG image. The PNG
image will be smaller than the BMP under most circumstances, but if a
specially crafted image leads to the original BMP image being smaller
than the converted PNG, the function will write PNG data beyond the
bounds of the allocated memory.

Exploit
-------
An attacker looking to exploit this issue will commonly attempt to get
the memory allocated to store the PNG image in a location that is
followed by a pre-allocated memory block that contains information the
attacker would like to modify. Using the buffer overflow, the attacker
can overwrite this pre-allocated memory block with attacker controlled
data. Depending on the type of the pre-allocated memory, this could
allow the attacker to read or modify arbitrary information within the
process and take control of execution flow. No attempt was made to
create a Proof-of-Concept that shows this level of control.

Time-line
---------
* 8 May 2014: This vulnerability was submitted to ZDI.
* 9 June 2014: This vulnerability was acquired by ZDI.
* 23 June 2014: This vulnerability was disclosed to Microsoft by ZDI.
* 14 October 2014: This vulnerability was address by Microsoft in
MS14-056.
* 21 December 2016: Details of this vulnerability are released.

Cheers,

SkyLined
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close