Ethical Hacking and Penetration Testing process
Ethical Hacking and Penetration Testing process
Introduction to Ethical
Hacking and Penetration Testing
1.1 Overview of Ethical Hacking
Ethical hacking is the process of legally breaking into systems to find and fix
vulnerabilities, ensuring security compliance with laws like the Computer Fraud
and Abuse Act (CFAA) and GDPR, while adhering to a strict code of ethics.
Example: A security consultant is hired to test a company’s network for
weaknesses by simulating a cyberattack or a bug bounty hunter getting paid for
reporting security vulnerabilities to organization bug bounty programs.
Black Hat: Malicious hackers who exploit systems for personal gain.Example:
A hacker breaking into a bank's system to steal money.
Grey Hat: Hackers who sometimes violate laws but without malicious
intent.Example: A hacker discloses a vulnerability without permission but
doesn't exploit it.
White Box: The tester has full knowledge of the system.Example: Testing with
full access to source code and infrastructure.
Gray Box: The tester has limited knowledge, often from a user
perspective.Example: An employee-level attack simulation.
2. Information Gathering/Reconnaissance/Enumeration
Information gathering is an essential part of any assessment. Because
information, the knowledge gained from it, the conclusions we draw, and the
steps we take are based on the information available.
3. Vulnerability Assessment
The next stop on our journey is Vulnerability Assessment , where we use the
information found to identify potential weaknesses. We can use vulnerability
scanners that will scan the target systems for known vulnerabilities and
manual analysis where we try to look behind the scenes to discover where the
potential vulnerabilities might lie. CVE - Common vulnerabilities and Exposures
4. Exploitation
5. Post-Exploitation
In most cases, when we exploit certain services for our purposes to gain
access to the system, we usually do not obtain the highest possible privileges.
Because services are typically configured in a certain way "isolated" to stop
potential attackers, bypassing these restrictions is the next step we take in this
stage. However, it is not always easy to escalate the privileges. After gaining
in-depth knowledge about how these operating systems function, we must
adapt our techniques to the particular operating system and carefully study
how Linux Privilege Escalation and Windows Privilege Escalation work.
6. Lateral Movement
7. Proof-of-Concept
The Proof-Of-Concept ( POC ) is merely proof that a vulnerability found exists. As
soon as the administrators receive our report, they will try to confirm the
vulnerabilities found by reproducing them.
8. Post Engagement
to reach a specific end goal (i.e., accessing the CEO's email inbox or obtaining a
flag planted on a critical server).
Vulnerability analysis is a generic term that can include vulnerability or security
assessments and penetration tests. In contrast to a penetration test, vulnerability
or security assessments are performed using purely automated tools. Systems are
checked against known issues and security vulnerabilities by running scanning
tools like Nessus, Qualys, OpenVAS, and similar. In most cases, these automated
checks cannot adapt the attacks to the configurations of the target system. This is
why manual testing conducted by an experienced human tester is essential.
Installing Kali Linux: Kali Linux is a specialized operating system designed for
penetration testing with built-in security tools like Nmap and Metasploit.
Example: Kali Linux is used to run network scans and attempt system exploits
in a safe, controlled setting. It contains quite a lot tools which can be helpful
during our penetration testing journey.
Example: Using VirtualBox to run both a Windows machine as the target and
Kali Linux as the attacking machine.