Hashcat is an open-source password recovery tool that recovers plaintext passwords from cryptographic hashes by computing candidate hashes at very high speed, mostly on graphics processing units (GPUs). In cybersecurity, and in security testing in particular, it is the standard instrument for auditing password strength during penetration tests, red team engagements and internal credential reviews.
Hashcat never reverses a hash mathematically. It guesses candidate passwords, hashes each guess with the same algorithm and parameters as the target, and reports a match when the results are identical. Its value therefore depends on raw hashing speed, on the quality of the guesses and on how expensive the target algorithm is to compute.
How Hashcat recovers passwords from hashes
Hashcat works by offline guessing: the tester first obtains a file of hashes, for example from a domain controller database, a captured authentication exchange or a leaked application table, and then attacks that file locally without contacting the original system. Because nothing touches the live service, account lockout policies and rate limits do not apply, which is why offline cracking is far faster than online guessing.
The tool uses OpenCL and CUDA kernels to run thousands of hashing operations in parallel on GPUs, and it can combine several devices in one session. Each supported algorithm is identified by a numeric hash mode, selected with the -m option, while the attack strategy is chosen with the -a option. Recovered results are written to a potfile, so a hash that has already been cracked is not attacked again.
The following table lists commonly encountered hash modes and the systems that produce them.
| Hash mode | Algorithm | Typical source |
|---|---|---|
| 0 | MD5 | Legacy web applications |
| 1000 | NTLM | Windows SAM and Active Directory |
| 5600 | NetNTLMv2 | Captured SMB or HTTP authentication |
| 13100 | Kerberos 5 TGS-REP (RC4) | Kerberoasting of service accounts |
| 1800 | sha512crypt | Linux shadow files |
| 3200 | bcrypt | Modern web applications |
| 22000 | WPA-PBKDF2-PMKID+EAPOL | Wi-Fi handshakes |
Attack modes and candidate generation
Hashcat offers several attack modes that differ in how candidate passwords are produced. The choice of mode matters more than hardware in most audits, because human-chosen passwords follow predictable patterns that a well-designed attack exploits long before an exhaustive search would finish.
The table below summarizes the main modes and when each one is appropriate.
| Mode | Option | How candidates are built | Best use |
|---|---|---|---|
| Straight (dictionary) | -a 0 | Words from a list, optionally with rules | First pass on any audit |
| Combinator | -a 1 | Concatenation of words from two lists | Passphrases of two words |
| Mask (brute force) | -a 3 | Every value in a defined character pattern | Short or structured passwords |
| Hybrid wordlist plus mask | -a 6 | Dictionary word followed by a mask | Words with appended digits |
| Hybrid mask plus wordlist | -a 7 | Mask followed by a dictionary word | Prefixed years or symbols |
| Association | -a 9 | Hints such as usernames per hash | Passwords derived from account data |
Rule-based attacks are the most productive technique in practice. A rule file applies transformations such as capitalizing the first letter, appending a year or replacing letters with digits, so a modest wordlist expands into billions of realistic candidates. Masks describe patterns with placeholders such as ?u for uppercase, ?l for lowercase and ?d for digits, which lets a tester target a policy such as one capital, six letters and two digits without wasting effort on impossible combinations.
Hashing speed and algorithm cost
The decisive factor in any cracking effort is the cost of the target algorithm. Fast unsalted hashes such as MD5 and NTLM can be computed at rates of tens to hundreds of billions per second on a single modern GPU, whereas deliberately slow algorithms such as bcrypt, scrypt and Argon2 reduce the rate by many orders of magnitude.
The ranges below are indicative for one high-end consumer GPU; actual figures depend on the card, the driver, the cost parameters and the attack mode.
| Algorithm class | Example | Indicative rate per GPU | Practical effect |
|---|---|---|---|
| Fast unsalted hash | NTLM, MD5 | Tens to hundreds of billions per second | Eight-character passwords fall quickly |
| Fast salted hash | Salted SHA-256 | Billions per second | Salt stops precomputation, not guessing |
| Iterated hash | sha512crypt, PBKDF2 | Hundreds of thousands per second | Only weak passwords fall |
| Memory-hard or adaptive | bcrypt cost 12, Argon2 | Thousands per second or fewer | Strong passwords resist for years |
Salting prevents precomputed tables and forces separate work for each account, but it does not slow the guessing of an individual hash. Only key stretching, meaning a high iteration count or memory requirement, raises the cost per guess enough to protect average passwords.
Hashcat compared with related tools
Hashcat is usually discussed alongside John the Ripper, the other major open-source cracker, and online guessing tools such as Hydra. The tools overlap, but each fits a different stage of an assessment.
| Tool | Primary strength | Main limitation |
|---|---|---|
| Hashcat | Fastest GPU cracking, rich rule and mask engine | Needs extracted hashes in the exact format |
| John the Ripper | Broad format support and extraction helpers | Generally slower on GPU workloads |
| Online guessing tools | Test live login services directly | Blocked by lockout and rate limits |
| Rainbow tables | Instant lookup for unsalted hashes | Useless against salted algorithms |
In many engagements, testers use John the Ripper utilities to extract hashes from files such as encrypted archives or key stores and then hand the output to Hashcat for the high-speed cracking phase. Tools such as Metasploit or Nmap may supply the initial access that makes hash collection possible.
Authorized use, limits and common mistakes
Hashcat is legal software, but cracking hashes without written authorization is an offense in most jurisdictions. A professional engagement defines in its rules of engagement which hash sources are in scope, how recovered passwords are stored and when they are destroyed. Recovered plaintext is highly sensitive data and should be reported in aggregate, for example as the share of accounts cracked within a given time.
- Wrong hash mode: a mismatched mode produces no results or a token length error, so the format must be verified first.
- Brute force first: starting with exhaustive masks wastes hours that a rule-based dictionary attack would save.
- Ignoring thermals: long sessions on poorly cooled hardware cause throttling and unstable results.
- Overstating results: an uncracked hash proves only that the attempted candidates failed, not that the password is strong.
- Leaking the potfile: recovered passwords left on a shared workstation create a new exposure.
The main limitation is structural: Hashcat can only find passwords that its candidate space contains. A long random passphrase protected by a memory-hard algorithm remains out of practical reach regardless of hardware.
In simple terms
Systems do not store passwords directly. They store a scrambled fingerprint of each password, called a hash. Hashcat takes those fingerprints and tries enormous numbers of guesses, scrambling each guess the same way, until one fingerprint matches. It is like testing keys on a lock very fast, using a powerful graphics card to try billions of keys every second.
Security teams use it to find out which employees chose passwords that are easy to guess before a real attacker does. The lesson is simple: long, unusual passwords and slow hashing methods make guessing impractical.
A practical example
During an authorized internal penetration test of a mid-sized manufacturer, a tester obtains a copy of the Active Directory database and extracts about 4,000 NTLM hashes. On a workstation with two GPUs, the tester first runs a dictionary attack with a large leaked-password list and a standard rule set, then a hybrid attack that appends years and symbols to company and product names.
Within six hours, about 38 percent of the accounts are cracked, including two service accounts with domain administrator rights whose passwords combined the company name and a year. The report shows the share of weak passwords without listing any plaintext. The client then introduces a banned-password list, raises the minimum length to 14 characters and moves the service accounts to managed accounts with long random secrets. A repeat audit three months later cracks fewer than 5 percent of the hashes in the same time.