this one is particularly fascinating as an 'unannounced' patch was
crammed into Microsoft Security Bulletin MS03-008 - Flaw in Windows
Script Engine Could Allow Code Execution (814078) of March 19, 2003
for 2. above in a relatively quick fashion: Feb 25, 2003 to March 19,
2003 whereby now the extracted executable is placed in the Temporary
Internet File [TIF] and controlled by the browser security setting.

Anyway:

Internet Explorer enjoys a unique component called the 'Web Folder"
component. This is a selectable component install with the original
installation of the browser or can be added later on. This unique
component allows for an assortment of web publishing and authoring
conveniences often touted as useful "feature".

But what it actually does, is create a nicely named file for us in a
known location.

Where:

The Internet Explorer series 5 through 6 enjoy a related behavior to
the so-called "Web Folder" component which allows us to point
directly to one of these web folders and traverse it directly.
However, should the folder not exist, an error message is generated
and conveniently placed for us in the temp folder:

So:

This particular error message is nothing more than a server side 404
error message which can be modified to suit our needs as we require.

Commence:

1. We first construct our trivial behavior to generate the error
message like so:

2. We then take our multi-faceted Windows Media Player and construct
a 0s url flip *.asf file and point that to our named file in our
known location:

<iframe src="temp.asf">

URL: mhtml:file://C:\WINDOWS\TEMP\wecerr.txt

Because the error file is nothing more than a text file, we need to
include our own html and allow Internet Explorer to 'read' it.
Previously numerous possibilities to allow for this existed,
including <object data="" type="text/html>, databinding with
dataformatas="HTML", dotting file extensions etc. These now all
appear to be patched.

Good:

But because we can craft our own error message on the server and
point our trivial behavior to it, we simply construct our error
message like so:

What that will do is generate our simple text file in our temp
folder, and by merely mhtml'izing our 0s url flip in our Media Player
like so: mhtml:file://C:\WINDOWS\TEMP\wecerr.txt, Internet Explorer
will open our text file in full html splendor.

Where it gets particularly interesting is as follows:

1. We place both our silly behavior and our iframe with 0s url flip
on the same page
2. You navigate to that, automatically our silly behavior generates
our custom crafted error file and places it in our known location.
Simultaneously, our Media Player automatically opens our 0s url flip
*.asf and points to that same file.
3. Because the Media Player is launched from the local machine [the
physical player], it is able to navigate locally to the file vs.
security measures currently in place to disallow referencing files
from the internet directly to the local machine.
4. What then happens is our *.txt file is conveniently html'ized, but
again, because of security measures, the html contents are actually
extracted and opened from within the TIF as a *.TMP file -- this in
accordance with Outlook Express recently cumulated security patches.
In this case, while it would appear that we are inside the local
machine and outside the security restrictions, we are in fact unable
to do anything at all.
5. In order to defeat that we include a second file and scheme to
then bypass that restriction. Our handy VML frame:

6. This is automatically generated once our first mhtml'ized
wecerr.txt is opened and it automatically overwrites the first,
allowing our VML frame to be rendered.

7. Now even with the MHTML file extracted and controlled by the TIF
security settings, it is pointing back to the local machine and temp
folder, and because it was originally extracted locally [from the TIF
as an extracted MIME file], we are once again operating outside the
security zone, in the "My Computer" zone and back to square one.

--
http://www.malware.com
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Delivery co-sponsored by IP3 Inc.
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
SECURITY QUESTIONS? We've got answers...Apply for a scholarship and become
TICSA certified.
Do not miss your opportunity to discover solutions to what our participants
have identified as their top 5 IT Security Challenges. You will return to
work better prepared to put into place an effective security strategy
utilizing the latest security tools, bookmarks and URL's.
<http://www.ip3seminars.com>
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo