Hashcat Commands & Tutorial 2026 | Complete Password Auditing Guide | A7 Security Hunters

A7 Security Hunters · Password Security Auditing

Table of Contents

Hashcat Commands & Tutorial 2026 — Complete Password Auditing Guide

Complete Hashcat guide covering installation, attack modes, mask attacks, dictionary attacks, combination attacks, hybrid attacks, hash identification, rules, wordlists, GPU acceleration, troubleshooting, practical lab usage, cheat sheets, and FAQs.

Hashcat Password Auditing GPU Acceleration Cybersecurity 2026 Guide
← Nmap → Hydra → John the Ripper → Hashcat → Wireshark

What Is Hashcat?

Hashcat is a password-recovery and security-auditing tool designed to test the strength of password hashes in authorized environments. It supports many hash algorithms and attack modes, including dictionary, mask, combination, and rule-based approaches, and can use GPU acceleration for supported workloads.

What is Hashcat used for? Security professionals use Hashcat in authorized environments to audit password strength, test password policies, evaluate exposed password hashes, research hash algorithms, and perform controlled security-lab exercises.

The basic workflow is: identify the hash → select the hash mode → choose an attack mode → run Hashcat → review results → report weaknesses.

Featured Snippet Answers

What is Hashcat used for?

Hashcat is used for password security auditing — testing the strength of password hashes in authorized environments using high-performance GPU acceleration.

Is Hashcat legal?

Hashcat itself is legal software. Testing hashes from systems you own or have explicit written authorization to test is legal; testing hashes without authorization is illegal.

Is Hashcat installed on Kali Linux?

Yes — Hashcat is pre-installed on Kali Linux. The latest version can be updated from the repositories.

What hash types does Hashcat support?

Hashcat supports 300+ hash types including MD5, SHA-1, SHA-256, SHA-512, NTLM, bcrypt, MySQL, PostgreSQL, and many more.

What is the difference between Hashcat and John the Ripper?

Both are password auditing tools. Hashcat is a high-performance, GPU-accelerated tool. John the Ripper is a general-purpose tool focused on Unix/Linux environments.

What is the difference between Hashcat and Hydra?

Hydra is an online authentication auditing tool. Hashcat is an offline password/hash auditing tool that uses GPU acceleration.

Hashcat Tutorial for Beginners

Hashcat is one of the most powerful password security auditing tools available. Security professionals use it to determine whether passwords represented by authorized hashes are sufficiently resistant to common password-guessing techniques.

Important: Only use Hashcat against password hashes and systems that you own or are explicitly authorized to assess.

Why Password Auditing Matters

A password can be technically valid while still being weak from a security perspective. Common passwords, predictable patterns, reused credentials, and short passwords can make authentication systems easier to compromise.

Password auditing helps organizations identify these weaknesses before they are exploited.

A7 Security Hunters Training Insight: Beginners often focus on the speed of password-auditing tools before understanding hash types, password policies, wordlists, and attack methodology. We recommend learning how authentication and hashing work first, then practicing Hashcat inside an isolated, authorized lab.

How to Install Hashcat

Kali Linux

Install Hashcat on Kali
sudo apt update
sudo apt install hashcat

Ubuntu and Debian

Install Hashcat
sudo apt update
sudo apt install hashcat

Windows

Download the latest Hashcat binary from the official website:

  • Visit hashcat.net/hashcat/
  • Download the Windows binary
  • Extract the zip file to a directory (e.g., C:\hashcat)
  • Open Command Prompt and navigate to the directory
  • Run: hashcat.exe -I to list available devices

macOS

Install Hashcat on macOS
brew install hashcat

Verify the Installation

Check version
hashcat --version

# Check available devices
hashcat -I

Understanding Hashcat Hash Types

Hashcat supports 300+ hash types. Selecting the correct hash mode is critical for successful password auditing.

Hash TypeExample HashHashcat Mode
MD55f4dcc3b5aa765d61d8327deb882cf99-m 0
SHA-15baa61e4c9b93f3f0682250b6cf8331b7ee68fd8-m 100
SHA-2568c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918-m 1400
SHA-512128 characters-m 1700
NTLM8846f7eaee8fb117ad06bdd830b7586c-m 1000
bcrypt$2a$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy-m 3200
MySQL 4.1*4ACFE3202A5FF5CF467898FC58AAB1D615029441-m 300
SHA-512 crypt$6$salt$hash-m 1800

List All Supported Hash Types

Show all hash types
hashcat --help | grep -E "\[[0-9]+\]"
Tip: Use hashcat --help to see the complete list of supported hash types and their corresponding mode numbers.

Understanding Hashcat Attack Modes

Hashcat supports several attack modes, each suited for different password-auditing scenarios.

Attack ModeHashcat OptionDescription
Dictionary Attack-a 0Tests passwords from a wordlist
Combination Attack-a 1Combines two wordlists
Mask Attack-a 3Brute force with custom character sets
Hybrid Attack-a 6Wordlist + mask
Hybrid Attack-a 7Mask + wordlist
Association Attack-a 9Wordlist association rules
Best practice: Start with dictionary attacks using targeted wordlists. Use mask attacks when you have knowledge of password patterns.

Dictionary Attack (Mode 0)

Dictionary attacks test passwords from a supplied wordlist. This is the most common Hashcat attack mode.

Basic dictionary attack
hashcat -m 0 -a 0 hashes.txt wordlist.txt

With Rules

Dictionary with rules
hashcat -m 0 -a 0 hashes.txt wordlist.txt -r rules/best64.rule

Popular Wordlist Locations

WordlistLocationDescription
rockyou.txt/usr/share/wordlists/rockyou.txt14 million passwords from RockYou breach
SecLists/usr/share/wordlists/SecLists/Comprehensive collection of wordlists
Fasttrack/usr/share/wordlists/fasttrack.txtTop 10,000 most common passwords
Pro tip: Use targeted wordlists based on the target environment for better results. Generic wordlists like rockyou.txt are a good starting point.

Mask Attack (Mode 3)

Mask attacks use brute force with custom character sets. This is useful when you know password patterns.

Basic mask attack
hashcat -m 0 -a 3 hashes.txt ?l?l?l?l?d?d?d?d

Mask Placeholders

PlaceholderDescriptionExample
?lLowercase lettersa-z
?uUppercase lettersA-Z
?dDigits0-9
?sSpecial characters!@#$%^&*
?aAll printable ASCII?l?u?d?s
?hHex characters (lowercase)0-9a-f
?HHex characters (uppercase)0-9A-F
Custom character set
# 8-character password with uppercase + lowercase + digits
hashcat -m 0 -a 3 hashes.txt -1 ?u?l?d ?1?1?1?1?1?1?1?1
Performance warning: Mask attacks can be extremely slow for longer passwords. A full 8-character alphanumeric mask can take years on a single CPU. Use GPU acceleration and limit password length.

Combination Attack (Mode 1)

Combination attacks combine two wordlists by concatenating entries from each list.

Combination attack
hashcat -m 0 -a 1 hashes.txt wordlist1.txt wordlist2.txt
Use case: Good for testing passwords like “admin123” or “password2024” where two common patterns are combined.

Hybrid Attack (Modes 6 & 7)

Hybrid attacks combine wordlists with mask attacks.

Mode 6 — Wordlist + Mask

Wordlist with mask suffix
hashcat -m 0 -a 6 hashes.txt wordlist.txt ?d?d?d?d

Mode 7 — Mask + Wordlist

Mask prefix with wordlist
hashcat -m 0 -a 7 hashes.txt ?u?l?l?l wordlist.txt
Use case: Good for testing passwords like “password123” or “Admin2024” where a word is combined with numbers or special characters.

Hashcat Rules

Rules transform words from a wordlist into additional password candidates.

Apply rules
hashcat -m 0 -a 0 hashes.txt wordlist.txt -r rules/best64.rule

Common Rule Files

Rule FileDescription
best64.rule64 most effective rules
d3ad0ne.ruleComprehensive rule set
rockyou-30000.rule30,000 rules from rockyou
OneRuleToRuleThemAll.ruleExtensive rule collection

Create a Custom Rule

Custom rule example
# Create a rule file with common transformations
echo ":" > custom.rule
echo "l" >> custom.rule
echo "u" >> custom.rule
echo "c" >> custom.rule
echo "r" >> custom.rule
echo "$!" >> custom.rule
echo "l$!" >> custom.rule

# Use the custom rule
hashcat -m 0 -a 0 hashes.txt wordlist.txt -r custom.rule

GPU Acceleration

Hashcat can use GPU acceleration for significantly faster password auditing.

Check available devices
hashcat -I
Use a specific device
hashcat -m 0 -a 0 hashes.txt wordlist.txt -d 1
Use multiple devices
hashcat -m 0 -a 0 hashes.txt wordlist.txt -d 1,2
Performance tip: GPU acceleration can be 10-100x faster than CPU-only processing. Use NVIDIA or AMD GPUs for best results.

Benchmarking Hashcat

Benchmarking helps security professionals understand the approximate performance of their testing environment.

Run benchmark
hashcat -b
Benchmark specific hash type
hashcat -b -m 0
Benchmark with specific device
hashcat -b -d 1
Note: Benchmark results depend on the GPU, CPU, drivers, and Hashcat version. Use benchmarks to compare different hardware configurations.

Identifying Hash Types

Several tools can help identify hash types before using Hashcat.

Use hashid
hashid hash.txt
Use hashcat’s detection
hashcat --identify hash.txt
Online hash identifier
# Visit https://hashes.com/en/tools/hash_identifier

Understanding Hashcat Output

Sample output
hashcat (v6.2.6) starting in benchmark mode...
OpenCL API (OpenCL 3.0) - Platform #1 [NVIDIA Corporation]
* Device #1: NVIDIA GeForce RTX 3080, 10240/10240 MB

Session..........: hashcat
Status...........: Running
Hash.Type........: MD5
Hash.Target......: hashes.txt
Time.Started.....: Mon Aug 21 14:23:45 2026
Time.Estimated...: Mon Aug 21 14:24:15 2026
Guess.Base.......: File (wordlist.txt)
Guess.Queue......: 1/1
Speed.#1.........: 12345.6 MH/s
Recovered........: 2/10 (20.00%)
Progress.........: 1234567/10000000 (12.35%)
Output ElementMeaning
SessionCurrent session name
StatusRunning, Exhausted, or Cracked
Hash.TypeThe hash type being tested
SpeedHashes per second (MH/s = million/s)
RecoveredNumber of hashes cracked
ProgressPercentage complete

Show Cracked Passwords

Show results
hashcat -m 0 hashes.txt --show
Show cracked passwords only
hashcat -m 0 hashes.txt --show --outfile cracked.txt

Restoring Interrupted Sessions

Create a session
hashcat -m 0 -a 0 hashes.txt wordlist.txt --session=audit1
Restore a session
hashcat --session=audit1 --restore
Check session status
hashcat --session=audit1 --status
Best practice: Always use named sessions for long-running password audits so you can resume if interrupted.

Common Hashcat Errors

ErrorPossible CauseRecommended Action
No hashes loadedUnsupported or malformed inputVerify the file and selected hash mode
No devices foundGPU drivers not installedInstall proper GPU drivers
Hash mode not supportedInvalid hash type selectionCheck hashcat --help for valid modes
File not foundIncorrect pathVerify the filename and directory
Out of memoryWordlist too largeUse smaller wordlist or increase system memory
Segmentation faultDriver or hardware issueUpdate drivers; reduce -w workload

Performance Optimization Tips

Use GPU Acceleration

GPU acceleration can be 10-100x faster than CPU. Use NVIDIA or AMD GPUs with proper drivers.

hashcat -b

Choose the Right Attack Mode

Dictionary attacks are fastest. Use mask attacks only when you know password patterns.

Use Workload Profiles

# -w 1 = Low (CPU/RAM friendly)
# -w 2 = Medium (default)
# -w 3 = High (max performance)
hashcat -m 0 -a 0 hashes.txt wordlist.txt -w 3

Limit Password Length

Use --increment to start with shorter passwords and increase length gradually.

hashcat -m 0 -a 3 hashes.txt ?d?d?d?d --increment

Use Rules Wisely

Rules increase success rates but slow down processing. Use best64.rule as a starting point.

Use Optimized Kernels

hashcat -m 0 -a 0 hashes.txt wordlist.txt -O

Authorized Lab Example — Complete Password Audit

Lab environment: This example uses a deliberately vulnerable lab environment. All targets are under the control of the training organization. Never test passwords you don’t have authorization to audit.

Scenario

You have obtained password hashes from a lab system and need to assess password security using Hashcat.

Step 1 — Identify Hash Type

Identify the hash
hashid hashes.txt
# Detected: MD5

Step 2 — Prepare Hash File

Each hash should be on its own line in the hash file.

Hash file example
5f4dcc3b5aa765d61d8327deb882cf99
8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918

Step 3 — Run Dictionary Attack

Dictionary attack
hashcat -m 0 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt

Step 4 — Apply Rules

Dictionary with rules
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r rules/best64.rule

Step 5 — View Results

Show cracked passwords
hashcat -m 0 hashes.txt --show

# Sample output:
# 5f4dcc3b5aa765d61d8327deb882cf99:password123
# 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918:admin

Step 6 — Save Results

Export cracked passwords
hashcat -m 0 hashes.txt --show --outfile cracked.txt
Lab takeaway: This exercise demonstrates how easily weak passwords can be recovered from hashed data. It shows why password policies, MFA, and regular auditing are essential security controls.

Hashcat vs John the Ripper vs Hydra

FeatureHashcatJohn the RipperHydra
Primary UseHigh-performance hash auditingGeneral password auditingOnline authentication testing
Attack TypeOfflineOfflineOnline
GPU AccelerationExcellentLimitedNo
Hash Support300+ formats30+ formatsN/A
Protocol SupportN/AN/A50+ protocols
SpeedVery Fast (GPU)Good (CPU)Network-limited
Best ForLarge-scale hash recoveryUnix/Linux environmentsAuthentication service testing
Which to use? Use Hashcat for high-performance password recovery with GPU acceleration. Use John the Ripper for general auditing in Unix/Linux environments. Use Hydra for testing live authentication services.

How to Defend Against Password Attacks

Strong Passwords

Use long, unique passwords and avoid common or predictable patterns. Minimum 12 characters with mixed case, numbers, and symbols.

Multi-Factor Authentication (MFA)

MFA adds an additional security layer beyond passwords. #1 defense against credential attacks.

Modern Hashing Algorithms

Use Argon2id, bcrypt, or PBKDF2 with suitable parameters. Avoid MD5 and SHA-1.

Prevent Password Reuse

Users should not reuse passwords across multiple services. Implement password history policies.

Monitor Authentication

Monitor suspicious login activity, credential attacks, and unusual authentication patterns.

Password Managers

Password managers can generate and store unique credentials for users securely.

Defense in depth: No single measure is sufficient. Combine strong policies, MFA, secure hashing, regular auditing, and user education.

Hashcat Best Practices

✔ Do These

  • Always get authorization before password auditing
  • Start with dictionary attacks (fastest)
  • Use GPU acceleration when available
  • Apply rules to increase success rate
  • Save sessions with --session
  • Verify hash types with hashid
  • Use --show to view results
  • Document findings for reporting

✘ Avoid These

  • Never test passwords without authorization
  • Don’t share cracked password lists
  • Don’t use default wordlists without customization
  • Don’t run mask attacks on long passwords
  • Don’t ignore hash type detection
  • Don’t skip manual verification of findings
Professional ethics: Hashcat is a powerful tool. Always use it responsibly and ethically. The difference between a security professional and an attacker is authorization.

Hashcat Cheat Sheet

PurposeCommand
Helphashcat --help
Versionhashcat --version
List hash typeshashcat --help \| grep -E "\[[0-9]+\]"
Check deviceshashcat -I
Benchmarkhashcat -b
Dictionary attackhashcat -m 0 -a 0 hashes.txt wordlist.txt
Dictionary with ruleshashcat -m 0 -a 0 hashes.txt wordlist.txt -r best64.rule
Mask attackhashcat -m 0 -a 3 hashes.txt ?l?l?l?l?d?d?d?d
Combination attackhashcat -m 0 -a 1 hashes.txt wordlist1.txt wordlist2.txt
Hybrid attack (wordlist + mask)hashcat -m 0 -a 6 hashes.txt wordlist.txt ?d?d?d
Hybrid attack (mask + wordlist)hashcat -m 0 -a 7 hashes.txt ?u?l?l?l wordlist.txt
Show resultshashcat -m 0 hashes.txt --show
Save sessionhashcat -m 0 -a 0 hashes.txt wordlist.txt --session=audit1
Restore sessionhashcat --session=audit1 --restore
Statushashcat --session=audit1 --status
Use GPUhashcat -m 0 -a 0 hashes.txt wordlist.txt -d 1
Optimized kernelhashcat -m 0 -a 0 hashes.txt wordlist.txt -O
Workload profilehashcat -m 0 -a 0 hashes.txt wordlist.txt -w 3
Incremental modehashcat -m 0 -a 3 hashes.txt ?d?d?d?d --increment
Save this: Bookmark this cheat sheet for quick reference during authorized lab exercises and security assessments.

Frequently Asked Questions About Hashcat

What is Hashcat?

Hashcat is a password-recovery and security-auditing tool designed to test the strength of password hashes in authorized environments using GPU acceleration.

Is Hashcat free?

Yes — Hashcat is open-source software released under the MIT license.

Is Hashcat legal?

Hashcat itself is legal software. Testing hashes from systems you own or have explicit written authorization to test is legal; testing hashes without authorization is illegal.

What is Hashcat used for?

Security professionals use Hashcat for password auditing, testing password policies, evaluating exposed password hashes, and performing controlled security-lab exercises.

What hash types does Hashcat support?

Hashcat supports 300+ hash types including MD5, SHA-1, SHA-256, SHA-512, NTLM, bcrypt, MySQL, PostgreSQL, and many more.

