The Spider of Doom
thedailywtf.com
thedailywtf.com
> ... management didn't quite see what was wrong with
> that. Instead, they told the client to NEVER copy
> paste content from other pages.
I'm reminded of the story about Feynman exposing the security problems with the combination locks used on safes at Los Alamos and Oak Ridge. Instead of fixing the problem, management just told people not to let Feynman near their safes. > He tells the story of being in Oak Ridge, and delivering
> a report to a colonel there. He reports that the colonel
> felt himself far too important to have an ordinary safe
> -- he ordered a special multi-ton safe. Feynman was
> delighted to discover that this big, important safe used
> the exact same type of lock as their little safes did,
> and just to be sure, he took the last two numbers off it
> while standing in the colonel's office. After the colonel
> closed the safe, Feynman told him the safes weren't
> secure, and proved it by opening the safe, then
> explaining how he did it. He told the colonel that the
> vulnerability was in leaving the safe open while he
> worked. "I see, very interesting," replied the colonel.
> Several months later, Feynman was again at Oak Ridge, and
> was surprised at all the secretaries telling him, "Don't
> come in the office! Don't come in here!"
> It developed that the colonel had immediately sent around
> a memo asking everyone, "During his last visit here, was
> Professor Feynman in your office?" Those that answered
> yes received another memo: "Change your safe combination."
> That was his solution - Feynman himself was the danger.
> Meanwhile, of course, people still continued to work with
> their safes open ...An authentication system should allow access if and only only if the client presents valid credentials in the expected manner (e.g. reporting a cryptographic cookie back with the HTTP request). In other words, the auth system should use the presence of valid credentials as the criterion for access.
Instead, this system used the absence of something as the criterion. Imagine if a secure building did this. Everyone arrives at the security checkpoint, and if the guards don't recognize you, they give you a badge that says "I'm not allowed in." Anyone who's not wearing the badge is allowed in. That's what this website was doing.
Moral of the story: Your authentication system can depend on cookies, JavaScript, and any other technology being enabled on the client side as a precondition for access. If you do that, and someone has disabled the technology, they're locked out, and there's no security breach--just a frustrated user. But your system should never trust the absence of some marker as proof that the client is allowed in.
Supposedly he sent it with a note along the lines of, "This one's on the house, but we're not doing it again."
Wouldn't the root cause be allowing GET requests to perform destructive actions?
1: disabling cookies bypasses security checks
2: a GET request is not side-effect free
The root cause is the combination of both issues.
This is also a pretty good case study of why using authentication frameworks is a very good idea.
Deleted comment
Because that's what the HTTP spec says. Wander off-spec, and you will eventually have problems, like the unfortunate gov department in the article.
http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Saf...
Relatedly, idempotency is a too-poorly understood concept.
What do you mean?
Therefore, if you suddenly find a way to actually forbid GET to ever trigger that, then that half wouldn't work "properly" any more.
I'm not a web-dev guy at all--is this still a problem today?
Josh should have been fired on the spot for such a ridiculous security oversight.