What is a Penetration Test (Pentest)?

lastmafia

Administrator
Staff member
Jun 4, 2024
5
0
1
A penetration test (Pentest) is conducted by companies and organizations to determine if their systems are secure by testing them from an attacker's perspective. Also known as a pentest or security test in the industry, penetration testing involves a simulation of an attack on the systems by experts in the field. During the penetration test, various attack methods are tried to infiltrate the system as a real attacker would.

The person or persons conducting the penetration test report the vulnerabilities they find, allowing the company to be aware of these vulnerabilities before actual attackers can exploit them. This way, companies become aware of the vulnerabilities in their systems and can close these security gaps.

Penetration Test (Pentest) Methods​

Black Box Pentest: In this type of test, the penetration tester is not given any information about the systems. The pentest is conducted with only publicly accessible information about the system, just like a real hacker.

White Box Pentest: In this test, the penetration tester is given full information about the systems used in the company. The aim here is to determine the potential damage that employees or an attacker who has infiltrated and observed the system for a while can cause to the company.

Grey Box Pentest: Grey box penetration testing is situated between white box and black box testing. The penetration tester is provided with the information and permissions that an unauthorized user would have.

Types of Penetration Tests​

  • Network Penetration Tests
    • Internal Network Penetration Test
    • External Network Penetration Test
  • Web Application Penetration Tests
  • Mobile Application Penetration Tests
  • Critical Infrastructure Systems Penetration Tests
  • DDoS and Load Testing
  • Wireless Network Penetration Test
  • VoIP Infrastructure Penetration Test
  • Social Engineering Penetration Test

Penetration Test (Pentest) Methodologies​

When conducting penetration tests, there are methodologies shared by some institutions and organizations that outline the steps to be followed. These methodologies are widely used by pentest experts.

  • OWASP (Open Web Application Security Project)
    • Web Security Testing Methodology
    • Mobile Application Security Testing Methodology
    • IoT Security Testing Methodology
  • OSSTM (The Open Source Security Testing Methodology)
  • ISSAF (Information Systems Security Assessment Framework)
  • NIST SP800-115
  • PTES (Penetration Testing Execution Standard)
  • FedRAMP

Penetration Test (Pentest) Steps​

There is a basic roadmap to follow when performing a pentest. The penetration testing process can be summarized in 7 basic steps:

  1. Scope DeterminationThe scope of the pentest is determined according to the agreement made between the company performing the penetration test and the organization. The type and number of systems to be tested are defined with the authorities of the institution where the test will be conducted.
  2. Information GatheringIn this phase, information about the target is collected. Pentest experts usually try to gather as much information as possible about the target systems. Specific methods are typically used in this phase. Tools like Social Media, Shodan, Nmap, Nessus, and Dig are used to gather information about the systems, and OSINT methods can be used to collect information about the company employees and the institution.
  3. Vulnerability ScanningIdentifying risks and vulnerabilities that could arise from these risks is a crucial step in ensuring information security. Vulnerability scanning involves detecting the vulnerabilities on the system. Misconfigurations of services running on the system or vulnerabilities in insecure applications can be examples. Tools like Nmap, Sqlmap, and Nikto are used in this phase.
  4. ExploitationIn this phase, the information gathered before the pentest and the vulnerabilities found are used to gain access to the system. The goal is to bypass security measures such as firewalls, intrusion detection, and prevention systems to access the resources on the system.
  5. Privilege EscalationThe aim in the privilege escalation phase is to gain control over a more privileged user account from the user account initially accessed. Various methods are applied in this step, such as identifying applications running on the target system, kernel versions, or user password hashes.
  6. Lateral MovementIn this phase, after gaining access to one user, attempts are made to compromise the accounts of other users on the network. Tests aimed at monitoring the network and reading data stored in specific databases holding session information of users are performed to capture other users.
  7. ReportingReporting is the final and most important phase of the penetration test (pentest). In this phase, the vulnerabilities found during the pentest and their solutions, the potential impact of the vulnerabilities, how the vulnerabilities can be exploited, distribution graphs of the vulnerabilities, and the attack methods used are presented to the institution receiving the service.