0Pricing
Ethical Hacking Academy · Lesson

Service and OS Detection

Fingerprinting.

Service and OS Detection is a free Ethical Hacking Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Ethical Hacking Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

From Open Ports to Targets

Knowing a port is open is not enough. You need to know what software is listening and its version, because exploits target specific versions.

Nmap's service detection and OS fingerprinting turn a list of open ports into actionable intelligence.

Service Version Detection

The -sV flag probes open ports and matches responses against Nmap's database to identify the service and version, for example 'OpenSSH 8.2p1' or 'Apache httpd 2.4.41'.

nmap -sV 192.168.1.10
# 22/tcp open ssh OpenSSH 8.2p1 Ubuntu

How Version Detection Works

Nmap sends a series of probes and compares the responses (banners, behaviors, error messages) to thousands of signatures in nmap-service-probes.

This banner-grabbing and behavioral matching identifies services even on non-standard ports, like an HTTP server running on port 8000.

Version Intensity

You can tune how hard Nmap tries with --version-intensity (0 to 9):

  • Lower: fewer probes, faster, may miss versions.
  • Higher: more probes, slower, more accurate.

Shortcuts: --version-light (intensity 2) and --version-all (intensity 9).

nmap -sV --version-intensity 9 192.168.1.10

OS Detection

The -O flag enables OS fingerprinting. Nmap examines subtle differences in how a TCP/IP stack responds and matches them against its OS signature database.

It reports a best guess and an accuracy percentage, plus device type and uptime estimates when available.

sudo nmap -O 192.168.1.10
# Running: Linux 5.X | OS CPE: cpe:/o:linux:linux_kernel:5

TCP/IP Stack Fingerprinting

Each OS implements TCP/IP slightly differently. Nmap probes characteristics such as:

  • Initial TTL values.
  • TCP window size.
  • How the stack handles unusual flag combinations.
  • TCP options ordering.

These tiny differences form a fingerprint unique enough to guess the OS family and version.

Accuracy Caveats

OS detection is a best guess, not a certainty. Accuracy drops when:

  • A firewall filters the probes Nmap relies on.
  • The host runs an unusual or virtualized stack.
  • Only a few ports are open to fingerprint from.

The --osscan-guess option makes Nmap guess more aggressively when unsure.

Combining Flags

In practice you combine detection options. The -A flag is a shortcut that enables OS detection, version detection, default scripts, and traceroute together.

sudo nmap -A 192.168.1.10
# Equivalent to -O -sV -sC --traceroute

Why Versions Matter

The exact version drives your next step. With 'vsftpd 2.3.4' you immediately recall a famous backdoor; with 'Apache 2.4.49' you think of a path-traversal CVE.

Accurate version data lets you search for matching exploits instead of blindly trying attacks. It also feeds directly into the vulnerability section of your report.

Saving Results

Always save scan output for analysis and reporting. Nmap supports multiple formats:

  • -oN normal text.
  • -oX XML (for tools).
  • -oG greppable.
  • -oA all formats at once.
nmap -A -oA scan_results 192.168.1.10

Banner Grabbing Without Nmap

Sometimes you confirm a service manually. Connecting with a raw client and reading the greeting (banner) reveals the software and version directly.

Tools like netcat let you do this for plaintext services. It is a quick sanity check when Nmap's guess seems off, though many services now suppress or fake their banners to mislead attackers.

nc 192.168.1.10 22
# SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5

Quick Check

Identify the flag that does the most at once.

Recap

You learned fingerprinting:

  • -sV detects service versions via probe/banner matching; tune with --version-intensity.
  • -O performs OS detection using TCP/IP stack fingerprinting; results are best guesses.
  • -A bundles OS, version, scripts, and traceroute.
  • Exact versions guide exploit selection; save output with -oA.

Next: the Nmap Scripting Engine for deeper automation.

Frequently asked questions

Is the “Service and OS Detection” lesson free?

Yes — the full text of “Service and OS Detection” is free to read here on the web, and the Ethical Hacking Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Ethical Hacking Academy course, upgrade to CoddyKit PRO.

What will I learn in “Service and OS Detection”?

Fingerprinting. You practise Ethical Hacking Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Ethical Hacking Academy?

No prior experience is required. Ethical Hacking Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Service and OS Detection” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Ethical Hacking Academy lesson?

Yes. Every Ethical Hacking Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Host Discovery
  2. Port Scanning Techniques
  3. Service and OS Detection
  4. The Nmap Scripting Engine
← Back to Ethical Hacking Academy