Lesson 03 of 5
The 5 Phases of Ethical Hacking Explained (Recon to Reporting)
3 min read
Reconnaissance, scanning, gaining access, maintaining access and reporting: what each phase means and which tools fit where.
Every professional security test follows a structured process. It keeps the work organised, makes sure nothing is missed, and makes the results repeatable. Most courses, including CEH, describe it as five phases.
Phase 1: Reconnaissance (information gathering)
The goal is to learn as much as possible about the target before touching it. There are two kinds:
- Passive recon – using public information only, without sending anything to the target. For example, the company website, job ads (which often name the technology used), social media, DNS records and search engines.
- Active recon – interacting with the target directly, for example looking up its DNS servers.
Some everyday recon commands you can run on your own domain:
whois yourdomain.com
nslookup yourdomain.com
dig yourdomain.com MX
Defenders do recon too: knowing what information about your company is public is the first step to reducing it.
Phase 2: Scanning and enumeration
Now you map the target's attack surface: which hosts are alive, which ports are open, and which software and versions are running. Nmap is the main tool here. Our free Nmap course covers it from basic to advanced. Web servers are often checked with tools like Nikto, and web apps are explored with Burp Suite.
Enumeration means digging deeper into each service: listing shares, users, web directories and versions. The output of this phase is a list of possible weaknesses.
Phase 3: Gaining access
Here the tester checks whether a weakness can actually be used to get in, for example an outdated service with a known vulnerability, a weak default password, or a web app bug. Frameworks like Metasploit contain tested modules for known vulnerabilities, which is why they appear in almost every pentest course.
This phase only ever happens inside the agreed scope. In your own lab, Metasploitable 2 is built for exactly this, and platforms like TryHackMe walk you through it step by step with full guidance.
Phase 4: Maintaining access and privilege escalation
Once inside, a real attacker tries to stay in and get more power. An ethical hacker checks how far an attacker could go, so the business understands the real impact:
- Privilege escalation – going from a normal user to administrator or root
- Lateral movement – reaching other machines from the first one
- Persistence – whether access would survive a reboot
In a real test, anything installed here is documented and removed afterwards.
Phase 5: Reporting (and clean-up)
Attackers end with covering tracks, deleting logs so nobody notices. Ethical hackers do the opposite. They clean up anything they added and write a clear report, because the whole point of the test is to get the problems fixed. Lesson 5 covers how to write one.
Simple words mein (Hinglish)
Ethical hacking ke 5 phases: Reconnaissance (target ke baare mein public info jama karna), Scanning (Nmap se open ports aur services dhundhna), Gaining access (check karna ki kamzori se andar ja sakte hain ya nahi), Maintaining access (andar aakar kitna nuksaan ho sakta hai) aur Reporting (saaf report jisse problems fix ho saken). Ye sab sirf permission aur scope ke andar hi hota hai.
FAQ
What are the 5 phases of ethical hacking? Reconnaissance, scanning, gaining access, maintaining access, and covering tracks for attackers or reporting for ethical hackers.
What is the difference between passive and active reconnaissance? Passive recon uses only public information without contacting the target. Active recon interacts with the target directly.
Which phase takes the most time? Usually recon and enumeration. The better you understand the target, the easier everything else becomes.
Practice task
- Run whois and dig on a domain you own, or on your own college or company with permission
- Run a full Nmap service scan on your Metasploitable 2 VM and list every service and version
- Complete a beginner "walkthrough" room on TryHackMe and note which phase each step belongs to
Next lesson: vulnerabilities, CVEs and risk, and how ethical hackers think about them.