Yet another Microsoft security hole


By Sandy - Posted on 25 October 2005

Many people visit online forums and bulletin boards, looking for information on computers, baseball, real estate, music, and other topics. Registered members are often allowed to upload "avatars", thumbnail images used to enhance text or provide a laugh.

Sven Vetsch has recently discovered a bug in the way that Internet Explorer displays images, so that any image uploaded by untrusted users can be used to exploit this bug, and execute arbitrary code in the browser, including revealing your password to a third party. This XSS (Cross-Site Scripting) exploit can also be applied to product images on auction sites (eBay, are you listening?).

When a browser tries to render embedded content files (.gif, .jpg, .wav, etc.) which are corrupted, the visitor will typically see a red X or other symbol that the file cannot be displayed. Accessing the file directly, rather than through a webpage,
as http://www.example.com/image.gif will produce the same result, except in IE 6.0, which will try to display the contents of the file as HTML.

Consider the following textfile, named with a .gif extension:

<GIF89a 8 f >
<html>
<head>
<script>
alert("XSS");
</script>
</head>
<body>
</body>
</html>

The browser accepts this as an image, because it is named so, and because it contains the proper hex header. When accessed directly, it will also display the red X or other symbol, since it has a .gif header and extension, and is clearly not a valid image, but if the file is renamed with a .jpg extension, IE 6.0 does not understand the header, and then runs this code, which pops up an alert box. It could also read a cookie, or do other things.

All "bad guy" has to do is lure you to click a link to access the fake image directly.

If you don't understand the stealth technology involved, just know that this is a very serious security hole. Until Microsoft issues a patch, users are advised to use Firefox or Netscape, at least when visiting any site where they might encounter user-uploaded "images".

No votes yet

Post new comment

The content of this field is kept private and will not be shown publicly.
 
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.

More information about formatting options

Request a Quote

Contact Us Tel: 866.277.9958
2929 Carlisle, Suite 375
Dallas, TX 75204
Get your free quote!

NEWSLETTER SIGN UP

Upcoming Events

07/06/2009 - 3:00pm - 4:00pm