Nmap basic example

Cli

Scan

1
2
3
4
5
6
7
8
9
10
11
# 100 ports
nmap --top-ports 100 192.168.1.54

# -sC Scan script default
nmap --top-ports 100 -T4 -sC 192.168.1.54

# -A Enable OS detection
nmap -A --top-ports 100 -sC -T4 192.168.1.54

# -Pn No ping
nmap --top-ports 100 -T4 -Pn -sC 192.168.1.54

Port output

1
2
3
4
5
6
7
8
Starting Nmap 7.60 ( https://nmap.org ) at 2018-01-04 15:36 HKT
Nmap scan report for cmtech-company (192.168.1.54)
Host is up (0.047s latency).
Not shown: 97 filtered ports
PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds

OS detection

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Host script results:
|_nbstat: NetBIOS name: XXX-COMPANY, NetBIOS user: <unknown>, NetBIOS MAC: <unknown> (unknown)
| smb-os-discovery:
| OS: Windows 6.1 (Samba 4.3.11-Ubuntu)
| Computer name: xxx-company
| NetBIOS computer name: XXX-COMPANY\x00
| Domain name: \x00
| FQDN: xxx-company
|_ System time: 2018-01-04T15:37:28+08:00
| smb-security-mode:
| account_used: guest
| authentication_level: user
| challenge_response: supported
|_ message_signing: disabled (dangerous, but default)
| smb2-security-mode:
| 2.02:
|_ Message signing enabled but not required
| smb2-time:
| date: 2018-01-04 15:37:28
|_ start_date: 1601-01-01 07:36:42

Reference

https://linux.die.net/man/1/nmap