by enscr · 12y ago · 0 comments
Could someone explain in simple english, how did they overlook known & well documented bugs that got them hacked (e.g. Bug 3 about cross domain injection). I'm wondering if someone of Github's caliber can be hacked so easily, what about the rest of the masses developing web apps. Especially all those new crypto-currency exchanges popping up left & right.
I've been toying with Django. Reading through the docs makes me feel that as long as I follow the safety guidelines, my app should be safe. It feels as if they've got you covered. But this post rattles my confidence.
Cheers !
https://github.com/github/rails
http://www.kalzumeus.com/2013/06/17/if-your-business-uses-ra...
> I . . . decoded _gist_session cookie (which is regular Rails Base64 encoded cookie)
In Rails 4 the session cookie is encrypted with a server-side secret, so the end user can't decipher it.
They're all pretty bad. SQL injection was a boondoggle for years until people wised up, or more likely moved to the then-newly-popular ORMs, but it still got Bell Canada recently. Target is #36 on the Fortune 500. That wasn't a webapp based attack, but even companies of their considerable resources still get security that wrong. Sure, you can tell yourself a startup is more tech focused and better positioned to get security right. But do devops building for server stacks and platforms they don't fully understand while pushing code multiple times a day really have both the skills and time to focus on security?
What do you think makes Github that much better than all the rest?
Really? I'm not so sure, AFAICT Github doesn't have any new or interesting problems to deal with. It's just a Rails app that's constantly developed on. You can do that, well, anywhere.
It's assured that a ton of Rails apps are vulnerable, it's just that no one has found them, or more likely, is not publicly releasing or actively exploiting them.
Also, Rails doesn't address for all security pitfalls. Some of its mechanisms are actually underdeveloped and require rolling lots of checks by yourself, such as for proper session termination, IIRC.
In computer security, you have to get it right every single time. The bad guys only need to get it right once.
Defense is hard.
This comes up time and time again in any defensive discipline:
Over two decades the CIA had learned again and again that it could not hope to
defend against terrorists by relying solely on its ability to detect specific
attacks in advance. No matter how many warnings they picked up, no matter how
many terrorist cells they disrupted, at least some attackers were going to
get through. Officers in the CTC privately compared themselves to soccer
goalies: They wanted to be the best in their league, they wanted to record as
many shutouts as possible, but they knew they were going to give up scores to
their opponents. Ultimately, many of them believed, the only way to defeat
terrorists was to get out of the net and try to take the enemy off the field.[1]
The final sentence above highlights the one pecularity of InfoSec; you do not have any
offensive capabilities.[1]: "Ghost Wars" (Steve Coll) pg 505
This may just end, like nuclear warfare, in MAD... But it would be great fun to watch!
http://en.wikipedia.org/wiki/Client_honeypot
http://books.google.com.au/books?id=YQmWtsqlvfMC&dq=active+h...
One of the keys to developing good software is hiring third-parties to conduct audits. A bug bounty program is one way to incentivize people who are already probing your software to take the next step and tell you about the bugs they find.
until that's different it's harder to answer your actual question. my guess, it'll be better but inevitably still have some holes.
Here is some OWASP material specific to Django.
If you like reading http://blog.mikeleone.com/2011/10/security-django-and-owasp-...
If you like watching http://www.youtube.com/watch?feature=player_embedded&v=sra9x...