Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


November 01, 1998

The Accidental Hacker Exploits IIS Bugs


RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

In July, many people reported a new bug in Internet Information Server (IIS) 3.0 and 4.0. NTFS supports multiple data streams within a file. The main data stream, which stores the main content, is called DATA. Users accessing this NTFS attribute directly from a browser might see the source code for scripts on the Web server. For example, accessing http://myserver.com/passwords.asp::$DATA can display the contents of the file, not the processed results of the file. Microsoft immediately released a patch for the bugs at ftp://ftp.microsoft.com/bussys/IIS/iis-public/fixes/usa/security/iis3-datafix and ftp://ftp.microsoft.com/bussys/IIS/iis-public/fixes/usa/security/iis4-datafix.

When I tested this bug, I found that it is very dangerous, and users everywhere need to close the hole. I've scanned a few corporate servers in Moscow, Russia (and a few in the United States and in other countries, too), and I see that most corporations still haven't installed the patch. They apparently have forgotten about Microsoft's and my recommendations. In "The Accidental Hacker" (February 1998), I told you never to put script files in a virtual directory that has read access.

When I typed the URL of a Web server in Moscow (I've changed the server names and IP addresses in this article)

http://www.somehost.ru/global.asa::$DATA

in my Web browser, I received the username and password for accessing SQL Server, as Listing 1 shows. (Heaven help the company if it runs all its scripts from the sa account, because that configuration usually would let me go anywhere in its site.)

The next hack I tried was to access SQL Server on the corporations' system. In my earlier article, I described a simple technique I used when companies had installed SQL Server on computers with NetBT enabled and I knew the username and password for accessing their site. Today, most servers on the Internet have disabled NetBT and locked down the Guest account.

If the company has disabled Guest but still has NetBT on the server, I can try to log on as Anonymous and then access SQL Server. This command does the job:

net use \\555.555.14.34\ipc$ "" /user:""

(Microsoft Support Online article Q143474--http://support.microsoft.com/support/kb/articles/q143/4/74.asp--explains this feature and how to restrict access.)

What can a hacker do if a company has closed all these avenues to access? First, I can check whether the company has installed SQL Server with TCP/IP-sockets type of client-server connection on the same computer as the Web server. To check for TCP/IP sockets, I run the SQL Server Client Configuration Utility from the Microsoft SQL Server 6.5 Program, Start menu and add new computers to the list of SQL Servers, as Screen 1 shows. The Connection String uses the format ip_address, [socket_number], where ip_address is the IP address of the computer running SQL Server and socket_number is the optional socket number that SQL Server is listening on. By default, SQL Server uses port number 1433, the official Internet Assigned Numbers Authority (IANA) socket number for SQL Server.

If I can connect to SQL Server over TCP/IP sockets, I don't need a correct domain name and password to access the database, and I can log on to the database with only a database username and password. If you want to know what I can do when I log on to SQL Server as sa, read my February article.

If I don't have the correct database username and password, I can try to use the probe login for accessing the database. The probe login is a special ID that the setup program installs. Some administrative applications (e.g., SQL Server Performance Monitor) use the probe login for connecting to a SQL Server system configured for standard security. If I can get into a system with the probe login, I can use any database that has the guest ID. If a system has integrated security, you can't use the probe login to get into SQL Server.

Protect Your Servers
To protect your server from these problems, follow these steps.

  1. Install the IIS patch immediately, before somebody hacks your site.
  2. Never run scripts from a virtual directory with read access enabled
  3. Restrict the information available to anonymous login users, as Microsoft Online Support article Q143474 describes.
  4. Protect SQL Server from access over TCP/IP sockets.
  5. Disable all unneeded accounts (e.g., probe) in SQL Server and in NT.

I think I've made some headway. When I checked the sites of the friends I wrote about in my previous article, I found that they had already patched their servers.

End of Article



Reader Comments
After i have tested on my domain (www.myweidong.com), although there is no such bug but i've received an error message very often after the testing - http://www.myweidong.com/global.asa::$DATA. The error is"

error 'ASP 0115'
Unexpected error

/default.asp

A trappable error occurred in an external object. The script cannot continue running.

Not sure whether the ::$DATA have created some problem to it.

KC Goh May 12, 2000


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Security Whitepapers Reducing the Costs and Risks of Branch Office Data Protection

Solving Desktop Management Challenges in Healthcare

Solving Desktop Management Challenges in Education

Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

Introduction to Identity Lifecycle Manager "2"

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement