Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: thedoc on 01/10/2013 21:30:01

Title: Comment on password security...
Post by: thedoc on 01/10/2013 21:30:01
Gordon Ross  asked the Naked Scientists:
   
On the latest edition of the naked scientist podcast, you mentioned about choosing passwords. You'd be surprised at how hard it is to create a good, strong password. There was recently an article on the Ars Technica website about cracking passwords: http://arstechnica.com/security/2013/05/how-crackers-make-minced-meat-out-of-your-passwords/

As to having secure passwords for banking sites, you might want to talk to Ross Anderson in the Computing Lab. He does a lot of research into security and the finance industry. Some of the things he comes out with are quite interesting: http://www.cl.cam.ac.uk/~rja14/#Reliability

Gordon.
   
What do you think?
Title: Re: Comment on password security...
Post by: MrVat7 on 23/01/2014 11:41:12
How to make 'the most secure' password  ?
Title: Re: Comment on password security...
Post by: RD on 23/01/2014 15:25:07
When using MD5 to hash a password (http://arstechnica.com/security/2013/05/how-crackers-make-minced-meat-out-of-your-passwords/) you should add a long salt (http://en.wikipedia.org/wiki/Salt_%28cryptography%29).

For a user database the salt should different for each user, ( say another MD5 derived from the date and time they first became a member, their user name, and other data ).

Password ="123456"
Salt = fc4270f85f1e9bbf501bc507b10e158b
MD5 (password+salt) = MD5(123456fc4270f85f1e9bbf501bc507b10e158b) = 608c5d43002f90cfeb7289e4ff9ac669

So on database the password "123456" for a particular user is stored on the database as 608c5d43002f90cfeb7289e4ff9ac669

If some other user also selects "123456" as their password it will be encoded completely differently on the database because their salt will be different , (try changing one character of the salt and see the different MD5 which results (http://www.md5decrypter.co.uk/hash-a-password.aspx)) , so frequency analysis (http://en.wikipedia.org/wiki/Frequency_analysis) of the database for common passwords (http://www.whatsmypass.com/the-top-500-worst-passwords-of-all-time) isn't going to help the cracker.

Reverse MD5 (http://www.md5decrypter.co.uk/) does not reveal the password if a long salt is used, and a brute-force-crack of an MD5 will take "hundred trillion trillion centuries (https://www.grc.com/haystack.htm)".
Title: Re: Comment on password security...
Post by: CliffordK on 23/01/2014 21:06:13
A good system design should have a method for dealing with multiple password attempts.  For example a 24 hr (or unlimited with manual reset) lockout after 5 password attempts for each user. 

It should also detect when a single IP address is attempting more passwords and user-names than expected.  Unsuccessful login attempts for 3 different user names from the same IP address or subnet, and that IP address and subnet gets a 24 hr (or permanent) lock.

Of course one can augment it with statistics.  A "family" may have multiple accounts...  but not thousands of accounts. 

Personally I do not like accounts that use well known information for "security questions", birthday, parents middle names, parents birthdays, mother's maiden name, etc. 

As far as brute force cracking, the passwords that can be easily "cracked" are those that are 100% numeric, or exist as a word in some unabridged dictionary. 

There are somewhere between 100,000 to 1,000,000 words in the English language.  Throw in all European languages, and if one can test a billion passwords a second, then the password should be able to be cracked in less than a second.

Add a single digit or character from the keyboard to the first and last place in the word and it multiplies that by perhaps a factor of 100, still not too bad. 

A little more obfuscation, and the dictionary attack fails. 

A good security system should require for some level of obfuscation before accepting the passwords.

The key, of course, is to not allow a person to test a billion passwords in a few seconds. 

For the hacker, if one is limited to a few dozen password attempts, perhaps spread out over a few weeks, then one needs to come up with a far better algorithm to select passwords to probe.  One method might be some kind of baiting.  For example set up a personal's website.  Lovely women (or hot men) here, and try to entice the target to sign up.  With some luck they'll give you the SAME password as their bank account.  Or, of course, hacking their computer and looking for a plain-text password file, or adding a keystroke logger.  The key, of course, is to never use the same password for the high security and low security accounts.
Title: Re: Comment on password security...
Post by: RD on 24/01/2014 01:24:05
How to make 'the most secure' password  ?

I did find a JavaScript implementation of the Keystretching algorithm PBKDF2 (https://en.wikipedia.org/wiki/PBKDF2) ...

 [ Invalid Attachment ]
http://anandam.name/pbkdf2/

You can save a copy of Parvez Anandam's pbkdf2 webpage on your computer and run it in your browser even when you are not connected to the internet, (so you can be sure the key derived is not transmitted over the internet).

PBKDF2 iterates the password+salt process hundreds or thousands of times, using SHA-1 (https://en.wikipedia.org/wiki/SHA-1) rather than MD5,
SHA-1(password+salt) becomes the salt for the next iteration. The many iterations vastly increase the computational work required by the would-be cracker.