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

Hide negative results behind vprint_error within auxiliary/scanner/ssh/ssh_enumusers #14664

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Hide negative results behind vprint_error within auxiliary/scanner/ssh/ssh_enumusers #14664

merged 1 commit into from
Jan 27, 2021

Conversation

s1e2b3i4
Copy link
Contributor

If you use the auxiliary/scanner/ssh/ssh_enumusers module and test a lot of users, the output gets polluted with many misses (e.g User 'xxx' not found).
Other auxiliary-moules hide those negative results per default and show them only if you specify verbose output.

My changes change the prints so that they also only show positive results per default. You can still get the full output if verbose is true.

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • use uxiliary/scanner/ssh/ssh_enumusers
  • set rhosts <IP>
  • set user_file /opt/metasploit-framework/embedded/framework/data/wordlists/unix_users.txt
  • run
  • Verify that users who are not found are not displayed in the output by default
  • set verbose true
  • run
  • Verify that now all results are displayed

@s1e2b3i4 s1e2b3i4 changed the title Hide negative results as default Hide negative results per default in auxiliary/scanner/ssh/ssh_enumusers Jan 27, 2021
@gwillcox-r7 gwillcox-r7 self-assigned this Jan 27, 2021
@gwillcox-r7
Copy link
Contributor

This looks good to me. Usually I would also ask one to update the documentation file as well but it seems in this case the user documented running the file with the VERBOSE mode set, so there are no updates that are needed there. The one thing that I did note might need changing is the line vprint_error("#{peer(ip)} User '#{user}' on could not connect") which seems to have an extra on where I believe the IP address was meant to go; this can probably be removed to make the line make more sense seeing as we are making edits to this part of the file.

Will ninja commit in the fixes for that one line but otherwise this is good to merge. Thanks for the PR @s1e2b3i4!

@gwillcox-r7 gwillcox-r7 changed the title Hide negative results per default in auxiliary/scanner/ssh/ssh_enumusers Hide negative results behind vprint_error within auxiliary/scanner/ssh/ssh_enumusers Jan 27, 2021
gwillcox-r7 added a commit that referenced this pull request Jan 27, 2021
@gwillcox-r7 gwillcox-r7 merged commit edde3b8 into rapid7:master Jan 27, 2021
@gwillcox-r7 gwillcox-r7 added the rn-enhancement release notes enhancement label Jan 27, 2021
@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Jan 27, 2021

Release Notes

Updated auxiliary/scanner/ssh/ssh_enumusers so that error messages which arise when a user doesn't exist on the target system, or whom can't connect remotely, are now only displayed if the VERBOSE flag is set.

@gwillcox-r7
Copy link
Contributor

Thanks again @s1e2b3i4 and congrats on your first MSF PR!

@s1e2b3i4
Copy link
Contributor Author

Thanks for the fast response and the warm welcome, even if I only changed 2 characters 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants