---[ Phrack Magazine Volume 8, Issue 54 Dec 25th, 1998, article 08 of 12
-------------------------[ NT Web Technology Vulnerabilities
--------[ rain.forest.puppy / [WT]
*Note: most of the vulnerabilities in this document have NOT been made public;
they were discovered by rain.forest.puppy, or other members of WT. Lots
of new toys out there on the Internet lately. Seems like the web is the
way to go, and every software spigot is demanding they be 'web-enabled'. A
lot are reinventing the wheel, bundling sub-standard web servers to serve up
their HTML and Java interface.
But this article isn't about them. There's too many, and they're to easy to
use as vulnerable targets. It's much more fun to find the needle in the
haystack, so I'm going to focus on some more common setups. On to the show.
----[ IIS 4.0
IIS is not too bad as a web server. It still doesn't compare to Apache, but
it has flexible scripting and server-side abilities. But, of course,
everything has its price...
One interesting problem (and probably the only one that may be previously
published at the time of this writing) is that appending an ".idc" extension
to the end of a URL will cause IIS installations to try to run the so-called
.IDC through the database connector .DLL. If the .IDC doesn't exist, than it
returns a rather informative page stating that it can't open
%documentroot%\.idc. For example:
"Cannot open c:\inetpub\wwwroot\index.html.idc"
Wow, absolute paths on the server. Very interesting. What good does this do?
Well, it gives you some insight and hints. If you're trying to exploit CGI or
other server-based programs, knowing what drive you're on when trying to
access outside documents blindly helps a lot. For example, if the IDC query
came back:
f:\webs\1\index.html.idc
then you know you'll probably have to specify 'c:\' to get to any Windows NT
system files; you can't do silly stuff like:
../../../../winnt/system/repair/sam._
since you're doing relative addressing, and staying on drive F. Another
common return is something like"
"Cannot open d:\20x.140.3x.25\index.html.idc"
Where the IP address is the full IP address of the webserver. This usually
indicates that the site is on a system that's probably hosting multiple
websites.
Also, usually the site that's based in \inetpub\wwwroot is the 'default' site,
and may have other things associated with it (like sample files, etc...
We'll get to these later). This is important to remember.
----[ FrontPage Webbots
A really quick recap on how webbots work: Frontpage inserts some HTML comments
that specify the parameters of the webbot. Then, the form is submitted to
/_vti_bin/shtml.dll, and the URL of the page is given. shtml.dll reads through
the given page, and interprets the webbot/HTML comment code.
So, all the parameters that are involved in (most) webbots are embedded in the
HTML page themselves. Let's take an example from a corporate site that makes
a very popular FTP suite (this is HTML code):