Guardian of Cyber Realms Scanning

CybersecurityCybersecurityBeginner
Practice Now

Introduction

In the mystical world of ancient India, amidst the soaring peaks of the Himalayas and the lush forests, there lay a hidden kingdom known for its advanced cyber fortifications. This kingdom, protected by the mythical creature Garuda, guardian of the Divine, was a bastion of knowledge and technology. Garuda, with its keen eyesight, could see threats from miles away, much like the modern-day cybersecurity tools that protect our digital realms. Your mission, should you choose to accept it, is to learn the arts of Cybersecurity through mastering Nmap Port Scanning Methods, to ensure the safety of the kingdom from digital threats lurking in the shadows, aiming to breach its defenses.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL cybersecurity(("`Cybersecurity`")) -.-> cybersecurity/NmapGroup(["`Nmap`"]) cybersecurity/NmapGroup -.-> cybersecurity/nmap_port_scanning("`Nmap Port Scanning Methods`") subgraph Lab Skills cybersecurity/nmap_port_scanning -.-> lab-415927{{"`Guardian of Cyber Realms Scanning`"}} end

Setting Up the Environment

In this step, we will prepare our lab environment for Nmap port scanning techniques by setting up a local service that we will later scan. This will give you a hands-on experience on how Nmap can be wielded to discover open ports and services running on a target system.

First, open a terminal and make sure you are in the correct directory:

cd /home/labex/project

Next, we will create a simple HTTP server on your machine to simulate a service running on a specific port. This will be the target of our Nmap scan. Execute the following command:

python3 -m http.server 8080 &

This command will start a local HTTP server on port 8080 and run it in the background. The & symbol at the end of the command is used to run the process in the background, allowing you to continue using the terminal.

Basic Nmap Port Scanning

In this step, you will learn how to perform a basic Nmap port scan to discover open ports on your local HTTP server. This is a foundational skill in cybersecurity for identifying potential entry points into a system.

Now, letโ€™s scan your local machine to find the open port.

Execute the following command to scan port 8080 and save the output to a file named basic_scan.txt:

nmap -p 8080 localhost > /home/labex/project/basic_scan.txt

This command instructs Nmap to scan port 8080 on your local machine. The -p flag specifies the port number, and localhost is the target system.

Open the basic_scan.txt file to view the scan results:

cat /home/labex/project/basic_scan.txt

You should see output similar to this:

Starting Nmap 7.80 ( https://nmap.org ) at YYYY-MM-DD
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Other addresses for localhost (not scanned): ::1

PORT     STATE SERVICE
8080/tcp open  http-proxy

This output indicates that port 8080 is open and running a service, in our case, the HTTP server we started.

Advanced Scanning Techniques

In this more advanced step, we're going to delve into some more sophisticated scanning techniques available in Nmapโ€™s arsenal.

First, navigate to your working directory:

cd /home/labex/project

Next, we will perform a version detection scan to identify service information of the open port(s).

Execute the following Nmap command to perform a service version detection scan on port 8080 and save the output to a file named advanced_scan.txt:

nmap -sV -p 8080 localhost > /home/labex/project/advanced_scan.txt

This command performs a service version detection scan on port 8080 of the local machine. The -sV flag instructs Nmap to probe open ports to determine the service and its version.

Check the contents of the advanced_scan.txt file to view the scan results:

cat /home/labex/project/advanced_scan.txt

The output will provide detailed information about the service running on the open port, which is crucial for identifying potential vulnerabilities.

Summary

In this lab, we embarked on a mythical journey to the ancient Indian world, leveraging the keen eyesight of Garuda to explore the realm of Cybersecurity through Nmap Port Scanning Methods. Starting with setting up our environment to engage a basic port scan and advancing towards leveraging sophisticated scanning options that Nmap offers, we walked in the shoes of cyber guardians. This hands-on experience not only taught us about the technical aspects of Nmap but also instilled in us the importance of vigilance and preparedness in the face of digital adversaries. It was a unique blend of ancient wisdom and modern cybersecurity practices, aimed at arming you with the knowledge and skills to protect your digital kingdoms.

Other Cybersecurity Tutorials you may like