root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat crunch.md
// cracking

crunch

21 Jul 2026 · 5 min read
crunch is a brute-force wordlist generator bundled with Kali: it produces every possible combination for a given charset and length. It is used to build tailored lists when generic dictionaries do not match the target's password policy.

What really matters is that crunch is combinatorial and exhaustive: the keyspace grows exponentially with length, so its real value is not generating everything but constraining the space with -t patterns (position and character type) and piping the output into a cracker via stdin instead of writing terabytes to disk.

1. Beginner level — charset, length and output

CRUNCH cheat sheet — Beginner
CommandWhat it does
crunch 4 8Generates words of 4 to 8 chars (a-z)
crunch 8 8 -o wl.txtFixed length to a file
crunch 6 6 0123456789Digits only (6-digit PINs)
crunch 4 6 abcABC123Custom charset
crunch 8 8 -t @@@@%%%%Pattern: 4 letters + 4 numbers
crunch 5 5 -p perro gatoPermutes words (not characters)
crunch 1 8 -f charset.lst mixalphaUses a named charset
crunch 8 8 -t pass@@@@Fixed prefix + wildcards
crunch 4 4 -o - | hashcat -m 0 hash -Pipes via stdout to hashcat
crunch 8 8 -c 10000 -o STARTSplits into files of N lines
crunch 6 6 -d 2@Limits consecutive repeated characters
crunch 8 8 -s aaaaaaaaStarts from a specific word
crunch 8 8 -e zzzzzzzzEnds at a specific word
cat /usr/share/crunch/charset.lstLists the predefined charsets

2. Advanced level — patterns, compression and feed

CRUNCH cheat sheet — Advanced
CommandWhat it does
crunch 8 8 -t @@@^^^%%Letters, symbols and numbers by position
crunch 12 12 -t Pass%%%%@@@@ -o wl.txtComplex pattern with prefix
crunch 8 8 -t ,@@@@@@@First uppercase (,) + lowercase
crunch 10 10 -t @@@@2024!!Fixed year between wildcards
crunch 6 6 abcdef -o - | aircrack-ng -w - cap.capDirect feed to aircrack-ng
crunch 8 8 -d 1@ -t %%%%%%%%No consecutive repeated characters
crunch 8 8 -b 20mib -o STARTSplits by size (not by lines)
crunch 4 6 -f charset.lst lalpha-numericSpecific named charset
crunch 8 8 -t @@@@@@@@ -iReverses the generation order
crunch 5 5 -p abc 123Permutes a set of tokens
crunch 8 8 -z gzip -o wlCompresses the output on the fly
crunch 8 8 -q words.txtPermutes the lines of a file
crunch 8 8 -t ^@@@@@@@First character a symbol
crunch 1 8 mixalpha-numeric-all -o - | john --stdinFeeds john via stdin

3. Details people miss

  • Output size grows exponentially: a full a-z 8-character list is around 200 TB. crunch prints the estimated size before it starts, so always read it before writing to disk.
  • In -t each symbol is a different wildcard: @=lowercase, ,=uppercase, %=numbers, ^=symbols. Mixing them up produces the wrong list without warning.
  • To avoid filling the disk, pipe with -o - straight into hashcat, john or aircrack-ng via stdin instead of saving the file.
  • If you need a literal @ , % ^ inside -t, escape it with \; otherwise crunch treats it as a wildcard.
  • crunch does not require root, but it does need real space: use -c (by lines) or -b (by size) to split the output and avoid blowing up the filesystem.

Responsible use

These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.