Skip to content

Various bugs when using the PASSWORD_SPRAY option #19652

Open
@Mathiou04

Description

@Mathiou04

When fixing issue #19525, I noticed that the code used to generate credentials in the case of password spraying was a quick adaptation from the code that generates credentials without it (it seems that this option has been added "recently").

I spent some time playing around with the option and found a few bugs.

I will describe at least one using the below template, but it will be easier to demonstrate all the issues with actual code: I will attach a first draft PR that implements the failings cases through automated tests

Steps to reproduce

How'd you do it?

  1. use scanner/ssh/ssh_login
  2. set PASSWORD_SPRAY 1
  3. set BLANK_PASSWORDS 1
  4. set USERNAME user
  5. set rhosts file:./targets.txt
  6. run

Expected behavior

I expect the module to attempt the following credentials: user:

Current behavior

Nothing is attempted

Metasploit version

6.4.36-dev

Additional Information

As written above, this is only one of various issues there are with the piece of code that generates credentials.
I will attach a PR with more explanations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmedIssues confirmed by a committer

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions