Beginner’s Guide to Hashcat: Password Cracking with Kali Linux

Listen to this Post

Featured Image
Hashcat is one of the most powerful password-cracking tools available, widely used in cybersecurity for penetration testing and ethical hacking. Below is a comprehensive guide on using Hashcat effectively.

You Should Know: Essential Hashcat Commands & Techniques

1. Installing Hashcat in Kali Linux

Hashcat comes pre-installed in Kali Linux. To verify, run:

hashcat --version

If not installed, update and install it:

sudo apt update && sudo apt install hashcat -y

2. Basic Hashcat Syntax

hashcat -m [bash] -a [bash] [bash] [bash]

3. Common Hash Types (-m)

  • MD5: `0`
  • SHA1: `100`
  • SHA256: `1400`
  • NTLM (Windows): `1000`
  • bcrypt: `3200`

4. Attack Modes (-a)

  • Dictionary Attack (-a 0): Uses a wordlist.
  • Brute-Force (-a 3): Tries all possible combinations.
  • Hybrid Attack (-a 6 or -a 7): Combines wordlists with masks.

5. Cracking an MD5 Hash

hashcat -m 0 hashes.txt rockyou.txt

(Replace `hashes.txt` with your target hashes file and `rockyou.txt` with your wordlist.)

6. Cracking Windows NTLM Hashes

hashcat -m 1000 ntlm_hashes.txt /usr/share/wordlists/rockyou.txt

7. Using Rules for Advanced Cracking

Hashcat supports rule-based attacks for modifying wordlists dynamically:

hashcat -m 0 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

8. Resume a Paused Session

If interrupted, resume with:

hashcat --restore

9. Optimizing Performance

  • Use `-O` for optimized kernels.
  • Use `-w` to adjust workload (1-4, where 4 is the most aggressive).

10. Saving Results

hashcat -m 0 hashes.txt rockyou.txt --outfile cracked_passwords.txt

What Undercode Say

Hashcat is an indispensable tool for cybersecurity professionals, penetration testers, and ethical hackers. Mastering it requires understanding different attack modes, hash types, and optimization techniques. Below are additional Linux and Windows commands to enhance your password-cracking skills:

Linux Commands:

  • Extract hashes from /etc/shadow:
    sudo unshadow /etc/passwd /etc/shadow > hashes.txt
    
  • Generate custom wordlists with crunch:
    crunch 6 8 0123456789 -o num_wordlist.txt
    
  • Check GPU status (for hashcat optimization):
    nvidia-smi  For NVIDIA 
    lshw -C display  General GPU info 
    

Windows Commands:

  • Extract NTLM hashes with Mimikatz:
    sekurlsa::logonpasswords
    
  • Dump SAM hashes:
    reg save HKLM\SAM sam.save 
    reg save HKLM\SYSTEM system.save 
    

Prediction

As AI and GPU advancements continue, password cracking will become faster, emphasizing the need for stronger encryption (like bcrypt) and multi-factor authentication (MFA).

Expected Output:

A cracked password list stored in `cracked_passwords.txt` with recovered plaintext passwords from the target hashes.

🔗 Further Reading:

References:

Reported By: Chuckkeith Beginners – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram