Hashcat - Password Recovery Tool

Hashcat - Password Recovery Tool

October 22, 2026 · 5 min read · tools

cracking passwords

What is Hashcat?

Hashcat is a tool that cracks password hashes. A system does not store your password, but an irreversible calculation of it: the hash. Anyone who obtains that hash cannot work the password back out, but they can guess. You try a candidate, calculate the hash, and see whether it matches.

That guessing is exactly what Hashcat is good at. The tool uses the graphics card, which carries out thousands of calculations at the same time. Depending on the hash type that ranges from a few thousand to tens of billions of attempts per second. Hashcat is open source, runs on Linux, Windows and macOS, and supports hundreds of hash formats.

Important to understand: Hashcat does not break encryption. It guesses passwords very quickly. Whether that succeeds depends entirely on how the password was chosen.

What do we use Hashcat for?

Hashcat is the final piece of much of our work. During a pentest we regularly come across hashes, and those only tell us something once we know whether they can be cracked.

After a WiFi pentest we set Hashcat on the handshakes we captured with wifit3 or Wifite2. Within a Windows domain we use it to crack the NTLM hashes that come from an NTDS dump, and the tickets from Kerberoasting and AS-REP Roasting. With a web application that has a leaked user database, it shows how well the password storage has been chosen.

In every case the outcome is the same kind of finding: what percentage of the passwords can be guessed within a realistic time, and which patterns are in them. That is more usable for an organisation than a standalone remark about password policy.

Installation

On Kali Linux, Hashcat is in the default repositories:

sudo apt install hashcat

For serious cracking work you want the newest version plus the right GPU drivers. Download those from hashcat.net. Then check whether your card is recognised:

hashcat -I          # which devices does Hashcat see?
hashcat -b -m 1000  # benchmark for NTLM

If Hashcat only sees your processor and not your graphics card, the OpenCL or CUDA drivers are missing. In a virtual machine the GPU is usually not available, so preferably run Hashcat on the host system.

What does a hashcat command look like?

Every command consists of four parts: the hash type (-m), the attack mode (-a), the file with hashes, and the source of your candidates.

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

This says: these are NTLM hashes (-m 1000), use a wordlist attack (-a 0), the hashes are in hashes.txt, and try everything from rockyou. Hashcat remembers cracked passwords in a potfile, so that you see them again later with --show.

hashcat -m 1000 hashes.txt --show            # show what has already been cracked
hashcat -m 1000 hashes.txt --show --username # including the username

Commonly used hash types

-m Type Where you come across it
22000 WPA-PBKDF2-PMKID+EAPOL WiFi handshakes from wifit3 or Wifite2
1000 NTLM Windows passwords from an NTDS dump or from memory
5600 NetNTLMv2 Captured login attempts during a network pentest
13100 Kerberos TGS-REP Service tickets from Kerberoasting
18200 Kerberos AS-REP Tickets from AS-REP Roasting
1800 sha512crypt /etc/shadow on Linux
3200 bcrypt Password storage of modern web applications
0 / 100 MD5 / SHA1 Older application databases

The difference between those types is bigger than it looks. NTLM and MD5 are extremely fast to calculate, which makes billions of attempts per second achievable. bcrypt is deliberately slow and holds you back to a few tens of thousands of attempts. That is why the choice of hash algorithm in an application matters so much.

Attack modes

-a Mode When you use it
0 Wordlist The standard approach, optionally with rules added
1 Combinator Sticks words from two lists together
3 Mask Targeted brute forcing of a known pattern
6 Hybrid Word from a list with a mask after it
7 Hybrid Mask at the front, word after it

A mask describes the shape of a password. ?u is a capital letter, ?l a lower-case letter, ?d a digit and ?s a punctuation mark. The mask ?u?l?l?l?l?l?d?d therefore looks for words such as Zomer24. That is far more efficient than trying everything, as long as you judge the pattern correctly.

# Known pattern: capital letter, five lower-case letters, two digits
hashcat -m 1000 -a 3 hashes.txt '?u?l?l?l?l?l?d?d'

Rules: the difference between good and very good

People rarely pick a bare word from a list. They turn it into Welkom2026!. With rules you let Hashcat generate those variants itself: adding capital letters, sticking digits on the end, replacing letters with digits.

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

best64.rule is the standard choice and costs little extra time. If you want to dig deeper, OneRuleToRuleThemAll is popular, although the running time then goes up considerably. For wordlists we mainly use SecLists alongside rockyou, supplemented with lists that we derive from the organisation itself, such as the company name and place names.

Detection and defence

Hashcat runs on your own machine, so there is nothing to detect. The defence lies entirely on the side of the password and the way it is stored.

For users: length beats complexity. A passphrase of four random words is far stronger than P@ssw0rd!, even though the latter meets more complexity rules. It is precisely those rules that produce predictable patterns, and those patterns are exactly what Hashcat rules catch.

For developers: choose a slow hash algorithm. bcrypt, scrypt or Argon2 are designed to make cracking expensive, unlike MD5 or SHA1. Always use a salt, so that identical passwords do not produce the same hash and rainbow tables are worthless.

And for the organisation as a whole: make sure that a cracked password does not immediately grant access. Multi-factor authentication is the measure that prevents the most damage at the moment a password does become known.

Only use Hashcat on hashes that are yours or that you have obtained within an agreed engagement. Cracking other people’s passwords without permission is a criminal offence.

Frequently asked questions about Hashcat

What is the difference between Hashcat and John the Ripper?

Both crack password hashes, but Hashcat is built around the GPU and John the Ripper was originally built around the CPU. For large quantities of fast hashes, such as NTLM from a Windows domain, Hashcat is many times faster. John the Ripper is stronger at recognising hash formats automatically and at handling exotic file types. In practice we use John to convert a file into a usable hash, and Hashcat to do the heavy cracking work.

Do you need a GPU for Hashcat?

You do not need one, but it makes an enormous difference. Hashcat also runs on the processor, you just get a fraction of the speed. Cracking an NTLM hash on a modern GPU gets towards tens of billions of attempts per second, while a CPU stalls in the hundreds of millions. For slow hashes such as bcrypt the difference is smaller, because those are designed to be slow in the first place.

How do you know which -m value you need?

The -m option determines the hash type and it has to be exactly right, otherwise Hashcat finds nothing. The full overview is in hashcat --help or in the list of examples on the project’s site. If you do not know the type, a tool such as hashid or name-that-hash can take a look, but often you already know it from the context: if the hash comes from a WiFi capture it is 22000, and if it comes from a Windows domain it is 1000.

How long does cracking a password take?

That depends on the hash type and on the password itself, not on luck. A password that appears in a wordlist, or is a simple variant of one, comes out within minutes. A random string of twenty characters cannot be cracked with current technology. That is exactly where the value for a pentest lies: if the cracking does not succeed within the agreed time, that is the evidence that the password policy works.

Is using Hashcat legal?

The tool itself is perfectly legal and is also used to recover your own forgotten passwords. Cracking hashes that you have obtained without permission is not. Within a pentest we always work with hashes that we have obtained during an agreed engagement, and we destroy that material afterwards.

Related articles