Nmap supports operating system (OS) detection on a remote host. Detection is based on TCP/IP stack fingerprinting. TCP and UDP packets are sent to the remote host and responses are examined. Results are compared with known OS fingerprints. This tutorial shows how to detect operating system on a host using Nmap.
The -O
option allows to perform OS detection. On Linux, this option requires running a command with sudo privileges.
nmap -O 192.168.0.123
Output example:
Starting Nmap 7.80 ( https://nmap.org ) at 2022-08-06 01:51 UTC
Nmap scan report for 192.168.0.123
Host is up (0.0032s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
MAC Address: XX:XX:XX:XX:XX:XX (Raspberry Pi Foundation)
Device type: general purpose
Running: Linux 3.X|4.X
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
OS details: Linux 3.2 - 4.9
Network Distance: 1 hop
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 3.17 seconds
Leave a Comment
Cancel reply