Slashdot Mirror


The Dangers of Improper Cookie Use

shifted89 writes "Over the last year, the security community have exposed web application security for what it is — extremely lacking. However, for all the focus on XSS, CSRF, history stealing, etc., not much attention has been given to the cookie. Unfortunately, cookie misuse can be just as dangerous, if not more so than XSS attacks and InformIT illustrates why. In short, the author clearly demonstrates what can happen when a website improperly uses cookies for customer tracking — including a working illustration."

191 comments

  1. Old News by MyLongNickName · · Score: 4, Funny

    Cookie misuse has been chronicled here

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    1. Re:Old News by Kabuthunk · · Score: 1

      Ok, albeit not quite what I was thinking, but at least I wasn't the only one who was thinking something else after reading the title.

      I was picturing children somehow jamming oatmeal cookies in their eye or something :P

      --
      Planet Zebeth - Metroid with a twist
    2. Re:Old News by xlordtyrantx · · Score: 1

      Whoa, before I read that I had no idea that Star Wars and the Muppets had a connection... Frank Oz is the man.

      --
      Eagles may soar, but weasels never get sucked into jet engines...
    3. Re:Old News by Anonymous Coward · · Score: 1, Funny

      So you've never imagined Yoda saying "Waka waka waka"

    4. Re:Old News by sharkey · · Score: 2, Funny

      Such a tender, heartwarming account of someone bettering himself. What they don't show is the agonizing struggle he went through.

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
    5. Re:Old News by Anonymous Coward · · Score: 0

      Tofu cookies truly are a misuse of cookies.

  2. Cookies? Javascript? Etc? by Anonymous Coward · · Score: 5, Funny

    I disable them all because I hate any innovation of the web past 1991. Anyone who disagrees with me is wrong. This article is proof.

    1. Re:Cookies? Javascript? Etc? by Anonymous Coward · · Score: 2, Funny

      Really? I'm the opposite.

      As Scott McNealy once said, "Privacy is dead, deal with it". I've extended that to security which is why I enable javascript and install the binary-only flash player which is configured to auto execute bytecode from any server on the web. In my vision of the future, anybody with disabilities, privacy concerns, security concerns or who is running something other than Windows isn't worth bothering with. Viva innovation, especially from Microsoft!

    2. Re:Cookies? Javascript? Etc? by Kelson · · Score: 4, Insightful
      I disable them all because I hate any innovation of the web past 1991.

      Hmm. Animated GIFs? Check. Blink? Check. Scrolling status bar? Check. Background MIDI files? Check. Pop-ups? Check. Flash ads with full video and sound? Check. Garish color schemes? Double-check.

      I think you're on to something!

    3. Re:Cookies? Javascript? Etc? by BLACKtactx · · Score: 4, Insightful

      Do you count CSS as an innovation??. If so, i have to disagree with you. Wouldn't it be better to word it "I hate any innovation that annoys me", instead of a blanket "any" innovation. Or maybe I should just develop all my sites in size 15 font, using framesets, in times new roman, and 16 colours. Innovation in itself is not bad, innovation for the sake of it is. The misuse of tehcnology cannot also be blamed on the technology itself but the dumb people who develop. I find javascript incredibly useful to improve my ui, some people decide to make yellow scrolling text on a magenta background, thats not javascripts issue. Dont shoot the messenger. Better go, my brick cell phone is ringing, and Im missing Magnum PI reruns.

    4. Re:Cookies? Javascript? Etc? by Anonymous Coward · · Score: 0

      someone didn't see the tag...

    5. Re:Cookies? Javascript? Etc? by Anonymous Coward · · Score: 1, Informative
      Or maybe I should just develop all my sites in size 15 font, using framesets, in times new roman, and 16 colours.

      Fonts, font sizes, frames, and colors are all post-1991 innovations and would be invalidated by the GP's criteria.

      Also, you seem to be missing a sense of humor. I recommend immediate surgery to remedy the problem.

    6. Re:Cookies? Javascript? Etc? by kalaf · · Score: 4, Funny

      High resolution porn? No wait, I take it back!

    7. Re:Cookies? Javascript? Etc? by laffer1 · · Score: 1

      How about the img tag? I think all of us can think of many uses of pictures on the internet. Hell I kept AOL as a teen to look at porn. :)

      Cookies aren't all bad. Most people associate then with ads, but they also allow a stateless protocol to work with login type websites. I couldn't imagine the web without e-commerce or the ability to pay my discover card online. They could have been implemented better or differently, but that's true of all computer technologies. Just remember when working with cookies always treat the data back from them as tainted and validate it using a regular expression if possible. (if it makes sense with the data type of course)

      Frames are open to debate although there are a few arguable uses like a table of contents for content, etc. Most of this can be accomplished with CSS now.

      I've used WorldWideWeb on my NeXT and was able to pull up three websites. Google, Apache.org and kernel.org worked but any site using XHTML would not render. Obviously images were not supported. It was also not the very first version of WorldWideWeb (the first browser). Here's a picture from my NeXT: http://www.foolishgames.com/luke/firstbrowser.tiff

      I think most people have a list of web technologies that they wish didn't exist. The list is probably different for everyone. I personally hate Flash and Java Applets. Flash is slightly worse as it runs on less operating systems than java does. Before someone says its 99%, remember that this is slashdot and many of us use other operating systems and not necessarily 32bit intel based ones. Now that Adobe owns flash, there is no hope for standards compliance although part of it may work in firefox for the systems it supports. Porting firefox is not fun.

    8. Re:Cookies? Javascript? Etc? by mabinogi · · Score: 1

      There's nothing in the original specs for HTML and HTTP that prevents that ;)

      --
      Advanced users are users too!
    9. Re:Cookies? Javascript? Etc? by Anonymous Coward · · Score: 0

      Sounds like someone needs to get over themselves

    10. Re:Cookies? Javascript? Etc? by evilviper · · Score: 1
      I disable them all because I hate any innovation of the web past 1991.

      You kids and your web...

      I want my gopher sites back.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    11. Re:Cookies? Javascript? Etc? by kalaf · · Score: 1

      Before I posted, I took into consideration the fact that someone like you would point that out for me. I concede, yes it was possible.

      Bandwidth was the real issue back then, but people got around that problem by using an extremely efficient lossy format called "ASCII"...

    12. Re:Cookies? Javascript? Etc? by MillionthMonkey · · Score: 2, Funny

      Well maybe you weren't downloading porn in 1991 but some of us were already busy gluing uuencoded ladies back together.

    13. Re:Cookies? Javascript? Etc? by sco08y · · Score: 1

      I disable them all because I hate any innovation of the web past 1991. Anyone who disagrees with me is wrong. This article is proof.

      Screw the web, I'm posting over a gopher gateway.

    14. Re:Cookies? Javascript? Etc? by McFadden · · Score: 1
      Hmm. Animated GIFs? Check. Blink? Check. Scrolling status bar? Check. Background MIDI files? Check. Pop-ups? Check. Flash ads with full video and sound? Check. Garish color schemes? Double-check.

      Seriously... Enough about myspace...
    15. Re:Cookies? Javascript? Etc? by tehcyder · · Score: 1

      Dude, the GP was joking.

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    16. Re:Cookies? Javascript? Etc? by amling · · Score: 1

      If you can't say it in 16 colours, it's not worth being said.

      --
      70e808a22cb027cde4a6abddf6435d55
  3. Okay, I know it's not an old article... by Bright+Apollo · · Score: 1

    ... but isn't this old news? Hacking (plaintext) cookies is about as innovative as hacking URLs or telnetting into your office SMTP server to write fake CEO emails to the new guy.

    Still.. I'm off to get my $4 off coupons from Restaurant.com, ad-free weather from Wunderground.com, and free schools data from GreatSchools.net...

    -BA

  4. Obligatory by Archangel+Michael · · Score: 2, Informative

    Me Like Cookies! - Cookie Monster

    --
    Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    1. Re:Obligatory by silentounce · · Score: 1

      I'm confused. Does obligatory mean not funny?

      --
      There are many tongues to talk, and but few heads to think. -Victor Hugo
    2. Re:Obligatory by Enoxice · · Score: 0, Redundant

      Off-topic:

      I hate to break it to you, but: http://news.bbc.co.uk/2/hi/entertainment/4432415.s tm

      --
      Anyone else think the comments just weren't rendering right before they turned off ABP and saw ads?
    3. Re:Obligatory by Archangel+Michael · · Score: 2, Insightful

      Why yes! Yes it does!

      My problem is that I missed the Anonymous Coward Check box, and now, my karma has taken a hit. Sigh.

      Oh well. Live and learn

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    4. Re:Obligatory by silentounce · · Score: 1

      I'm not an expert or anything, but I'm pretty sure that's not your problem.

      --
      There are many tongues to talk, and but few heads to think. -Victor Hugo
    5. Re:Obligatory by Anonymous Coward · · Score: 0

      In any case, you live.

    6. Re:Obligatory by Archangel+Michael · · Score: 3, Insightful

      Okay, it is ONE of my problems. Sheesh

      No need to beat a man while he's down.

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    7. Re:Obligatory by silentounce · · Score: 0, Offtopic

      Tell that to my wife. I'm sorry. My wife is taking her PMS out on me, and now I'm taking it out on you. It's the circle of life. Beautiful, no?

      --
      There are many tongues to talk, and but few heads to think. -Victor Hugo
    8. Re:Obligatory by Anonymous Coward · · Score: 0

      No need to beat a man while he's down. There is if you think he might get up... ;)
    9. Re:Obligatory by hoojus · · Score: 1

      Ahh yes but cookies are now a sometimes food and web developers should take that into consideration.

  5. What about clipboard theft? by mongus · · Score: 1

    If you think that's bad try going to a page like this with IE after copying and pasting sensitive information.

    1. Re:What about clipboard theft? by Cartack · · Score: 0

      Not sure about older versions, but IE 7.0 asks before allowing the clipboard to be copied.

    2. Re:What about clipboard theft? by Anonymous Coward · · Score: 0

      I went to that site with IE6 (just to see what happens) and it gets your browser stuck in an endless loop asking "Do you want to allow this page to paste information from your clipboard?" and I was slightly annoyed by having to terminate IE using task manager. In any rate I use Firefox exclusively but thought I would give other users a heads-up against going to said site.

    3. Re:What about clipboard theft? by geobeck · · Score: 2, Funny

      From that site:

      Did you know that by default Internet Explorer allows any website to obtain the current contents of your clipboard? This isn't a bug, Microsoft considers it a feature.

      Damn Microsoft for removing features in IE7!

      --
      Find environmentally and socially responsible products on http://buy-right.net
    4. Re:What about clipboard theft? by kalirion · · Score: 1

      I went to that site with IE6, and it worked as advertised.

    5. Re:What about clipboard theft? by MWojcik · · Score: 0

      Internet Explorer 6.0 sp2 is not affected.

  6. cookies passed as plaintext by brunascle · · Score: 3, Informative
    Second, cookies are passed as plaintext unless there is an encrypted session. As a result, anyone with a sniffer can capture the cookies contents and use them as their own.
    bingo. that's why i store the IP address along with the session ID in the database.
    1. Re:cookies passed as plaintext by Anonymous Coward · · Score: 0

      Yes, and the instant you store IP addresses with session IDs you break your web applications for the millions of people that run their machines behind any sort of NAT device.

    2. Re:cookies passed as plaintext by multipartmixed · · Score: 1

      That's bitten me a few times with AOhelL users... their proxy sometimes dynamically changes.

      Mind you, nobody's bitched about it in a couple of years now. Maybe their proxies are smarter now?

      --

      Do daemons dream of electric sleep()?
    3. Re:cookies passed as plaintext by daeg · · Score: 1

      How do you figure? He's storing the public-facing IP, not the private address.

      How does this break?

      (Of course it does break for anyone using anonymizer-type services)

    4. Re:cookies passed as plaintext by brunascle · · Score: 1

      yeah, i knew that was going to happen going forward, but it's a small price to pay to eliminate a rather large vulnerability. and i have yet to hear any complaints.

    5. Re:cookies passed as plaintext by adnonsense · · Score: 1

      When I faced that problem, I made the IP check only consider the first 2 octets of the IP address, and compared the user agent too. By no means watertight, but was enough to stamp out some casual abuse with a minimum of effort.

    6. Re:cookies passed as plaintext by Anonymous Coward · · Score: 0

      Some large companies, not just AOL, do the interal->external address mapping dynamically. That means the same user can send requests from multiple ip addresses during a single session.

      When the company I worked for at the time encountered this, we just used the first three octets instead of the whole IP address. That worked in all the cases we ran into.

      However, AOL does so many other weird things that in the end we had to tell our customers that we could not support them if they were using AOL. In one case, I was able to run the equivalent of tcpdump on both the client and the server while attempting to connect to our web site via AOL. In each case, the first three packets made it and the rest were silently dropped.

    7. Re:cookies passed as plaintext by Xzzy · · Score: 5, Insightful

      bingo. that's why i store the IP address along with the session ID in the database.

      There was a merchant site that I visited quite some time ago that did something like this. Except they screwed it up and, along with putting the session ID in the URL, they "automatically" tied the session id with account information. The effect this had was that anyone who visited a copied URL would pull up the account information of the person who had spread the URL around.

      It took some time to figure it out. The URL was posted on a fairly busy forum, and it was a fairly fast selling item, and 50+ people had used the link to try and make a purchase.. and every time someone checked out, the account was updated with their information.

      I'm not sure what the lesson here is, other than the fact that any "safe practice" can become insecure in the hands of idiots. Cookies aren't an inherently stupid idea, but the ease of using them invites a lot of abuses.

    8. Re:cookies passed as plaintext by darthlurker · · Score: 1

      Second, cookies are passed as plaintext unless there is an encrypted session. Or if you encrypt the cookie's value. Isn't that SOP if your HTTP state information is sensitive?

    9. Re:cookies passed as plaintext by jgc7 · · Score: 3, Insightful
      > bingo. that's why i store the IP address along with the session ID in the database.

      How does that do anything for the example given? If someone uses a sniffer at a wireless access point with NAT, they have access to the same IP as their victim.

      --
      70% of statistics are made up.
    10. Re:cookies passed as plaintext by Anonymous Coward · · Score: 0

      Bad idea, unless you like to prevent AOL users from using the site.

    11. Re:cookies passed as plaintext by Anonymous Coward · · Score: 0

      Even better, encrypt the session with a secret key and a timestamp too. Don't rely on the browser to timeout the cookie.

      So if you get a cookie, you look at the timestamp see if it is still valid, if so decrypt the cookie and check the timestamp inside. If that matches, then check the ip and finally access the session.

      To be safe, you should also rotate the secret key.

      If you rotate the secret key often enough, you can use that instead of the second timestamp. Just find out which key decrypts the cookie and that'll tell you how old it is. If none of the X most recent keys decrypt it, it has expired. Not quite as good as the timestamped one (since for the lifetime of the key all cookies with the same ip and sessionid will be exactly the same) but good enough for most cases.

    12. Re:cookies passed as plaintext by budgenator · · Score: 1

      why not send a few random characters in a hidden field as an nounce and a md5sum of the session ID and the nounce, then you can stop most sesion hijacks as well. Give the nonce and checksum a reasonable sounding name and no one would connect the dots.

      --
      Apocalypse Cancelled, Sorry, No Ticket Refunds
    13. Re:cookies passed as plaintext by Doctor+Memory · · Score: 1

      Great, another site I can't visit when I'm at The Client From Hell. TCFH, among other endearing practices, sets DHCP leases to expire every fifteen minutes. As you might imagine, this makes downloading large patches or updates "eventful"...

      --
      Just junk food for thought...
    14. Re:cookies passed as plaintext by infofc · · Score: 1

      which is exactly why you save the session ID in a cookie and not the URL, and require cookies to be enabled.

    15. Re:cookies passed as plaintext by panaceaa · · Score: 1

      Security is not absolute, and there's lots of ways to get a cookie besides having root somewhere along a person's network uplinks. Security IS about making things harder for people, and I controversially (though pretty firmly) believe that locking a cookie down to an IP address is a great idea. It may not work as well for people behind a large corporate network, or a rooted machine behind the same NAT as a victim user, but sending a request out from a specific IP address is usually a big step to overcome besides merely having someone's cookie.

    16. Re:cookies passed as plaintext by James+McGuigan · · Score: 1

      While the sessionid in the URL makes it more explisit, and leaves open the copy/paste URL issue, you should equally never assume that cookie data is "trusted" data, ie its possible for the user to manually open up their cookie file and enter in any arbitrary/random/malicious data in there.

      One way of protecting session ID spoofing, is to keep track of all sessionids in a database, along with time last seen, IP subnet (ie 192.168.***.*** - the exact IP may legitimately vary if going through a multi-server load balancing proxy), and the first 255 chars of the user agent string (remember to do a substring on the UA before comparing it - I got burned once on a Ubuntu Firefox UA string that was longer than 255 chars and would never compare to the 'cropped' DB value). Also record a live/unlive flag.

      Any time you check the cookie sessionid, look it up in the DB, check to see if the last seen time is within an acceptable limit (ie 1 hour), check that the IP sebnet matches and so does the UA string, and that it is still marked as a live sessionid. If any of these checks fails mark the sessionid as unlive, and regenerate the sessionid (double checking that the new random value hasn't already been recorded in the DB).

      Though if a XSS attack happens then having username/password data in the cookie, may be of more importance than the sessionid.

      If you are extra paranoid, you could even randomly generate a 32 digit password, store it in the cookie, and double check it on each page load. This will help against guessing the sessionid, but won't help if the cookie itself is read remotely (ie via a javascript XSS attack), so you could in theory regenerate the random password on every page load (the attacker would then need to act on that data before the user clicked on the next page), but this could cause problems if a user attempts to load several pages (ie in tabs) before the next page can send its cookies back (all the requests would have the same password, but the server would be expecting a password that the client has not yet recieved), or if there is a connection issue which means the server gets the request, but the user fails to recieve the response.

  7. practical, perhaps? by fermion · · Score: 4, Insightful
    I was going to read the article until the 5th cookie was set at which point i just assumed that the entire thing was an practical lesson. Be stupid enough to read an article about cookie abuse and get caught in the trap. Sort of like trying to find a windows virus filter only to find that the virus filter has infected you.

    Oh well, I guess this is just another lesson in how marketers will shoot themselves in the foot. Animated gifs are abused, so i turn animation off. Cookies are abused, so i reject any cookie that is not obviously necessary. Flash is useful, but no way to request that it does not start automatically, so either I don't install it or install a hack to block it. I don't even see the product that is being advertised.

    I hope this gets everyone off thier high horse, and realize that third party cookies should be rejected on all machines by default. What I really wish existed was a screen that popped up every time you went to a new site that informed the user of the site, and asked for a cookie preference for that site. That way, all cookies could be accepted at the corporate site, and no cookies might be accepted at google.

    --
    "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    1. Re:practical, perhaps? by blindcoder · · Score: 2, Informative

      My mozilla from a year-or-so ago has this setting where it ask you about each cookie being set. it can then remember the setting for this website.
      Maybe you should learn about or change your browser.

      Edit - Preferences - Privacy & Security - Cookies
      Here Check 'Allow Cookies based on privacy settings' and 'Ask for each cookie'.

      Also, for flash, google for flashblock. Nice plugin, disables all flash and replaces it with a 'play' button. You can then click on that button to show the flash.

      --
      See my blog for my free opinions.
    2. Re:practical, perhaps? by Yazeran · · Score: 2, Informative


      Oh well, I guess this is just another lesson in how marketers will shoot themselves in the foot. Animated gifs are abused, so i turn animation off. Cookies are abused, so i reject any cookie that is not obviously necessary. Flash is useful, but no way to request that it does not start automatically, so either I don't install it or install a hack to block it. I don't even see the product that is being advertised.


      Well just use Firefox with the Adblock and Flashblock extensions (ok addblock does not fix flash things, but once learned ignores most image advertizing.). Flashblock replaces any flash thing with a window frame with the same size but does not run the flash, and i think it does not even download it untill you bress the run button on the window frame.

      In my opinion Addblock and Flashblock are the two most important reasons to use Firefox.

      Yours Yazeran

      Plan: To go to Mars one day with a hammer.

    3. Re:practical, perhaps? by nekokoneko · · Score: 3, Interesting

      What I really wish existed was a screen that popped up every time you went to a new site that informed the user of the site, and asked for a cookie preference for that site. That way, all cookies could be accepted at the corporate site, and no cookies might be accepted at google.

      Actually, Konqueror does that if you set it up to ask what to do when you receive a cookie. I fiddled around with Firefox and couldn't find a way to do it, but maybe messing around with Network.cookie.cookieBehavior and Network.cookie.p3p

    4. Re:practical, perhaps? by M.+Baranczak · · Score: 1

      In my opinion Adblock and Flashblock are the two most important reasons to use Firefox. Mine too. You don't even realize how annoying those Flash ads are until you use FlashBlock for a few months, then go use a browser that doesn't have it.
    5. Re:practical, perhaps? by McNihil · · Score: 1

      Or you can use "Permit Cookies" with FireFox and still read it without getting/giving any cookies if you want ;-)

    6. Re:practical, perhaps? by FireFury03 · · Score: 2, Interesting

      My mozilla from a year-or-so ago has this setting where it ask you about each cookie being set. it can then remember the setting for this website.
      Maybe you should learn about or change your browser.


      For some crazy reason, FireFox 2 has now removed this option - I had to go poking around in about:config to turn it back on. :(

    7. Re:practical, perhaps? by Arkhan · · Score: 1
      fermion: What I really wish existed was a screen that popped up every time you went to a new site that informed the user of the site, and asked for a cookie preference for that site. That way, all cookies could be accepted at the corporate site, and no cookies might be accepted at google.

      This is easily configurable behavior in IE6 (possibly earlier - I can't recall). Tools->Internet Options->Privacy->Advanced.

      I keep mine set to third-party reject, first-party prompt, always accept session cookies. When I hit a site with a first party cookie, I get a little popup that says: "<sitename> wants to store a cookie on your computer" with choices "Accept Cookie", "Reject Cookie", "Cancel", and a checkbox to say "Always apply the same decision for this site".

      Voila. Corporate stuff gets one click of the "always apply..." checkbox and then one click on Accept. Nearly every other site gets one click on "always apply..." and then one click on Reject.

      Works like a champ. I wish everyone configured this way.

    8. Re:practical, perhaps? by Anonymous Coward · · Score: 0
      Typically, you can set the browser to reject, accept, or accept for sessions, specific cookies. It not possible, as far as I know, to set the browser to reject all cookies from a specific domain or specific page, no matter where those cookies originate.

      so, to recap, any modern browser can accept or reject specific cookies, and remember those preferences. What does not yet happen is the rejection of cookies from entire site. On a trivial basis, this means that any cookie from 2o7.com will be rejected, and I do not have to individually reject those cookies. On a more expanded view, any cookie with 2o7 in the name will be rejected. On the grandest scale, and cookie that tries to be set when I navigate to microsoft.com will be rejected out of hand.

      If there is a way to make this happen, let us know.

    9. Re:practical, perhaps? by blindcoder · · Score: 1

      You can do this in Mozilla. Same dialogue as before, click on 'Manage Cookies'. Don't know about the new FF, but in my Mozilla, it's there.

      --
      See my blog for my free opinions.
    10. Re:practical, perhaps? by Crayon+Kid · · Score: 1

      Trust me, you DON'T want a popup dialogue for every cookie. There are Firefox extensions (such as Cookie Button) which let you customize cookie setting per-site. Together with a default of "enforce session expiration for this site", all is well.

      You can't really browse the web with cookies completely disabled. I have extensions that can block both cookies and JavaScript completely. I can live without JS, but I've discovered I can't with blocking all cookies by default. So now the default is session. It's ok, really -- I get the functionality and the likes of doubleclick.net don't get to match my id from one session to another.

      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    11. Re:practical, perhaps? by PCM2 · · Score: 3, Funny
      Sort of like trying to find a windows virus filter only to find that the virus filter has infected you.

      Where the hell do you live? Soviet Russia?

      --
      Breakfast served all day!
    12. Re:practical, perhaps? by aaronl · · Score: 2, Informative

      On my Firefox 2 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)), I definitely have that option. It's in Preferences, Privacy, "Keep Until: ask me every time".

    13. Re:practical, perhaps? by evilviper · · Score: 2, Informative
      In my opinion Addblock and Flashblock are the two most important reasons to use Firefox.

      If you use NoScript (which you should to stop dangerous and irritating javascript code), you don't need Flashblock.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    14. Re:practical, perhaps? by Anonymous Coward · · Score: 0

      Actually, that is the default in Konqueror. The nice thing is after a while you will have a blacklist and a whitelist set up so you will get fewer prompts as you continue to use it.

    15. Re:practical, perhaps? by ben+there... · · Score: 1
      Or you can use "Permit Cookies" with FireFox and still read it without getting/giving any cookies if you want ;-)

      I'm with you on that, regardless of its, umm, ambiguous name. Block by default, Alt-C to allow.

      The alternative, asking on every site, would be very annoying.
    16. Re:practical, perhaps? by nekokoneko · · Score: 1

      Well, being an AC, I think you won't see this, but FYI the default in Konqueror in Kubuntu 6.06 was "accept all cookies".

  8. How old is this article? by Dekortage · · Score: 5, Insightful

    It says "updated Dec 15, 2006" but the comments at the end of the article are all dated from 2004. I mean, the problem is much older than that, but it seems the article was just updated with 2006 dates to make it seem more current. Or am I missing something?

    --
    $nice = $webHosting + $domainNames + $sslCerts
    1. Re:How old is this article? by Anonymous Coward · · Score: 0

      Those comments apply to the 'security reference guide', not to the article.

    2. Re:How old is this article? by locokamil · · Score: 1

      If the site used cookies, we would know.

  9. Easiest pen-test I ever ran by Anonymous Coward · · Score: 0
    Sitting in the project room with the devs working on a high-profile web app for controlling business internet service (can't be more specific, sorry :) Fire up ethereal; watch admin cookie go by in plain, copy & paste into local browser - boom! 0wnxx0red :))

    This was possible because, against the dev security specs which said *everything* had to go over SSL, someone had decided that Javascript, CSS and Javascript should live on a separate, non-SSL server. The wonderful "enterprise" product they'd built their site with was kindly sending session cookies out with every response. Oops! :)

    You may think "Ah, but this scenario has nothing to do with the real world" -- actually it did, because the "admin users" are people at the customer sites who control their service through the web front-end. So an attacker working for a client co could easily snaffle admin rights and just drop the service (or buy all our other services, or change IP settings, and all sorts of other phun.)

    Web devs: if there's one piece of advice I could give, it'd be to get familiar with Ethereal ("Wireshark" as it's now called - bleurgh) and get to understand the basics of TCP and IP so you can interpret what you see on the wire. A pen-test proxy such as WebScarab is highly recommended.

    1. Re:Easiest pen-test I ever ran by Anonymous Coward · · Score: 0

      Simple solution, scrap the use of generated session ids altogether. Just use the customer's credit card number. If they don't want to buy anything, they aren't a real user anyway. :-p

  10. One simple rule to follow by D4rk+Fx · · Score: 1

    There's only one simple rule to follow. The client can never be trusted, and all information should be verified server side.

  11. Cookie on cookie misuse link by blindcoder · · Score: 4, Insightful

    I like how the first thing the 'cookie misuse' site is doing is trying to do is to set a cookie. The 'why' remains unknown.
    Other things they do is prohibit tabbed browsing by using javascript to open an image from a thumbnail to a new window. Can someone please send these guys to a usability crash-course?

    --
    See my blog for my free opinions.
    1. Re:Cookie on cookie misuse link by J0nne · · Score: 4, Informative
      Other things they do is prohibit tabbed browsing by using javascript to open an image from a thumbnail to a new window.

      I can't believe how common that still mistake still is.
      It's not like it's hard to use the following instead:
      <a href="image.jpg" onclick="popup(this.href);return false;">link</a>...
    2. Re:Cookie on cookie misuse link by blindcoder · · Score: 1

      or just use the target parameter like everyone else.

      --
      See my blog for my free opinions.
    3. Re:Cookie on cookie misuse link by Anonymous Coward · · Score: 0

      How is tabbed browsing prohibited? I click a thumbnail and the image opens in a new tab. What else should I expect it to do?

    4. Re:Cookie on cookie misuse link by blindcoder · · Score: 2, Insightful

      if I click on the image, I expect it to open in the same or a new window. If I click with both mousebuttons, I expect it to open in a new tab.
      this is not possible with javascript 'links' which may or may not do things as you would expect and certainly destroy any usage patterns you have achieved and do so without a valid reason.

      --
      See my blog for my free opinions.
    5. Re:Cookie on cookie misuse link by Anonymous Coward · · Score: 0

      Now try opening that image in a new tab by Ctrl-clicking. Please put a little thought into your click handlers.

    6. Re:Cookie on cookie misuse link by LanMan04 · · Score: 1

      or just use the target parameter like everyone else. Depricated! Not valid XHTML!
      --
      With the first link, the chain is forged.
    7. Re:Cookie on cookie misuse link by blindcoder · · Score: 1

      care to enlighten us on the correct way or do you intend to let us die dumb?

      --
      See my blog for my free opinions.
    8. Re:Cookie on cookie misuse link by Crayon+Kid · · Score: 1
      I can't believe how common that still mistake still is.
      It's not like it's hard to use the following instead:
      link
      You do know that window.popup() works in IE only, right?
      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    9. Re:Cookie on cookie misuse link by grcumb · · Score: 4, Insightful
      care to enlighten us on the correct way [to open a new window from HTML] or do you intend to let us die dumb?

      The correct way is - and always has been - to leave that to the user. Useability studies have shown time and again that new windows popping open unannounced are unwelcome, even frightening to many computer users. And the quickest way to piss off power users like me is to presume to know better than I how your site should be displayed.

      This behaviour is another legacy of assuming that the entire world browses with certain versions of MSIE. The only reasonable way in that browser to keep track of multiple sites was to open links in new windows. But even then, such presumption was unwelcome to most people, even many IE users.

      The only remaining (valid) use of the target attribute is in a frameset, and that monstrousity is not needed any more, what with the moderately decent CSS positioning support that is present in all modern browsers.

      --
      Crumb's Corollary: Never bring a knife to a bun fight.
    10. Re:Cookie on cookie misuse link by Dragonslicer · · Score: 1

      At the risk of wandering off topic (eh, too late I guess), the Tab Mix Plus extension (and probably at least a couple other extensions) has a "Single Window Mode" option, where anything that would otherwise open in a new window opens in a new tab instead.

    11. Re:Cookie on cookie misuse link by J0nne · · Score: 1

      I didn't know IE had a built-in function called popup (I use Firefox for everything). popup(element) in my example would be a custom function that uses window.open to open the href attribute of the anchor.

      I just used that example for clarity, and to make a point that it pisses me off too that some web developers don't want to go through the trouble of providing a real link to images while there's no technical reason to not do that.

      Besides, I wouldn't even write the thing inline, but use something like <a href="bleh" class="popup" (or rel="popup")>, and let an external script deal with it (and something like Lightbox is even better than a popup if you just want to show images).

    12. Re:Cookie on cookie misuse link by Arker · · Score: 1

      You're currently at +4 insightful and I'd happily put you up to +5 if I could. There are very few posts that deserve +5 IMOP but you really hit the nail on the head. Well done.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    13. Re:Cookie on cookie misuse link by ben+there... · · Score: 1

      I believe not allowing target= anymore has more to do with semantic web stuff. It's presentation/functionality, and doesn't belong in the HTML (in theory). What it really means, though, is everyone will use annoying javascript like the one mentioned a few parents up for a while, until they all figure out that you can apply the javascript to certain classes or rels.

      Btw, popup windows do have their purposes, such as music players that should remain running even while you're browsing other pages, or in some cases toolbox-type windows. At least with target= you can override it's default behavior by Ctrl-clicking or right-click->new tab.

    14. Re:Cookie on cookie misuse link by Anonymous Coward · · Score: 0

      I believe not allowing target= anymore has more to do with semantic web stuff. It's presentation/functionality, and doesn't belong in the HTML (in theory).

      That's not the Semantic Web. It's just semantics, which was actually part of the design of the original WWW in the first place. Don't confuse semantics with the actual Semantic Web, they are related but different concepts.

      you can override it's default behavior

      You want "its", not "it's". "It's" is always short for "it is", possessive "its" has no apostrophe.

    15. Re:Cookie on cookie misuse link by ben+there... · · Score: 1

      Hmm...you're right. It's* a step towards the Semantic Web, but only a subset. Maybe referring to it as MVC would have been more appropriate. Anyway.

      * I know the correct usage of its and it's, but I still have to consciously think about which one to use. It doesn't come naturally to me. That time fell into the 5% I don't catch.

    16. Re:Cookie on cookie misuse link by petermgreen · · Score: 1

      there are occasions when popping up a window is the best choice, the big one i've come accross is when you have an window that contains say an irc client (usually a java applet but ajax or streaming to frames are also possible), unless you pop it up in a seperate window then it is very easy for the user to accidently close it.

      i do however wish firefox would have a "change new window request into new tab request" setting.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    17. Re:Cookie on cookie misuse link by HeroreV · · Score: 0

      They do. It's been around practically forever. Does nobody ever open the preferences window and just look around at all the settings? It's the first thing I do with almost any new application I try.

    18. Re:Cookie on cookie misuse link by Arker · · Score: 1

      You are completely missing the point. Yes, there are cases where I want something to open in a new window. In those cases I right click and select 'open in new window'.

      The question is not whether we sometimes want things opened in a new window, the question is whether there should be a way for someone else to FORCE us to do so. And the answer is no.

      --
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Friends don't let friends enable ecmascript.
    19. Re:Cookie on cookie misuse link by petermgreen · · Score: 1

      so you want noobies flooding your irc channel with joins/parts as they use the back/forward buttons with your ajax or java applet based irc client?

      other than forcing a new window what soloution to this do you propose?

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  12. I love the start of this article by fullphaser · · Score: 3, Insightful

    As it references XSS attacks and then jumps to cookie abuse like it is something newer than XSS, I mean you know the whole web 2.0, almost everything being session and cookie based, yes turn those boogers off their dangerous, and return to the safe land of 1998 where static web pages reigned supreme. The fact is that we can't just dismiss the cookie, yes we can play safely in the field with it, but past that it is a integral part of today's web infrastructure and there is no short term replacement for it, between JS, ASP, and PHP all nearly relying on the whole concept of the cookie to validate session etc. You can't just say they are dangerous and to stop accepting them in general, and you can't just tell the web designer to stop using them, for the primary reason that it isn't practical.

    --
    Did someone say cake?
    1. Re:I love the start of this article by Shados · · Score: 1

      the problem isn't even javascript or cookies. Its that making web sites was marketed as something easy, when in practice, web apps are significantly more difficult to make than desktop applications (at least if you don't half ass them). So you have a ton of people claiming to be web experts, that don't know how all these technologies work... The technologies are decent at what they do, as long as the average skill of those who use them is greater than your typical 6th grader...

    2. Re:I love the start of this article by fullphaser · · Score: 1

      Even then what are you going to do, we are always taught to never trust our users, so I think the thing with this cookie business is just on the same level, cookies are just another method of attack, if you rely solely on them, as an experienced web app we should know if you are going to have cookies you are going to need another form of verification than just the cookie. So pointing a finger at any one single source is ridiculous, distrust the user all the way through

      --
      Did someone say cake?
    3. Re:I love the start of this article by Shados · · Score: 1

      Yup. Symmetric encryption of the cookies, on top of SSL enabled, for the win. That tends to be good enough for a lot (not all) purposes, as then the cookie is semi-temper proof.

    4. Re:I love the start of this article by evilviper · · Score: 1
      You can't just say they are dangerous and to stop accepting them in general,

      Yes I can.

      and you can't just tell the web designer to stop using them, for the primary reason that it isn't practical.

      Yes I can, and yes it is.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  13. Remember.. by Swimport · · Score: 2, Funny

    Cookies go in the mouth not the nose.

  14. Maybe by RAMMS+EIN · · Score: 2, Informative

    ``"Over the last year, the security community have exposed web application security for what it is extremely lacking. However, for all the focus on XSS, CSRF, history stealing, etc., not much attention has been given to the cookie.''

    Maybe that's because the dangers of cookies have been known for AGES?

    --
    Please correct me if I got my facts wrong.
  15. Worse and worse by Dracos · · Score: 3, Informative

    Cookie abuse reached new heights a few weeks ago when top sites in Google search results throw cookies on the search results page. So far it's not a guaranteded occurance, and only happens for the top search result. Still, it's jumping the gun.

    I can't wait for the Mozilla devs to clean up their cookie code so that blocking cookies is as easy and configurable as blocking images. Even being able to prompt to block everything other than a session cookie would be a nice improvement.

    1. Re:Worse and worse by i.r.id10t · · Score: 1

      Blank your cookie file, login, etc. to the sites you want to have cookies on, close browser, make cookies.txt readonly, enjoy.

      --
      Don't blame me, I voted for Kodos
    2. Re:Worse and worse by afidel · · Score: 4, Informative

      That's because your browser is pre-downloading the content from those sites, so yeah they are going to send their normal cookies. Turn off the preload feature and problem solved.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    3. Re:Worse and worse by Dracos · · Score: 1

      I keep a somewhat comprehensive (18,000 line) hosts file on my machine, and have for a few years now. I don't get barraged with as many cookies (or banners) as most people.

      This cookies-in-the-results behavior isn't a pre-fetch issue. It started well after I switched (from Mozilla) to Firefox 1.5.x in August, maybe in the last month or so.

      Other key features for cookie blocking are to block cookies from domains other than the window's URI, and block cookies returned from non text/* or application/* mime types (images, I'm looking at you).

      It took me a while to get FilterSetG to block urchin.js, but I think I finally managed to.

    4. Re:Worse and worse by evilviper · · Score: 1
      I can't wait for the Mozilla devs to clean up their cookie code so that blocking cookies is as easy and configurable as blocking images.

      It already is...

      For images, you have Adblock.

      For cookies, it's "Cookie Button" https://addons.mozilla.org/firefox/1247/

      Or in the status bar: https://addons.mozilla.org/firefox/1328/

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  16. Use AJAX? by bb5ch39t · · Score: 1
    I'm just asking. But it seems to me that if a Web site were designed to use AJAX, then the entire "session" would be a single communications, so no cookies would be needed to "track" the user interaction.

    Or am I full of you-know-what again?

    1. Re:Use AJAX? by Shados · · Score: 1

      ajax doesn't allow you to keep a live connection or something. It still does standard HTTP requests and such. So you're still living in a disconnected model. It doesn't help, unless you're using a fancy framework that will handle things for you: but then its the framework that helps, not ajax.

    2. Re:Use AJAX? by iwan-nl · · Score: 1

      Good AJAX sites don't work like that. It breaks the browser's navigation and refresh buttons and it doesn't degrade gracefully.

      --
      I'm trying to improve my English. Please correct me on any spelling/grammar errors in this post.
  17. The Real Danger of Improper Cookie Use by MrCopilot · · Score: 1, Funny
    The Real Danger of Improper Cookie Use:

    Two Words: Crumby Milk

    Thank You and Tip your Servers.

    --
    OSGGFG - Open Source Gamers Guide to Free Games
  18. The Dangers of Improper Cookie Use by aquatone282 · · Score: 0, Flamebait

    . . . about an extra 5 - 10 pounds around the waistline, in my experience.

    --
    What?
  19. Obligatory Simpsons reference.... by Illusion2269 · · Score: 5, Funny

    Mindy: What's wrong?
    Homer: Oh, yeah, like you don't know. We're gonna have sex!
    Mindy: Oh...well, we don't have to.
    Homer: Yes we do! The cookie told me so.
    Mindy: Well...desserts aren't always right.
    Homer: But they're so sweet!

  20. OMG cookie misuse! by suv4x4 · · Score: 1

    There are way more subtle ways to misuse cookies than demonstrated here.

    This article shows us that you shouldn't let people in only by username without their password. Well duh.

  21. What's the big deal? by smooth+wombat · · Score: 1

    I read the article and the author talks about the usual stuff: what cookies are, what they contain and how they track you. Then he goes on to say that since some of the cookies expire in 2009, a lot of information could be collected on you during this time.

    As is said everytime the issue of cookies comes up, DELETE THEM! You don't need to keep them.

    Once you delete them, you're a new, unique visitor to a web site. You screw with their statistics since they think you're someone new, thus increasing their advertising budgets because they think they have more visitors.

    There is no reason to keep cookies. Delete them and laugh everytime you read stories like this.

    --
    We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
    1. Re:What's the big deal? by Anonymous Coward · · Score: 0

      In this case, deleting the cookie wouldnt protect anyone... The site in question uses the email field of a cookie as authorization to a specific account. Even if you delete your cookies, an attacker can still get into your account because they only have update their own cookie with your email address...

    2. Re:What's the big deal? by Anonymous Coward · · Score: 0

      Once you delete them, you're a new, unique visitor to a web site. You screw with their statistics since they think you're someone new, thus increasing their advertising budgets because they think they have more visitors. You're an idiot, an anti-social teenager, or (probably) both.

      All you do is upset/hurt the economy by doing that.
  22. Sigh... by alisson · · Score: 1

    So used to Fark, that I thought it meant the pastry for a moment...

  23. So.. what's the solution? by sherriw · · Score: 1

    Ok... if you're storing the session id via cookie... what's the best solution for preventing cookie theft abuse? Pardon my stupidity for not knowing this already...

    1. Re:So.. what's the solution? by Carnildo · · Score: 1
      Ok... if you're storing the session id via cookie... what's the best solution for preventing cookie theft abuse? Pardon my stupidity for not knowing this already...


      1) Make the session ID a random value so it can't be guessed
      2) On the backend server, tie the session ID to a given access time and IP range
      3) Invalidate the session ID and force a re-login if a request with that ID comes too long after the last access, or from a different IP range.
      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    2. Re:So.. what's the solution? by davidbrit2 · · Score: 1

      The typical way to do this is by storing a completely random, meaningless sequence of characters (often a hash of some random data) generated at login into the cookie, and keeping track of these hashes and their associated sessions on the server. You can know all the personal information you want about someone, but none of it will help you determine what their session ID hash is, since there's no direct correlation between the two.

      Now, there's still the issue of packet sniffing or XSS to steal someone's session ID cookie, but there are some preventive measures for this too. For example, the server could also track the IP address that the session ID hash is associated with, and refuse access to a client that tries to use it from a different address. I'm sure there are many more clever approaches too, not the least of which is ssl encryption.

    3. Re:So.. what's the solution? by Trails · · Score: 1

      One should ensure that a given session ID is not used across multiple c-class ip addresses (e.g. it should always come from x.x.x.* where * can change throughout the session). The reason why I say c-class and not full ip address is that the ip address of AOL users can sometimes rotate mid-session (more info).

      For example: you get an HTTP request from 66.35.250.150 (using /.'s ip for example purposes). You assign it a session ID and service the request.

      Now you get a second HTTP request, with the same session ID, from 212.58.228.155 (BBC's ip, used for example purposes). This request must be blocked, and the session killed, since the session has potentially been comprimised.

    4. Re:So.. what's the solution? by ben+there... · · Score: 1
      The reason why I say c-class and not full ip address is that the ip address of AOL users can sometimes rotate mid-session

      So AOL users can still steal each other's cookies. Guess AOL users are SOL.
    5. Re:So.. what's the solution? by Trails · · Score: 1

      Well it's either leave AOL users at risk, or have them at risk of having their session rejected in an unpredictable fashion, causing the users to get pissed off, complain, and possible leave the comapny in favour of a less secure but with a better UE competitor. If you bring that choice foward to the guy who makes business deicsions where you work, which do you think they'll go for?

  24. More "Cookie Monster" Hysteria by Doc+Ruby · · Score: 5, Informative
    The "friendly" article does start off sensibly, mentioning that "Cookies are not programs, they can't read your personal data, and they don't cause spam.". OK, main scary cookie myths put aside.

    FTFA:
    This value pair is my personal identification code that can be used to track my movements across the internet and build a profile about my surfing habits. This is possible because a cookie can be read at any time by the domain that owns it. As a result, when I visit Slashdot.org, doubleclick.net will attempt to read its cookie that is on my computer. This will provide doubleclick.net with my id value, and their database will be updated. In other words, they now know that I like to visit Informit.com and Slashdot.org. Already their profile on my surfing habits can tell them I am probably a computer geek.


    That section about the "personal identification code" talk is very weaselly. It makes cookies sound like any website can read a cookie on your computer that's flagged as "owned" by that website at any time. Cyrus Peikari and Seth Fogie (article authors) leave out the important, necessary link: the DoubleClick cookie can be read only when your computer makes an outgoing HTTP connection to DoubleClick. Like when a DoubleClick banner ad is included in a Slashdot page's HTML. Which HTTP request includes a CGI param (REFERER) pointing to the Slashdot page from which the IMG tag instructed the computer to pull the DoubleClick banner image. That's how Doubleclick gets its cookie, and the context that you visited a Slashdot page.

    DoubleClick cannot read its cookie any other time, when there's no HTTP connection from your computer to DoubleClick. Like all the rest of the pages on which DoubleClick has no banner or other "self-clicking" link. There are web bugs, invisible images tags embedded in other pages just to hit their server with the REFERER of the page triggering their bug, updating your computer's cookie with their counter (etc). But they cannot be read "at any time".

    Besides, the cookie is a nonessential part of this snooping. DoubleClick doesn't need to keep its counter on your computer - the IMG hit can update its server-side counter DB. It can ID you, though not as precisely, by your IP# and other CGI parameters you send with every HTTP request. Or DoubleClick's deal with, say, Slashdot, is that Slashdot encode the DoubleClick banner IMG tags the Slashdot server sends you with its pages with a unique ID, like your Slashdot userid. ACs and public terminals mostly escape, but they're not really targets for these marketdroids.

    And you can turn off cookies in any non-retarded browser, making them anonymous (encoded IMG URLs are much harder - see?). And you can inspect the cookies stored on your computer.

    All these issues were discussed in great detail by the HTTP Working Group as we invented cookies, almost a decade ago. Some people were philosophically opposed to letting untrusted servers store any data on users' computers. Though every page, every image is stored on users' computers, after retrieval for presentation. And we realized that stopping cookies would mean only people with money to make "cross-site" deals and maintain large centralized databases would get the power to exploit cookies for tracking. So the cost would motivate more profit-exploitation of the tech. Ultimately only profiteers would track you, and there'd be plenty of them, without even the local control that cookies offer. And the entire Web would lose even voluntary easy tracking of intersession client state.

    We decided to make cookies simple and use them. They're mostly harmless - a good balance with the huge benefit they deliver all day long in the Web Era. But I guess there's still profit to be made by scaring people on the Web, like the naive "technologists" to whom this InformIT article is directed, with incorrect cookie hysteria, and offers to help protect us.

    That's the way the cookie crumbles.
    --

    --
    make install -not war

    1. Re:More "Cookie Monster" Hysteria by VGPowerlord · · Score: 1

      It's not really a good idea calling them CGI parameters, as they're sent with every request whether or not there's a CGI script at the other end. This is what goes in web server logs and why your web server logs list things like Referrer and Browser.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    2. Re:More "Cookie Monster" Hysteria by Doc+Ruby · · Score: 1

      It's "Common Gateway Interface". Even when there's no CGI script to consume them, they're part of the CGI environment generated by the HTTP server. And "CGI" is a familiar term, especially to people who could use interpretation of this hysterical article.

      --

      --
      make install -not war

    3. Re:More "Cookie Monster" Hysteria by twistedmoney45 · · Score: 1
      I agree with the comments on doubleclick. Those are good points...but not really the focus of the article, as I read it.

      From what I read, it suggested cookies aren't inherently evil. The problem illustrated by this article was that malcious hackers could alter their own cookies at any time and gain access to another persons restaurant.com account, regardless of whether or not that other person was even online.

      You can't prevent this by deleting cookies or turning cookies off. All that would do is prevent a person from ever signing up for an account at restaurant.com (might not be a bad thing). The point was that sites are using cookies improperly and not understanding that anyone can alter them and break authentication/authorization shemes built around storing customer data in a cookie.

    4. Re:More "Cookie Monster" Hysteria by Doc+Ruby · · Score: 1

      That's why I didn't disagree with the article's main focus, "The Dangers to the Server of Improper Cookie Use by the Client". Even though that's what the ambiguous Slashdot story headline should have read.

      And why I did point out the authors did mention that cookies aren't as scary in some ways as some try to say.

      I know I write long posts. They're still not usually designed as comprehensive reviews of the entire story they discuss. Especially when they don't say they are.

      --

      --
      make install -not war

    5. Re:More "Cookie Monster" Hysteria by VGPowerlord · · Score: 1
      Since you know what CGI stands for, perhaps you should read the description of it as well. Emphasis added by me.

      The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers.

      Webservers don't create the CGI environment unless they're calling a CGI script. Some webserver modules duplicate the CGI environment as well: SSI and PHP as examples.

      The referrer is an HTTP header, specifically the Referer header. I also mentioned Browser, so I'll point out the User-Agent header as well.
      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    6. Re:More "Cookie Monster" Hysteria by RAMMS+EIN · · Score: 1

      ``DoubleClick doesn't need to keep its counter on your computer - the IMG hit can update its server-side counter DB. It can ID you, though not as precisely, by your IP# and other CGI parameters you send with every HTTP request. Or DoubleClick's deal with, say, Slashdot, is that Slashdot encode the DoubleClick banner IMG tags the Slashdot server sends you with its pages with a unique ID, like your Slashdot userid.''

      Or by exploiting your browser cache. For example, by sending you a file that causes a unique id to be sent to doubleclick's server, for example, an HTML document with an image that has the id in its filename, or a script that performs a request with the id in it. Tell the browser to cache the file that has the id in it, but not the file that has the unique id in its name. Now, each time your browser visits doubleclick.com, it will read the unique id from its cache and make a request using that id - telling doubleclick.com it's you.

      --
      Please correct me if I got my facts wrong.
    7. Re:More "Cookie Monster" Hysteria by Doc+Ruby · · Score: 1

      Yes.

      Thanks, I'll take cookies, please.

      --

      --
      make install -not war

    8. Re:More "Cookie Monster" Hysteria by schwaang · · Score: 1
      DoubleClick cannot read its cookie any other time, when there's no HTTP connection from your computer to DoubleClick. Like all the rest of the pages on which DoubleClick has no banner or other "self-clicking" link.

      I think the article was just addressing the fact that web usage across totally different sites (including Slashdot) is tracked (w/ the help of cookies) by the likes of doubleclick. That in itself is of interest, and many users still don't realize that it goes on. If that's news to a reader of the article, now they know that blocking doubleclick's cookies might help their online privacy a little.
    9. Re:More "Cookie Monster" Hysteria by Doc+Ruby · · Score: 1

      Except blocking them won't help their privacy, for the reasons I mentioned. Because it's not just DoubleClick. And it's not just cookies.

      The article addressed several things, some of which were wrong. Hence my post.

      --

      --
      make install -not war

    10. Re:More "Cookie Monster" Hysteria by schwaang · · Score: 1

      TFA points out something many people don't know which materially affects their privacy. The fact that there are other ways of gathering the same data does not negate the fact that cookies are actively used for that purpose, nor is it "hysteria" to point out such use of cookies. Hence my reply to your post.

  25. White-list the only way by Anonymous Coward · · Score: 0

    It's almost scary looking at your cookie list after some surfing. That's why I have allowed cookies only from certain hosts.

  26. want a cookie by erbbysam · · Score: 0, Offtopic

    good website:want a cookie? you:not from your site! good website:alright, I'll live on. bad website:want a cookie? you:not from your website bad website:that wasn't a question. We're not going to work for you now.

  27. Cookie Dangers... by neax · · Score: 0, Flamebait

    "A Cookie is a Sometimes Food". Do not overuse; may cause drowsiness, fatigue or a fat ass.

    --
    Hard work is just an accumulation of the easy things that you didn't do when you should have.
  28. Deleting Cookies Automatically by Kelson · · Score: 1

    Firefox and Opera both make it easy to automatically delete cookies.

    In Firefox, go to Tools->Options* and select Privacy. In the Cookies section, change "Keep until:" to "I close Firefox." Voila! All cookies will be deleted automatically whenever you close Firefox. Plus, by clicking on the "Exceptions..." button, you can set a list of sites for which you want to remember your cookies. Alternatively, you can use the Clear Private Data feature, but wipes all cookies, even the ones you've listed under Exceptions.

    In Opera, go to Tools->Preferences and select Advanced. Then choose Cookies. Select "Delete new cookies when exiting Opera." Then clear out any cookies you want to get rid of. From that point on, cookies set before you turned on the checkbox will stay until they expire, but cookies set afterward will be dropped when you close the browser. You can add more semi-permanent cookies by unchecking the box, visiting a site, then checking it again.

    *Or equivalent on Mac or Linux.

    1. Re:Deleting Cookies Automatically by Anonymous Coward · · Score: 0

      In Firefox, you can do it one better with an addon.

      I recommend Permit Cookies.

  29. Cookies by KermodeBear · · Score: 4, Informative

    I have a friend who works for a medical software company. Their system handles all kinds of personal information; SSNs, medical records, body scans, etc. The authentication is cookie-based; All the information about a user's access is a serialized, base64 encoded data structure.

    Yup, you heard it right. base64 decode your cookie, change a few values, stick it back in... Ta-da, you're an admin.

    Improper cookie use can be a nasty, nasty thing. The worst part is that this problem was brought up to the lead developer, who had originally wrote this auth system, but... "Well, it is base64 encoded, noone will ever figure that out." Yeah, right.

    --
    Love sees no species.
    1. Re:Cookies by The+MAZZTer · · Score: 4, Informative

      If I see a nonsensical combination of upper and lower case letters, numbers, and punctuation, especially if it has one or two equal signs tacked onto the end, I immediately think "base64!".

      Firefox allows base64 encoding for data: urls, and we can use this to make a quick-n-dirty base64 decoder. Just type data:text/plain;base64, (including the comma) into the address bar and paste the string on the end, and hit enter to see the decoded string (if it's plaintext).

      Base64 is not encryption and it should not be used where encryption is needed (or in this case, a secure DATABASE). Base64 is a way to represent binary data in plaintext without having to worry about data corruption due to non-binary safe programs.

    2. Re:Cookies by accessdeniednsp · · Score: 1

      Explain to him why he should use a salt in his data:

      http://en.wikipedia.org/wiki/Syntactic_sugar#Synta ctic_salt

      Really, it's not *that* hard, people...

    3. Re:Cookies by Anonymous Coward · · Score: 0
      Explain to him why he should use a salt in his data:

      http://en.wikipedia.org/wiki/Syntactic_sugar#Synta ctic_salt [wikipedia.org]

      Really, it's not *that* hard, people...
      It's hard to tell if you're trying to be funny and are just no good at it or if you are truly an idiot who thinks "syntactic salt" has anything to do with data security.
  30. Let's discuss something new by claes · · Score: 3, Informative

    Firefox 2 includes the new WHATWG-specified client-side persistent storage. However, some argue it is critically flawed. Learn the arguments now and we can discuss this further on Slashdot in 2010!

    1. Re:Let's discuss something new by Pichu0102 · · Score: 1

      Are we allowed to use those arguments we learned when the dupe comes round, or do we have to wait until 2010?

    2. Re:Let's discuss something new by claes · · Score: 1

      You better wait. In 2007 we will argue about Google and Ipod every day, Slashdot will be too busy for dupes on persistent storage until 2010.

  31. Is it a telling comment by dmatos · · Score: 1

    that when I read the title, I expected an article about the dangers of chocolate chips, maimings performed with oatmeal-raisin, and death by fudgee-o's? Hrm, methinks I should have a snack.

    --

    It may look like I'm doing nothing, but I'm actively waiting for my problems to go away.
    --Scott Adams
  32. Stupid article.... no mention of session cookies.. by BarnabyWilde · · Score: 1

    ...outdated

  33. Firefox could do better by brunes69 · · Score: 2, Insightful

    Firefox could do better around cookies.

    For example, just look at their cookie management under "privacy". Sure, they have white and blacklists for cookies, and that's fine. But bring up your cookie list - the *ONLY* option you have for each cookie is to delete.

    Why isn't there are "delete and block" button? It would be SO SIMPLE to add this function, and make the management of cookies so much simpler for the 95% of web users like me who want to accept *most* cookies, and only block obvious cross-site tracking cookies.

    The task of copying cookies from one list to another is very tedious. This sort of thing should be able to be automatic.

    1. Re:Firefox could do better by schwaang · · Score: 2, Insightful

      Not only that, but site list is sorted without grouping by domain. So o.nytimes.com is far away in the list from video.nytimes.com. That's just lame.

  34. Cookie Expiry by ebob9 · · Score: 1

    One of the great features of a cookie that the article leaves out is the fact that servers don't need to set an Expiry date.

    If you don't set an expiry date, the cookie is temporary, and will not be stored to disk. It will be deleted/destroyed when the browser is closed.

    Cookies with SessionID information should ALWAYS be temporary, or no Expiry date. Anyone who sets a cookie with sensitive information with an expiry date is asking for trouble, plain and simple.

  35. Re:Gimme yer dough by Anonymous Coward · · Score: 0

    C'mon. This is completely on topic--is not robbing a bank with a spritz-cookie gun an improper use of a cookie? Sheesh. What's a man got to do to get a laugh around here.

  36. Re:Stupid article.... no mention of session cookie by Anonymous Coward · · Score: 0

    They previously were slashdotted on sessions at http://www.informit.com/articles/article.asp?p=603 037&seqNum=1&rl=1

  37. Worst case scenario by HuckleCom · · Score: 0

    If you use cookies improperly you'll grow blue muppet hair.

  38. Use Jabber by Anonymous Coward · · Score: 0

    I'd use Jabber instead since it's a stateful protocol. HTTP is not and that's why we have all these work-arounds to make it into one...badly.

  39. Have you ever seen a malicious cookie??? by TroopaCabra · · Score: 0

    This cookie is certainly malicious. Don't worry- It's just a picture. The Malicious Cookie

  40. Selective Cookie Rejection? by Anonymous Coward · · Score: 0

    I wish there was a way to reject cookies from specific sites. I like the ability to not having to login to various sites each time I visit them but I don't like getting tagged with non-esential cookies.

  41. You lie! FUD! FUD! by fm6 · · Score: 3, Funny

    If you were really that old-fashioned, you wouldn't have to disable JavaScript. The graphical web browser was invented in 1992, so you'd be compelled to use a text-only browser, such as Lynx. And those don't have any JavaScript to disable.

    You are obviously part of an Evil Conspiracy. Please rant some more so I can figure out which one.

    1. Re:You lie! FUD! FUD! by rucs_hack · · Score: 1

      strictly speaking lyx doesn't count either. It also renders many web page elements that only exist because of graphical browsers.

    2. Re:You lie! FUD! FUD! by fm6 · · Score: 1

      You can always run the 1991 version.

    3. Re:You lie! FUD! FUD! by rucs_hack · · Score: 1

      you crazy foo!

    4. Re:You lie! FUD! FUD! by moeffju · · Score: 1

      I should probably point out that most newer versions of links do support JavaScript.

      --
      follow me on Twitter: http://twitter.com/moeffju
  42. doing that also nicely blocks AOL users by bigtrike · · Score: 1

    bingo. that's why i store the IP address along with the session ID in the database. That has the convenient side effect of making your site not work for AOL users or anyone else behind a balanced proxy
    1. Re:doing that also nicely blocks AOL users by PhxBlue · · Score: 1

      That has the convenient side effect of making your site not work for AOL users or anyone else behind a balanced proxy

      You misspelled "benefit." :)

      --
      !#@%*)anks for hanging up the phone, dear.
  43. That doesn't do anything. by Generic+Player · · Score: 1

    If I can sniff your http traffic, I can also spoof your IP. All your plan will do is break your site for people who are behind a proxy pool.

    1. Re:That doesn't do anything. by brunascle · · Score: 1
      If I can sniff your http traffic, I can also spoof your IP.
      and how would you get the returned packets, if my server is sending them to the IP you're trying to spoof?
    2. Re:That doesn't do anything. by Generic+Player · · Score: 1

      Obviously if I can sniff your http traffic, then I can also sniff the http traffic going to you but generated by me spoofing your IP. If I can sniff your traffic then I am between you and the server. If I am between you and the server, I can send packets from your IP, and then look at the responses coming back. I can even decide not to let the responses get to you, so you wouldn't even be able to tell it was happening even if you were watching.

    3. Re:That doesn't do anything. by brunascle · · Score: 1

      yup, that's true. and as someone else pointed out, if you and the victim were both behind the same NAT, you could have the same public IP address anyway. so it obviously isnt perfect, but it's better than nothing.

      and, other than forcing SSL for the entire site, i cant think of anything better.

  44. Enough Already! by h4ck7h3p14n37 · · Score: 1

    Anyone want to guess how many more stupid articles we're going to see explaining the basics of how HTTP, cookies or Javascript works? I find it amusing, yet sad, that so many people are pointing out web vulnerabilities that are nothing more than a n00b not understanding how someting works and either misconfiguring it or using it improperly.

    I'm sorry, but cross-site scripting attacks are not real vulnerabilities! The problem is that your stupid browser can execute Javascript that's allowed to read local files and send data out over the network. The problem is not some forum maintainer allowing people to post Javascript, the problem is that you're allowing it to run. Turn Javascript off! It's garbage.

    As for cookies being used improperly, what's so hard to understand? It's a file that's stored on a client's system. Under no circumstances should you store data you don't want the client to see, nor should you blindly trust the data the client provides.

    Let's not even get into form validation. Apparently a lot of "web developers" don't understand the difference between an HTTP server and HTML content. No, just because you limited that pulldown to three options in your HTML doesn't mean the client can't send something else in its POST request.

    I can't help but to wonder where companies are finding all of the idiot web developers.

    1. Re:Enough Already! by twistedmoney45 · · Score: 1
      I suspect that people will stop posting these articles once sites start implementing proper security controls.

      While you might be very familiar with security, the kids coming out of school and stepping into jobs are not. They haven't heard that cookies can be abused, or even suspect that a person would or could inject Javascript into a program they wrote.

      History repeats itself because a new ignorant workforce replaces the older more knowledgable one...I wonder if this cycle occurs more often in the security community.

      The simple fact that there are so many sites out there that use cookies to store sensitive data indicates the need for such articles...of which I personal hope there are more!

    2. Re:Enough Already! by imgumbydammit · · Score: 1

      I can't help but to wonder where companies are finding all of the idiot web developers. In my experience working as a web developer and hiring/training them, there are two types of people who get into the field: wanna-be java programmers who didn't get the job they wanted and ended up in web, and designer types who think they can program. Futhermore, a lot of manager types also have no idea that web programming involves anything more than playing with images and colors.
      --
      That's right: I'm gumby dammit.
  45. Old news by infofc · · Score: 1

    Hmm, not even old, more like ancient use. It's as basic as it gets. Idiots will always get a chance to create software, so it's hardly surprising that you can find dumb site implementations.

  46. HttpOnly cookies by dumky · · Score: 1

    The article mentions the vulnerability of cookies to XSS attacks. There is actually a way of protecting cookies from javascript, by using the HttpOnly option. It was introduced in IE6. Hopefully, it will get implemented in other browsers too, as it is a step forward in security for cookies.

    http://msdn.microsoft.com/workshop/author/dhtml/ht tponly_cookies.asp

  47. That really freaked me out!!! by pablo_max · · Score: 1

    seriously, that headline really freaked my out!! I had just eating like 18 cookies!! Doesn't look like this applies to me though. Thank god for that.

  48. Misuse? by teebob21 · · Score: 1

    Clearly we are all ignoring the true danger of improper cookie use: a fat ass.

    --
    khasim (12/9/06): In a blind taste test, more people preferred Coke over the Pepsi that I had previously pissed in.
  49. Cookie Misuse is widespead by Anonymous Coward · · Score: 0
  50. OT, Scotty..... Re:Cookies? Javascript? Etc? by mrmeval · · Score: 1

    So where did Scott post his social security number, credit card numbers, drivers license number, license plate number, employee id number, his entire medical history, his entire school records, how many times he visits a whore, and a digital copy of his finger prints, retnal pattern and DNA.

    --
    I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty