Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 38 ยท Scanning and Enumeration

Enumerating Common Services

A guide to what testers check on common network services: FTP, SSH, SMTP, DNS, SMB, SNMP, RDP and databases, with defensive fixes and read-only example output.

After scanning, you have a list of open ports. Each well-known service has its own typical weaknesses, and experienced testers carry a mental checklist per service. This lesson walks through the most common ones. The goal for each is the same: learn what the service reveals without credentials, check for default or weak settings, and note what a defender should change. Commands are read-only with example output on documentation addresses. Do not run guessing or brute-force attempts unless the RoE allows them, because they cause account lockouts.

A checklist per service

FTP / SMB Anonymous access, shares.
SSH / RDP Auth methods, exposure.
SMTP / DNS Relay, user hints, transfers.
SNMP / DB Default strings, exposed ports.

Ask the same three questions each time.

1 / 2

The three questions: Does it need to be reachable from here? Does it allow anonymous or default access? Is its configuration and version current?

FTP (21/tcp)

FTP sends credentials in clear text. Check whether anonymous login is enabled and what it exposes.

TEXT
ftp> open 192.0.2.30
220 (vsFTPd 3.0.3)
Name: anonymous
230 Login successful.
ftp> ls
-rw-r--r--  1 ftp  ftp   2048 Jan 05  backup-config.txt

Example output. A writable anonymous directory is worse: files could be uploaded. Fix: disable anonymous login, use SFTP instead.

SSH (22/tcp)

Check the version, supported key exchange and ciphers, and which authentication methods are accepted (password, public key). Password authentication on an internet-facing server invites guessing. Fix: keys only, no root login, rate limiting, restrict by source address.

SMTP (25/tcp)

Check whether the server is an open relay (forwards mail from anyone to anyone) and whether commands such as VRFY or EXPN reveal valid users.

TEXT
220 mail.example.test ESMTP Postfix
VRFY admin
252 2.0.0 admin

Example output. Confirming users helps phishing. Fix: disable VRFY and EXPN, restrict relaying, require authentication.

DNS (53/tcp and udp)

Check for zone transfers and whether the server is an open resolver that answers anyone (usable in amplification attacks). See DNS and Subdomain Reconnaissance.

Terminal
dig axfr example.test @192.0.2.53
TEXT
; Transfer failed.

Example output of a correctly configured server.

HTTP and HTTPS (80, 443, 8080, 8443)

Fingerprint, inspect TLS, look at default pages, admin consoles (management pages on alternate ports are common) and allowed HTTP methods. Web testing has its own chapter later in the course.

SMB (139, 445/tcp)

Windows file sharing is a rich source of findings. Check:

  • Whether null sessions or guest access list shares or users.
  • Which dialect versions are enabled: SMBv1 is obsolete and dangerous.
  • Whether SMB signing is required, which blocks relay attacks.
  • Which shares exist and whether permissions are too broad.
TEXT
Sharename       Type      Comment
---------       ----      -------
ADMIN$          Disk      Remote Admin
Public          Disk      
HR              Disk      HR documents

Example output. Anonymous listing of an HR share would be a high-impact finding. Fix: disable SMBv1, require signing, restrict anonymous access and review share permissions.

SNMP (161/udp)

SNMP exposes device information protected by a "community string". Versions 1 and 2c use clear-text strings; defaults like public and private are widespread. A readable public string can list interfaces, routes and software; a writable private string can change configuration.

TEXT
iso.3.6.1.2.1.1.1.0 = STRING: "Cisco IOS Software, C2960 ..."
iso.3.6.1.2.1.1.5.0 = STRING: "switch-core-1"

Example output. Fix: use SNMPv3 with authentication and encryption, change defaults, restrict by source.

RDP (3389/tcp) and remote access

Remote Desktop exposed to the internet is a favorite target. Check whether Network Level Authentication is required, which version and patch level run, and whether the service is reachable at all. Fix: put it behind a VPN or gateway, require MFA, keep it patched.

Databases (3306, 5432, 1433, 1521, 27017, 6379)

Databases should rarely be reachable from untrusted networks. Findings include: reachable from the internet, no password (some in-memory stores default to open), default accounts and old versions. Fix: bind to local or private addresses, firewall rules, strong authentication, encryption.

LDAP, Kerberos and directory services

On internal tests, directory services (389, 636, 88) map users, groups and computers. Anonymous binds or overly informative directories help an attacker plan privilege escalation.

Stand-in: apply a per-service checklist

The first example turns the checklist into data. Given scan results, it prints the follow-up checks and typical fixes for each open port, which is how you plan an enumeration pass.

Python Generate a follow-up checklist

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.

The second example analyzes a simulated share listing from an SMB-like service and flags sensitive-looking names and broad permissions. The listing is invented.

Python Flag risky shares

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.

Safety reminders

  • Anonymous enumeration is usually safe; guessing credentials is not. Do not run brute-force scripts without explicit permission and lockout awareness.
  • Do not write files to shares unless the rules allow it, and remove anything you create.
  • Record every anonymous or default-access finding with evidence, then continue to Vulnerability Scanning and Triage.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why is SMBv1 a concern?

    SMBv1 is old and has been used in major worm outbreaks. It should be disabled.
  2. 2. What does a readable SNMP community string of 'public' risk?

    Default strings let anyone read configuration details, and a writable default could change them.
  3. 3. Which is a typical fix for exposed Remote Desktop?

    Reducing exposure and adding strong authentication lowers risk dramatically.
  4. 4. You suspect weak passwords on an SSH server. What do you do first?

    Guessing can lock out real users. It needs explicit permission and care.

Summary

  • Each common service has a typical checklist: FTP (anonymous), SSH (auth methods), SMTP (relay, VRFY), DNS (transfers), SMB (null sessions, SMBv1, signing), SNMP (default strings), RDP (exposure), databases (reachability).
  • Ask three questions: must it be reachable, does it allow anonymous or default access, is it current?
  • Enumeration without credentials is generally safe; guessing is not and needs permission.
  • Record evidence and the defensive fix for every issue.

Next: Vulnerability Scanning and Triage