Nmap Cheat Sheet Last Updated : 06 Feb, 2025 Comments Improve Suggest changes Like Article Like Report Nmap (Network Mapper) is a free and open-source network detection and security scanning utility. Many network and system administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring server or service availability. Nmap uses raw IP packets in a novel way to determine the hosts available on the network, the services they offer (application name and version), and the operating systems they are running (and operating systems). version). It's designed to scan large networks quickly but works well with a single host.In this Nmap Cheat Sheet, you'll learn all the basics to advanced like basic scanning techniques, discovery options in Nmap, Firewall evasion techniques, version detection, output options, scripting engines and more.Usage of NmapAuditing the security of a device or firewall by identifying the network connections that can be made to or through it.In preparation for auditing, identify open ports on a target host.Network inventory, network mapping, asset and maintenance management are all examples of network services.Identifying additional servers to test the network's security.Creating network traffic, analysing responses, and measuring response time.Used to Finding and exploiting vulnerabilities in a network.DNS queries and subdomain searchUsage:nmap [<Scan Type>] [<Options>] {<target specification>}NMAP Commands Cheat Sheet 2024Basic Scanning TechniquesNmap QueryNmap CommandScan a single targetnmap [target]Scan multiple targetsnmap [target1,target2,etc]Scan a list of targetsnmap -iL [list.txt]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 OptionsNmap QueryNmap CommandPerform a ping scan onlynmap -sP [target]Don’t pingnmap -PN [target]TCP SYN Pingnmap -PS [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 specify DNS serversnmap –dns-servers [servers] [target]Create a host listnmap -sL [targets]Firewall Evasion TechniquesNmap QueryNmap CommandFragment packetsnmap -f [target]Specify a specific MTUnmap –mtu [MTU] [target]Use a decoynmap -D RND: [number] [target]Idle zombie scannmap -sI [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 DetectionNmap QueryNmap CommandOperating 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]Output OptionsNmap QueryNmap CommandSave output to a text filenmap -oN [scan.txt] [target]Save output to a xml filenmap -oX [scan.xml] [target]Grepable outputnmap -oG [scan.txt] [target]Output all supported file typesnmap -oA [path/filename] [target]Periodically display statisticsnmap –stats-every [time] [target]133t outputnmap -oS [scan.txt] [target]Scripting EngineNmap QueryNmap CommandExecute individual scriptsnmap –script [script.nse] [target]Execute multiple scriptsnmap –script [expression] [target]Execute scripts by categorynmap –script [cat] [target]Execute multiple scripts categoriesnmap –script [cat1,cat2, etc]Troubleshoot scriptsnmap –script [script] –script-trace [target]Update the script databasenmap –script-updatedb Comment More infoAdvertise with us Next Article Subnet Mask Cheat Sheet R ritikshrivas Follow Improve Article Tags : Ethical Hacking CCNA Similar Reads Geeksforgeeks Cheatsheets - All Coding Cheat Sheets Collections Cheatsheets are short documents that contain all the most essential information about a specific technology in short, such as its syntax, commands, functions, or its features. Sheets are designed to help users to learn quickly and these Sheets are given the basics Overview of the technology without 4 min read Subnet Mask Cheat Sheet A Subnet Mask is a numerical value that describes a computer or device's how to divide an IP address into two parts: the network portion and the host portion. The network element identifies the network to which the computer belongs and the host part identifies the unique computer on that network. An 9 min read Git Cheat Sheet The Git Cheat Sheet is a quick, well-organized guide designed for both beginners and experienced developers/DevOps engineers. It serves as a go-to reference for learning and recalling essential Git concepts and commands. In this Git Cheat Sheet, we have covered all the basics to advanced Git command 9 min read NumPy Cheat Sheet: Beginner to Advanced (PDF) NumPy stands for Numerical Python. It is one of the most important foundational packages for numerical computing & data analysis in Python. Most computational packages providing scientific functionality use NumPyâs array objects as the lingua franca for data exchange. In this Numpy Cheat sheet f 15+ min read Linux Commands Cheat Sheet Linux, often associated with being a complex operating system primarily used by developers, may not necessarily fit that description entirely. While it can initially appear challenging for beginners, once you immerse yourself in the Linux world, you may find it difficult to return to your previous W 13 min read Pandas Cheat Sheet for Data Science in Python Pandas is a powerful and versatile library that allows you to work with data in Python. It offers a range of features and functions that make data analysis fast, easy, and efficient. Whether you are a data scientist, analyst, or engineer, Pandas can help you handle large datasets, perform complex op 15+ min read Java Cheat Sheet Java is a programming language and platform that has been widely used since its development by James Gosling in 1991. It follows the Object-oriented Programming concept and can run programs written on any OS platform. Java is a high-level, object-oriented, secure, robust, platform-independent, multi 15+ min read C++ STL Cheat Sheet The C++ STL Cheat Sheet provides short and concise notes on Standard Template Library (STL) in C++. Designed for programmers that want to quickly go through key STL concepts, the STL cheatsheet covers the concepts such as vectors and other containers, iterators, functors, etc., with their syntax and 15+ min read Docker Cheat Sheet : Complete Guide (2024) Docker is a very popular tool introduced to make it easier for developers to create, deploy, and run applications using containers. A container is a utility provided by Docker to package and run an application in a loosely isolated environment. Containers are lightweight and contain everything neede 10 min read C++ Cheatsheet This is a C++ programming cheat sheet. It is useful for beginners and intermediates looking to learn or revise the concepts of C++ programming. While learning a new language, it feels annoying to switch pages and find different websites for different concepts that are easily understandable. You can 15 min read Like