10 most basic nmap commands

10 most basic nmap commands

Nmap is a free and open-source network exploration and security auditing tool. It is used to discover hosts and services on a network, and to identify potential vulnerabilities and security risks. Nmap uses a variety of scanning techniques to gather information about hosts and services, including TCP and UDP scans, version detection, OS detection, and more. It also includes advanced features like scripting and output customization. Nmap can be run from the command line on various platforms, including Windows, macOS, and Linux. It is widely used by network administrators, security professionals, and researcher.

Here are the 10 most basic Nmap commands:

  1. Scan a single host: nmap  This command will perform a scan on a single host, specified by its IP address or host name. By default, Nmap will perform a basic scan of the 1000 most common ports.
  2. Scan a range of IP addresses: nmap - This command will perform a scan on a range of IP addresses, specified by the starting and ending IP addresses. For example, nmap 192.168.1.1-10 will scan IP addresses from 192.168.1.1 to 192.168.1.10.
  3. Scan a subnet: nmap  This command will perform a scan on a whole subnet, specified by the IP address and subnet mask. For example, nmap 192.168.1.0/24 will scan all IP addresses on the 192.168.1.0 subnet.
  4. Scan a list of hosts: nmap -iL  This command will perform a scan on a list of hosts, specified by a text file containing one IP address or hostname per line. For example, nmap -iL targets.txt will scan all hosts listed in the file targets.txt.
  5. Perform a fast scan: nmap -F  This command will perform a fast scan on a host, scanning only the 100 most common ports. This can be useful for quickly identifying open ports and potential vulnerabilities.
  6. Perform a more thorough scan: nmap -sS  This command will perform a more thorough scan on a host, using the TCP SYN scan technique. This technique is faster and less detectable than the default TCP connect scan.
  7. Perform a TCP SYN scan: nmap -sS  This command will perform a scan using the TCP SYN technique, which sends a SYN packet to each port and waits for a response. This can be useful for stealthy scanning and can often bypass firewalls and intrusion detection systems.
  8. Perform a UDP scan: nmap -sU  This command will perform a scan using the UDP protocol, which is commonly used for services such as DNS and DHCP. UDP scans can be slower and less reliable than TCP scans, but can often uncover additional open ports.
  9. Scan for specific ports: nmap -p  This command will perform a scan on specific ports, specified by a comma-separated list of port numbers or ranges. For example, nmap -p 80,443,8080 192.168.1.1 will scan for open ports 80, 443, and 8080 on the host 192.168.1.1.
  10. Scan all ports: nmap -p-  This command will perform a scan on all ports (1-65535) of a host. This can take a long time to complete, but can be useful for discovering hidden or lesser-known services.

Note that some scans may require administrative privileges or special permissions, depending on the target network and the options used. Always use caution when scanning networks, and ensure that you have permission to do so.

Total
1
Shares

Leave a Reply

Previous Post
What is SSL certificate and why it is important for your website

What is SSL certificate and why it is important for your website

Next Post
Beyond Zeroes and Ones: Exploring the Multifaceted Nature of Cyber attacks

Beyond Zeroes and Ones: Exploring the Multifaceted Nature of Cyber attacks

Related Posts