Exploring Network Security with Nmap Commands: Ethical Hackers(Beginners) Must Know

Gokul
2 min readJan 24, 2023

--

I’ve already discussed the legion tool. It is a tool for scanning targets via a graphical user interface. View it now

Ping Scanning

The ping scanning gives information about every active IP on your Network. We can perform a ping scan by using the below command:

nmap -sn <target>

Port Scanning

sS TCP SYN scan

sT TCP connect scan

sU UDP scans

sY SCTP INIT scan

sN TCP NULL

Host scanning

Host scanning provides a detailed description of a particular host or IP address

Nmap -sp <target IP range>

OS Scanning

Nmap -O <target IP>

Scan the Most Popular Ports

This sort of scan examines the response after sending TCP and UDP packets to a port. It provides details about a host’s OS after comparing the answer to a database of operating systems.

Nmap — Top-ports 20 <target IP>

Output to a file

If we want the output of results of Nmap scan of any file, you can add an extension to the command.

Add:-oN output.txt

Some Examples

Work in your machine ,which gives more knowledge to you.

  1. nmap: Basic command to run a simple scan on a target host.
  2. nmap -sS: Perform a stealth SYN scan.
  3. nmap -sT: Perform a TCP connect scan.
  4. nmap -sU: Perform a UDP scan.
  5. nmap -sA: Perform an ACK scan.
  6. nmap -sW: Perform a Window scan.
  7. nmap -sM: Perform a Maimon scan.
  8. nmap -sN: Perform a Null scan.
  9. nmap -sX: Perform an Xmas scan.
  10. nmap -sF: Perform a FIN scan.
  11. nmap -sL: Perform a List scan.
  12. nmap -sI: Perform an idle scan.
  13. nmap -p: Specify specific ports to scan.
  14. nmap -o: Output results to a file.
  15. nmap --top-ports: Scan the top most commonly used ports.
  16. nmap --version-all: Attempt to determine the version number of all services running on the target host.

Examples with IP

  1. nmap -O 192.168.1.1
  2. nmap -A 192.168.1.1
  3. nmap -v 192.168.1.1
  4. nmap --open 192.168.1.1
  5. nmap -iL targets.txt
  6. nmap --resume
  7. nmap --resume scan_results.xml
  8. nmap --exclude 192.168.1.5 192.168.1.0/24
  9. nmap --exclude 192.168.1.5 192.168.1.0/24
  10. nmap -sS -sV 192.168.1.1

Thank you for Reading This content.I hope you got some Knowledge from this post.Grow your Knowledge with medium.

--

--

Gokul
Gokul

Written by Gokul

Cybersecurity Enthusiast | Smart India Hackathon |TN Police Hackathon Finalist | Linux | WebApp Penetration Tester | CCNA |Intern At Coimbatore CyberCrime Dept

No responses yet