Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 37 ยท Information Gathering

Service Enumeration with Auxiliary Scanner Modules

Use Metasploit auxiliary scanner modules to identify services such as SSH, HTTP, SMB and databases, read version banners, and understand what defenders log.

After a port scan you know that something listens on port 22 or 445. Enumeration asks what exactly it is and how it is configured: the product, the version, supported protocol options and whether it allows anonymous access. Metasploit's auxiliary scanner modules do this for dozens of protocols using one consistent set of options.

All examples target a lab host (10.10.10.20), and the console output is typical example output. The module names are shown by category rather than as a list to memorise; use search to find the current ones.

The scanner pattern

Almost every scanner module follows the same pattern:

TEXT
msf6 > search type:auxiliary scanner ssh
msf6 > use auxiliary/scanner/ssh/ssh_version
msf6 auxiliary(scanner/ssh/ssh_version) > set RHOSTS 10.10.10.20
msf6 auxiliary(scanner/ssh/ssh_version) > set THREADS 4
msf6 auxiliary(scanner/ssh/ssh_version) > run

[+] 10.10.10.20:22 - SSH server version: SSH-2.0-OpenSSH_8.x (example output)
[*] Scanned 1 of 1 hosts (100% complete)

THREADS controls how many hosts are scanned in parallel. The module reports each result with a prefix: [+] for a finding, [*] for information, [-] for an error or negative result and [!] for a warning. Results are also saved in the database, so services shows them afterwards.

Common service families

Instead of listing modules, learn the questions each family answers.

Questions per protocol

SSH Version, algorithms, auth methods.
HTTP Server, title, methods, headers.
SMB Version, shares, signing.
Databases Version, exposure to the network.

One scanner per question.

1 / 2
  • SSH: version string, key exchange and cipher lists, authentication methods offered. Old algorithms and password authentication are findings.
  • HTTP/HTTPS: server header, page title, allowed methods, directory listing, TLS versions and certificate details.
  • SMB: protocol versions, message signing required or not, listed shares, null sessions.
  • FTP: banner, whether anonymous login is enabled.
  • SMTP: banner, supported commands, open relay.
  • SNMP: whether default community strings answer. Default "public" is a classic finding.
  • Databases: version and whether the port is reachable from places it should not be.
  • DNS: record queries and whether zone transfers are open to anyone.

Note the focus on configuration weaknesses. Many serious findings are not exploits at all but exposures: anonymous access, weak protocol settings, defaults left on.

A banner is the text a service volunteers when you connect. The scanner above does exactly that for SSH. This stand-in parses a banner string the way a scanner would. It reads sample strings only; it opens no connection.

Python Parse service banners

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A loopback demo that never leaves your machine

To see a real network service you can build a tiny one yourself. Python in the browser cannot open sockets, so this demo only simulates a conversation with in-memory objects. It shows the shape of an enumeration: connect, read the greeting, record it.

Python Simulated service greeting (no real network)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Turning findings into configuration advice

The goal is a fix list. For each result ask: is this service needed, is it reachable from where it should not be, is it patched, is it configured well?

Finding Recommended fix
FTP allows anonymous login Disable anonymous access or retire FTP for SFTP
SSH offers password login on an internet-facing host Use keys and MFA; restrict by address
SMB signing not required Require signing; disable SMBv1
SNMP answers to "public" Change community strings or use SNMPv3 with authentication
Database port reachable from the user network Firewall it to the application servers only
Directory listing on a web server Disable it

What defenders log

Scanner modules connect and disconnect quickly. Defenders see many short sessions from one address, authentication attempts that stop before completing, and unusual user agents in web logs (the module's default). If you change defaults such as user agent strings for realism, document it, because the client's logs should still be matched to your work.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does THREADS control in a scanner module?

    THREADS sets scan parallelism; higher values are faster and noisier.
  2. 2. What does a [+] line mean in module output?

    [+] reports a finding, [*] information, [-] a negative or error, [!] a warning.
  3. 3. Which is a configuration finding rather than an exploit?

    Many findings are exposures such as anonymous access or default community strings.
  4. 4. Why is a service banner useful?

    Banners volunteer software identity, which guides enumeration and patch checks.

Summary

  • Scanner modules share options (RHOSTS, THREADS) and a consistent output style.
  • Ask a specific question per protocol: versions, algorithms, anonymous access, shares.
  • Many findings are exposures, not exploits; each has a concrete fix.
  • Scans leave visible patterns: keep your own log to match them.

Next: Parsing and Summarising Scan Results