29 December 2009 | 6,219 views

Microsoft IIS Semicolon Bug Leaves Servers Vulnerable

Check Your Web Security with Acunetix

The latest news breaking over the Christmas period is that of a fairly serious bug in IIS that allows local file inclusion (LFI) of any filetype due a bug in the way IIS filters handle semicolons (;).

Secunia has confirmed the vulnerability “on a fully patched Windows Server 2003 R2 SP2 running Microsoft IIS version 6. Other versions may also be affected”.

Although oddly it only classifies the bug as “Less critical” – basically a 2/5 on their threat scale.

A researcher has identified a vulnerability in the most recent version of Microsoft’s Internet Information Services that allows attackers to execute malicious code on machines running the popular webserver.

The bug stems from the way IIS parses file names with colons or semicolons in them, according to researcher Soroush Dalili. Many web applications are configured to reject uploads that contain executable files, such as active server pages, which often carry the extension “.asp.” By appending “;.jpg” or other benign file extensions to a malicious file, attackers can bypass such filters and potentially trick a server into running the malware.

There appears to be some disagreement over the severity of the bug, which Dalili said affects all versions of IIS. While he rated it “highly critical,” vulnerability tracker Secunia classified it as “less critical,” which is only the second notch on its five-tier severity rating scale.

It’s a pretty nasty bug if you ask me, it means any CMS, forum software or gallery page where users are allowed to upload files (running on IIS) can be owned by a webshell without any effort at all.

Even if an app doesn’t allow native uploading, LFI can now be executed using another exploit and it will bypass any filtering IIS provides against executable files such as .asp scripts.

I don’t really see how this bug is “Less critical” – I’d imagine there’s some mass pwnage going around the World right now.

“Impact of this vulnerability is absolutely high as an attacker can bypass file extension protections by using a semicolon after an executable extension such as ‘.asp,’ ‘.cer,’ ‘.asa’ and so on,” Dalili wrote. “Many web applications are vulnerable against file uploading attacks because of this weakness of IIS.”

In an email to El Reg, Dalili offered the following attack scenario:

“Assume a website which only accepts JPG files as the users’ avatars. And the users can upload their avatars on the server. Now an attacker tries to upload “Avatar.asp;.jpg” on the server. Web application considers this file as a JPG file. So, this file has the permission to be uploaded on the server. But when the attacker opens the uploaded file, IIS considers this file as an ASP file and tries to execute it by ‘asp.dll.’

“So, the attacker can upload a web-shell on the server by using this method. Most of the uploaders only control the last part of the files as their extensions, and by using this method, their protection will be bypassed.”

Microsoft as per usual is ‘looking into it’ – I would guess within a week or so users will be screaming for a patch in the next round of updates planned for January if not sooner.

Although if you are using IIS, I wouldn’t hold your breath for an out of schedule patch – we all know what Microsoft thinks of those.

Source: The Register





                

Recent in Exploits/Vulnerabilities:
- Heartbleed Bug SSL Vulnerability – Everything You Need To Know
- Oracle Java Cloud Service Vulnerabilities Publicly Disclosed
- ODA – Online Web Based Disassembler

Related Posts:
- Microsoft Preps Windows Security Fix for Patch Tuesday
- Gentoo Pulls the Plug after Getting Pwned
- DotDotPwn v1.0 – Directory Traversal Checker/Scanning Tool

Most Read in Exploits/Vulnerabilities:
- Learn to use Metasploit – Tutorials, Docs & Videos - 225,397 views
- AJAX: Is your application secure enough? - 118,959 views
- eEye Launches 0-Day Exploit Tracker - 84,997 views

Advertise on Darknet

8 Responses to “Microsoft IIS Semicolon Bug Leaves Servers Vulnerable”

  1. d3m4s1@d0v1v0 29 December 2009 at 11:42 am Permalink

    It doesn’t seems “less critical” to me, there are tons of sites that allow image uploads but don’t scripts like .asp… this incur in a serious remote file inclusion vulnerability, and RFI is not a “less critical” problem…
    Well, let’s see what MS says about this…

  2. Morgan Storey 29 December 2009 at 12:11 pm Permalink

    Having admin’ed a few IIS servers and attacked a few in my time. This is pretty damned critical and the work around is all-be it not to bad, but not workable on a big IIS farm, a patch is the best solution.
    I haven’t tested the : vuln that was mentioned, but that one looks interesting using NTFS alternate streams to remote rootkit the box is pretty cool, but also bad.
    I guess there is also the work-a-round of input validation on your upload fields, ensuring no : or ; are allowed.

  3. Andy Davies 29 December 2009 at 5:57 pm Permalink

    Demonstrates the need for permissions to be set at all levels, denying execute on the folder that the users content is uploaded to should help mitigate against this too.

    It’s worth noting that it doesn’t appear to apply to asp.net – http://soroush.secproject.com/downloadable/iis-semicolon-report.pdf

  4. droope 30 December 2009 at 11:18 am Permalink

    We might learn from this not to trust our security to microsoft ever again.

    We might, since they still have a chance to place a patch.

  5. Rishabh Dangwal 30 December 2009 at 8:55 pm Permalink

    @ – d3m4s1@d0v1v0
    As usual MS will release a patch,say a few more words about their dedication to increase user experience,productivity,privacy(?) and security…and after week or maybe 2 week later release one more patch which will address problems posed by the patch 1..
    the loop goes on :)

  6. Morgan Storey 31 December 2009 at 10:54 am Permalink

    I don’t think Microsoft bashing is really justified here. IIS 6′s patching has been very few so far. Sure it isn’t as flexable as Apache but security wise it ain’t too bad. Compare this to the huge number of apache flaws (the http keep alive request DOS anyone)
    MS does bad coding and bad releases, as does The open source movement, look at the Debian SSH debacle. OSS’s advantage is freedom and flexability.

  7. Mormoroth 13 January 2010 at 5:40 pm Permalink

    microsoft publishe news about this vulnerability
    they said its not a security hole !!! i wonder how its not a security hole that permit miscolious file can be executed

  8. cert 18 January 2010 at 6:53 pm Permalink

    shit lammer !