Live data from Hacker News

Five Minute Guide to Software Security

oneupsecurity.com

11–20 of 37 posts

Re: Five Minute Guide to Software Security

#11
post #10
post #5

Wow did I miss arguably the most important box to check, KISS? Seriously, keep it EFFING SIMPLE. The more complex and involved it is the more things can and will break. Does no one follow that anymore?

Sorry to burst that bubble, but KISS doesn't produce neither secure nor reliable software. Security and reliability is something you have to design for.

Software security engineers design for simplicity; it's one of the fundamental ideas of the discipline.

Re: Five Minute Guide to Software Security

#12
Not trusting user input is a good start, but the client shouldn't be trusted, either.

I have seen plenty of web apps that fell short on this...

Whenever I'm on a web app that has a button shown but disabled, you can be pretty sure that I will enable that button and click it...

If the client is limiting the maximum length of the contents of a textbox, I'm probably going to change that and see if the server is performing the same validation...

My favorite so far, though, was client-side calculation and validation of order amounts for some products. Intercepting the JavaScript file and tweaking it before the browser started using it allowed me to place an older for a bunch of products for only $0.01 (going negative was also attempted, too, but this particular system did a pre-approval with a payment gateway and it didn't like that... so I settled on a penny).

These were all things I've done with permission, of course... but it's amazing what you can do when people assume the browser will always follow the rules...

Re: Five Minute Guide to Software Security

#13
post #7
post #5

Wow did I miss arguably the most important box to check, KISS? Seriously, keep it EFFING SIMPLE. The more complex and involved it is the more things can and will break. Does no one follow that anymore?

Easier said than done in the real world.

Maybe but I would think if you want to be taken seriously you would add it to the list.

Re: Five Minute Guide to Software Security

#14
post #13
post #7

Earlier quoted context omitted.

Easier said than done in the real world.

Maybe but I would think if you want to be taken seriously you would add it to the list.

To me it seems a little like a platitude or general development advice.

Re: Five Minute Guide to Software Security

#15
post #2

>Ensure use of Anti-CSRF tokens, CORS, and crossdomain.xml policies to prevent an attacker from forcing a user to submit authenticated requests. isn't crossdomain.xml an adobe flash thing?

In theory it was designed for any "web client" [1] but it designed for Flash.

Just for curiosity, you can check twitter's [2]

[1]: http://www.adobe.com/devnet/adobe-media-server/articles/cros... [2]: https://twitter.com/crossdomain.xml

Re: Five Minute Guide to Software Security

#17

These types of guides always overlook the most important principle of software security: Always avoid reading, storing, or interacting with secure, personal, or otherwise "interesting" data. As much as possible, strip this information from your application, so that when it gets pwned the blast radius is absolutely miniscule. Create software not liabilities.

i always cringe when i enter all my payment details and then there's another step to "review before submit".

i know you just stored all of that somewhere, CVV included.

Re: Five Minute Guide to Software Security

#19

Not trusting user input is a good start, but the client shouldn't be trusted, either. I have seen plenty of web apps that fell short on this... Whenever I'm on a web app that has a button shown but disabled, you can be pretty sure that I will enable that button and click it... If the client is limiting the maximum length of the contents of a textbox, I'm probably going to change that and see if the server is performi…

At my last job the HR guy installed this super annoying Slack bot that would spam everyone every week with a "happiness survey". I got so tired of it I eventually logged the requests my survey made and used curl to replay one with a happiness score of -100 (usually the value would be between 0 and 10). Response said "success".

Turned out the backend happily took that value and it skewed our average a lot and the next week I was laughing my ass off while HR was trying to figure out why everyone was suddenly so unhappy.

Re: Five Minute Guide to Software Security

#20

These types of guides always overlook the most important principle of software security: Always avoid reading, storing, or interacting with secure, personal, or otherwise "interesting" data. As much as possible, strip this information from your application, so that when it gets pwned the blast radius is absolutely miniscule. Create software not liabilities.

While this is great advice in principle, in practice it substantially complicates development. We need far better and more accessible end-to-end encryption tools if we want developers to start doing this by default in non-security critical use cases.

No it doesn't. It just requires a shift in your thinking.

Having a database is a code smell.

If you absolutely have to have a database, then having a `users` table (or equivalent) is a code smell.

If you absolutely have to have a `users` table, having any columns in it other than `id`, `username`, and `password_hash` is a code smell.

...and so on.

Admittedly this isn't necessarily easy in a company setting. It's in direct conflict with what the sales & marketing people want, and unfortunately that means your job is sometimes to fight with the sales & marketing team. But it's not complicated.

Post reply on HN