惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园_首页
罗磊的独立博客
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
Last Week in AI
Last Week in AI
D
DataBreaches.Net
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
D
Docker
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
H
Help Net Security
T
The Blog of Author Tim Ferriss

Black Hills Information Security, Inc.

Bad Habits: An ANTISOC Operation Same Problem, Different Angles: When Red Team and Blue Team Actually Talk to Each Other How to Identify and Exploit New Vulnerabilities Swapper – A Pure Regex Match/Replace Burp Extension A Practical Guide to BloodHound Data Collection Network Engineering Basics Signed, Trusted, and Abused: Proxy Execution via WebView2 Getting Started In Pentesting – Advice From The BHIS Pentest Lead Cloud Security: Tips and Resources for Securing the Cloud Lessons From A Chatbot Incident How to Lead Effective Tabletops Understanding GRC: How to Navigate Risks and Compliance Standards The “P” in PAM is for Persistence: Linux Persistence Technique Malware Analysis: How to Analyze and Understand Malware OSINT: How to Find, Use, and Control Open-Source Intelligence What to Do with Your First Home Lab When the SOC Goes to Deadwood: A Night to Remember Social Engineering and Microsoft SSPR: The Road to Pwnage is Paved with Good Intentions Common Cyber Threats Finding the Right Penetration Testing Company Deceptive-Auditing: An Active Directory Honeypots Tool The Curious Case of the Comburglar How to Set Smart Goals (That Actually Work For You) Inside the BHIS SOC: A Conversation with Hayden Covington Abusing Delegation with Impacket (Part 3): Resource-Based Constrained Delegation Why You Got Hacked – 2025 Super Edition Abusing Delegation with Impacket (Part 2): Constrained Delegation Abusing Delegation with Impacket (Part 1): Unconstrained Delegation GoSpoof – Turning Attacks into Intel Model Context Protocol (MCP)
Nmap Cheatsheet
BHIS · 2025-08-06 · via Black Hills Information Security, Inc.

, , , , ,

Written by Alireza Liaghat || Reviewed by Dale Hobbs

This blog is part of Offensive Tooling Cheatsheets: An Infosec Survival Guide Resource. You can learn more and find all of the cheatsheets HERE: https://www.blackhillsinfosec.com/offensive-tooling-cheatsheets/

Nmap Cheatsheet: PRINT-FRIENDLY PDF

Find the tool here: https://nmap.org/


Nmap is a powerful open-source tool commonly used by system/network administrators and security professionals to perform network discovery, security auditing, and basic vulnerability assessment. Nmap allows you to quickly identify live hosts, open ports, running services, operating systems, and potential security risks within a network. This cheatsheet provides a reference to essential Nmap commands, scanning techniques, and common use cases to help streamline your network reconnaissance and troubleshooting tasks.

The Nmap Formula

Nmap + Target + Type + Port + Detection + Timing + Scripts + Evasion

TARGET

What do you want to scan?

ExampleDescriptionUse Case
192.168.x.xScan the specified IP addressUsed when there is only one target IP address.
domain.comScan the specified domainUsed when there is only one target domain.
-iL target.txtScan from a list of host addressesUsed when searching a known range of hosts.
--uniqueScans each address only onceUsed in combination with lists. Avoids duplicate scans to speed up the scan.
-nNo DNS resolutionSpeeds up scanning by skipping reverse DNS resolution.

TYPE

How do you want to scan?

ExampleDescriptionUse Case
-sTFull TCP 3-Way Handshake ScanMost reliable scan. Use when not worried about firewalls.
-sS“Stealth” scan. Impartial 3-Way HandshakeDoes not establish a full handshake. “Dumb” firewalls will only see this as regular poor connection.
-sUScan using UDPPreferred for scanning DNS (53), SNMP (161), DHCP (67), TFTP (69), etc.

PORT

What port do you want to scan?

ExampleDescriptionUse Case
-p 80,443Scans only the comma-separated portsUseful for when scanning a host for a specific attack surface.
-p 1-65535Scans all possible portsUseful for all ports in use, including ephemeral (temporary) ports.

DETECTION

What do you want to detect?

ExampleDescriptionUse Case
-sVProbe for service/versionUseful for when mapping and identifying a network
--version-lightTry the most likely probes for detectionUseful for when mapping and identifying a network.
--version-allTry every available probe (max intensity)Useful for when mapping and identifying a network..
-OOS DetectionUseful for when mapping and identifying a network.

TIMING

How fast do you want to scan?

ExampleDescriptionUse Case
--max-rate 5Sends a maximum of 5 probes per secondLimits network traffic to avoid disruptions to the network.
--scan-delay 1Adds 1 second delay between probesLimits network traffic to avoid disruptions to the network.
--host-timeout 1Give up on a particular port after 1 secondLimits network traffic and useful for slow responding devices.

SCRIPTS

What additional scripts do you want?

ExampleDescriptionUse Case
--script=whoisSpoofs the source IP addressUsed when mapping a network.
--scripts=smb-enum-sharesAdds random data to packetsIdentifies SMB shares that might be exposed.
--script=vulnersUses a proxy to scanIdentifies known/unpatched vulnerabilities in a network.

EVASION

How sneaky do you want to be?

ExampleDescriptionUse Case
-spoof-mac 00:0C:29:6F:F3:6BSpoofs the source MAC addressUseful for when the network switch restricts connectivity using MAC addresses
S 192.168.1.1Spoofs the source IP addressUseful for when the network switch restricts connectivity using IP addresses
--data-length 5Adds random data to packetsUseful for when trying to camouflage the network traffic caused by the scan
--proxies 192.168.5.5Uses a proxy to scanUseful for when navigating a scan through an IP-based filter

Example formula of a slow and thorough search:

nmap 192.168.10.50 -sT -p1-65535 -version-light -max-rate 5 --script=vulners -S 192.168.1.1 

Common Port States

open: An application is actively accepting TCP connections or UDP datagrams on this port.
closed:The port is accessible. Nmap probes received a response but was indicated that there is no application listening.
filtered:Nmap cannot determine if the port is open. This could be caused by firewalls dropping packets or by network congestion.


Explore the Infosec Survival Guide and more… for FREE!

Get instant access to all issues of the Infosec Survival Guide, as well as content like our self-published infosec zine, PROMPT#, and exclusive Darknet Diaries comics—all available at no cost.

You can check out all current and upcoming issues here: https://www.blackhillsinfosec.com/prompt-zine/