Home > Website Security > Using Cookies For Selective DoS and State Detection

Using Cookies For Selective DoS and State Detection

August 22nd, 2010 Leave a comment Go to comments

Using Cookies For Selective DoS and State Detection: “

28 posts left….

This is a continuation of he first post where we described how you can use cookies to DoS certain portions of the website. After our speech one of the Mozilla guys came up to us and described another attack that arises from this. Let’s say when a user logs in it sets a cookie that is 200 bytes long, and when they log out it re-sets the same cookie to 50 bytes. Well if the attacker can set a cookie with a particular path to a single image on the site, for instance, they can use JavaScript to check with an onerror event handler to see if the image has loaded.

By combining the over-long cookie (minus 50 bytes) a logged in state will cause the image to fail to load, where as a logged out state will allow the image to load just fine. In this way an attacker can tell cookie states as long as the cookies are variable width and there aren’t other cookies muddying the waters. Interesting attack, I thought!

(Via ha.ckers.org web application security lab.)

  1. No comments yet.