NT IIS idq.dll Directory Traversal Vulnerability
BID:968
Info
NT IIS idq.dll Directory Traversal Vulnerability
| Bugtraq ID: | 968 |
| Class: | Input Validation Error |
| CVE: | |
| Remote: | Yes |
| Local: | No |
| Published: | Feb 02 2000 12:00AM |
| Updated: | Feb 02 2000 12:00AM |
| Credit: | Discovered By Mnemonix, Published in CIS advisory CISADV000202 on February 2, 2000. |
| Vulnerable: |
Microsoft Index Server 2.0 Microsoft IIS 4.0 Microsoft IIS 3.0 |
| Not Vulnerable: | |
Discussion
NT IIS idq.dll Directory Traversal Vulnerability
A vulnerability in idq.dll can allow an attacker to gain read access to any file on the same logical drive as the web server virtual root. The attacker has to know the physical path and filename of the requested file, and the ACL for the file must specify read access for either the anonymous user or the Everyone or Guest group.
idq.dll will follow the '../' string in the specification of a template file. Any file can be specified as the template file. Although some IDQ files append the '.htx' extension to the user's input, it is possible to circumvent this by appending several spaces to the end of the requested filename, eg: 'desiredfile.txt%20%20%20...%20%20.htx'. What this will do is provide the '.htx' so the system thinks it is a valid template file, but when it retrieves the file the '.htx' string is pushed out of the buffer, the spaces are ignored, and the desired file is returned.
The webhits.dll patch (Microsoft Security Bulletin MS00-006, at http://www.securityfocus.com/templates/advisory.html?id=2060, and Bugtraq ID 950, at http://www.securityfocus.com/bid/950)may in some cases affect the nature of this vulnerability. If this patch has been applied, IDQ files will only be vulnerable if they do not append the .htx extension.
A vulnerability in idq.dll can allow an attacker to gain read access to any file on the same logical drive as the web server virtual root. The attacker has to know the physical path and filename of the requested file, and the ACL for the file must specify read access for either the anonymous user or the Everyone or Guest group.
idq.dll will follow the '../' string in the specification of a template file. Any file can be specified as the template file. Although some IDQ files append the '.htx' extension to the user's input, it is possible to circumvent this by appending several spaces to the end of the requested filename, eg: 'desiredfile.txt%20%20%20...%20%20.htx'. What this will do is provide the '.htx' so the system thinks it is a valid template file, but when it retrieves the file the '.htx' string is pushed out of the buffer, the spaces are ignored, and the desired file is returned.
The webhits.dll patch (Microsoft Security Bulletin MS00-006, at http://www.securityfocus.com/templates/advisory.html?id=2060, and Bugtraq ID 950, at http://www.securityfocus.com/bid/950)may in some cases affect the nature of this vulnerability. If this patch has been applied, IDQ files will only be vulnerable if they do not append the .htx extension.
Exploit / POC
NT IIS idq.dll Directory Traversal Vulnerability
Example:
http ://target/query.idq?CiTemplate=../../../somefile.ext
Example:
http ://target/query.idq?CiTemplate=../../../somefile.ext
Solution / Fix
NT IIS idq.dll Directory Traversal Vulnerability
Solution:
Microsoft's webhits.dll patch addresses some of the issue. It is available at:
Intel:
http://www.microsoft.com/downloads/release.asp?ReleaseID=17727
Alpha:
http://www.microsoft.com/downloads/release.asp?ReleaseID=17728
Also, IDQ files should be edited to force usage of specific template files, eliminating user input from the process. For example,
Old -> CiTemplate=%TemplateName%
New -> CiTemplate=/path/actualtemplate.htx
Solution:
Microsoft's webhits.dll patch addresses some of the issue. It is available at:
Intel:
http://www.microsoft.com/downloads/release.asp?ReleaseID=17727
Alpha:
http://www.microsoft.com/downloads/release.asp?ReleaseID=17728
Also, IDQ files should be edited to force usage of specific template files, eliminating user input from the process. For example,
Old -> CiTemplate=%TemplateName%
New -> CiTemplate=/path/actualtemplate.htx
References
NT IIS idq.dll Directory Traversal Vulnerability
References:
References: