Summary
Checks for a vulnerability in IIS 5.1/6.0 that allows arbitrary users to access secured WebDAV folders by searching for a password-protected folder and attempting to access it. This vulnerability was patched in Microsoft Security Bulletin MS09-020, http://nmap.org/r/ms09-020.
A list of well known folders (almost 900) is used by default. Each one is checked, and if returns an authentication request (401), another attempt is tried with the malicious encoding. If that attempt returns a successful result (207), then the folder is marked as vulnerable.
This script is based on the Metasploit
modules/auxiliary/scanner/http/wmap_dir_webdav_unicode_bypass.rb auxiliary module.
For more information on this vulnerability and script, see: * http://blog.zoller.lu/2009/05/iis-6 -webdac-auth-bypass-and-data.html *
http://seclists.org/fulldisclosure/2009/May/att-134/IIS_Advisory_pdf.bin * http://www.skullsecurity.org/blog/?p=271 * http://www.kb.cert.org/vuls/id/787932 * http://www.microsoft.com/technet/security/advisory/971492.mspx
SYNTAX:
http.pipeline: If set, it represents the number of HTTP requests that'll be pipelined (ie, sent in a single request). This can be set low to make debugging easier, or it can be set high to test how a server reacts (its chosen max is ignored).
TODO
Implement cache system for http pipelines
http.useragent: The value of the User-Agent header field sent with requests. By default it is
''Mozilla/5.0 (compatible
Nmap Scripting Engine
http://nmap.org/book/nse.html)''.
A value of the empty string disables sending the User-Agent header field.
basefolder: The folder to start in
eg, ''/web'' will try ''/web/xxx''.
folderdb: The filename of an alternate list of folders.
http-max-cache-size: The maximum memory size (in bytes) of the cache.
webdavfolder: Selects a single folder to use, instead of using a built-in list.