Microsoft IIS Semicolon Bug Leaves Servers Vulnerable

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

Posted in: Exploits/Vulnerabilities, Web Hacking, Windows Hacking

, , , , , ,

Latest Posts:

Karkinos - Beginner Friendly Penetration Testing Tool Karkinos – Beginner Friendly Penetration Testing Tool
Karkinos is a light-weight Beginner Friendly Penetration Testing Tool, which is basically a 'Swiss Army Knife' for pen-testing and/or hacking CTF's.
Aclpwn.Py - Exploit ACL Based Privilege Escalation Paths in Active Directory Aclpwn.Py – Exploit ACL Based Privilege Escalation Paths in Active Directory is a tool that interacts with BloodHound< to identify and exploit ACL based privilege escalation paths.
Vulhub - Pre-Built Vulnerable Docker Environments For Learning To Hack Vulhub – Pre-Built Vulnerable Docker Environments For Learning To Hack
Vulhub is an open-source collection of pre-built vulnerable docker environments for learning to hack. No pre-existing knowledge of docker is required, just execute two simple commands.
LibInjection - Detect SQL Injection (SQLi) and Cross-Site Scripting (XSS) LibInjection – Detect SQL Injection (SQLi) and Cross-Site Scripting (XSS)
LibInjection is a C library to Detect SQL Injection (SQLi) and Cross-Site Scripting (XSS) through lexical analysis of real-world Attacks.
Grype - Vulnerability Scanner For Container Images & Filesystems Grype – Vulnerability Scanner For Container Images & Filesystems
Grype is a vulnerability scanner for container images and filesystems with an easy to install binary that supports the packages for most major *nix based OS.
APT-Hunter - Threat Hunting Tool via Windows Event Log APT-Hunter – Threat Hunting Tool via Windows Event Log
APT-Hunter is a threat hunting tool for windows event logs made from the perspective of the purple team mindset to provide detection for APT movements hidden in the sea of windows event logs.

8 Responses to Microsoft IIS Semicolon Bug Leaves Servers Vulnerable

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

    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 December 29, 2009 at 12:11 pm #

    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 December 29, 2009 at 5:57 pm #

    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 –

  4. droope December 30, 2009 at 11:18 am #

    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 December 30, 2009 at 8:55 pm #

    @ – 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 December 31, 2009 at 10:54 am #

    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 January 13, 2010 at 5:40 pm #

    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 January 18, 2010 at 6:53 pm #

    shit lammer !