MD5 password hashes are dead

Rainbow tables win, Kaspersky analyst recommends two factors for all
  • Stilgherrian (CSO Online (Australia))
  • — 09 September, 2011 16:26

MD5 hashes, still a common method for securing login passwords, are no longer an adequate defence against hackers, according to Kaspersky Lab analyst Evgeny (Eugene) Aseev.

Aseev, who heads the company's China Anti-Virus Lab, dismissed MD5 hashes in a throw-away comment during an otherwise routine presentation on recent high-profile hacking incidents in Kuala Lumpur yesterday. He later confirmed his assessment to CSO Online.

"MD5 is not really enough now," Aseev said. Asked whether rainbow tables had won the battle against MD5, he agreed.

Rainbow tables had been used to crack passwords in the attack on H B Gary Federal by Anonymous earlier this year.

MD5 is a cryptographic hash function that takes a plain text input, such as a password, and returns a seemingly-random 16-byte number, called a "hash value". Authentication systems store the hash value rather than the original password. When a user logs in, the password they enter is processed through MD5 and compared with the hash value on file, allowing access if there's a match.

It is computationally difficult to work backwards and produce the original password from the hash value. In theory this means that it wouldn't matter if an attacker gained access to the stored password hashes.

However hackers now pre-compute the hash values for all possible passwords within a certain range using thousands of networked computers, storing them in multi-gigabtyte databases called rainbow tables.

Rainbow tables are readily available online, containing the MD5 hash values for all possible passwords up to eight characters long, provided they consist of nothing but letters in upper and lower case, digits and spaces, and all passwords up to ten characters long if they are nothing but lower-case letters.

In the H B Gary incident, both chief executive officer Aaron Barr and chief operating officer Ted Vera had been using passwords consisting of only six letters and two numbers -- and the problem was compounded when they used the same passwords for both their Google accounts and H B Gary's internal systems.

"Lots of fails in this story," Aseev said.

Cryptographers have also been warning against potential weaknesses in the MD5 algorithm since the middle of the last decade. MD5 "should be considered cryptographically broken and unsuitable for further use", wrote US-CERT in 2008. Nevertheless, MD5 hashes are still widely used in web applications.

Rainbow tables can be defeated by using much longer passwords, or passwords with added salt -- random bits added automatically to the user's password to extend its length -- although presumably these techniques will eventually be rendered useless by ever-larger rainbow tables.

Assev recommends using two-factor authentication, such as systems that require a separate hardware token or smartcard. He also recommends that users be forced to create complex passwords, and educated against reusing passwords or falling for social engineering tricks.

 

Stilgherrian travelled to Kuala Lumpur as a guest of Kaspersky Lab.

Tags: authentication, cryptographic hash function, Eugene Aseev, hackers, HB Gary, kaspersky lab, MD5 hashes, rainbow tables

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
Users posting comments agree to the CSO comments policy.
Login or register to link comments to your user profile, or you may also post a comment without being logged in.
CSO Corporate Partners
  • FirEye
  • Clear Swift
  • Trend Micro
  • Sophos
  • NetIQ
rhs_login_lockGet exclusive access to CSO, invitation only events, reports & analysis.
CSO Directory

ZENworks® Endpoint Security Management

Get powerful mobile security capabilities, and protect the data the various mobile devices inside your organization.

Security Awareness Tip
Clearswift tips: Guidelines for introducing and policing an effective IT Policy

1. Make it clear that the policy is not about playing ‘Big Brother’ but to ensure the security of employees, company information and data and to safeguard the company’s reputation.
2. Invest time to get buy-in from managers and their teams.
3. Convey the message of flexibility – with regard to social media, it is not about blocking staff usage but working in everyone’s interests to ensure that threats are contained.
4. Introduce a regular company-wide training programme that everyone attends at regular intervals throughout the year, not merely as part of an induction programme.
5. Within the training programme make sure that there are specific examples to demonstrate each rule or regulation, and that there is a clear explanation of the dangers of casual or careless talk on social networking sites. Again use examples, employees need to understand the consequences of raising a throwaway comment that has negative connotations for the business, as much as they need to be aware of dangers of making a more direct but ill-considered attack on a competitor, regulator or even a fellow colleague. They need to be clearly advised on any impact on the company and/or legal action or inquires that may be raised as a result.
6. Alert employees to any changes in policy through regular clear communication.
7. Reinforce the operational policy guidelines regularly, cover everything from blogging to Facebook, LinkedIn and Twitter.
8. Ensure that the rules are fair and that they apply throughout the business.
9. Enforce the rules – if there is a deliberate or malicious contravening, disciplinary action needs to be taken. A policy isn’t worth having if it is seen to be lax and unenforced.
10. Review the policy regularly to ensure you keep up to date with new systems and technology.

Phil Vasic is Regional Director, APAC, at Clearswift, the software security company www.clearswift.com
Security ABC Guides

7 Ways to Protect Your Business Printers

Can a hacker burn down your business by remotely setting one of your printers on fire? Researchers at Columbia University have recently proposed such a scenario, although HP quickly denied that it's possible. However, even if your printers can't be used as remote firestarters, there are many risks involved in networking a printer.