Skip to content

Call Free: 627-222-1234 Office Hours: 9:00 Am - 5:00 pm

Atlanta Cyber Security

Learn Nmap

We have compiled a ton of information in regards to learning how to hack. A lot this information is the foundation of hacking and should be mastered prior to going deeper.

Nmap – Nmap is short for Network Mapper and it is a free, open-source tool for network discovery, inventory, and security auditing. It enables cybersecurity professionals and network administrators to identify active hosts, open ports, available services (names and versions), and operating systems, as well as detect potential security risks.

Installing Nmap – At this point in time you should be using a Linux based OS. Once you are using a Linux based OS, you can follow this tutorial.

Step 1 – Check and see if Nmap is installed. Open terminal (Ctrl + Alt + T) and type nmap -v (if Nmap is installed, it will display the version information; if not, you’ll see a message indicating that the command is not found.

Step 2 – If Nmap is not installed, you can do so using the terminal. Syimple type sudo apt install nmap -y. This will download and install Nmap for you.

Nmap DNS Tricks

Nmap CommandResults
host -t ns example.comGets the name servers of a website.
host -t a example.comGets the A records of a website.
host -t aaaa example.comGets the AAAA records of a website.
host -t mx example.comGets the MX records of a website.
host -t soa example.comGets information about a domain's DNS settings.

Basic Scanning Techniques

Nmap QueryNmap Command
Get some helpnmap -h
Scan a single targetnmap [target]
Scan multiple targetsnmap [target1,target2,etc]
Scan a list of targetsnmap -iL [list.text]
Scan a range of hostsnmap [range of IP addresses]
Scan an entire subnetnmap [IP address/cdir]
Scan random hostsnmap -iR [number]
Excluding targets from a scannmap [targets] -exclude [targets]
Excluding targets using a listnmap [targets] -excludefile [list.txt]
Perform an aggressive scannmap -A [target]
Scan an IPv6 targetnmap -6 [target]

Discovery Options

Nmap QueryNmap Command
Perform a ping scan onlynmap -sP [target]
Don't pingnmap -PN [target]
TCP SYN Ping (search for open ports on a system)nmap -PS [target]
TCP SYN Scan (stealthy and efficient)nmap -sS [target]
TCP ACK Pingnmap -PA [target]
UDP pingnmap -PU [target]
SCTP init Pingnmap -PY [target]
ICMP echo pingnmap -PE [target]
ICMP Timestamp pingnmap -PP [target]
ICMP address mask pingnmap -PM [target]
IP protocol pingnmap -PO [target]
ARP pingnmap -PR [target]
Traceroutenmap -traceroute [target]
Force reverse DNS resolutionnmap - R [target]
Disable reverse DNS resolutionnmap -n [target]
Alternative DNS lookupnmap -system-dns [target]
Manually specific DNS serversnmap -dns-servers [servers] [target]
Create a host listnmap -sL [targets]
Scan to detect firewall settingssudo nmap -sA [target]

Firewall Evasion Techniques

Nmap QueryNmap Command
Fragment packetsnmap -f [target]
Specify a specific MTUnmap -mtu [MTU] [target]
Use a decoynmap -D RND: [number] [target]
Idle zombie scannmap -sl [zombie] [target]
Manually specify a source portnmap -source-port [port] [target]
Append random datanmap -data-length [size] [target]
Randomize target scan ordernmap -randomize-hosts [target]
Spoof MAC Addressnmap -spoof-mac [MAC|0|vendor] [target]
Send bad checksumsnmap -badsum [target]

Version Detection

Nmap QueryNmap Command
Operating system detectionnmap -O [target]
Attempt to guess an unknownnmap -O -osscan-guess [target]
Service version detectionnmap =sV [target]
Troubleshooting version scansnmap -sV -version-trace [target]
Perform a RPC scannmap -sR [target]