Windows | Nmap Network Scanning (2024)

  • Nmap Network Scanning
  • Chapter2.Obtaining, Compiling, Installing, and Removing Nmap
  • Windows

Windows

While Nmap was once a Unix-only tool, a Windows version wasreleased in 2000 and has since become the second most popular Nmapplatform (behind Linux). Because of this popularity and the fact thatmany Windows users do not have a compiler, binary executables aredistributed for each major Nmap release. We support Nmap on Windows 7and newer, as well as Windows Server 2008 and newer. We also maintaina guide for userswho must run Nmap on earlier Windows releases. While it has improved dramatically, the Windows port is notquite as efficient as on Unix. Here are the known limitations:

  • Nmap only supports ethernet interfaces (including most802.11 wireless cards and many VPN clients) for raw packet scans.Unless you use the -sT -Pn options, RAS connections(such as PPP dialups) and certain VPN clients are not supported. Thissupport was dropped when Microsoft removed raw TCP/IP socket supportin Windows XP SP2. Now Nmap must send lower-level ethernet framesinstead.

  • When using Nmap without Npcap, you cannotgenerally scan your own machine from itself (using aloopback IP such as 127.0.0.1 or any of itsregistered IP addresses). This is a Windows limitation that wehave worked around in Npcap, which is included in the Windows self-installer.Users stuck without a Npcap installation can use a TCPconnect scan without pinging (-sT -Pn) as that usesthe high level socket API rather than sending rawpackets.

Scan speeds on Windows are generally comparable to those onUnix, though the latter often has a slight performance edge. Oneexception to this is connect scan (-sT), which isoften much slower on Windows because of deficiencies in the Windowsnetworking API. This is a shame, since that is the one TCP scan thatworks over all networking types (not just ethernet, like the raw packet scans).Connect scan performance can beimproved substantially by applying the Registry changes in thenmap_performance.reg file included with Nmap. By default these changes are applied for you by the Nmap executable installer. This registry fileis in the nmap-<version>directory of the Windows binary zip file, andnmap-<version>/mswin32in the source tarball (where <version> is theversion number of the specific release). These changes increasethe number of ephemeral ports reserved for user applications (such asNmap) and reduce the time delay before a closed connection canbe reused. Most people simply check the box to apply these changes in the executable Nmap installer, but you can also apply them by double-clicking onnmap_performance.reg, or by running the commandregedt32 nmap_performance.reg. To make the changes by hand, add these three Registry DWORD values toHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters:

MaxUserPort

Set a large value such as 65534 (0x0000fffe). See MS KB 196271.

TCPTimedWaitDelay

Set the minimum value (0x0000001e). See MS KB 149532.

StrictTimeWaitSeqCheck

Set to 1 so TCPTimedWaitDelay is checked.

Windows | Nmap Network Scanning (1)Note

I would like to thank Ryan Permeh of eEye, Andy Lutomirski, and Jens Vogt for their hard work on the Nmap Windows port. For many years, Nmap was a Unix-only tool, and it would likely still be that way if not for their efforts.

Windows users have three choices for installingNmap, all of which are available from thedownload page at https://nmap.org/download.html.

Every Nmap release includes a Windowsself-installer namednmap-<version>-setup.exe(where <version> is the version number of thespecific release). Most Nmap users choose this option since it is soeasy. Another advantage of the self-installer is that it provides the option to install the Zenmap GUI and other tools. Simply run the installer file and let it walk you throughpanels for choosing an install path and installing Npcap. Theinstaller was created with the open-source Nullsoft ScriptableInstall System. After it completes, read the section called “Executing Nmap on Windows” for instructions on executing Nmap on thecommand-line or through Zenmap.

Command-line Zip Binaries

Windows | Nmap Network Scanning (2)Note

Most users prefer installing Nmap with the self-installer discussed previously.

