Password Attacks
Crunch is a wordlist generator where you can specify a standard character set or a custom one. It can generate all possible combinations.
sudo apt install crunch
crunch <min> <max> [charset] -o <output>
Crunch is a wordlist generator that creates every possible character combination within specified parameters. It generates wordlists from minimum and maximum lengths, custom character sets, and pattern templates.
Unlike content-based tools like CeWL, Crunch creates wordlists mathematically. You define the character set (lowercase, uppercase, digits, symbols) and length range, and Crunch generates all permutations. This makes it ideal for creating PIN lists, brute-force dictionaries, and pattern-based wordlists.
Crunch can output directly to files or stdout, allowing it to pipe directly into other tools like Hashcat, John the Ripper, or Hydra without creating intermediate files.
| Command | Purpose |
|---|---|
crunch -v | Print the installed version. |
crunch 4 4 ab12 -o ./audit-4char.txt | Generate a bounded 256-entry fixture. |
crunch 6 6 -t 'PIN%%%' -o ./audit-pins.txt | Generate 1,000 fixed-prefix candidates. |
crunch 4 4 abc -s abca -e acbc -o ./bounded-range.txt | Generate an inclusive bounded range. |
crunch 6 6Generate all lowercase words of exactly 6 characters using the default charsetcrunch 4 8Generate words from 4 to 8 characters long using the default lowercase charsetcrunch 8 8 abcdefghijklmnopqrstuvwxyzGenerate 8-char words using a custom lowercase-alphabet charsetcrunch 6 6 0123456789Generate all 6-digit numeric PIN combinationscrunch 6 8 -o wordlist.txtWrite generated 6-8 char words to a file instead of stdoutcrunch 1 8 -f /usr/share/crunch/charset.lst mixalpha -o wordlist.txtUse a named charset from charset.lst and save to a filecrunch 8 8 -t @@@@@@@@ -o pass.txtUse a pattern of lowercase-letter placeholders to build the wordlistcrunch 12 12 -t Pass@@@@%%%%Build passwords with a fixed prefix plus lowercase and numeric placeholderscrunch 10 10 -t @@@@@^^^^^Generate words mixing lowercase letters and symbols via pattern placeholderscrunch 8 8 -t pass,%%%Use uppercase-letter placeholder (,) followed by numeric placeholders in a patterncrunch 6 6 abcdef -s cadefStart generating from a specific word rather than the first combinationcrunch 6 6 abc123 -e fff123Stop generating once a specific end word is reachedcrunch 4 6 abc -d 2@ -o wordlist.txtLimit consecutive identical characters (max 2 of the same @ placeholder)crunch 1 6 abcABC -c 1000 -o STARTSplit output into files of 1000 lines each (START is auto-renamed by content)crunch 6 8 -b 20mib -o STARTSplit output into files no larger than 20 MiB eachcrunch 8 8 -p abcGenerate permutations of the supplied characters (no repetition, ignores min/max)crunch 1 1 -p cat dog birdGenerate permutations of whole words rather than characterscrunch 6 6 -q infile.txtGenerate permutations of lines read from a filecrunch 5 5 abcde -i -o wordlist.txtInvert output so characters change left-to-right instead of right-to-leftcrunch 6 6 -z gzip -o wordlistCompress the output file with gzip on the flycrunch 6 6 -z bzip2 -o wordlistCompress the output file with bzip2 on the flycrunch 1 8 abcdefghijklmnopqrstuvwxyz0123456789 -o wordlist.txtGenerate a full alphanumeric wordlist of 1-8 characterscrunch 8 8 -t ,@@^^%%%Combine all four placeholder classes (upper, lower, symbol, number) in one patterncrunch 6 6 abc -t @@@@@l -l aaaaa@Use -l to mark which pattern symbols are literal characters instead of placeholderscrunch 4 6 abcdef123456 | wc -lCount how many candidates a given charset and length range would produceGenerate all 6-digit numeric PINs for testing PIN-based authentication systems.
Create wordlists matching known password patterns like 'pass' + 4 digits.
Pipe generated words directly into cracking tools without intermediate files.
Generate complete character set combinations for exhaustive password testing.
Create custom wordlists for cryptography and password cracking challenges.
Yes, Crunch is included in the default Kali Linux installation, so no extra setup is needed. If it is missing on a minimal image you can add it with `sudo apt install crunch`. Verify the version with `crunch --version`.
Crunch generates wordlists algorithmically from character sets and patterns you define, producing every possible combination. CeWL instead scrapes a website to build a wordlist from words that actually appear on it. Use Crunch for pattern-based or policy-based lists and CeWL for target-specific vocabulary during authorized testing.
Crunch ships with `/usr/share/crunch/charset.lst`, which defines named sets like `lalpha` and `mixalpha-numeric-all`. Reference one with the `-f` flag, e.g. `crunch 8 8 -f /usr/share/crunch/charset.lst mixalpha -o wordlist.txt`. You can copy that file and edit it to define your own named character sets.
Crunch has no true resume feature, but the `-s` flag lets you start generation from a specific string, e.g. `crunch 6 6 -s aab000`. By noting the last value written before an interruption, you can restart close to where you stopped instead of regenerating the whole keyspace.
Crunch works with any byte values you pass in a custom character set, so accented and other characters can be included directly on the command line, e.g. `crunch 4 4 abcñé`. Full multi-byte Unicode support can be inconsistent, so verify a small sample of the output before generating a large list.
Use `-b` to cap each file by size or `-c` to cap it by number of lines, combined with `-o START`. For example `crunch 8 8 -b 20mib -o START` writes a series of files no larger than 20 MiB each, which keeps individual files manageable for tools that struggle with huge inputs.
Password Attacks
CeWL is a custom word list generator that spiders a target URL and creates a wordlist from the content. Great for targeted password attacks.
Password Attacks
CUPP (Common User Passwords Profiler) creates custom wordlists based on target personal information like names, birthdays, nicknames, pets, and keywords.
Password Attacks
John the Ripper is a free and open-source password security auditing and password recovery tool. It can crack various password hash types offline and is highly customizable with different attack modes and mangling rules.
Password Attacks
Learn how to use Hashcat in Kali Linux as a beginner, from checking the install and selecting the right modes to running a wordlist crack and reading results.
Password Attacks
Hydra is a parallelized login cracker that supports numerous protocols including FTP, HTTP, HTTPS, SMB, SSH, and many more. It performs rapid dictionary attacks against login pages and services to test password strength.
Password Attacks
Medusa is a speedy, parallel, and modular login brute-forcer. It supports many protocols including HTTP, FTP, SSH, SMB, MySQL, and more.
Learn how dictionary attacks use wordlists to crack passwords, how to create effective wordlists, and strategies to defend against wordlist-based attacks.
Security · IntermediateLearn about brute force attacks, their variations, tools used, and comprehensive defense strategies including rate limiting, lockouts, and password policies.
Security · BeginnerEverything you need to know about password security, including creating strong passwords, using password managers, multi-factor authentication, and defending against attacks.
Tools · BeginnerA comprehensive guide to using Hydra for network authentication testing with common protocols, practical examples, and security best practices.
Outputs a text file populated with every single mathematical permutation based on your input parameters.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.