Course contentsShow
← Security
Lesson 360 of 3,0528. Network Security - ReconnaissanceFree lesson

Nmap Service Version Detection

Using Nmap's -sV flag and probes to accurately identify service types, versions, and underlying applications.

Nmap Service Version Detection

What you'll learn: How to use Nmap's -sV flag to precisely identify what services and versions are running on open ports.

The Challenge: Knowing What's Really Running

When you perform a basic port scan, Nmap tells you which ports are open—but not what's actually running on them. A service on port 80 could be Apache, Nginx, or something entirely different. A mail server on port 25 might be Postfix, Sendmail, or Exchange. Knowing the exact service and version is crucial for understanding vulnerabilities.

It's like seeing a locked door and knowing someone's behind it—but not knowing if it's a child, a guard dog, or a security system. The response matters.

How Service Version Detection Works

The -sV flag activates service version detection. Nmap sends carefully crafted probes to open ports and analyzes the responses:

nmap -sV 192.168.1.10

Nmap maintains a database of thousands of service signatures. It:

  1. Connects to each open port
  2. Sends protocol-specific probes (HTTP requests, SSH handshakes, etc.)
  3. Examines banners and response patterns
  4. Matches responses against its signature database
  5. Reports the service name, version, and sometimes OS details

Intensity Levels: You can control probe depth with --version-intensity:

nmap -sV --version-intensity 9 192.168.1.10
  • Level 0: Light probes (faster, less accurate)
  • Level 9: All probes (slower, maximum accuracy)

Why This Matters in Reconnaissance

Accurate version information reveals:

  • Known CVEs (security vulnerabilities)
  • Default configurations and credentials
  • Compatible exploit modules
  • Misconfigured or outdated software

Key Takeaway: Nmap's -sV flag transforms basic port scanning into detailed service enumeration by actively probing open ports and matching responses against signature databases, revealing exact service versions critical for security assessment.