🧰 Modules

πŸ“ Module Structure

Syntax:

<No.> <type>/<os>/<service>/<name>

Example:

794  exploit/windows/ftp/scriptftp_list

Module Components:

Component
Description

Index No.

Number shown in search results for quick selection (use <no.>)

Type

One of: auxiliary, encoder, exploit, nop, payload, plugin, post

OS

Target operating system (e.g., Windows, Linux)

Service

Service involved (e.g., SMB, FTP)

Name

Explains the module's purpose

Only auxiliary, exploit, and post can be directly run with use <no.>.


πŸ” Searching for Modules

Command:

msf6 > help search

Example:

msf6 > search eternalromance

Refined Example:


🎯 Selecting a Module (MS17-010 Example)

  1. Scan Target

  1. Search Module

  1. Use Exploit Module

  1. Show Options

  1. Set RHOST

  1. Set LHOST

  1. Run the Exploit


πŸ“‹ Output from Successful Exploitation


πŸ’‘ Tips & Best Practices

  • Use info to get detailed module description:

  • Use setg to globally persist variables like RHOSTS or LHOST:

  • Metasploit payloads like windows/meterpreter/reverse_tcp allow interactive control.


Let me know if you'd like this in a downloadable format or expanded with post-exploitation commands!

Last updated