Techzone/RainbowCrack

RainbowCrack

3 min readArticle

RainbowCrack is a hash cracker that uses pre-computed rainbow tables to crack hashes. The concept: instead of computing hash(candidate) for every candidate during cracking, you pre-compute hash chains for an entire character space and store them. Then cracking is just a table lookup — extremely fast once tables are generated, but tables take huge storage.

The Rainbow Table Concept

Traditional brute force: For each candidate → compute hash → compare. Slow.

Rainbow tables: Pre-compute chains (hash + reduce cycles) for the whole character space. Store as tables. To crack: look up hash in table, follow chain. Fast.

Trade-off: Storage vs time. A table for all 8-char lowercase alphanumeric combos can be hundreds of gigabytes.

Why it's less used today: GPU cracking (Hashcat) is so fast that rainbow tables are often slower for common hash types. Rainbow tables shine for specific cases — very weak hashes with no salt (old LM/NTLM), or when you crack millions of hashes at once.

Salted Hashes Kill Rainbow Tables

Rainbow tables don't work against salted hashes:

  • /etc/shadow (SHA512crypt) — salted → rainbow tables useless
  • bcrypt — salted and slow → tables useless
  • MD5crypt ($1$) — salted → useless
  • Windows NTLM — NOT salted → rainbow tables work!
  • Old Windows LM — NOT salted → very vulnerable

Installation

bash
# Install RainbowCrack
sudo apt install rainbowcrack

# Or download from Project RainbowCrack website
# Tools: rtgen, rtsort, rcrack

Generating Tables (rtgen)

bash
# Syntax: rtgen <hash_algo> <charset> <min_len> <max_len> <table_index> <chain_len> <chain_count> <part_index>

# Generate NTLM tables for 8-char lowercase+numeric
rtgen ntlm loweralpha-numeric 1 8 0 3800 33554432 0
rtgen ntlm loweralpha-numeric 1 8 1 3800 33554432 0
rtgen ntlm loweralpha-numeric 1 8 2 3800 33554432 0

# Sort the tables (required before use)
rtsort *.rt

# Or one-liner
rtgen md5 loweralpha 1 7 0 3800 33554432 0 && rtsort *.rt

Warning: Generating large tables takes hours/days and requires massive storage. Only practical for specific targeted use cases.

Downloading Pre-generated Tables

Better than generating your own:

  • Project RainbowCrack (rainbowcrack.com) — official tables for sale
  • freerainbowtables.com — free tables (limited sets)
  • ophcrack.sourceforge.net — Windows LM/NTLM tables (free)

LM tables are most useful — Windows LM hashes are still common in older environments.

Cracking with rcrack

bash
# Crack a single hash
rcrack /path/to/tables/ -h 5f4dcc3b5aa765d61d8327deb882cf99

# Crack hash list from file
rcrack /path/to/tables/ -l hashes.txt

# Crack NTLM hash
rcrack /path/to/ntlm-tables/ -h 8846f7eaee8fb117ad06bdd830b7586c

# GPU-accelerated (rcracki)
rcracki_mt /path/to/tables/ -h <hash>

Ophcrack (Windows Passwords)

Ophcrack is a specific rainbow table tool for Windows LM/NTLM hashes with free pre-generated tables:

bash
# Install
sudo apt install ophcrack

# GUI
ophcrack

# Or download LiveCD (boots from USB, runs against Windows SAM)
# Very effective for Windows XP/7 era passwords

When Rainbow Tables Make Sense

  • Cracking Windows LM hashes (from old systems)
  • Cracking unsalted MD5/SHA1 (old databases)
  • Cracking a very large number of hashes at once (tables pay off at scale)
  • CTF challenges with weak/unsalted hashes
  • Forensics — recovering old Windows passwords

When to Use Hashcat Instead

  • Modern hashed passwords (bcrypt, SHA512crypt, Argon2)
  • When you have a specific wordlist to test
  • When you need flexibility (rules, masks)
  • When salt is present (renders rainbow tables useless)

Online Rainbow Table Lookup

For quick lookups of common hashes without local tables:

shell
crackstation.net — huge precomputed lookup database
hashes.com
md5decrypt.net (MD5 only)

See Also

  • hashcat-password-cracking-guide — GPU cracking (usually preferred)
  • john-the-ripper-guide — CPU cracking alternative
  • future-of-tech-emerging-trends-2023 — Offline tools overview
techzonesite.comUnlock Your IT Potential