Basic Nmap Command

Hacking Pentesting

Example of the basic nmap command:

nmap <target>

The <target> can be an IP address, a domain name, or a range of IP addresses.

For example, to scan a single IP address, you would use:

nmap 192.168.0.1

If you wanted to scan a range of IP addresses, you would use:

nmap 192.168.0.1-10

There are also many options and flags that can be used with nmap to customize the scan. Here are a few examples:

  • -sS: Use TCP SYN scan (default)
  • -sT: Use TCP connect scan
  • -sU: Use UDP scan
  • -O: Enable OS detection
  • -p: Specify port range to scan (e.g. -p 1-1024)
  • -A: Enable OS detection, version detection, and script scanning

Here’s an example of using some of these options:

nmap -sS -O -p 1-1024 192.168.0.1

This would perform a TCP SYN scan with OS detection on ports 1-1024 of the target IP address 192.168.0.1.

Leave a Reply

Your email address will not be published. Required fields are marked *