

To set Linux capabilities, you need to install the libcap package. To give Nmap the capabilities it needs to run without root or sudo privileges, we are using eip, thus allowing Nmap to use these capabilities irrespective of which user runs it. Linux capabilities are assigned in sets of “effective,” “inheritable,” “permitted,” and “ambient” for threads and files, respectively.

Note: be cautious when setting elevated capabilities, as a malicious user can exploit the Nmap’s Scripting Engine to get access to full sudo privileges and use scripts to exploit local host vulnerabilities.

#BASH COMMAND NETMAP HOW TO#
The essence of this guide is to show you how to use three capabilities: CAP_NET_RAW, CAP_NET_ADMIN, and CAP_NET_BIND_SERVICE to give Nmap the privileges it needs to run without checking for root user permissions. It has been distributed widely as the shell. Bash can also read commands from a file, called a script. Bash command line typically runs in a text window, where the user types commands that cause actions. You can learn more about Linux capabilities in the man pages. Bash or Bourne Again SHell is a Unix shell or main command-line interface and the command language was written by Brian Fox released in 1989.
