Scanning Subnet with Nmap

Cyber SecurityCyber SecurityBeginner
Practice Now

Introduction

In this challenge, you'll apply your knowledge of network scanning using Nmap, a powerful and versatile tool used by cybersecurity professionals. Nmap is essential for discovering hosts, services, and potential vulnerabilities on a network. Your task is to perform a series of scans on a local network, demonstrating your understanding of Nmap's capabilities and interpreting the results.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL cysec(("`Cyber Security`")) -.-> cysec/NmapGroup(["`Nmap`"]) cysec/NmapGroup -.-> cysec/nmap_basic_syntax("`Nmap Basic Command Syntax`") cysec/NmapGroup -.-> cysec/nmap_port_scanning("`Nmap Port Scanning Methods`") cysec/NmapGroup -.-> cysec/nmap_target_specification("`Nmap Target Specification`") subgraph Lab Skills cysec/nmap_basic_syntax -.-> lab-392091{{"`Scanning Subnet with Nmap`"}} cysec/nmap_port_scanning -.-> lab-392091{{"`Scanning Subnet with Nmap`"}} cysec/nmap_target_specification -.-> lab-392091{{"`Scanning Subnet with Nmap`"}} end

Perform Network Scans

In this step, you'll use Nmap to scan a range of IP addresses and analyze the results.

Tasks

  • Use Nmap to scan the first 10 IP addresses in the 192.168.1.0/24 subnet.
  • Identify the number of active hosts in this range.
  • Determine which host is running a web server (HTTP).
  • Find a host with an SSH service running.

Requirements

  • Execute all commands from the ~/project directory.
  • Use appropriate Nmap options to scan for open ports and identify services.
  • Save the output of the scan to a file named scan_results.txt in the ~/project directory.

Example

After running the scan, your scan_results.txt file might contain output similar to this:

Starting Nmap 7.80 ( https://nmap.org )
Nmap scan report for 192.168.1.1
Host is up (0.0010s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http

Nmap scan report for 192.168.1.5
Host is up (0.0015s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
22/tcp open  ssh

Nmap done: 10 IP addresses (2 hosts up) scanned in 2.05 seconds

Summary

In this challenge, you applied your knowledge of Nmap to perform a network scan on a range of IP addresses. You learned how to execute a basic Nmap scan, save the results to a file, and interpret the output to gather important information about the network.

This exercise reinforces the importance of network scanning in cybersecurity and system administration. By identifying active hosts and open services, you've simulated a common task performed by professionals to maintain network security and inventory.

Remember, in real-world scenarios, always ensure you have proper authorization before scanning any network. Unauthorized scanning can be illegal and unethical.

Other Cyber Security Tutorials you may like