Securing the password in your applications 🔑
Must read if you don't know about Rainbow Attacks
2 min read
What is a Rainbow Table Attack? 🌈
A rainbow table attack is a password cracking method that uses a special table a.k.a “rainbow table” to crack the password hashes in a database. Applications don’t store passwords in plaintext, but instead, encrypt passwords using hashes. After the user enters their password to log in, it is converted to hashes, and the result is compared with the stored hashes on the server to look for a match. If they match, the user is authenticated and able to log in to the application.
The rainbow table itself refers to a precomputed table that contains the password hash value for each plain text character used during the authentication process. If hackers gain access to the list of password hashes, they can crack all passwords very quickly with a rainbow table.
The prevalence of rainbow table attacks has dramatically decreased due to a technique known as “salting.” Salting is a modern technique used to thwart rainbow table attacks. It involves adding an extra random value to every hashed password to create a different hash value. Most modern password authentication systems include salting, which has significantly lessened the number of successful rainbow table attacks.
But how does it work?
Hackers must first gain access to leaked hashes in order to carry out rainbow table attacks. The password database itself might be poorly secured, or they may have gained access to the Active Directory. Others gain access through phishing techniques of those that might have access to the password database. On top of all these techniques, there are already millions and millions of leaked password hashes on the dark web that are available to hackers.
Once they have the password hashes the rainbow table is used to help decrypt the password hashes. As long as the password hashes don't include a - salt, they’ll be able to translate the encrypted passwords into plaintext easily.
1) A hacker finds a vulnerability in a company’s Active Directory and is able to gain access to the password hashes. Once they have the list of hashes they execute a rainbow table attack to decrypt the hashes into plaintext passwords.
Don't know about Active Directory? I will write about it soon... 🔐
Last but not the least, protection from this attack:
- Use MFA or Biometrics
- Use Password-less sign-ins
- Salting (affordable approach)
- Avoid MD5 and SHA1 (Even a 14 y/o nibba knows it) 😂