Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new Datastore options to ssh_login #17727

Merged
merged 4 commits into from Mar 8, 2023

Conversation

rohitkumarankam
Copy link
Contributor

@rohitkumarankam rohitkumarankam commented Mar 4, 2023

Addressed feature suggestion in issue #17178
added MaxErrorCount and MaxConsecutiveErrors to datastore.

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • use scanner/ssh/ssh_login
  • show advanced options

@gwillcox-r7 gwillcox-r7 self-assigned this Mar 8, 2023
@gwillcox-r7
Copy link
Contributor

With the GatherProof option this seems to be working as expected, first option is with it set to False, second with it set to True.

msf6 auxiliary(scanner/ssh/ssh_login) > run

[*] 127.0.0.1:22 - Starting bruteforce
[+] 127.0.0.1:22 - Success: 'gwillcox:*redacted*' ''
[*] SSH session 1 opened (127.0.0.1:42469 -> 127.0.0.1:22) at 2023-03-08 11:06:41 -0600
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/ssh/ssh_login) > set GatherProof true
GatherProof => true
msf6 auxiliary(scanner/ssh/ssh_login) > run

[*] 127.0.0.1:22 - Starting bruteforce
[+] 127.0.0.1:22 - Success: 'gwillcox:*redacted*' 'uid=1000(gwillcox) gid=1000(gwillcox) groups=1000(gwillcox),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),135(docker),140(wireshark) Linux gwillcox-Virtual-Machine 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux '
[*] SSH session 2 opened (127.0.0.1:36707 -> 127.0.0.1:22) at 2023-03-08 11:06:52 -0600
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf6 auxiliary(scanner/ssh/ssh_login) > 

Copy link
Contributor

@gwillcox-r7 gwillcox-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor fixes required which I will commit to this branch but otherwise looks good!

@gwillcox-r7 gwillcox-r7 merged commit fbda738 into rapid7:master Mar 8, 2023
33 of 34 checks passed
@gwillcox-r7
Copy link
Contributor

Release Notes

Two new options have been added to the login scanner library: max_consecutive_error_count and max_error_count. These options allow users to set the maximum number of errors that are allowed to occur when connecting as well as the maximum number of consecutive errors that are allowed when connecting before the login scanner will give up on a target.

@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Mar 13, 2023

@rohitkumarankam Heads up but this ended up breaking our login scanners so we will have to undo this commit for now. Once #17770 is landed which reverts these commits, we can take a look at how we can do this again in a way that doesn't end up breaking other login scanners. I'm sure there is a good solution, but current implementation doesn't seem to be working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants