NMAP

NMAP

nmap is used to discover hosts and services on a computer network by sending packets and analyzing the responses. Nmap provides a number of features for probing computer networks, including host discovery and service and operating system detection.

  • Target specification

  • Host Discovery

  • Advanced Scanning

    • UDP Scan

    • TCP Null, FIN, and Xmas scan

    • Idle scan

    • IP Protocol scan

  • Define port specification and scan order

# Basic scan
kali@kali:~$ nmap -v -sn 127.0.0.1/24

# Basic scan with grep for string match
kali@kali:~$ nmap -v -sn 192.168.0.1 | grep -v "host down"

# Scan for UDP Ports using stealth scan
kali@kali:~$ nmap -v -n -Pn -ss 192.168.0.1

# Scan ports including version numbers
kali@kali:~$ nmap -v -n -Pn -sV 192.168.0.1

NSE Scripting Engine

Nmap comes with a library of default scripts that can be run during a scan. You can specify these with the -sC for default scripts or --script=default for specifying scripts to run.

# Run nmap default scripts on an IP
kali@kali:~$ nmap -v -n -Pn -sC 192.168.0.1

# Run nmap specifying scripts
kali@kali:~$ nmap -v -n -Pn --script=nbstat.nse

Last updated