Understanding wordlist generation for WPA/WPA2 password cracking
In previous discussions about WPA and WPA2 security, we established that handshake packets contain crucial information for password verification. However, these packets don't provide enough data to directly recover or recalculate the original key.
This limitation leads us to a methodology called wordlist attack, which involves:
Figure 1: The WPA/WPA2 password cracking process using wordlists
While pre-made wordlists are available online, creating custom wordlists tailored to specific scenarios can significantly improve success rates. Crunch is a powerful tool that generates custom wordlists based on specified parameters.
The basic parameters include:
Generate passwords between 6-8 characters using only lowercase a, b, c and numbers 1, 2:
This command generates approximately 448,000 passwords (about 4MB of data).
Generate 6-character passwords that start with 'A' and end with 'B':
In the pattern:
This pattern reduces the possible combinations to only 625 passwords, making the attack much faster.
| Option | Description | Example |
|---|---|---|
| -t [pattern] | Define a pattern for generated passwords | -t P@ssw@@d |
| -o [filename] | Output to a file instead of stdout | -o my_wordlist.txt |
| -p [charset] | Generate passwords without repeating characters | -p abcd1234 |
| -s [startstring] | Start at a specific string | -s abc123 |
| -b [size] | Specify output file size (KB, MB, GB) | -b 10MB |
Figure 2: Comparison of wordlist sizes with different strategies
If you have any information about the target password, use it to reduce the search space:
Consider creating wordlists based on:
Be mindful of wordlist size:
This command would generate 208,827,064,576 passwords (nearly 2TB of data)!
Instead, use more targeted approaches:
This generates only 10,000 passwords that all start with "P@ss".