Whittle
Whittle is a command-line tool designed to manipulate and optimize wordlists for security testing. It was born out of a frustration with existing wordlists and wordlist generation tools that either did not contain the right features, or were too complex to use.
Motivation
When conducting security assessments, especially in internal infrastructure penetration testing, having the right wordlist can make a significant difference to efficiency and success rates when password cracking. Frequently, I found myself:
- Combining multiple wordlists
- Creating wordlists from scratch that were way too large, or not specific enough
- Wasting time using wordlists comprised of passwords that would never be accepted by default password policies
While there are tools available that can perform some of these functions, I never found one that considers Microsoft's password complexity requirements.
Features
Whittle focuses on being a versatile, yet simple tool for refining wordlists:
- Microsoft's "Must meet password complexity requirements" - By default, active directory will not accept passwords that don't meet the complexity requirements. Whittle can be used to remove candidate entries that don't meet these requirements. It also considers account full names and usernames!
- Filter - Remove entries based on minimum and maximum length, to deal with custom password policies.
- Statistics - Verbose statistics are provided, including the number of rejections and processing times.
Implementation & Usage
Whittle is written in Python, making it cross-platform and easy to extend. It uses efficient data structures to handle large wordlists with minimal memory consumption, and supports hyperthreading for parallel processing.
Case Study: Improving Success Rates
During a particularly successful penetration testing engagement for a financial services client, I found myself with an NTDS.dit file that was 1.7GB in size (that's a lot of password material). Rather than just using rockyou.txt as-is, I used whittle to refine it to be 100% compliant with the password policy.
This is only applicable where extra processing is not done - for example with hashcat rules. Since getting the NTDS.dit file took most of the engagement time, and I had a pretty low performance GPU, I didn't have the time to use beefy rules like dive or oneruletorulethemall. If this was purely a password audit assessment, this would be a different story.
Future Development
I'm continuously improving Whittle based on feedback and real-world usage. Some planned features include:
- Support for custom regex patterns, to allow for more complex filtering.
- The ability to provide a password policy export, which will be parsed for complexity requirements.