WebApp Sec mailing list archives

Re: [WEB SECURITY] Round-up: Ways to bypass HttpOnly (and HTTP Basic auth)


From: "Amit Klein (AKsecurity)" <aksecurity () hotpop com>
Date: Wed, 03 May 2006 19:07:48 +0200

On 3 May 2006 at 15:24, Achim Hoffmann wrote:


On Wed, 3 May 2006, Amit Klein (AKsecurity) wrote:

!! You'll see the incoming cookies in HTTP_COOKIE. I'm not sure about HTTP Basic Auth though
!! (I expected to see it in HTTP_AUTHORIZATION, but it seems that the servers handle this
!! header and do not provide it in the ENV variables).

Apache provides only AUTH_TYPE (Basic|Digest) and REMOTE_USER .
But IIRC there're patches around to provide the full credentials.
Old Netscape Enterprise was also able to provide the full credentials (at least
with a homemade plug-in), not sure for its successors iPlanet and SunONE.

!! Bottom line: there are many known attacks against HttpOnly (and
!! against Basic auth), that is, many known ways to elevate "standard" XSS condition to
!! be able to grab session info/credentials stored in HttpOnly cookies/HTTP Basic auth.

hmm, how do you use XSS to grab Basic auth?


All the techniques I surveyed effectively provide the attacker with a copy of the request 
sent by the browser (with cookies and HTTP basic auth added automatically by the browser). 
So HTTP basic auth is provided in the Authorization request header (user:password, Base64 
encoded).

For example, given XSS+TRACE, the attacker crafts XSS payload consisting of XmlHttpRequest 
with TRACE method, sends this to the server, reads the response BODY from the server (which 
is, for TRACE, a copy of the request), and voila - you have the Authorization header right 
there (courtesy of the browser).


-------------------------------------------------------------------------
Sponsored by: Watchfire

The Twelve Most Common Application-level Hack Attacks
Hackers continue to add billions to the cost of doing business online 
despite security executives' efforts to prevent malicious attacks. This 
whitepaper identifies the most common methods of attacks that we have seen, 
and outlines a guideline for developing secure web applications. 
Download this whitepaper today!

https://www.watchfire.com/securearea/whitepapers.aspx?id=701300000007t9r
--------------------------------------------------------------------------


Current thread: