Posts

Showing posts from October, 2011

Mitigating cookies theft using HttpOnly

Image
Cross Side Scripting (XSS) Cross Side Scripting is a technique that enables attackers to inject client-side script into Web pages viewed by other users. It's a computer security vulnerability typically found in Web applications. This means that a hacker would be able to insert JavaScript in a text field, say a blog post. This script would be executed by the browser, through this page, for every user that reads the post thread after it is published. The script could in turn read the current users cookie and send it to a a remote service and store is for later use. To protect a cookie against the XSS vulnerability there is a header flag available for the “Set-Cookie” HTTP response header. This header will mitigate the risk of client side script accessing the protected cookie (if the browser supports it). Testing the theory To test this theory, I will demonstrate it using a test application. Our test application consists of a ASP.Net web application and some javascript. The fo