Nmap Support Files
In addition to the nmap executable, there are six support files that provide nmap with additional information during a scan. These files are nmap-mac-prefixes, nmap-os-fingerprints, nmap-protocols, nmap-rpc, nmap-service-probes, and nmap-services.
Most nmap scans will work properly without these files, but the information provided during the scan will be limited if the files aren't available. Other scans options, such as the operating system fingerprinting option (-O), requires the nmap-os-fingerprints file or the scan will halt with this error:
OS scan requested but I cannot find nmap-os-fingerprints file. It should be in /usr/local/share/nmap, ~/.nmap, or .
Locating the Support Files
To locate the support files, nmap searches through the file system in this order:
- A data directory can be specified on the nmap command line with the --datadir option. All of the support files should be located in this single directory.
- An environment variable called NMAPDIR can reference the directory containing the support files. This environment variable can be configured in a login profile or using the operating system's set command.
- The real and effective user ID (on POSIX systems) home directory or the location of the nmap executable (on Windows-based systems) is another optional location for the support files. On POSIX systems, the home directory is referenced with a tilde (~), and the files are expected to be in the ~/nmap directory.
- The support files can also be stored in the directory where nmap was installed or compiled. This directory is usually /usr/local/share/nmap or /user/share/nmap.
- Finally, the current directory is checked for the support files.