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

| Command | What it does |
|---|---|
crunch 4 8 | Generates words of 4 to 8 chars (a-z) |
crunch 8 8 -o wl.txt | Fixed length to a file |
crunch 6 6 0123456789 | Digits only (6-digit PINs) |
crunch 4 6 abcABC123 | Custom charset |
crunch 8 8 -t @@@@%%%% | Pattern: 4 letters + 4 numbers |
crunch 5 5 -p perro gato | Permutes words (not characters) |
crunch 1 8 -f charset.lst mixalpha | Uses 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 START | Splits into files of N lines |
crunch 6 6 -d 2@ | Limits consecutive repeated characters |
crunch 8 8 -s aaaaaaaa | Starts from a specific word |
crunch 8 8 -e zzzzzzzz | Ends at a specific word |
cat /usr/share/crunch/charset.lst | Lists the predefined charsets |
2. Advanced level — patterns, compression and feed

| Command | What it does |
|---|---|
crunch 8 8 -t @@@^^^%% | Letters, symbols and numbers by position |
crunch 12 12 -t Pass%%%%@@@@ -o wl.txt | Complex 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.cap | Direct feed to aircrack-ng |
crunch 8 8 -d 1@ -t %%%%%%%% | No consecutive repeated characters |
crunch 8 8 -b 20mib -o START | Splits by size (not by lines) |
crunch 4 6 -f charset.lst lalpha-numeric | Specific named charset |
crunch 8 8 -t @@@@@@@@ -i | Reverses the generation order |
crunch 5 5 -p abc 123 | Permutes a set of tokens |
crunch 8 8 -z gzip -o wl | Compresses the output on the fly |
crunch 8 8 -q words.txt | Permutes the lines of a file |
crunch 8 8 -t ^@@@@@@@ | First character a symbol |
crunch 1 8 mixalpha-numeric-all -o - | john --stdin | Feeds 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
-teach 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.
crunch es un generador de diccionarios de fuerza bruta incluido en Kali: produce todas las combinaciones posibles para un charset y una longitud dados. Se usa para crear listas a medida cuando los diccionarios genéricos no encajan con la política de contraseñas del objetivo.Lo que de verdad importa es que crunch es combinatorio y exhaustivo: el keyspace crece exponencialmente con la longitud, así que su valor real no está en generarlo todo, sino en acotar el espacio con patrones -t (posición y tipo de carácter) y en canalizar la salida a un cracker por stdin en lugar de escribir terabytes a disco.
1. Nivel principiante — charset, longitud y salida

| Comando | Qué hace |
|---|---|
crunch 4 8 | Genera palabras de 4 a 8 chars (a-z) |
crunch 8 8 -o wl.txt | Longitud fija a un archivo |
crunch 6 6 0123456789 | Solo dígitos (PINs de 6) |
crunch 4 6 abcABC123 | Charset personalizado |
crunch 8 8 -t @@@@%%%% | Patrón: 4 letras + 4 números |
crunch 5 5 -p perro gato | Permuta palabras (no caracteres) |
crunch 1 8 -f charset.lst mixalpha | Usa un charset con nombre |
crunch 8 8 -t pass@@@@ | Prefijo fijo + comodines |
crunch 4 4 -o - | hashcat -m 0 hash - | Envía por stdout a hashcat |
crunch 8 8 -c 10000 -o START | Divide en archivos de N líneas |
crunch 6 6 -d 2@ | Limita caracteres repetidos consecutivos |
crunch 8 8 -s aaaaaaaa | Empieza desde una palabra concreta |
crunch 8 8 -e zzzzzzzz | Termina en una palabra concreta |
cat /usr/share/crunch/charset.lst | Lista los charsets predefinidos |
2. Nivel avanzado — patrones, compresión y feed

| Comando | Qué hace |
|---|---|
crunch 8 8 -t @@@^^^%% | Letras, símbolos y números por posición |
crunch 12 12 -t Pass%%%%@@@@ -o wl.txt | Patrón complejo con prefijo |
crunch 8 8 -t ,@@@@@@@ | Primera en mayúscula (,) + minúsculas |
crunch 10 10 -t @@@@2024!! | Año fijo entre comodines |
crunch 6 6 abcdef -o - | aircrack-ng -w - cap.cap | Feed directo a aircrack-ng |
crunch 8 8 -d 1@ -t %%%%%%%% | Sin caracteres repetidos consecutivos |
crunch 8 8 -b 20mib -o START | Divide por tamaño (no por líneas) |
crunch 4 6 -f charset.lst lalpha-numeric | Charset con nombre concreto |
crunch 8 8 -t @@@@@@@@ -i | Invierte el orden de generación |
crunch 5 5 -p abc 123 | Permuta un conjunto de tokens |
crunch 8 8 -z gzip -o wl | Comprime la salida al vuelo |
crunch 8 8 -q words.txt | Permuta las líneas de un archivo |
crunch 8 8 -t ^@@@@@@@ | Primer carácter símbolo |
crunch 1 8 mixalpha-numeric-all -o - | john --stdin | Alimenta john por stdin |
3. Detalles que se pasan por alto
- El tamaño de salida crece exponencialmente: una lista completa a-z de 8 caracteres ronda los 200 TB. crunch imprime el tamaño estimado antes de empezar, así que léelo siempre antes de escribir a disco.
- En
-tcada símbolo es un comodín distinto:@=minúsculas,,=mayúsculas,%=números,^=símbolos. Confundirlos genera una lista equivocada sin avisar. - Para no llenar el disco, canaliza con
-o -directamente a hashcat, john o aircrack-ng por stdin en vez de guardar el archivo. - Si necesitas un
@ , % ^literal dentro de-t, escápalo con\; de lo contrario crunch lo interpreta como comodín. - crunch no requiere root, pero sí espacio real: usa
-c(por líneas) o-b(por tamaño) para trocear la salida y no reventar el sistema de ficheros.
Uso responsable
Estos comandos son para entornos propios o con autorización explícita por escrito (laboratorios, CTF, auditorías contratadas). Usarlos contra infraestructura ajena sin permiso es ilegal en la mayoría de países.