what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

browserRender.txt

browserRender.txt
Posted Jul 15, 2005
Authored by Michal Zalewski | Site lcamtuf.coredump.cx

Interesting write up regarding possible code execution vulnerabilities in Microsoft Internet Explorer due to problems with image decompression and parsing.

tags | paper, web, vulnerability, code execution
SHA-256 | 8aa59c5262d0659c3680241d1e53f860d9626568c3b86d989d08cba6b374e641

browserRender.txt

Change Mirror Download
Synopsis:
---------

Well, not really. Instead, at the risk of boring you to death, I'd like
to report on a casual 30-minute experiment I've conducted of recent.
This experiment resulted in identifying a potential remote code
execution path in Microsoft Internet Explorer, plus some other bugs, and
should be a good starting point for further testing of other browsers or
similar programs.

Discussion:
-----------

You might remember the 'mangleme' affair, where various browsers were
subjected by yours truly to a trivially constructed malformed HTML
crash-course - all that in order to find exploitable input handling flaws.
Back then, MSIE performed admirably compared to other browsers (although
did not escape some embarassment when ned@felinemenace found the
infamous IFRAME bug that way):

https://lcamtuf.coredump.cx/mangleme/gallery/

Of recent, I decided to try something completely different and radically
new, without having to do any actual work. I used the same META REFRESH
auto-test framework to check for image decompression and parsing flaws
(JPEG, GIF, PNG), as opposed to making fun of HTML renderers.

I used a simple index.cgi script (attached, though hardly noteworthy) to
dynamically generate a page that references ten just as dynamically
created images. These images were prepared by running a test set of
pictures (some regular ones, and several pathological cases created with
ImageMagick) through a slightly modified version of my old afx utility.

Surprisingly, it is MSIE and its proprietary JPEG decoder (apparently
not shared with other Windows components?) that performed embarassingly
poor this time. Results below.

Vulnerability examples:
-----------------------

NOTE #1: As with mangleme, this list of problems is most certainly NOT
exhaustive, and performing longer tests or improving the technique
would most likely result in additional findings.

Several MSIE crash sample files from that 30-minute run are available
at:

https://lcamtuf.coredump.cx/crash/

Note that these may produce different results depending on program
versions, plugins and configuration. Tested with WinXP Pro PL
2600.xpsp2.050301-1526 SP1, MSIE PL 6.0.2800.1106, up-to-date.

mov_fencepost.jpg - on most platforms, causes a crash due to mov
destination fencepost error after going past allocated memory, or
after accessing a bogus address such as 0x27272727. The destination
address appears to be controllable (i.e. changing the file or
displaying other data before or along with this image alters it).
My bets are that this is exploitable for remote execution.

cmp_fencepost.jpg - here, causes a crash due to a very similar cmp
fencepost (no write). Not necessarily exploitable for remote code
execution, unless code execution path can be affected later on.

oom_dos.jpg - usually causes a OOM crash. Less interesting, unless
you like to punish people who borrow your pictures for their blogs.

random.jpg - causes mov fencepost of CPU consumption + crash. Didn't
investigate in much detail.

NOTE #2: MSIE comes with no sources, and reverse engineering is naughty.
I didn't examine the renderer to see what went wrong; I see unbounded,
user-dependent memory accesses, and that spells trouble.

Vendor notification:
--------------------

It is my experience that reporting and discussing security problems with
Microsoft is a needlessly lengthy process that puts too much burden and
effort on the researcher's end, especially if you just have a crash
case, not a working exploit; hence, they did not get an advance notice.

Bonus (OT)
----------

Since piggyback request smuggling and fooling proxies and filters is a
popular new pastime, some of you might find it entertaining to have a
look at how various applications differ in handling duplicate instances
of HTTP/SMTP message/NNTP headers that are, in common perception,
"supposed to" occur only once.

--
------------------------- bash$ :(){ :|:&};: --
Michal Zalewski * [https://lcamtuf.coredump.cx]
Did you know that clones never use mirrors?
--------------------------- 2005-07-14 00:29 --

https://lcamtuf.coredump.cx/silence/



#!/bin/bash

echo "Content-Type: text/html"
echo

ID="timg-$$-$RANDOM-$RANDOM"

rm -f timg-* AFX.log

cat <<_EOF_
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" content="0;URL=/">
</HEAD>
<BODY>
_EOF_

CNT=0

for i in img/*; do
CNT="$[CNT+1]"
FNAM="$ID-$CNT"
EXT=`echo $i | cut -d. -f2`
./afx-loc -p 1 -i 100 -m RANDOM -s 60000 <$i 2>$FNAM.$EXT >>AFX.log
echo "Test $CNT - <IMG SRC=\"$FNAM.$EXT\"><BR>"
done

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close