Slashdot Mirror


Cross Site Cooking

Liudvikas Bukys writes "Michal Zalewski identifies a new class of attacks on users of web applications, dubbed Cross Site Cooking. Various browsers' implementations of restrictions on where cookies come from and where they're sent are weaker than you think. Web applications that depend on the browser enforcing much will offer many opportunities for mischief."

15 of 125 comments (clear)

  1. Never trust the input by MyNymWasTaken · · Score: 5, Informative

    Web applications that depend on the browser enforcing much will offer many opportunities for mischief.

    That is true regardless of what the exact nature of the issue is. Never trust user provided input.

    Expecting, not just a specific third-party program but, an entire class of programs to maintain your data integrity & overall security is sheer laziness or plain incomptence.

  2. cookies insecure by amazon10x · · Score: 1, Informative

    Wasn't this demonstrated when some guy managed to steal a bunch of passwords stored in cookies. It would grab the cookie when they visited his site and he would look through them and access accounts accordingly. I think this happened on a social netowrking site (myspace?)

  3. Work arounds.... by IAAP · · Score: 2, Informative
    The Firefox extension: "SpoofStick" can help - I think.

    FTFA: One can set a cookie for ".com.", then bounce the visitor to http://www.victim.com./ .

    I'm thinking plugins like the one I mentioned would help a user from getting screwed like this. I'd be curious as to other methods.

  4. Re:Web developers by jacksonj04 · · Score: 5, Informative

    Alternatively, only drop a session tracking ID by cookie then maintain session expiry data on the server. With this it's possible to also do things like hostmask matching, so if the hostmask of the machine sending the session doesn't match one on the database, the password can be asked for again as verification.

    --
    How many people can read hex if only you and dead people can read hex?
  5. Re:The second one suprises me by Ark42 · · Score: 3, Informative

    Yeah, that one surprised me as well, and he made it seem like modern browsers where still affected, but a simple PHP script:
    <?
        SetCookie("Test","Value",0,"/",".com.");
        print_r($_COOKIE);
    ?>

    Did not work in Firefox or IE6 for me, so those browsers at least, seem safe from this.

  6. Opera by Rits · · Score: 2, Informative

    Opera is the one browser that was apparently not researched, as the issues do not show there (#2) or are less severe (in case of issue #1). People sometimes complain that Opera throws a warning for (or refuses) a cookie that the other browsers happily accept. This is no error, just Opera better at following the specs like RFC 2965...

    --
    If you don't like having choices made for you, you should start making your own. - Neal Stephenson
  7. Formkeys by Bemmu · · Score: 2, Informative

    I wrote about this a while back, warning community sites about it. That was before the MySpace chaos. Formkeys help as a basic precaution, although they may also be read and passed on by ajax techniques.

  8. Microsoft have been doing this for years by Anonymous Coward · · Score: 3, Informative


    with MSN network, we (large corp) banned all of their MSN domains as this is a security risk and as its intentionally deceptive on their part we had to classify it as malicious due to the intent

    here (with analysis)
    news report here

    of course MS still use it and the surfers still have no idea its occuring, though if you block their servers you soon find out how many times they try.

    never mind trusting the user, its the server and the company that does it that people cant trust

  9. Don't Use Cookies: Most Sites Don't. by Anonymous Coward · · Score: 1, Informative
    Rewrite URLs with encrypted data as required instead.

    Only 22% of servers use cookies. The best sites work fine without them.

  10. Re:Opera by Anonymous Coward · · Score: 1, Informative

    The Incorrect Paths thing is handy, but I refer you here:

    http://nontroppo.org/wiki/CookieSettings

    I would never have worked out Opera's cookie handling without this. Now, it works nicely.

    Clear out all your old cookies. Set Opera to accept anything. Go to all the sites you trust and log in and out. Then set your cookies to Normal: Treat as specified in Server Manager; Third-Party: Accept All.

    Do a quick review[1] to be sure there's nothing unwanted left in the list. Opera stops bothering you about crap cookies, because Server Manager just denies them right away, but all those junky sites (eBay, for one) that seem to need your blood group and mother's maiden name, in a cookie that goes across a hundred servers, actually work.

    'Course, a Hosts file that blocks many of their affiliates is never a bad idea either.

    AC

    [1] Quick is a complete lie. Opera has a funny approach to displaying the cookie list. You'll find you need to close it and reopen it to populate it, and after deleting one cookie, it weirdly decides to hide some others. So you close, reopen and delete, lather, rinse, and repeat. You'll get there.

  11. Re:Web developers by multipartmixed · · Score: 2, Informative

    I also use cookies for display preferences which might reasonable change from browser-to-browser or host-to-host for the same user.

    Nothing critical, though; worst case scenario, the attacker makes the screen look a little funny. Whoopie.

    --

    Do daemons dream of electric sleep()?
  12. Re:Opera by CTho9305 · · Score: 2, Informative

    SeaMonkey (don't download the beta just yet - 1.0 is shipping in a matter of hours!)

  13. Re:I read TFA... by Anonymous Coward · · Score: 1, Informative

    Because that's the latest they can.

  14. Re:No site should trust client-side information. by ArsenneLupin · · Score: 2, Informative
    This is why I so appreciate Perl's "taint checking" mode. In this mode, *all* data obtained from external sources ... is considered tainted

    Except that this only allows you to protect against lack of datavalidation/escaping bugs (SQL injection, etc.), not against this attack.

    The cookie planted by the attacker looks legit at first glance (the attacker may very well have gotten it from your site in the first place, before foisting it on an unsuspecting victim). The problem lies not in the cookie's contents, but on the fact that that content is known by a third party in addition to the victim. No amount of taint-checking will reveal this.