Every stable Nmap release comes with Windowscommand-line binaries and associated files in a Zip archive. Nographical interface is included, so you need to runnmap.exe from a DOS/command window. Or you candownload and install a superior command shell such as those includedwith the freeCygwinsystem available from https://www.cygwin.com. Here are the step-by-step instructions for installing and executing the Nmap .zip binaries.

Installing the Nmap zip binaries

  1. Download the .zip binaries from https://nmap.org/download.html.

  2. Extract the zip file into the directory you wantNmap to reside in. An example would be C:\ProgramFiles. A directory callednmap-<version> should be created, which includesthe Nmap executable and data files.

  3. For improved performance, apply the Nmap Registrychanges discussed previously.

  4. Nmap requires the free Npcap packet capture library.We include a recent Npcap installer which is available in the zip fileas npcap-<version>.exe,where <version> is the Npcap version ratherthan the Nmap version. Alternatively, you can obtain and installthe latest version from https://npcap.com.

  5. Due to the way Nmap is compiled, it requires theMicrosoft Visual C++ Redistributable Package of runtimecomponents. Many systems already have this installed from otherpackages, but you should run VC_redist.x86.exefrom the zip file just in case you need it.Pass the /q option to run these installers in quiet (non interactive) mode.

  6. Instructions for executing your compiled Nmap aregiven in the section called “Executing Nmap on Windows”.

Compile from Source Code

Most Windows users prefer to use the Nmap binary self-installer,but compilation from source code is an option, particularly if you plan to help with Nmap development. Compilation requiresMicrosoft Visual C++ 2019, which is part of their commercial Visual Studiosuite. Any of the Visual Studio 2019 editions should work, including the freeVisual Studio 2019 Community.

Some of Nmap's dependencies on Windows are inconvenient to build. Forthis reason, precompiled binaries of the dependencies are stored inSubversion, in the directory /nmap-mswin32-aux.When building from source, whether from a source code release or fromSubversion, check out /nmap-mswin32-aux asdescribed below.

Compiling Nmap on Windows from Source

  1. Download the Windows dependencies from Subversion with the commandsvn checkout https://svn.nmap.org/nmap-mswin32-aux.The build files are configured to look for dependencies in thischecked-out directory. If you want to build the dependencies yourselfinstead, you will have to reconfigure the Visual Studio project files topoint to the alternate directory.

  2. Decide whether to obtain the Nmap source code by downloading the latest release from nmap.org, or using a Subversion client to retrieve even newer (but less tested) code from our repository. These instructions are for the web download approach, but using Subversion instead is straightforward (see the section called “Obtaining Nmap from the Subversion (SVN) Repository”).

  3. Download the latest Nmap source distribution from https://nmap.org/download.html. It has the namenmap-<version>.tar.bz2 ornmap-<version>.tgz. Those are the same tar file compressed using bzip2 or gzip, respectively. The bzip2-compressed version is smaller.

  4. Uncompress the source code file you just downloaded. Thesource code directory and the nmap-mswin32-aux mustbe in the same parent directory.Recent releases of the free Cygwin distribution can handle both the .tar.bz2 and .tgz formats. Use the command tar xvjf nmap-version.tar.bz2 or tar xvzf nmap-version.tgz, respectively. Alternatively, the common WinZip application can decompress these files.

  5. Open Visual Studio and the Nmap solution file (nmap-<version>/mswin32/nmap.sln).

  6. Right click on Solution 'nmap' in the Solution Explorer sidebar and choose Configuration Manager. Ensure that the active solution configuration is Release and then close the Configuration Manager.

  7. Build Nmap by pressing F7 or choosing BuildSolution from the GUI. Nmap should begin compiling, andend with the line -- Done -- sayingthat all projects built successfully and there were zerofailures.

  8. The executable and data files can be found in nmap-<version>/mswin32/Release/. You can copy them to a preferred directory as long as they are all kept together.

  9. Ensure that you have Npcap installed. You can obtain it byinstalling our binary self-installer or executingnpcap-<version>.exe fromour zip package. Alternatively, you can obtain the official installer athttps://npcap.com.

  10. Instructions for executing your compiled Nmap aregiven in the next section.

If you wish to build an Nmap executable Windowsinstaller or Zenmap executable,see docs/win32-installer-zenmap-buildguide.txt in the Nmap SVN repository.

Many people have asked whether Nmap can be compiled with thegcc/g++ includedwith Cygwin or other compilers. Some users have reported success withthis, but we don't maintain instructions for building Nmap underCygwin.

Executing Nmap on Windows

Nmap releases now include theZenmap graphical user interface for Nmap.If you used the Nmap installer and left the Zenmap field checked,there should be a new Zenmap entry on your desktop and Start Menu.Click this to get started. Zenmap is fully documented inChapter12, Zenmap GUI Users' Guide. While many users love Zenmap, others preferthe traditional command-line approach to executing Nmap. Here aredetailed instructions for users who are unfamiliar with command-lineinterfaces:

  1. Make sure the user you are logged in as hasadministrative privilegeson the computer (user should be a member of the administrators group).

  2. Open a command/DOS Window. Though it can be found inthe program menu tree, the simplest approach is to choose Start -> Run and type cmd<enter>. Opening a Cygwin window (if you installed it) by clicking on the Cygwin icon on the desktop works too, although the necessary commands differ slightly from those shown here.

  3. Change to the directory you installed Nmap into. You can skip this step if Nmap is already in your command path (the Zenmap isntaller adds it there by default). Otherwise, type the following commands.

    c:cd "\Program Files (x86)\Nmap"

    On Windows releases prior to Windows 7, specify \Program Files\Nmap instead. The directory will also be different if you chose to install Nmap in a non-default location.

  4. Execute nmap.exe. Figure2.1 is a screen shot showing a simple example.

Figure2.1.Executing Nmap from a Windows command shell

Windows | Nmap Network Scanning (3)

If you execute Nmap frequently, you can add the Nmap directory(c:\Program Files (x86)\Nmap by default) to your command execution path:

  1. Open the System Properties window to the Advanced tab by running SystemPropertiesAdvanced.exe.

  2. Click the EnvironmentVariables button.

  3. Choose Path from theSystem variables section, then hitedit.

  4. Add a semi-colon and then your Nmap directory (e.g. c:\Program Files (x86)\Nmap) to the end of the value.

  5. Open a new command prompt and you should be able to execute acommand such as nmap scanme.nmap.org from any directory.

Windows | Nmap Network Scanning (2024)

FAQs

Is there a Windows version of Nmap? ›

Windows users have three choices for installing Nmap, all of which are available from the download page at https://nmap.org/download.html .

Is Nmap illegal? ›

When used properly, Nmap helps protect your network from invaders. But when used improperly, Nmap can (in rare cases) get you sued, fired, expelled, jailed, or banned by your ISP.

How to run a network scan? ›

To rapidly scan a network yourself using native operating system (OS) capabilities, follow these steps.
  1. Open the command prompt.
  2. Enter the command “ipconfig” for Mac or “ifconfig” on Linux. ...
  3. Next, input the command “arp -a”. ...
  4. Optional: Input the command “ping -t”.
Jan 4, 2023

What is an Nmap scan? ›

Nmap is a network scanning tool—an open source Linux command-line tool—used for network exploration, host discovery, and security auditing. Gordon Lyon (pseudonym Fyodor Vaskovich) created it to help map an entire network easily and find its open ports and services.

Is it safe to use Nmap on Windows? ›

Yes, Nmap is generally safe to install and use, provided it is used responsibly and legally. Nmap (Network Mapper) is a powerful and widely-used open-source network scanning tool that helps in discovering and mapping networks, identifying open ports, and detecting vulnerabilities.

What is the GUI version of Nmap for Windows? ›

