██████╗ ██╗ ██╗███╗ ██╗███████╗ ██████╗██████╗ ██╗██████╗ ████████╗██╗ ██████╗ ███╗ ██╗
██╔══██╗██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║██╔══██╗╚══██╔══╝██║██╔═══██╗████╗ ██║
██████╔╝██║ █╗ ██║██╔██╗ ██║███████╗██║ ██████╔╝██║██████╔╝ ██║ ██║██║ ██║██╔██╗ ██║
██╔═══╝ ██║███╗██║██║╚██╗██║╚════██║██║ ██╔══██╗██║██╔═══╝ ██║ ██║██║ ██║██║╚██╗██║
██║ ╚███╔███╔╝██║ ╚████║███████║╚██████╗██║ ██║██║██║ ██║ ██║╚██████╔╝██║ ╚████║
╚═╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝
██╗ ██╗████████╗██╗██╗ ██╗████████╗██╗███████╗███████╗
██║ ██║╚══██╔══╝██║██║ ██║╚══██╔══╝██║██╔════╝██╔════╝
██║ ██║ ██║ ██║██║ ██║ ██║ ██║█████╗ ███████╗
██║ ██║ ██║ ██║██║ ██║ ██║ ██║██╔══╝ ╚════██║
╚██████╔╝ ██║ ██║███████╗██║ ██║ ██║███████╗███████║
╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
npm run passwords
: Generate a custom wordlist containing all combinations of theWORD_LIST
in theconfig.js
file.npm run rules-combinations
: Generate the results of what happens when a.rule
file is applied to a wordlist file for a better understanding of what.rule
files do inhashcat
.npm run masks-combinations
: Generate the results of what happens when a.mask
file is applied to a wordlist file for a better understanding of what.hcmask
files do inhashcat
.
cp .config.example .config
- Run
npm run utils
to get started.? Select a command to run: (Use arrow keys) ❯ passwords: node ../utils/passwords/generator.mjs rules-combinations: node ../utils/wordlist-rules-combinations/generator.mjs masks-combinations: node ../utils/wordlist-masks-combinations/generator.mjs Exit
- If you select
passwords: node ../utils/passwords/generator.mjs
you can
? Select generation process: (Use arrow keys)
❯ .config.js
manual
Exit
You can generate a list of possible passwords based on a couple of clues that could have be used to build the password you want to crack.
...
// General configurations
PRINT_ITEMS: 10, // Number of items to print in the terminal
GENERATE_PERMUTATIONS: 2000, // Number of permutations to generate and add to the .txt file
EXPORT_FILE_NAME: "./hashcat/wordlists/generated-passwords.txt", // Name of the exported file
WORD_LIST: [], // List of words for generation
MAX_WORDS_USED: 2, // Max number of words that can be combined to form a given string
...
- Edit the
config.js
file and add your clues to theWORD_LIST: []
array.WORD_LIST: [A, B, C, D, E]
- Set the
MAX_WORDS_USED
variable to configure how many words will be contained in the final results:- 1 =>
[A, B, C, D, E]
- 5 results - 2 =>
[A, B, C, D, E, AB, AC, AD, AE, BA, BC, BD, BE, CA, CB, CD, CE, DA, DB, DC, DE, EA, EB, EC, ED]
- 25 results - Etc...
- 1 =>
- Run the
npm run passwords
command to generate a list of possible password combinations.["A", "AB", "AC", "AD", "AE", "B", "BA", "BC", "BD", "BE", "C", "CA", "CB", "CD", "CE", "D", "DA", "DB", "DC", "DE", "E", "EA", "EB", "EC", "ED"]
- It will export the list to a
.txt
file at the specificed location,EXPORT_FILE_NAME
, by default:./hashcat/wordlists/generated-passwords.txt
- For example say you set the
WORD_LIST:
to["cat", "dog", "rat"]
, you would get the following results:cat catdog catrat dog dogcat dograt rat ratcat ratdog
- You can then use the
generated-passwords.txt
file to try and crack the network passowrd by runningnpm run scripts
again and looking for the wordlist in the generated script file for a given network.
Are you interested in what a .rule
file generates? I've include the logic to help answer this questions.
- In the
config.js
file there are a few variables to help with this process. In them you can point to specific.rule
and.txt
files to create a list of the results when they are combined. By default it uses thebase-word.txt
file that contains the wordpassword
, and points to thebase64
rule set.... // Rule list permutations configurations TEST_WORD_LIST: "./hashcat/generator/base-word.txt", TEST_RULES_FILE: "./hashcat/rules/_NSAKEY.v2.dive.rule", RESULTS_DIRECTORY: "./hashcat/generator/results", GENERIC_RESULTS_FILENAME: "wordlist-plus-rule-combinations.txt" ...
- Run the
npm run combos
command to generate the list of strings thathashcat
will generate in its work. - With the default configuration you will get the following results, truncated for readability.
password sswordpasswordpa swordpas wordpass ordpassw rdpasswo passwore passwora dpasswor sswordpa
- By default the results each of the provided
.rule
files applied to the wordpassword
is provided in the./hashcat/generator/results
directory.
PLEASE NOTE: There are certain rules in some .rule
files that are not currently implemented in the wordlist-combinations-generator.js
logic so the x variations
counts can be lower than expected.
Are you interested in what a .hcmask
file generates? I've include the logic to help answer this questions.
- Add tooling to calculate combinations for different attacks.
- Update README with examples and CLI commands.
- Update utils so that you can enter custom sort params.
- Add the ability to save the custom config file. Add it to .gitignore.