Skip to content

Instantly share code, notes, and snippets.

@Seek4samurai
Last active December 1, 2022 04:52
Show Gist options
  • Save Seek4samurai/f1ac46ee65098e92cea785c22eb8d98a to your computer and use it in GitHub Desktop.
Save Seek4samurai/f1ac46ee65098e92cea785c22eb8d98a to your computer and use it in GitHub Desktop.
Nmap ("Network Mapper") is a free and open source utility for network discovery and security auditing.
Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering,
what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.
To scan a host:
nmap www.hostname.com
To scan a range of IP addresses (.1 – .10):
nmap 192.168.0.1-10
To run Nmap on a subnet:
nmap 192.168.0.1/13
To scan targets from a text file:
nmap –iL textlist.txt
Scan port 80 on the target system:
nmap –p 80 192.168.0.1
Scan ports 1 through 200 on the target system:
nmap –p 1-200 192.168.0.1
Scan (Fast) the most common ports:
nmap –F 192.168.0.1
To scan all ports (1 – 65535):
nmap –p– 192.168.0.1
To scan using TCP connect (it takes longer, but is more likely to connect):
nmap –sT 192.168.0.1
To perform the default SYN scan (it tests by performing only half of the TCP handshake):
nmap –sS 192.168.0.1
To instruct Nmap to scan UDP ports instead of TCP ports (the –p switch specifies ports 80, 130, and 255 in this example):
nmap –sU –p 80,130,255 192.168.0.1
Run a fast scan on the target system, but bypass host discovery. (Host discovery uses ping, but many server firewalls do not respond to ping requests. This option forces the test without waiting for a reply that may not be coming):
nmap –Pn –F 192.168.0.1
The nmap utility can be used to detect the operating system of a particular target:
nmap –A 192.168.0.1
It can also be used to probe for the services that might be using different ports:
nmap –sV 192.168.0.1
Tags:-
The -T (timing template) option allows us to specify a value from 0 to 5. This sets one of the timing modes.
The timing modes have great names: paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5).
The lower the number, the less impact nmap will have on the bandwidth and other network users.
@Seek4samurai
Copy link
Author

Nmap stuffs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment