I'm running Linux mint and I need to modify my nmap configuration's default service enumeration by making a new service list. I think I do this in the config file (I'm not positive), but I can't seem to find an nmap config file. I know the services I need to run, and the service flags, I just need a way to configure what nmap does by default. I've tried looking everywhere I can think of, and I've found some files in /usr/share/nmap, but none of them seem to be config files. Once again, I know the command I want run including the flags and services, I just need a way to edit the default configuration. Thanks,
-
Why don't you use numbers to tell nmap which ports to use? – wullxz Jan 20 '13 at 17:42
-
What specific actions do you need to configure? What can't be done from the command line? – bonsaiviking Jan 21 '13 at 02:56
2 Answers
Nmap does some things by default (TCP SYN scan, reverse (PTR) DNS name resolution) but most other functions are specified with command-line flags. That said, there are some configuration files that affect how Nmap works.
From your question, I guess the file you're interested in is nmap-services
. This file follows the same structure as the Unix services file, with an additional column for an empirical "open-frequency" score, based on Internet-wide scans conducted by the Nmap development team. The default Nmap port scan scans the top 1000 most-frequently-open ports, based on this file. The SERVICE column in Nmap's output is populated from the first column in this file, unless overridden by service version detection results.

- 4,420
- 17
- 26
The default service definition on *NIX is in /etc/services
, which is usually shipped by your distribution and not by nmap.

- 1,492
- 9
- 13