Network Scanning and Enumeration

Objectives: Network Scanning and Enumeration

Network Scanning and Enumeration – Full Practical Labs

NETWORK SCANNING AND ENUMERATION – FULL PRACTICAL LAB NOTES


LAB 3-01: Perform Host Discovery Using Nmap

Scenario

A mid-sized IT organization is strengthening its cybersecurity posture by performing a complete assessment of its internal network. The goal is to identify active hosts, open ports, and running services within the network. The infrastructure consists of Windows servers, Linux systems, database servers, IoT devices, and IPv6-enabled hosts.

Objective

To discover live hosts in a target network using multiple host discovery techniques supported by Nmap.

Tool Used

  • Nmap
  • Parrot Security OS

Step 1: Gain Root Privileges

Switch to ParrotOS and open the terminal. Run the following command to gain root access:

sudo su

Step 2: ARP Ping Scan

nmap -sn -PR [Target IP Address]

This command disables port scanning and performs an ARP ping scan. ARP scans are extremely reliable in local networks because they do not rely on firewall rules. If an ARP reply is received, the host is confirmed to be alive.

Step 3: UDP Ping Scan

nmap -sn -PU [Target IP Address]

This scan sends UDP packets to the target host. A UDP response or ICMP error indicates that the host is active. UDP ping is useful when ICMP is blocked.

Step 4: ICMP Echo Ping Scan

nmap -sn -PE [Target IP Address]

This method sends ICMP Echo Requests. If the host responds with an ICMP Echo Reply, it is considered alive.

Step 5: ICMP Echo Ping Sweep

nmap -sn -PE [Target IP Range]

This scan is used to discover multiple active hosts across a subnet. Example:

nmap -sn -PE 192.168.56.2-192.168.56.254

Step 6: ICMP Timestamp Ping Scan

nmap -sn -PP [Target IP Address]

This scan requests the target system’s time. If a timestamp reply is received, the host is active.

Step 7: ICMP Address Mask Ping Scan

nmap -sn -PM [Target IP Address]

Used when ICMP Echo is blocked. It determines host availability using address mask replies.

Step 8: TCP SYN Ping Scan

nmap -sn -PS [Target IP Address]

This scan sends TCP SYN packets. If an ACK or SYN-ACK response is received, the host is active.

Step 9: TCP ACK Ping Scan

nmap -sn -PA [Target IP Address]

An RST response indicates the host is alive. This method can bypass some firewall rules.

Step 10: IP Protocol Ping Scan

nmap -sn -PO [Target IP Address]

This scan sends packets using multiple IP protocols. Any response confirms host availability.

Conclusion

Using multiple host discovery techniques ensures accurate identification of live systems, even in restrictive firewall environments.


LAB 3-02: Explore Various Network Scanning Techniques Using Nmap

Objective

To identify open ports, services, versions, and firewall behavior using different Nmap scanning techniques.

TCP Connect Scan

nmap -sT -v [Target IP Address]

Performs a full TCP handshake. This scan is reliable but easily detectable.

Stealth (SYN) Scan

nmap -sS -v [Target IP Address]

Sends SYN packets without completing the handshake, making it stealthier.

XMAS Scan

nmap -sX -v [Target IP Address]

Sends packets with FIN, PSH, and URG flags set.

TCP Maimon Scan

nmap -sM -v [Target IP Address]

Used to bypass certain firewall rules.

ACK Scan

nmap -sA -v [Target IP Address]

Used to map firewall rules and filtering behavior.

UDP Scan

nmap -sU -v [Target IP Address]

Identifies open UDP ports. This scan is slow due to UDP behavior.

Service Version Detection

nmap -sV [Target IP Address]

Aggressive Scan

nmap -A [Target Subnet]

Includes OS detection, service detection, script scanning, and traceroute.


LAB 3-03: Perform OS Discovery Using Nmap Script Engine (NSE)

Aggressive OS Detection

nmap -A [Target IP Address]

OS Detection Only

nmap -O [Target IP Address]

SMB OS Discovery Script

nmap --script smb-os-discovery.nse [Target IP Address]

Extracts OS name, computer name, domain name, workgroup, NetBIOS name, and system time.


LAB 3-04: Scan Beyond IDS/Firewall Using Evasion Techniques

Packet Fragmentation

nmap -f [Target IP Address]

Source Port Manipulation

nmap -g 80 [Target IP Address]

MTU Manipulation

nmap -mtu 8 [Target IP Address]

Decoy Scan

nmap -D RND:10 [Target IP Address]

MAC Address Spoofing

nmap -sT -Pn --spoof-mac 0 [Target IP Address]

LAB 3-05: Scan a Target Network Using Metasploit

Initialize Database

msfdb init

Start PostgreSQL

service postgresql start

Launch Metasploit

msfconsole

Nmap Scan Inside Metasploit

nmap -Pn -sS -A -oX Test 192.168.2.0/24

Import Scan Results

db_import Test

List Hosts

hosts

List Services

services

LAB 3-06: Scan a Target Using ShellGPT

ICMP Scan Using AI

sgpt --chat scan --shell "Use hping3 to perform ICMP scanning on target IP"

Host Discovery

sgpt --chat scan --shell "Scan the network for active hosts"

Nmap Scan via ShellGPT

sgpt --chat scan --shell "Run a fast but comprehensive Nmap scan"

OS Detection via TTL

sgpt --chat scan --shell "Identify OS using TTL value"

Conclusion

AI-assisted tools significantly enhance reconnaissance speed, accuracy, and automation in modern penetration testing environments.


FINAL CONCLUSION

These labs demonstrate professional network reconnaissance techniques used in ethical hacking. Proper authorization is mandatory before conducting any scans. Mastery of these tools allows security professionals to proactively identify vulnerabilities and strengthen network defenses.

Reference Book: N/A

Author name: SIR H.A.Mwala Work email: biasharaboraofficials@gmail.com
#MWALA_LEARN Powered by MwalaJS #https://mwalajs.biasharabora.com
#https://educenter.biasharabora.com

:: 1::

β¬… ➑