Service & Version Detection

Service and version detection identifies exactly which software is running behind open ports. Basic port scans only show that a port is open, but they do not explain what service is listening or which version is installed. Service and version detection fills this gap. It reveals technologies, versions, modules, and protocol behaviors that help pentesters choose correct exploits and detect misconfigurations. This phase is critical because vulnerabilities depend heavily on specific versions.

What Service Detection Means

Service detection focuses on discovering:

  • The service running on a port

  • The underlying application or daemon

  • The protocol in use

  • Additional features or modules

Many services run on non-standard ports, so service detection prevents false assumptions.

What Version Detection Means

Version detection identifies the exact version number, build, or release of the software. Most vulnerabilities target specific versions, so accurate version information is essential for exploitation planning.

Version detection also reveals:

  • Patch levels

  • Default configurations

  • Deprecated technologies

  • Outdated or unsupported software

How Nmap Performs Service Detection

Nmap uses crafted probes to communicate with services and interpret their responses. Each probe triggers a unique pattern that Nmap compares to its internal fingerprint database.

Standard Service Detection

nmap -sV 10.10.10.5

This sends protocol-based requests to detect:

  • Service name

  • Version number

  • Additional metadata

Aggressive Service Detection

nmap -sV --version-all 10.10.10.5

This performs deeper probing with more signatures, revealing details hidden by standard scans.

Light Service Detection

nmap -sV --version-light 10.10.10.5

This is faster but less precise, used for large networks.

Using NSE for Service Enumeration

Nmap Scripting Engine enhances service detection with protocol-specific scripts.

Default Scripts + Version

nmap -sC -sV 10.10.10.5

This combination reveals extended information such as:

  • SSL certificate details

  • HTTP paths

  • FTP configuration

  • SMB shares

  • DNS misconfigurations

Running a Specific Script for Precision

nmap --script ssh-hostkey 10.10.10.5

This retrieves SSH key fingerprints, useful for OS detection and security review.

Manual Service Fingerprinting

Manual techniques complement Nmap when deeper behavior analysis is needed.

Using Netcat for Banner Information

nc -nv 10.10.10.5 22

This grabs SSH banners that reveal OS type and version.

HTTP Version Detection with Curl

curl -I http://10.10.10.5

This reveals:

  • Web server version

  • Frameworks

  • Security headers

TLS Version and Cipher Enumeration

openssl s_client -connect 10.10.10.5:443

This shows:

  • Certificate details

  • Supported TLS versions

  • Encryption strength

Identifying Services on Non-Standard Ports

Attackers often place services on unusual ports. Pentesters must detect these by analyzing responses, not assuming default port behavior.

Examples:

  • SSH on port 2222

  • HTTP on port 8081

  • Database services on high random ports

Nmap automatically identifies these patterns with fingerprint matching.

Behavioral Fingerprinting

Beyond banners and probes, pentesters analyze service behavior.

Indicators include:

  • Response delays

  • Error messages

  • TCP flags

  • Header structures

  • Authentication prompts

Behavioral differences often reveal custom or obscure services.

Matching Versions with Vulnerabilities

After identifying the version, pentesters compare it against known vulnerabilities using public sources such as:

  • CVE databases

  • Exploit-DB

  • Security advisories

  • Vendor patch notes

Accurate version detection helps select the correct exploit rather than guessing.

Why Service & Version Detection Matters

Service and version detection converts port scan results into meaningful intelligence. Without this step, pentesters cannot identify vulnerabilities accurately or determine which attack paths are realistic. Proper detection ensures that exploitation is targeted, efficient, and effective.

Intel Dump

  • Service detection identifies which application runs on a port

  • Version detection retrieves exact software versions and build details

  • Nmap uses probes and NSE scripts for advanced fingerprinting

  • Manual tools like netcat, curl, and OpenSSL enhance detection

  • Behavioral analysis reveals hidden or custom services

  • Version data is matched against known vulnerabilities for exploitation

HOME LEARN COMMUNITY DASHBOARD