Nmap Cheat Sheet in 2025, all commands and options

11 March 2025 4 minutes Author: Cyber Witcher

In this article, you will learn about the basic features and commands of the Nmap tool, including specifying targets, scanning methods, detecting hosts, ports, services, and operating systems, configuring scan speed, using NSE scripts, evading firewalls and IDS, and various output formats.

Let’s start

The only downside to a tool as powerful and reliable as Nmap is the difficulty of memorizing all its commands. Even experienced cybersecurity professionals sometimes find it difficult to use Nmap to its full potential, as keeping track of all its parameters and flags can be a real challenge.

To make this task easier, we have provided a handy and structured Nmap cheat sheet. It will be a great help for those who want to quickly refresh their memory of the necessary commands, as well as for those who are preparing for certification exams like CEH or Pentest+. Whether you use it for training or as a handy reference, this cheat sheet will help you better master one of the most useful security testing tools.

Now let’s move on to the Nmap commands:

Specification of goals

Note: SYN scanning (-sS) is commonly used to quickly detect open ports, but requires administrator privileges. If you don’t have such privileges, you should use -sT.

Port specification in Nmap

Note: The -p- parameter is used to perform a full scan of all ports, which is useful for detailed analysis of open services.

Determining service and version in Nmap

Note: To obtain more accurate service data, it is recommended to use -sV with higher intensity levels or -A for comprehensive analysis.

Determining the operating system in Nmap

Note: To accurately determine the OS, it is advisable to run -O with a sufficient number of open/closed ports or use -A for more detailed analysis.

Timing and performance in Nmap

Note: The -T4 and -T5 modes may raise suspicion in intrusion detection systems (IDS) and affect network stability.

Timing and Performance Switches in Nmap

Note: The –min-rate and –max-rate settings allow you to control the scanning speed for the optimal balance between efficiency and stealth.

Nmap NSE Scripts (Nmap Scripting Engine)

Note: NSE scripts allow you to significantly extend Nmap’s functionality, including vulnerability detection, information gathering, and even target exploitation.

Useful NSE scripts in Nmap

Note: These scripts help automate vulnerability detection, network resource analysis, and target information gathering.

Firewall/IDS evasion and IP spoofing

Note: Using these settings can help bypass firewalls and IDS systems, but may also violate security policies and laws. Always obtain permission before performing penetration tests or network scans.

Outputting results in Nmap

Note: These Nmap options help you save, analyze, and restore scan results, as well as increase the level of detail in the output.

Useful Nmap output examples

Note: These commands help you effectively analyze Nmap output, filter results, compare scans, and convert data into convenient formats.

Various useful Nmap flags

Note: These Nmap flags are useful for working with IPv6 addresses and getting help with all available commands.

Other useful Nmap commands

Note: These Nmap commands allow you to perform various types of network device discovery without a full port scan, and also help with traffic analysis and route tracing.

Summary

Nmap is a powerful network scanning tool that provides great capabilities for device discovery, port analysis, determining running services, and even bypassing security measures. Thanks to a wide range of options, it allows for both quick network scans and in-depth security audits. Using Nmap allows you to not only obtain valuable information about your network, but also effectively test its security. At the same time, it is worth remembering the ethical aspect of scanning and obtaining permission before performing any actions related to security verification.

Other related articles
Found an error?
If you find an error, take a screenshot and send it to the bot.