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

推荐订阅源

aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
Last Week in AI
Last Week in AI
The Cloudflare Blog
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
S
SegmentFault 最新的问题
量子位
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
I
InfoQ
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Engineering at Meta
Engineering at Meta

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/