Rainbow tables and password salting
How an attacker recovers passwords from stolen hashes, what a rainbow table is, and what salting changes.
On this page
In 30 seconds
- Where it happens
- After the theft of an account database[1], or after hashes are extracted from a Windows machine or from a company directory[3][4].
- What the attacker wants
- To turn the hashes into readable passwords, then log in to the systems and services the account gives access to[2].
- The reflex
- A long, different password for each service, kept in a password manager, and two-factor authentication wherever it exists[5][6].
- If it has already happened
- Change the affected password, then the password of any other service where it had been reused[7].
What it is
An online service must not keep your password as it is. It keeps a hash, computed by a hash function, which cannot be reversed: even with the hash in hand, an attacker cannot use it directly to log in as you[1]. One method remains for the attacker: pick a likely password, compute its hash and compare it with the one that was stolen. If they match, the attacker knows your password[1].
A rainbow table saves the attacker from redoing these calculations every time: it is a precomputed table of hashes, which MITRE lists among the ways to crack hashes[2]. Salting, a random value specific to each user and added to the password before hashing, protects against these precomputed tables[1]. This article describes the mechanism, what the victim can see of it, and the habits that matter for an employee.
Straight answers
What is a password hash?
It is the result of a one-way function: a hash cannot be "decrypted" to recover the original text, but one can check that a password that is typed in produces the same hash[1]. Passwords must never be stored in clear text[7].
What is a rainbow table?
It is a table of hashes calculated in advance. The attacker looks things up in it instead of calculating, password after password, the hash of each candidate[1][2].
What is salting?
A salt is a random string, unique to each user, added to the password during hashing[1]. According to OWASP, three effects follow. The attacker has to crack the hashes one by one with their salt, instead of calculating a hash once and comparing it with every hash in the database. Precomputed tables no longer work. And it is not possible to tell that two users have the same password without cracking their hashes, because different salts give different hashes[1].
Is salting enough?
No. It does not make a weak password strong. An attacker can still try lists of passwords from other compromised sites, dictionaries of common passwords, or test everything by brute force[1]. With graphics processors and servers rented in the cloud, the cost of these attempts remains relatively low, especially when good hashing practices are not followed[1].
Which password holds up best?
The CNIL notes that choosing passwords that are "easy to remember" makes dictionary attacks easier, since they test words, first names and their classic variations: from the word "kangourou", for example, they try "k4ng0urou", "kangourou01" or "KaNgOuRoU"[7]. For a password with no other protection, the CNIL sets a minimum of 80 bits of entropy and gives three equivalent examples: 12 characters mixing uppercase letters, lowercase letters, digits and special characters, 14 characters with no mandatory special character, or a passphrase of at least 7 words[7]. NIST requires services to demand a minimum of 15 characters for a password used alone, and recommends allowing at least 64 characters[5].
What should you do if a service announces a breach?
According to the CNIL, the service must force a password change at the next login and recommend also changing the passwords of other services in case of reuse[7]. MITRE recommends proactively resetting accounts known to be part of breached credentials, either immediately or after brute force attempts are detected[8]. Two-factor authentication is among the measures it lists against these attacks[8].
Are passwords going away?
The UK NCSC states that passkeys are a safer and simpler way to log in, and that they should be the default authentication option for the general public[9]. As long as a service asks for a password, the rules above apply.
Inside the attacker's head
The attacker starts by getting hold of hashes. On a Windows machine, the SAM database holds the local accounts, and extracting it requires SYSTEM-level access[3]. In a company, the attacker can target the Active Directory database file, located by default on a domain controller, or look for backups that contain the same information[4]. MITRE places Mimikatz among the tools of this kind, able to obtain Windows credentials in clear text[10]. On the website side, the source is the database, for example after an SQL injection flaw is exploited or a backup is stolen[1].
Next comes the calculation. According to MITRE, hash cracking is generally done on systems the attacker controls, outside the victim's network[2]. Techniques exist to systematically guess the passwords that produced the hashes, and the attacker can also use a rainbow table[2]. The recovered password is then used to log in to the systems, resources and services the account has access to[2].
If the database is salted, the precomputed table is of no use: the attacker has to crack the hashes one by one with their salt[1].
What you see on screen
The user generally sees nothing of the cracking, which is most often done on the attacker's systems, outside the victim's network[2].
The signs come afterwards. MITRE describes, from the defenders' side, sudden valid logins on accounts whose credentials had been extracted but had not successfully authenticated before, and successful logins on routers or switches from accounts whose hashes had been extracted, which suggests offline cracking[2].
The other signal is the service's notification. After a compromise, it must force the password change at the next login and invite users to change those of the other accounts where it had been reused[7]. This message is a reason to change your passwords without waiting.
Under the hoodIT teams
A fast hash helps the attacker. OWASP stresses that MD5 and SHA-1 were designed to be fast, whereas a password storage algorithm must be slow, with an adjustable work factor[1]. It recommends Argon2id, bcrypt or PBKDF2, and states that fast algorithms such as SHA-256 are not suitable, because they allow a large number of candidates to be tested very quickly[1]. The CNIL lists scrypt and Argon2 among the specialised functions mentioned by ANSSI, and asks for a non-reversible function that incorporates a salt or a key[7].
NIST sets the rules on the service side. According to NIST, passwords must be salted and hashed with a suitable scheme, the salt must be at least 32 bits and be chosen to minimize salt collisions among stored hashes, and both the salt and the hash must be stored for each password[5]. It also recommends an additional operation with a secret key stored separately from the hashes, which makes cracking impractical as long as that key remains secret[5]. OWASP calls this protection a pepper, shared among all passwords, unlike the salt[1].
Older databases pose a particular problem. Applications that use MD5 or SHA-1 can move to a modern algorithm, but their old hashes stay stored until the user has logged in again[1].
Case filesReal cases
May 2021: an NGO and a predictable password
This case does not involve a rainbow table, but it shows the price of a simple password. In a joint advisory of March 2022, the FBI and CISA report that, as early as May 2021, Russian state-sponsored actors broke into the network of a non-governmental organization[6]. They obtained the credentials through a password guessing attack on an account with a simple, predictable password[6]. This account had been removed from Duo two-factor authentication after a long period of inactivity, but had not been disabled in Active Directory[6]. Because Duo's default configuration allowed a new device to be enrolled for a dormant account, the attackers enrolled one and gained access[6]. They then reached the victim's cloud storage and email[6]. The joint advisory recommends enforcing two-factor authentication for everyone, disabling inactive accounts everywhere, and requiring strong, unique passwords that are not reused across accounts[6].
2025: destructive attacks in Poland
MITRE reports that, during the 2025 wiper attacks in Poland, the adversaries attempted to crack user passwords[2]. MITRE also states that FIN6 extracted hashes from ntds.dit to crack them offline[2].
Sources
- OWASP, “Password Storage - OWASP Cheat Sheet Series”. https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html (accessed 10 November 2026)
- MITRE ATT&CK, “Brute Force: Password Cracking, Sub-technique T1110.002 - Enterprise | MITRE ATT&CK®”. https://attack.mitre.org/techniques/T1110/002/ (accessed 10 November 2026)
- MITRE ATT&CK, “OS Credential Dumping: Security Account Manager, Sub-technique T1003.002 - Enterprise | MITRE ATT&CK®”. https://attack.mitre.org/techniques/T1003/002/ (accessed 10 November 2026)
- MITRE ATT&CK, “OS Credential Dumping: NTDS, Sub-technique T1003.003 - Enterprise | MITRE ATT&CK®”. https://attack.mitre.org/techniques/T1003/003/ (accessed 10 November 2026)
- NIST, “NIST Special Publication 800-63B”. https://pages.nist.gov/800-63-4/sp800-63b.html (accessed 10 November 2026)
- CISA, “Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and “PrintNightmare” Vulnerability”, 15 March 2022. https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-074a (accessed 10 November 2026)
- CNIL, “Mots de passe : recommandations pour maîtriser sa sécurité”, 14 October 2022. https://www.cnil.fr/fr/mots-de-passe-recommandations-pour-maitriser-sa-securite (accessed 10 November 2026)
- MITRE ATT&CK, “Brute Force, Technique T1110 - Enterprise | MITRE ATT&CK®”. https://attack.mitre.org/techniques/T1110/ (accessed 10 November 2026)
- NCSC (UK), “Password administration for system owners”, 19 November 2018. https://www.ncsc.gov.uk/collection/passwords (accessed 10 November 2026)
- MITRE ATT&CK, “Mimikatz, Software S0002 | MITRE ATT&CK®”. https://attack.mitre.org/software/S0002/ (accessed 10 November 2026)
Cite this article
Brain, “Rainbow tables and password salting”, Cyberpedia, 2026. https:/
BibTeX
@misc{brain_cp040_en_2026,
author = {Brain},
title = {Rainbow tables and password salting},
year = {2026},
howpublished = {Cyberpedia},
url = {https://startbrain.io/cyberpedia/en/articles/rainbow-tables-password-salting/},
note = {CC BY 4.0}
}