Live data from Hacker News

Ask HN: Why do you think vulnerable code is still being released today?

news.ycombinator.com

1–10 of 22 posts

Ask HN: Why do you think vulnerable code is still being released today?

#1
Fellow hackers, I'm curious as to why you think vulnerable code in applications is still being released today?

Why is SQL Injection still #1 (in Owasp T10) ?

As a developer myself working for a top-10 us e-retailer I saw: - Developers not having any(or enough) care/knowledge to write secure code. - Tight deadlines where security of an application was swept under the rug. - Security being swept under the rug due to time, other "priorities" like new features, etc.

Curious on your thoughts or experiences?

Re: Ask HN: Why do you think vulnerable code is still being released today?

#4
It's like asking "Why doesn't everyone know calculus in this day and age? It was discovered hundreds of years ago." Sometimes people are ignorant, lazy, under a time crunch, etc. When information became widely available(That SQL injection is bad and easy to fix) has little to do with how 5 random dudes working on a team write their code.

Re: Ask HN: Why do you think vulnerable code is still being released today?

#5
Security is really hard, you need everything perfect all the time. It's easy over look something, or just say "eh, no one will ever find it". It's hard to make sure a million or even 1,000 lines of code are 100% safe. Writing totally secure code takes much longer, much more skill.

Re: Ask HN: Why do you think vulnerable code is still being released today?

#6
If you want reasons other than negligence.

The biggest reason is likely universities: I was there not too long ago (6-7 years), I wrote code that was secure against SQL injection - which lost me marks. They teach you to write insecure code and so help you God if you don't stick to what they have taught you.

Secondly is human error - that's to do with buffer overflows etc. You might say that we have static analysis, but...

Thirdly is that our static analysis tools simply are not "there" yet. They will catch the vast majority of vulnerabilities (especially when coupled together with contracts) but there are those corner cases that only a very creative security analyst will find.

Honestly though, if I was ever in a fire/hire position bringing SQL-injectable-code to a code review would be grounds for being fired on the spot.

Re: Ask HN: Why do you think vulnerable code is still being released today?

#7
A good thing though is the programming methodology is shifting its stance. As framework-based programming becomes mainstream, which it almost has, for any half-decent setup- the programmer will create loop-holes because of his _stupidity_ and not because of his inexperience in the programming environment.

As fixes come to the base of the infrastructure, the benefits would evaporate throughout the stack on top of it. Ideally, a developer should focus on features, priorities and deadlines. It sure as hell may be geeky, but it is not cool to force-everyone to-know-everything.

Re: Ask HN: Why do you think vulnerable code is still being released today?

#10
As a consultant, I've seen a fair share of people building their own "ultra-secure" authentication, authorization, and encryption algorithms. One project simply took plain-text passwords, Base64-encoded them, reversed the result, and called the passwords "encrypted". Plenty of others would execute raw SQL without validating user input. This is an education problem.

Last winter we saw Ruby on Rails vulnerabilities that likely came about because the focus of the Rails framework has not traditionally been security. Rails is "optimized for programmer happiness". I'm cool with that, just know what you're getting in to when you choose to adopt a new framework (stay up to date with security patches and otherwise secure and monitor your web servers as best as you can). Any new framework that becomes widely adopted will likely go through the same type of problems.

With all of that said, I learned nothing about code security until I had to. University did not really touch on it, so most of my education on security came later in a workplace setting when I desperately needed it.

Post reply on HN