Five Stages of Penetration Testing — Ethical Hacking as a Beginner [04]

Bhavyansh @ DiversePixel
3 min readApr 22, 2024

--

Next on our quest to learning Ethical Hacking, we have Penetration testing. Penetration Testing is a crucial component of robust cybersecurity. It involves systematically scrutinizing an organization’s IT system, network, or web application to identify potential vulnerabilities that a hacker could exploit. In this blog post, we will explore the five stages of penetration testing.

The five stages are:

  1. Reconnaissance (Information gathering)
  2. Scanning
  3. Vulnerability Assessment
  4. Exploitation
  5. Covering tracks

1. Reconnaissance

The first stage, Reconnaissance, is the foundation of the entire process. In this phase, the tester embarks on an intelligence-gathering mission about the target system. The collection might encompass a variety of data, including information about IP addresses, domain details, network services, mail servers, and network topology.

Proactive intelligence gathering provides invaluable insights, helping to sketch a detailed blueprint of the target’s environment. Armed with this information, the tester can devise an informed testing strategy that can effectively probe for vulnerabilities, setting the stage for the subsequent phases of the penetration testing process.

Tools used: nslookup, whois, theHarvester, whatweb

Open-source tools can be found on github, for example sherlock. The thing about open-source tools is, a lot of hit and trial will go on till you stumble upon a good tool.

2. Scanning

Next comes the Scanning stage. This phase involves an in-depth technical review of the target system. Automated tools like vulnerability scanners, network mappers, and others are used to understand how the target system responds to various intrusions.

Scanning enables testers to determine how the target application behaves under different conditions and to identify potential weak points that could be exploited. It maps out the system’s digital terrain, enabling the tester to spot possible points of ingress that an attacker might use.

In simple terms, we send TCP/UDP packets to the host to find open ports. 65535 is the highest number that can be used in internet protocols. So a host with no open ports is the highest secured.

Reconnaissance and Scanning are the most important steps when carrying out an ethical attack.

Starting this point, we need permissions to carry out the steps. So to learn more about Scanning, we will be installing a virtual machine named Metasploitable, I downloaded it from here. Once downloaded, we will need to set this as another Virtual Machine. This will be the Victim OS we talked about in our 2nd post of this series.

Then later we will be looking into the following steps as well, in upcoming blogs.

3. Vulnerability Assessment

Once the target system has been thoroughly scanned, the process proceeds to the Vulnerability Assessment stage. This phase is a careful analysis of the target system to identify potential points of exploitation.

Using a combination of automated tools and manual methodologies, the tester scrutinizes the security of the systems, identifying any potential loopholes. This methodical approach helps to ensure that no vulnerabilities are overlooked, providing a comprehensive assessment of the system’s security posture.

4. Exploitation

With the vulnerabilities identified, the tester moves on to the Exploitation stage. In this phase, the tester attempts to exploit the vulnerabilities to determine the level of risk they pose. This process involves using various tools and techniques to simulate real-world attacks, helping to assess the potential impact of a successful breach.

It is essential to approach this phase with caution, as uncontrolled exploitation could lead to system crashes or other unintended consequences.

5. Covering Tracks

The final stage, Covering Tracks, involves cleaning up any traces of the penetration testing process. This step is crucial to maintain the integrity of the system and to respect privacy regulations. It includes removing any malware or tools used during the testing process and restoring the system to its pre-testing state.

By following these five stages, ethical hackers can help organizations identify and address potential vulnerabilities, thereby enhancing their overall cybersecurity posture.

If you’re following along, we are rapidly proceeding to perform our first attack. Coming up soon. Stay Excited and, protected!

--

--

Bhavyansh @ DiversePixel
Bhavyansh @ DiversePixel

Written by Bhavyansh @ DiversePixel

Hey I write about Tech. Join me as I share my tech learnings and insights. 🚀

No responses yet