Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Rainbow Table Hash Cracker

Implementation of a rainbow table–based password cracking system for SHA-512 hashes.

This project was developed as part of a Security coursework on hash-cracking techniques, exploring practical attacks against hashed passwords.

The repository demonstrates how precomputed hash chains (rainbow tables) can significantly reduce the time required to crack password hashes compared to brute-force or dictionary attacks.


Overview

Password hashing is widely used to protect user credentials. However, poorly protected hashes can still be attacked using techniques such as:

  • Brute-force attacks
  • Dictionary attacks
  • Rainbow table attacks

This project focuses on the rainbow table approach, which trades memory for computation time by precomputing chains of hashes and reductions.

Rainbow tables allow attackers to crack hashes faster than brute force by using precomputed lookup tables instead of recomputing hashes repeatedly.

The system targets hashes generated with:

hashlib.sha512()

as specified in the coursework requirements.

Coursework reference: cs4028-coursework-2024-25


How Rainbow Tables Work

A rainbow table consists of chains of alternating hash and reduction functions.

Example chain:

password → hash → reduction → hash → reduction → ... → final value

Instead of storing every hash, the table stores only:

start_password → end_value

During cracking:

  1. The target hash is reduced repeatedly.
  2. Possible chains are reconstructed.
  3. The correct password is recovered when the chain matches.

This significantly reduces the search space compared to brute-force attacks.


Features

  • SHA-512 password hashing
  • Rainbow table generation
  • Hash lookup using rainbow tables
  • Chain reduction functions
  • Configurable chain length and table size
  • Efficient lookup algorithm
  • Demonstration scripts

About

Implemented in Python algorithms that search for hashed passwords using - brute force, dictionary attack, dictionary search for salted hashes and Rainbow tables. Compared the performance.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages