views:

232

answers:

4

This has been asked many times, but none of the answers are satisfying, I looked online for secure tutorials but I have not found something good enough you would want to use in an important website. It just seems like there are so many ways to get around security.

Does anyone know of a GOOD one? What do you guys do when you build a website that needs something like this?

A: 

Download open source frameworks or CMSs, dive in the code and see how it is done :) Example: Drupal !

redben
Not many open source frameworks or CMSs are written with security as a primary focus.
Jacco
Plus they are open source, anyone can look in there to see how things work! They are good for very basic sites that a logged user can't really do too much damage though.
Murtez
No sir. Drupal for instance has a whole team that's only concerned by security in the project http://drupal.org/securityOn the other hand, because it is open source and anyone can look at the source (not only black hats) vulnerabilities are easier to spot and correct :)
redben
@Murtez - obscurity is the poorest form of security: http://en.wikipedia.org/wiki/Kerckhoffs%27_principle
LeguRi
A: 

I use a permission based system where every user belongs to a group and every group has a set of permissions, in every form I use a nonce field to prevent 'accidental' submiting, if it's really important I check user passwords with crypt and not allow weak ones.

EDIT. you could also use Email verification for really important commands.

Javier Parra
+1  A: 

With security, the best plan is to not do it yourself; leave it to the experts... and I'm someone with a severe case of "Not Built Here" syndrome.

If you want to learn security, write it yourself, but don't use it in a prod environment.

If you need to learn security, I suggest at least reading You're Probably Storing Passwords Incorrectly on Coding Horror and reading Essential PHP Security.

If you need security in a prod environment, get a library from a trustworthy professional source, and use it. I suggest OpenID.

LeguRi
Yes I need to learn security, I've been looking around at tutorials, different attack types, how to prevent them, etc. but not sure where to go from here.
Murtez
+1  A: 

You can get general but useful info here - The Definitive Guide To Website Authentication (beta).

Bakhtiyor