msfconsole allows you to search for modules based on various criteria. The search command is powerful and can be customized with filters such as type, platform, and more. Here’s how you can refine your searches using different options.

Basic Search Command

search <term>

This searches for modules matching the given term. For example, searching for “smb” will return all modules related to SMB.

Common Search Filters

Search by Module Type

You can filter results by module type using the type: filter. The main types of modules are:

  • exploit: Modules used to exploit vulnerabilities.
  • payload: Modules that define how to deliver the payload.
  • auxiliary: Modules used for tasks like scanning, fuzzing, etc.
  • post: Modules that are used after gaining access to a system (post-exploitation).
  • evasion: Modules that help evade detection by security software.
search type:exploit
search type:payload
search type:auxiliary
search type:post
search type:evasion

Search by Platform

You can search for modules that target specific platforms using the platform: filter. Here are a few common platforms:

  • windows: Targets Windows operating systems.
  • linux: Targets Linux-based systems.
  • android: Targets Android devices.
  • osx: Targets macOS.
  • bsd: Targets BSD-based systems.
search platform:windows
search platform:linux
search platform:osx

Search by Architecture

If you’re targeting specific CPU architectures, you can use the arch: filter to search for modules compatible with different architectures like:

  • x86: 32-bit systems.
  • x64: 64-bit systems.
  • arm: ARM architecture.
search arch:x86
search arch:x64
search arch:arm

Search by Rank

Metasploit modules are rated based on their effectiveness and the ease with which they can exploit a vulnerability. You can search by the rank of the module:

  • rank:excellent
  • rank:good
  • rank:average
  • rank:manual
search rank:excellent

Search by Author

If you’re looking for a specific module by its author, you can use the author: filter.

search author:hdm

Search by Description or Keyword

You can search for modules containing specific words in their description using keywords.

search description:smb
search description:buffer overflow

Example Search Queries

Here are some example search queries to show how you can combine different filters:

Search for Exploits on Windows Platforms

search type:exploit platform:windows

This will return all exploit modules that target Windows platforms.

Search for Payloads for Linux x64 Systems

search type:payload platform:linux arch:x64

This will return payload modules specifically designed for Linux x64 systems.

Search for Auxiliary Modules for Windows with Excellent Rank

search type:auxiliary platform:windows rank:excellent

This will return all auxiliary modules for Windows that have an excellent rank.

Search for Post-Exploitation Modules for Windows with Author Information

search type:post platform:windows author:hdm

This will return all post-exploitation modules targeting Windows, authored by hdm.

Search for Evasion Modules for Linux

search type:evasion platform:linux

This will return evasion modules targeting Linux systems.