TUCoPS :: Web :: IIS :: bu-1340.htm

Microsoft IIS 0Day Vulnerability in Parsing Files (semi-colon bug)
Microsoft IIS 0Day Vulnerability in Parsing Files (semi-colon bug)
Microsoft IIS 0Day Vulnerability in Parsing Files (semi-colon bug)



############################################################=0D
Microsoft IIS 0Day Vulnerability in Parsing Files (semi-colon bug)=0D
############################################################=0D
#Application: Microsoft Internet Information Services - IIS (All versions)=0D
#Impact: Highly Critical for Web Applications=0D
#Finding Date: April 2007=0D
#Report Date: Dec. 2009=0D
#Found by: Soroush Dalili (Irsdl {4t] yahoo [d0t} com)=0D
#Website: Soroush.SecProject.com=0D
#Weblog: Soroush.SecProject.com/blog/=0D
#Thanks From: Mr. Ali Abbas Nejad, Mormoroth, Aria-Security Team, and other ethical hackers.=0D
#Vulnerability/Risk Description:=0D
 - IIS can execute any extension as an Active Server Page or any other executable extension. For instance =93malicious.asp;.jpg=94 is executed as an ASP file on the server. Many file uploaders protect the system by checking only the last section of the filename as its extension. And by using this vulnerability, an attacker can bypass this protection and upload a dangerous executable file on the server.=0D
#Impact Description:=0D
 - Impact of this vulnerability is absolutely high as an attacker can bypass file extension protections by using a semi-colon after an executable extension such as =93.asp=94, =93.cer=94, =93.asa=94, and so on.=0D
 - Many web applications are vulnerable against file uploading attacks because of this weakness of IIS. In a measurement which was performed in summer 2008 on some of the famous web applications, 70 percent of the secure file uploaders were bypassed by using this vulnerability.=0D
#Method of Finding:=0D
 - Simple fuzzer by using ASP language itself.=0D
#More Details:=0D
 - In case of having the =93malicious.asp;.jpg=94, web applications consider it as a JPEG file and IIS consider it as an ASP file and pass it to =93asp.dll=94. This bug does not work with ASP.Net as the .Net technology cannot recognize =93malicious.aspx;.jpg=94 as a .Net file and shows a =93page not found=94 error.=0D
 - Besides using semi-colon, =93:=94 can be used to make an empty file with any arbitrary extension. For example by uploading =93test.asp:.jpg=94, an empty ASP file - =93test.asp=94 - would be created on the server on an NTFS partition. This is only because of =93NTFS Alternate Data Streams=94 and it is completely different from the semi-colon vulnerability.=0D
#Fast Solution/Recommendation:=0D
 - For Web Developers:=0D
    -- Highly Recommended: Use a completely random string as a filename and set its extension by the web application itself (by using a =93switch-case or select-case=94 for example) and never accept the user=92s input as the filename.=0D
    -- Only accept alpha-numerical strings as the filename and its extension.=0D
 - For Webmasters:=0D
    -- Remove =93execute=94 permission from the upload directories (folders).=0D
#Proof of Concept/Exploit:=0D
 - Many of the web applications can be exploited by using this vulnerability. We cannot announce their names before the Microsoft security patch for IIS because of security reasons.=0D
#Related Documents:=0D
- http://soroush.secproject.com/downloadable/iis-semicolon-report.pdf=0D 
=0D

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH