← Back to Tools
Password Attacks

Hashcat

The world's fastest CPU/GPU-based password recovery and hash cracking tool.

Category
Password Attacks
Platform
Linux / Kali
Type
CLI / Open Source
Skill Level
Beginner → Advanced

What is Hashcat?

Hashcat is the world's leading password recovery tool, capable of cracking hundreds of hash types using CPU or GPU acceleration. It supports multiple attack modes including dictionary, brute-force, combinator, and rule-based attacks. Security professionals use it during authorized assessments to test password strength and recover credentials from captured hashes.

⚠ Legal Notice

Only use on systems you own or have explicit written permission to test. Unauthorized use violates Pakistan's PECA 2016 and international cybercrime laws.

Installation

# Update packages
sudo apt update

# Install (pre-installed on Kali, otherwise:)
sudo apt install hashcat -y

# Verify installation
hashcat --version

Basic Usage

# Basic syntax
hashcat -m [hash-type] -a [attack-mode] [hashfile] [wordlist/mask]

# Dictionary attack on MD5 hash (-m 0)
hashcat -m 0 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt

# Dictionary attack on NTLM hash (-m 1000)
hashcat -m 1000 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt

# Brute-force attack with mask (8-char alphanumeric)
hashcat -m 0 -a 3 hashes.txt ?a?a?a?a?a?a?a?a

# Dictionary attack with rules (best64)
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# Show cracked results
hashcat -m 0 hashes.txt --show

Common Hash Types (-m flag)

Attack Modes (-a flag)

Common Use Cases

Further Reading

Practice on legal targets like TryHackMe, HackTheBox, or hackzia.site labs. Always read the official documentation before using in a live engagement.