metasploit-framework
metasploit-framework copied to clipboard
Unexpected PASSWORD_SPRAY and USER_AS_PASS Interaction
Steps to reproduce
- use scanner/ssh/ssh_login
- set PASSWORD_SPRAY 1
- set USER_AS_PASS 1
- set USER_FILE ./usernames.txt
- set PASS_FILE ./passwords.txt
- set rhosts file:./targets.txt
- run
Expected behavior
If username.txt contains:
admin
root
And passwords.txt contains:
password
I expect the module to attempt the following credentials:
admin:admin
root:root
admin:password
root:password
Current behavior
Instead, makes the following attempts:
password:password
admin:password
root:password
Metasploit version
6.4.20-dev
Additional Information
I believe the bug is related to the relatively recently implemented "PASSWORD_SPRAY" option.
I managed to reproduce the issue on my side, and created a PR that seem to fix it. I am not familiar with the different steps for issues here, looking at this basecode for the first time, so not sure what the next steps are. (maybe this bug needed more triaging? 😓 )