Nmap Installation and Port Discovery

Cyber SecurityCyber SecurityBeginner
Practice Now

Introduction

In this challenge, you will explore the basic functionality of Nmap, a powerful network scanning and security auditing tool. You'll install Nmap, use it to discover open ports on a local machine, and gather detailed information about the services running on those ports.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL linux(("`Linux`")) -.-> linux/PackagesandSoftwaresGroup(["`Packages and Softwares`"]) cysec(("`Cyber Security`")) -.-> cysec/NmapGroup(["`Nmap`"]) linux/PackagesandSoftwaresGroup -.-> linux/apt("`Package Handling`") cysec/NmapGroup -.-> cysec/nmap_installation("`Nmap Installation and Setup`") cysec/NmapGroup -.-> cysec/nmap_basic_syntax("`Nmap Basic Command Syntax`") cysec/NmapGroup -.-> cysec/nmap_port_scanning("`Nmap Port Scanning Methods`") cysec/NmapGroup -.-> cysec/nmap_service_detection("`Nmap Service Detection`") subgraph Lab Skills linux/apt -.-> lab-391325{{"`Nmap Installation and Port Discovery`"}} cysec/nmap_installation -.-> lab-391325{{"`Nmap Installation and Port Discovery`"}} cysec/nmap_basic_syntax -.-> lab-391325{{"`Nmap Installation and Port Discovery`"}} cysec/nmap_port_scanning -.-> lab-391325{{"`Nmap Installation and Port Discovery`"}} cysec/nmap_service_detection -.-> lab-391325{{"`Nmap Installation and Port Discovery`"}} end

Nmap Installation and Port Scanning

Before we begin our exploration of network scanning, we need to set up our tooling. We'll start by installing Nmap, then use it to perform some basic scans on our local machine. This will give us insight into what services are running and potentially exposed.

Tasks

  1. Install Nmap on your Ubuntu Linux system
  2. Use Nmap to scan for open ports on localhost (127.0.0.1) within the range of 1-10000
  3. Perform a version scan on all open ports discovered to get detailed information about the running services

Requirements

  • Execute all commands in the /home/labex/project directory using the zsh shell
  • Use the Ubuntu package manager (apt) to install Nmap
  • For the initial port scan, use Nmap's port range specification feature
  • Use Nmap's version scanning feature to get detailed information about discovered services
  • Record the port number, service name, and version information of any discovered services

Example

After completing the tasks, you should be able to answer questions like:

  1. How many open ports did you discover within the specified range?
  2. What is the port number of an open port you found?
  3. What type of service is running on this port?

Ensure you use the appropriate Nmap commands to gather all required details.

Summary

In this challenge, you installed Nmap and used it to discover and analyze services running on your local machine. This exercise demonstrates the fundamental steps in using Nmap for network discovery and service detection. It covers package installation, basic port scanning, and version detection, providing a foundation for understanding network scanning techniques.

Other Cyber Security Tutorials you may like