Introduction. Zenmap is the official Nmap Security Scanner GUI.

Do real hackers use Nmap? ›

Inexperienced hackers will often use the default settings of Nmap and end up getting their IP blocked by the target IDS or their packets dropped by the network firewall. An experienced hacker will be patient and probe the target using different MAC/IP addresses to gain information about the targets system.

Can Nmap be traced? ›

Log monitoring tools such as Logwatch and Swatch can certainly help, but the reality is that system logs are only marginally effective at detecting Nmap activity. Special purpose port scan detectors are a more effective approach to detecting Nmap activity. Two common examples are PortSentry and Scanlogd.

Why is Nmap bad? ›

However, hackers can also use Nmap to access uncontrolled ports on a system. They can run Nmap on a targeted approach, identify vulnerabilities, and exploit them. But Nmap is not only used by hackers - IT security companies also use it to simulate potential attacks that a system may face.

How do I scan a network device in Windows? ›

Configure a new network device authenticated scan
  1. Go to Settings > Device discovery > Authenticated scans in the Microsoft Defender portal.
  2. Select Add new scan and choose Network device authenticated scan and select Next.
  3. Choose whether to Activate scan.
  4. Enter a Scan name.
Apr 24, 2024

How to scan network using cmd? ›

In order to get a list of the IP addresses of all of the devices connected to your entire network, follow these steps:
  1. Open a terminal window to get to the command line.
  2. Issue the command ipconfig and press Return. On Linux type ifconfig instead.
  3. Enter the command arp -a to get more information.
Jan 8, 2024

How do I add a network scanner in Windows 10? ›

Install or add a network, wireless, or Bluetooth scanner
  1. Select Start > Settings > Devices > Printers & scanners or use the following button. Open the Printers & scanners settings.
  2. Select Add a printer or scanner. Wait for it to find nearby scanners, then choose the one you want to use, and select Add device.

How to run Nmap on Windows? ›

Nmap on the Windows Command Line

Simply fire up a command prompt and launch nmap . If you installed from the standalone zip file, you need to add the installation folder to the system path manually through system properties. As you can see the familiar Nmap command options appear after running the command.

What is a stealth scan? ›

A stealth scan is a scanning technique in Nmap that seeks to minimize the detection of scanning activity by the target host's firewalls and other security measures. The default SYN scan is also known as a stealth scan. This is due to the SYN scan failing to complete the TCP handshake.

Is Nmap available on Windows 10? ›

Nmap runs on all major computer operating systems, and official binary packages are available for Linux, Windows, and Mac OS X.

Is Nmap Linux or Windows? ›

The Nmap tarball compiles under Linux, Mac OS X, Windows, and many UNIX platforms (Solaris, Free/Net/OpenBSD, etc.) It includes Zenmap, the GUI frontend. Most Windows users install with our Windows executable installer, but we also provide Windows source code compilation instructions.

How does Nmap work on Windows? ›

Nmap builds on previous network auditing tools to provide quick, detailed scans of network traffic. It works by using IP packets to identify the hosts and IPs active on a network and then analyze these packets to provide information on each host and IP, as well as the operating systems they are running.

What is the Windows equivalent of NC command? ›

The Windows equivalent is Test-NetConnection - it will test if the connection to the destination works and show certain debug output. You can use "tnc" as shortening of Test-NetConnection in Windows Powershell. Legacy Windows command shell doesn't have any equivalent of nc (except third parties).

Do people still use Nmap? ›

Nmap users include everyone from beginners to cyber security professionals. Network administrators use Nmap (and Zenmap) to map subnets and discover hosts. Cyber security professionals use Nmap to scan target systems for open ports and services they might be running.

Top Articles
What Will Disqualify You From Life Insurance? | Independent Insurance Associates
Do You Need a Down Payment to Refinance Your Mortgage? Here are Some Options | Moreira Team Mortgage
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5688

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.