Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Cookie Bug Exploit.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cookie Bug Exploit.

 Post Reply Post Reply Page  <12
Author
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2005 at 10:08pm
Don't use cookies and auto login...
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2005 at 1:15am
Originally posted by theSCIENTIST theSCIENTIST wrote:


The problem here is that I hear time and time again about how some app was hacked bacause the cookie was stealed, how the heck so?

The other part of the problem is that I can't re-create this hack, therefore can't effectively secure against it, what I'm doing, is, securing based on guess work, if someone was to create a fake cookie he would need these variables with these values, so lets get those values all scrambled up and variables with less meaningful names of what they do.
 
 
I hear you.  It's a serious concern because of the number of people reporting it.  I periodically spend time exploring different methods of attack using cookie forging, and I'm fairly comfortable saying that almost all cookie based exploits are not a weakness in the target app, like WWF.  If I create a web site that steals cookies or compromise your machine by sending an email with a cookie-napper, I haven't exploited WWF.  I've taken advantage of another vulnerability to use against WWF.
 
It might be a good idea to encode more information into the cookie to obfuscate the meaning, but there are a couple reasons why that might not fix anything.  First, if it's not encrypted with a decryption password unknown to the hacker, it's going to be a simple thing for the hacker to encode his own forged cookie.  Second, if the attack is a "stolen" cookie, then assume the cookie data is encrypted with an unbreakable cipher but the attacker steals your cookie, how will the web app determine that the cookie was stolen?  If it's just decrypted and decoded, it didn't do anything but obscure the meaning.  But a hacker will always know the meaning unless every users of WWF modifies the program to scramble the meaning.  Even then, figuring out the meaning probably won't take too long.
 
You should assume that the hacker always knows what values are scrambled in the cookie and always knows the meaning of every variable.  And unless you understand the attack, then you're counting on luck that your fix will work.  Maybe a more secure solution is to prevent cookie-based login for admin accounts.
 
I could be wrong.
 
Originally posted by theSCIENTIST theSCIENTIST wrote:


Comparing against the IP, defies the purpose of using cookies to auto-login, since many ISPs still assign IPs dinamically, not fixed, maybe when IP v6 comes into place, ISPs will then assign a fixed IP to all customers, which in it-self should allow us developers to go into many new directions.
 
Good point.  I've been spoiled by the static IP for so long, I forget there is the other world out there.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post Posted: 12 August 2005 at 7:41am
Originally posted by Phat Phat wrote:

Don't use cookies and auto login...

Tell me then another way to check if a user has permission to view a page? Even if you use Session variables that's a cookie also, the only difference is that it is destroyed after it's timeout or browser closure, as for the auto-login, I can live without it, but for a forum app, most users like it.

Originally posted by JJLatWebWiz JJLatWebWiz wrote:

I hear you. It's a serious concern because of the number of people reporting it. I periodically spend time exploring different methods of attack using cookie forging, and I'm fairly comfortable saying that almost all cookie based exploits are not a weakness in the target app, like WWF. If I create a web site that steals cookies or compromise your machine by sending an email with a cookie-napper, I haven't exploited WWF. I've taken advantage of another vulnerability to use against WWF.

It might be a good idea to encode more information into the cookie to obfuscate the meaning, but there are a couple reasons why that might not fix anything. First, if it's not encrypted with a decryption password unknown to the hacker, it's going to be a simple thing for the hacker to encode his own forged cookie. Second, if the attack is a "stolen" cookie, then assume the cookie data is encrypted with an unbreakable cipher but the attacker steals your cookie, how will the web app determine that the cookie was stolen? If it's just decrypted and decoded, it didn't do anything but obscure the meaning. But a hacker will always know the meaning unless every users of WWF modifies the program to scramble the meaning. Even then, figuring out the meaning probably won't take too long.

You should assume that the hacker always knows what values are scrambled in the cookie and always knows the meaning of every variable. And unless you understand the attack, then you're counting on luck that your fix will work. Maybe a more secure solution is to prevent cookie-based login for admin accounts.

I could be wrong.

I'm going to have to really understand this attack, preferably re-create it. I use cookies in one way or another and feel kind of stuck without them, I remember reading a few years back that cookies are bad, and here we are now still debating the issue, this time the concern is even bigger.
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.