LinuxCommandLibrary

crunch

Create wordlists from character sets

TLDR

Output a list of words of length 1 to 3 with only lowercase characters

$ crunch [1] [3]
copy

Output a list of hexadecimal words of length 8
$ crunch [8] [8] [0123456789abcdef]
copy

Output a list of all permutations of abc (lengths are not processed)
$ crunch [1] [1] -p [abc]
copy

Output a list of all permutations of the given strings (lengths are not processed)
$ crunch [1] [1] -p [abc] [def] [ghi]
copy

Output a list of words generated according to the given pattern and a maximum number of duplicate letters
$ crunch [5] [5] [abcde123] -t [@@@12] -d 2@
copy

Write a list of words in chunk files of a given size, starting with the given string
$ crunch [3] [5] -o [START] -b [10kb] -s [abc]
copy

Write a list of words stopping with the given string and inverting the wordlist
$ crunch [1] [5] -o [START] -e [abcde] -i
copy

Write a list of words in compressed chunk files with a specified number of words
$ crunch [1] [5] -o [START] -c [1000] -z [gzip|bzip2|lzma|7z]
copy

SYNOPSIS

crunch [] [-t <@,%^>] [-p ] [-q ] [-l <@,%^>] [-b ] [-o ] [-d ] [-s ] [-e ] [-z ] [-f ] [-k] [-m]

PARAMETERS


    Minimum length of the password to generate.


    Maximum length of the password to generate.

[]
    Character set to use for generating passwords. Can be a combination of l (lowercase), u (uppercase), d (digits), s (symbols). Example: 'lud' for lowercase, uppercase, and digits.

-t <@,%^>
    Specifies a pattern to use. @ will insert lowercase characters, , will insert uppercase characters, % will insert numbers, and ^ will insert symbols. Example: -t @@@% for three lowercase characters followed by a number.

-p
    Permutes the specified words. Requires -l option.

-q
    Same as -p but prints only the specified words permuted.

-l <@,%^>
    Specifies a literal. Used with -p to define how the words are permuted.

-b
    Specifies the maximum size of the output file. can be k, m, g, or mb.

-o
    Specifies the output filename. Without this, output goes to stdout.

-d
    Limit duplicate characters. Example: -d 2@ will prevent two consecutive lowercase characters.

-s
    Start at the specified value. Used for resuming interrupted sessions.

-e
    Stop at the specified value.

-z
    Compresses the output. Supported types: gzip, bzip2, lzma, 7z.

-f
    Specifies a character set from the charset.lst file.

-k
    Start the generation from the first character of the charset.

-m
    Merges all the output into a single file.

DESCRIPTION

Crunch is a powerful command-line tool in Linux designed to create wordlists based on specified criteria.
It's primarily used for brute-force password cracking and penetration testing. Crunch allows you to define a character set, minimum and maximum password lengths, and output the generated wordlist to the terminal or a file. It supports various character set combinations (lowercase, uppercase, digits, symbols) and pattern-based generation, giving the user flexibility in creating targeted wordlists. You can use crunch to generate wordlists containing specific words, dates, or patterns.
Because of it's ability to generate very big files, be aware of the target disk space.

CAVEATS

Generating large wordlists can consume significant disk space. Using complex patterns can exponentially increase the generation time. Be mindful of ethical hacking practices and legal limitations.

CHARACTER SETS

Character sets can be defined explicitly or by using predefined abbreviations.
Using lowercase ('l'), uppercase ('u'), digits ('d'), and symbols ('s') allows you to create a combination of character sets for password generation.

OUTPUT REDIRECTION

The output can be directly piped to other tools or saved to a file using the '-o' option.
Piping the output can be useful for immediate analysis or filtering with tools like 'grep'.

HISTORY

Crunch was developed as a flexible and powerful tool for generating wordlists to aid in password cracking and security auditing.
Its development was driven by the need for customizable wordlist generation beyond simple brute-force approaches.
The tool has evolved over time to include features like pattern-based generation, charset selection, and output compression, enhancing its utility in penetration testing and security research.

SEE ALSO

john(1), hashcat(1), aircrack-ng(1)

Copied to clipboard