DEV Community

Cover image for Explore, Scan, Secure: Nmap for Network Ninjas
KARAN JAIN
KARAN JAIN

Posted on

2 1 1 1 1

Explore, Scan, Secure: Nmap for Network Ninjas

Disclaimer:
This post is for educational purposes only. Unauthorized scanning or hacking of websites or networks is illegal and can lead to severe consequences. Always ensure you have proper permission before performing any scans or security tests.

"Want to Hack a Website? Here’s Where It All Begins!"

The first step is finding all the open ports on the website. These ports act as entry points, and discovering them is crucial.

To do this, we use a powerful tool called Nmap. It scans and reveals all the open ports, giving you a map of what’s accessible.

Image description

Nmap, which stands for Network Mapper, is a free tool that helps you explore networks and check for security issues. It's really helpful for system admins and those interested in cybersecurity.
Common Uses:
Scanning networks, Detecting open ports, Identifying running services, Checking for vulnerabilities

Step.1: Installing Nmap
For Linux:
Most Linux distributions include Nmap in their repositories. Install it using:

sudo apt install nmap 
Enter fullscreen mode Exit fullscreen mode

For Windows:

Nmap official website

Step.2:Give commands:
0.For summary of options

nmap -h
Enter fullscreen mode Exit fullscreen mode

1.Scan a Single Host

nmap 192.168.1.1

nmap www.google.com

Enter fullscreen mode Exit fullscreen mode

2.Scan All Ports

nmap -p- 192.168.1.1

Enter fullscreen mode Exit fullscreen mode

3.Scanning Your Local Network

nmap -sn 192.168.1.0/24

Enter fullscreen mode Exit fullscreen mode
  1. For Aggressive scanning
nmap -A www.google.com
Enter fullscreen mode Exit fullscreen mode

5.To scan UDP ports

nmap -sU www.google.com
Enter fullscreen mode Exit fullscreen mode

6.To scan TCP ports

nmap -sT www.google.com
Enter fullscreen mode Exit fullscreen mode

7.To scan top ports

nmap --top-ports <number> www.google.com
Enter fullscreen mode Exit fullscreen mode

8.Scan Excluding the range of port

nmap --exclude-ports 1-100 www.google.com
Enter fullscreen mode Exit fullscreen mode

9.To increase the scanning speed

nmap -F www.google.com
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more