In this practical, we will use Nmap to scan a local network and a specific target machine. The goal is to:

This hands-on exercise will help you understand how to perform network reconnaissance and gather useful information for penetration testing, system administration, or network management.

Setting Up Your Test Environment:

Scanning the Local Network:

$ nmap -sn 192.168.1.0/24

Starting Nmap 7.80 ( <https://nmap.org> ) at 2024-12-16 16:00 UTC
Nmap scan report for 192.168.1.1
Host is up (0.0012s latency).
Nmap scan report for 192.168.1.5
Host is up (0.0009s latency).
Nmap scan report for 192.168.1.10
Host is up (0.0015s latency).
Nmap scan report for 192.168.1.20
Host is up (0.0020s latency).
Nmap done: 256 IP addresses (4 hosts up) scanned in 3.12 seconds

Nmap detected that four devices are up in the 192.168.1.0/24 range: 192.168.1.1, 192.168.1.5, 192.168.1.10, and 192.168.1.20.

Scanning a Specific Target Machine:

Now that we know there are live hosts on the network, let’s focus on scanning a specific target machine for open ports, services, and OS information. Let’s say the target machine has the IP address 192.168.1.5.