What are Hashcat attack modes?

Hashcat supports dictionary (0), combination (1), mask (3), hybrid (6, 7), and association (9) attack modes.

What is a dictionary attack?

A dictionary attack tests passwords from a supplied wordlist. It’s the most common and efficient attack mode.

What is a mask attack?

A mask attack uses brute force with custom character sets. It’s useful when you know password patterns.

Can Hashcat use a GPU?

Yes — Hashcat can use GPU acceleration for significantly faster password auditing. Use hashcat -I to list available devices.

What is the difference between Hashcat and John the Ripper?

Both are password auditing tools. Hashcat is a high-performance, GPU-accelerated tool. John the Ripper is a general-purpose tool focused on Unix/Linux environments.

What is the difference between Hashcat and Hydra?

Hydra is an online authentication auditing tool. Hashcat is an offline password/hash auditing tool that uses GPU acceleration.

Can beginners learn Hashcat?

Yes — Start by learning hash types, hash identification, and dictionary attacks in an authorized lab environment.

What is a Hashcat wordlist?

A wordlist is a file containing a list of potential passwords. Common wordlists include rockyou.txt and SecLists.

How do I use Hashcat with rules?

Use -r to apply rules: hashcat -m 0 -a 0 hashes.txt wordlist.txt -r best64.rule

How do I show Hashcat results?

Use hashcat -m 0 hashes.txt --show to display cracked passwords.

How do I save a Hashcat session?

Use --session to save progress: hashcat -m 0 -a 0 hashes.txt wordlist.txt --session=audit1

How do I restore a Hashcat session?

Use --restore: hashcat --session=audit1 --restore

What is Hashcat incremental mode?

Incremental mode (--increment) starts with shorter passwords and increases length gradually.

What is the Hashcat pot file?

The pot file stores cracked password hashes to avoid re-cracking them.

Can Hashcat be used for cybersecurity training?

Yes — It is useful for controlled password-security labs and ethical hacking education.

How can organizations defend against password auditing attacks?

Use strong passwords, MFA, modern hashing algorithms, prevent password reuse, and monitor authentication activity.

Hashcat: Quick Expert Summary

Hashcat is a high-performance password auditing tool. It helps cybersecurity professionals evaluate password-hash strength in authorized environments using GPU acceleration.

The most important concepts to learn are: hash types, hash modes, attack modes, wordlists, rules, mask attacks, GPU acceleration, sessions, and defensive password security.

A professional workflow should always include authorization, hash identification, controlled testing, evidence collection, remediation, and retesting.

Official & Authoritative Resources

Hashcat Official

hashcat.net/hashcat/

Official downloads, documentation, and release notes.

Hashcat GitHub

github.com/hashcat/hashcat

Source code, issue tracking, and development resources.

Kali Linux

Kali Linux Hashcat Package

Kali-specific package information.

OWASP

OWASP Password Security Resources

Password security guidance for application security professionals.

SecLists

SecLists — Wordlist Repository

Comprehensive wordlist collection for password auditing.

Verizon DBIR 2025

Verizon Data Breach Report

Credential abuse as the #1 initial access vector.

© A7 Security Hunters. Educational cybersecurity content. Use security tools only on systems, accounts, and password hashes that you own or are explicitly authorized to assess.

Last Updated: August 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

About Us

A7 Security Hunters is a leading provider of cybersecurity certifications and training, offering both online and offline courses tailored to professionals at all levels. Our comprehensive programs cover key areas like ethical hacking, network security, and threat management, designed to equip individuals with the skills to succeed in the fast-paced world of cybersecurity. With expert instructors and hands-on learning, A7 Security Hunters ensures you gain practical knowledge and industry-recognized certifications to advance your career in cybersecurity.

Cybersecurity Training & Certifications

Most Recent Posts

A7 Security Hunters

Enroll in A7 Security Hunters' Certifications and Transform into a Cybersecurity Expert

A7 Security Hunters provides cybersecurity training, ethical hacking courses, penetration testing education, digital forensics training, AI security learning, and professional cybersecurity certifications for students and professionals across India.

Address: Mata Darwaja, Gau Karan Rd, Near SD School, landmark Gau Karn Traffic Police Choki, Plot 736a Baba Laxman Puri Colony, Makhane or, Library Wali Gali, Rohtak124001, Haryana (India) | Official Email Address- [email protected] | [email protected] | Official Phone Numbers – +91 – 7988-28-5508 | +91 – 818181-6323

© 2026 A7 Security Hunters. Cybersecurity Training, Ethical Hacking Courses & Professional Certifications.