nmap . -O: Enable OS detection

commandline session

$nmap 127.0.0.1

Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-24 17:56 IST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00019s latency).
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
$nmap -O 127.0.0.1
TCP/IP fingerprinting (for OS scan) requires root privileges.
QUITTING!
$sudo nmap -O 127.0.0.1
[sudo] password for jeffrin:

Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-24 17:56 IST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000057s latency).
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=6.00%E=4%D=11/24%OT=22%CT=1%CU=32670%PV=N%DS=0%DC=L%G=Y%TM=5291F0
OS:7A%P=x86_64-unknown-linux-gnu)SEQ(SP=FF%GCD=1%ISR=111%TI=Z%CI=Z%II=I%TS=
OS:8)OPS(O1=M400CST11NW6%O2=M400CST11NW6%O3=M400CNNT11NW6%O4=M400CST11NW6%O
OS:5=M400CST11NW6%O6=M400CST11)WIN(W1=8000%W2=8000%W3=8000%W4=8000%W5=8000%
OS:W6=8000)ECN(R=Y%DF=Y%T=41%W=8018%O=M400CNNSNW6%CC=Y%Q=)T1(R=Y%DF=Y%T=41%
OS:S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=41%W=0%S=A%A=Z%F=R%O=%
OS:RD=0%Q=)T5(R=Y%DF=Y%T=41%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=41%W
OS:=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=41%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)
OS:U1(R=Y%DF=N%T=41%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%D
OS:FI=N%T=41%CD=S)

Network Distance: 0 hops

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.17 seconds
$
$sudo nmap -O 192.168.0.1

Starting Nmap 6.00 ( http://nmap.org ) at 2013-11-24 17:59 IST
Nmap scan report for 192.168.0.1
Host is up (0.00047s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
53/tcp open  domain
80/tcp open  http
MAC Address: 5C:D9:98:5C:01:1A (D-Link)
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:kernel:2.6
OS details: Linux 2.6.29 - 2.6.31
Network Distance: 1 hop

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 2.10 seconds
$

nmap . -O: Enable OS detection – Video Tutorial Related