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 hierarchical search table support #18581

Merged

Conversation

adfoster-r7
Copy link
Contributor

@adfoster-r7 adfoster-r7 commented Nov 28, 2023

Adds hierarchical search table support to Metasploit's search command functionality. Now the search table will include a module's actions, targets, and alias metadata. This functionality requires the user to opt-in with the command features set hierarchical_search_table true.

Problem

We have a recurring discoverability/UX problem for user to find modules that have actions and configurable targets

In terms of impacted modules/numbers - we have:

  • 198 modules with 1 Actions
  • 101 modules with 2 or more Actions
  • 897 modules with 2 or more Targets

Recently we've introduced more 'modern' modules which have multiple actions, but this functionality still isn't discoverable for the average user. There's no user affordance added to aid in the discovery of relevant modules that have actions that the user could use. i.e. The Kerberos forge_ticket module can forge 4 different ticket types - but only if you know the right incantations to set actions - potentially by reading docs.metasploit.com

Proposed solution

We update the search table to include hierarchical rows, including the available targets, actions, and AKA metadata.

Verification

  1. Ensure there are no changes in behavior to the search functionality when the feature flag is disabled
  2. Ensure the feature flag can be enabled features set hierarchical_search_table true, and verify common scenarios

Searching for actions - search forge_golden

image

Searches that include targets and AKA metadata search eternalblue

image

The use <index> functionality still works, and the target or action is automagically set for the user

image

The info <index> functionality still works, and the target or action is automagically set for the user when the module info is generated

image

@@ -34,7 +34,7 @@ def initialize(info = {})
'Stability' => [CRASH_SAFE],
'SideEffects' => [IOC_IN_LOGS],
'Reliability' => [],
'AKA' => ['Silver Ticket', 'Golden Ticket', 'diamond', 'sapphire', 'Ticketer', 'Klist']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These previous values were just SEO hackery; Now actions are searchable this can be trimmed down

@adfoster-r7 adfoster-r7 force-pushed the add-hierarchical-search-table-support branch 2 times, most recently from 8d036b3 to 2fc3f56 Compare November 30, 2023 10:44
@adfoster-r7 adfoster-r7 marked this pull request as ready for review November 30, 2023 16:30
@adfoster-r7 adfoster-r7 force-pushed the add-hierarchical-search-table-support branch from 2fc3f56 to 02c892c Compare November 30, 2023 16:32
@dwelch-r7 dwelch-r7 merged commit 45c5479 into rapid7:master Dec 4, 2023
57 checks passed
@dwelch-r7 dwelch-r7 added the rn-enhancement release notes enhancement label Dec 4, 2023
@dwelch-r7
Copy link
Contributor

dwelch-r7 commented Dec 4, 2023

Release Notes

Adds hierarchical search table support to Metasploit's search command functionality. Now the search table will include a module's actions, targets, and alias metadata. This functionality requires the user to opt-in with the command features set hierarchical_search_table true.

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

Successfully merging this pull request may close these issues.

None yet

3 participants