Skip to content

This repository contains a Python script designed to demonstrate the process of brute-forcing password hashes. It is intended for educational purposes to understand how brute force techniques operate and to highlight the importance of strong password policies. The script employs a SHA256 hashing algorithm.

chathaj/Password-Brute-Force

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 15, 2024 18:42
November 15, 2024 18:38
November 15, 2024 18:42

Brute Forcing A Password

Overview

This program implements a basic brute force password hash cracker that attempts to match user-provided hashes to their corresponding passwords. The program is designed to demonstrate how hash cracking can work, using user-input hashes and brute-force attempts with customizable password lengths and character sets.

Features

  • Accepts user-provided hashes and passwords for testing.
  • Reads additional hash-password pairs from a CSV file.
  • Uses SHA256 to hash password attempts for comparison.
  • Employs a brute-force algorithm to generate possible passwords based on a specified character set and length range.
  • Reports whether the password hash was successfully cracked.
  • Measures and displays the time taken for the brute force process.

Repository Structure

password-hash-cracker/
├── README.md           # Documentation for the project
├── Bruteforce.py          # Main script for hash cracking
├── sha256_hashes.csv   # Sample CSV file with hashes and passwords

Prerequisites

Ensure the following are installed and available in your environment:

  • Python 3.x
  • Standard Python libraries:
    • itertools
    • csv
    • time
    • hashlib

How It Works

  1. User Input: The program prompts the user to input the number of hash-password pairs they want to provide.
  2. CSV File: The program reads additional hash-password pairs from a file named sha256_hashes.csv.
  3. Brute Force: For each hash, the program attempts to brute force the corresponding password by generating all possible combinations of characters within a specified length range.
  4. Comparison: The generated hash is compared to the provided hash. If a match is found, the password is "cracked"; otherwise, the program continues until a maximum attempt limit is reached.
  5. Output: The program prints whether the cracking attempt was successful for each hash and reports the time taken for the process.

About

This repository contains a Python script designed to demonstrate the process of brute-forcing password hashes. It is intended for educational purposes to understand how brute force techniques operate and to highlight the importance of strong password policies. The script employs a SHA256 hashing algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages