Quantcast
Channel: Security Boulevard
Viewing all articles
Browse latest Browse all 37364

Virtual Patch for ASP.Net Forms Authentication Bypass Vulnerability (CVE-2011-3416)

$
0
0

Last Thursday, Microsoft released an out-of-band security patch (MS11-100) which includes a fix for CVE-2011-3416:  

An elevation of privilege vulnerability exists in the way that .NET Framework authenticates users. In order to exploit this vulnerability, an unauthenticated attacker would need to be able to register an account on the ASP.NET application, and must know an existing account name for a targeted user. The attacker could then craft a special web request using a previously registered account name to gain access to that account. The attacker could then take any action in the context of the targeted user, including executing arbitrary commands on the site.

This vulnerability is described in more detail in the following advisory:

Vulnerability overview/description:
-----------------------------------
The null byte termination vulnerability exists in the
CopyStringToUnAlingnedBuffer() function of the webengine4.dll library used by
the .NET framework. The unicode string length is determined using the lstrlenW
function. The lstrlenW function returns the length of the string, in
characters not including the terminating null character. If the unicode string
containing a null byte is passed, its length is incorrectly calculated, so only
characters before the null byte are copied into the buffer.

This vulnerability can be leveraged into an authentication bypass
vulnerability. Microsoft ASP.NET membership system depends on the
FormsAuthentication.SetAuthCookie(username, false) method for certain
functionality. By exploiting this vulnerability an attacker is able to log on
as a different existing user with all the privileges of the targeted user
(e.g. admin).


Proof of concept:
-----------------

Detailed exploit information and source code references have been removed from
this advisory.

An attacker is able to bypass authentication in certain functionality using
null bytes and log on as another user, e.g. admin.

Even though the full PoC code was redacted from the vulnerability announcement, Trustwave SpiderLabs Research Team was able to obtain example attack payloads through our MAPP (Microsoft's Active Protections Program) membership.  Based on that data, we have created the following ModSecurity virtual patch to identify exploit attempts:

SecRule REQUEST_METHOD "@streq POST" "chain,phase:2,t:none,log,block,id:'2100000',msg:'Trustwave SpiderLabs Alert - Possible Elevation of Privilege Attack against .Net.',ta
g:'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3416',tag:'http://technet.microsoft.com/en-us/security/bulletin/ms11-100'"
        SecRule REQUEST_FILENAME "@contains /Membership/CreatingUserAccounts.aspx" "chain"
                SecRule ARGS:/\$CreateUserStepContainer\$UserName$/ "@validateByteRange 1-255"

This virtual patch is also included within the commercial ModSecurity Rules from Trustwave SpiderLabs along with many other virtual patches created by the SpiderLabs Research Team.



Viewing all articles
Browse latest Browse all 37364

Trending Articles