🔥 How to Crack Passwords Using Hashcat
🔥 How to Crack Passwords Using Hashcat
Hashcat is a powerful password-cracking tool that supports GPU acceleration for faster brute-force attacks. Here’s a step-by-step guide to using Hashcat for password cracking.
🛠 1. Install Hashcat
📌 Windows
1️⃣ Download Hashcat from 🔗 https://hashcat.net/hashcat/
2️⃣ Extract the ZIP file
3️⃣ Open Command Prompt (cmd) and navigate to the Hashcat folder
📌 Linux (Kali, Ubuntu)
📌 macOS
🔍 2. Identify the Hash Type
Before cracking, you need to determine the hash type.
You can use Hash-Identifier or check online 🔗 https://hashcat.net/wiki/doku.php?id=example_hashes.
Common Hash Types & Their Modes in Hashcat
| Hash Type | Example | Mode ID |
|---|---|---|
| MD5 | 5f4dcc3b5aa765d61d8327deb882cf99 | 0 |
| SHA-1 | b3d44e29c9f5b89b507cfd9c72eac5f1eecfd567 | 100 |
| SHA-256 | 9e107d9d372bb6826bd81d3542a419d6 | 1400 |
| NTLM | 32ed87bdb5fdc5e9cba88547376818d4 | 1000 |
| bcrypt | $2a$12$wJr8UjhRzLXG4N7Mi.YE/O. | 3200 |
You can also use Hashcat's built-in hash identifier:
🔑 3. Crack the Password
📌 Step 1: Save the Hash
Create a text file (hash.txt) and paste the hash inside:
📌 Step 2: Choose an Attack Mode
Hashcat supports different attack types:
-
Dictionary Attack (Wordlist) →
-a 0 -
Brute-force Attack →
-a 3 -
Mask Attack →
-a 3 -
Hybrid Attack →
-a 6(Dictionary + Mask) -
Combinator Attack →
-a 1
🔹 Option 1: Dictionary Attack (Fastest)
If you have a wordlist like rockyou.txt, use:
💡 Replace -m 0 with your hash type mode ID.
🔹 Option 2: Brute-Force Attack (Slow but Effective)
If the password is unknown, try all possible character combinations:
-
?a→ Any character (letters, numbers, symbols) -
?l→ Lowercase letters -
?u→ Uppercase letters -
?d→ Digits -
?s→ Special characters
Example: Crack a 6-character password with numbers & letters:
🔹 Option 3: Mask Attack (Partial Known Info)
If you know the password format (e.g., starts with "admin" and ends with numbers):
🚀 4. Optimize Hashcat Performance
📌 Enable GPU Acceleration
-
--force→ Forces Hashcat to run -
--opencl-device-types 1,2→ Uses CPU + GPU
📌 Run Hashcat on Multiple Threads
📌 Use a Session (Resume Cracking Later)
Start cracking:
Pause and resume later:
🛑 5. Stop Hashcat & Check Results
Stop Hashcat anytime using:
Check cracked passwords:
⚠️ Legal Disclaimer
❌ Cracking passwords without permission is illegal. This guide is for educational & ethical hacking purposes only.
Comments
Post a Comment