A handy tool that helps you to create your own wordlist for Metasploit framework, in order to carry out a password spray attack against various network protocols in your victims' domain, such as SMB :)
Metasploit has multiple modules that can be utilized to perform a brute force attack against various services or protocols. Take "SMB_Login" module as an example, it tries to obtain the passwords of victims by testing multiple logins against a system with open SMB protocol .
As an ethical hacker , you may have experienced situations that you cannot perform a brute force attack due to limitations like "Account Lockout" policy. In those cases, we can utilize the password spray technique that helps us to bypass detection mechanisms.
A brute force attack tests various passwords against one username until the whole password list is finished. After that a new username is being selected and the whole process is started all over again. Something like the following:
Username | Password | #Round |
---|---|---|
user1 | pass1 | 1 |
user1 | pass2 | 1 |
... | ... | 1 |
user1 | pass1000 | 1 |
user2 | pass1 | 2 |
user2 | pass2 | 2 |
... | ... | 2 |
user2 | pass1000 | 2 |
... | ... | ... |
On the other hand, password spray attack tests a single password against all the usernames in our username list till all of them are being tested once. Then a new password is being selected and the test begins as described. For instance:
Username | Password | #Round |
---|---|---|
user1 | pass1 | 1 |
user2 | pass1 | 1 |
... | ... | 1 |
user1000 | pass1 | 1 |
user1 | pass2 | 2 |
user2 | pass2 | 2 |
... | ... | 2 |
user1000 | pass2 | 2 |
... | ... | ... |
But unfortunately, we cannot simply configure Metasploit's modules to support password spray method. To overcome this situation, one can use Metasploit's parameter called USERPASS_FILE : File containing users and passwords separated by space, one pair per line
in its modules (if available) and passes a file containing usernsmes and passwords that are seperated from eachother by a space character.
This tool creates that wordlist with the purpose of performing a successful password spray attack against victim's network.
git clone https://github.com/Cyb3r-Techie/MSF_PassSpray_Wordlist_Generator.git
chmod +x msf_passspray.sh
Parameters
~~~~~~~~~~~~~~~~~
--userlist / -u define the path of your username wordlist [required]
--passlist / -p define the path of your password wordlist [required]
--help / -h show this help message and exit!