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

Add a couple of tips #18412

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

zeroSteiner
Copy link
Contributor

@bwatters-r7 suggested I add the using partial module names to the Metasploit tips trick I was using during my demos over the summer. I also added one for using the capture plugin. If there's another tip suggestion, feel free to leave it as a comment and I'll add it in.

Testing

  • Start msfconsole
  • Run the tips command and see the new tips show up

@adfoster-r7
Copy link
Contributor

adfoster-r7 commented Sep 29, 2023

Not a blocker: I'm not sure if the tip's description aligns with the behavior here. If the use command doesn't find an exact match, it falls back back to using the search functionality - and since it found only a single match for your example it caused that module to be used

i.e. this is equally valid as a set of arguments to the use command:

msf6 auxiliary(admin/kerberos/get_ticket) > use kerberos forge silver ticket

Matching Modules
================

   #  Name                                   Disclosure Date  Rank    Check  Description
   -  ----                                   ---------------  ----    -----  -----------
   0  auxiliary/admin/kerberos/forge_ticket                   normal  No     Kerberos Silver/Golden Ticket Forging


Interact with a module by name or index. For example info 0, use 0 or use auxiliary/admin/kerberos/forge_ticket

[*] Using auxiliary/admin/kerberos/forge_ticket

@@ -32,13 +32,15 @@ def self.highlight(string)
"Search can apply complex filters such as #{highlight('search cve:2009 type:exploit')}, see all the filters with #{highlight('help search')}",
"Metasploit can be configured at startup, see #{highlight('msfconsole --help')} to learn more",
"Display the Framework log using the #{highlight('log')} command, learn more with #{highlight('help log')}",
"Adapter names can be used for IP params #{highlight('set LHOST eth0')}",
"Network adapter names can be used for IP options #{highlight('set LHOST eth0')}",
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@zeroSteiner
Copy link
Contributor Author

@adfoster-r7 Do you think it would be more clear to update it to something like: "The 'use' command accepts search queries and will select the module when only a single match is found, e.g. 'use kerberos/get_ticket'". It's more technically accurate but it's a little longer. I think the key here might be that the search query / short hand module name needs to be long enough to uniquely identify it.

@adfoster-r7
Copy link
Contributor

adfoster-r7 commented Sep 29, 2023

Is fuzzy searching too vague/incorrect as terminology?

"The #{highlight('use')} command supports fuzzy searching, i.e. #{highlight('use kerberos/get_ticket')} or #{highlight('use kerberos forge silver ticket')}"

@zeroSteiner
Copy link
Contributor Author

Yeah that works, I pushed up a change implementing your suggestion.

Copy link
Contributor

@adfoster-r7 adfoster-r7 left a comment

Choose a reason for hiding this comment

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

LGTM; But will will await Brendan's review 👍

lib/msf/ui/tip.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@bwatters-r7 bwatters-r7 left a comment

Choose a reason for hiding this comment

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

Makes sense; I added a thought on the use for shortened or close module names to try and reinforce that it will select the module for you.

@zeroSteiner
Copy link
Contributor Author

This should be ready to go now.

@jheysel-r7 jheysel-r7 self-assigned this Oct 4, 2023
@jheysel-r7 jheysel-r7 merged commit 81e4f94 into rapid7:master Oct 4, 2023
32 checks passed
@smcintyre-r7
Copy link
Contributor

Release Notes

This adds additional usage tips to Metasploit, expanding the pool that is selected from on startup.

@smcintyre-r7 smcintyre-r7 added the rn-enhancement release notes enhancement label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy rn-enhancement release notes enhancement
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants