Skip to content

Conversation

zeroSteiner
Copy link
Contributor

This makes two changes, one in each commit.

New Module: auxiliary/test/login

This is a new testing module that can be used to see how the datastore options adjust the login scanner behavior. It's effectively a dummy module. I forget why I originally wrote it but it came in handy again while testing #19653 so it seemed helpful to share it for future testing. The credential collection logic can be a bit complicated and this makes it easy to see exactly what's happening. Which leads to the second change...

Fixed The ANONYMOUS_LOGIN option

The ANONYMOUS_LOGIN datastore option was not being passed to the credential collection from the AuthBrute mixin, meaning that users could set the option but then it wouldn't do anything. This bug has now been fixed and is a great use case for the new testing module because you can simply toggle it and see the differences.

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • Load the test modules with loadpath test/modules
  • Use the new test module with use auxiliary/test/login
  • Set the options to whatever, it never actually contacts a host that's online
  • Set ANONYMOUS_LOGIN to true, see that it starts with an attempt to login with a blank username and password
  • Set ANONYMOUS_LOGIN to false, see that it does not start with an attempt to login with a blank username and password

Demo Output

msf auxiliary(test/login) > run
[*] 1.2.3.4: - Starting login bruteforce
[*] username: "test", password: "Password1"
[*] username: "test", password: "Password2"
[*] username: "test", password: "Password3"
[*] username: "alice", password: "Password1"
[*] username: "alice", password: "Password2"
[*] username: "alice", password: "Password3"
[*] username: "bob", password: "Password1"
[*] username: "bob", password: "Password2"
[*] username: "bob", password: "Password3"
[*] username: "charlie", password: "Password1"
[*] username: "charlie", password: "Password2"
[*] username: "charlie", password: "Password3"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(test/login) > run ANONYMOUS_LOGIN=true
[*] 1.2.3.4: - Starting login bruteforce
[*] username: "", password: ""
[*] username: "test", password: "Password1"
[*] username: "test", password: "Password2"
[*] username: "test", password: "Password3"
[*] username: "alice", password: "Password1"
[*] username: "alice", password: "Password2"
[*] username: "alice", password: "Password3"
[*] username: "bob", password: "Password1"
[*] username: "bob", password: "Password2"
[*] username: "bob", password: "Password3"
[*] username: "charlie", password: "Password1"
[*] username: "charlie", password: "Password2"
[*] username: "charlie", password: "Password3"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(test/login) > run ANONYMOUS_LOGIN=true PASSWORD_SPRAY=true
[*] 1.2.3.4: - Starting login bruteforce
[*] username: "", password: ""
[*] username: "test", password: "Password1"
[*] username: "alice", password: "Password1"
[*] username: "bob", password: "Password1"
[*] username: "charlie", password: "Password1"
[*] username: "test", password: "Password2"
[*] username: "alice", password: "Password2"
[*] username: "bob", password: "Password2"
[*] username: "charlie", password: "Password2"
[*] username: "test", password: "Password3"
[*] username: "alice", password: "Password3"
[*] username: "bob", password: "Password3"
[*] username: "charlie", password: "Password3"
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(test/login) > 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug library rn-fix release notes fix
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants