Understanding GPU Clusters and Hash Benchmarks
My last article about the benchmark on the new GPU Cluster instances in the Amazon cloud had a large impact. Some magazines claimed that: "A German hacker claims to have used cloud computing to crack passwords stored in an algorithm that was developed by the NSA." Well, at this point, I have to get some facts straight.
What I did was benchmarking the speed of the new instance type for cracking SHA1 hashes. My first result was that it takes 49 minutes to do a 95 characters, 6 digit long brute force attack on a list of 14 hashes. The thing that was new is that, due to the new Amazon offering, everyone is able to spawn a 100 or more node cluster in the cloud and distribute the task of cracking passwords onto these nodes. Especially cracking hashes is perfectly suitable for massive parallelization! An attacker would be able to spawn a gigantic cluster of nodes using some stolen credit card informations and it would be no problem for him to crack 8 character long passwords in a nice time frame.
Why SHA1 is Deprecated for Password Storage
The reason I said that SHA1 is deprecated for storing passwords is easy to explain: SHA1 was never made to store passwords. SHA1 is a hash algorithm, it was made for verifying data integrity. It was made to be as fast and as collision-free as possible, and that's the problem when using it for storing passwords: It's too fast!
The processing speed of modern computers is increasing incredibly fast, and so brute forcing will get faster and faster, and the new cloud offerings make parallelization of such use tasks easy and affordable for virtually anyone. As GPU compute power scales linearly in a cloud environment, traditional hash algorithms fall short in providing adequate security margins against dedicated attacks.
Adopting Key Derivation Functions (KDFs)
Instead of basic hash algorithms like MD5 or SHA1, developers and security architects should use Key Derivation Functions like PBKDF2, bcrypt, or scrypt. Some of these functions hash passwords thousands of times (a process known as key stretching) and introduce computational hardness, making brute forcing it a lot harder and significantly more expensive for an attacker. By increasing the memory and CPU requirements for each hash verification, KDFs neutralize the speed advantages of massive GPU clusters.
Frequently Asked Questions (FAQ)
Why is cloud computing dangerous for password security?
Cloud computing allows attackers to easily provision massive, highly parallelized GPU clusters. This immense computational power can be used to dramatically accelerate brute force and dictionary attacks against weak or outdated cryptographic hashes.
Is SHA1 safe for storing user passwords?
No, SHA1 is highly deprecated for password storage. It was designed for speed and data verification, meaning an attacker with modern cloud GPUs can generate and test millions of SHA1 hashes per second, making passwords easily crackable.
What are Key Derivation Functions?
Key Derivation Functions (KDFs) like bcrypt, scrypt, and PBKDF2 are algorithms explicitly designed to be computationally intensive. They employ key stretching and memory-hard operations to slow down automated password cracking attempts, protecting user data even against cloud-based attacks.