Siber Security Step by Step: Penetration Tests and Objectives
Definition:
Penetration Testing or PenTest, is a security test that evaluates a computer system, network, or application from the perspective of a simulated attacker, aiming to identify security vulnerabilities.
Objectives:
- Detect potential security vulnerabilities.
- Evaluate the effectiveness of existing security measures.
- Test the resilience of systems, networks, and applications.
- Assess business continuity and sustainability.
Types:
Black-Box Testing
This testing process is a high-level process where the tester is not given any information about the inner workings of the application or service.
The tester acts as a regular user testing the functionality and interaction of the application or piece of software. This testing can involve interacting with the interface, i.e. buttons, and testing to see whether the intended result is returned. No knowledge of programming or understanding of the programme is necessary for this type of testing.
Black-Box testing significantly increases the amount of time spent during the information gathering and enumeration phase to understand the attack surface of the target.
Grey-Box Testing
This testing process is the most popular for things such as penetration testing. It is a combination of both black-box and white-box testing processes.The tester will have some limited knowledge of the internal components of the application or piece of software. Still, it will be interacting with the application as if it were a black-box scenario and then using their knowledge of the application to try and resolve issues as they find them.
With Grey-Box testing, the limited knowledge given saves time, and is often chosen for extremely well-hardened attack surfaces.
White-Box Testing
This testing process is a low-level process usually done by a software developer who knows programming and application logic. The tester will be testing the internal components of the application or piece of software and, for example, ensuring that specific functions work correctly and within a reasonable amount of time.
The tester will have full knowledge of the application and its expected behaviour and is much more time consuming than black-box testing. The full knowledge in a White-Box testing scenario provides a testing approach that guarantees the entire attack surface can be validated.
External to Internal PenTest:
- Starts from outside the organization and progresses towards internal systems, representing efforts to penetrate from the external world to inside systems.
Internal to External PenTest:
- Starts from within the organization and progresses towards external systems, representing efforts to penetrate from within an organization to external systems.
Application-Based PenTest:
- Targets an application, website, or similar software for testing. It is often conducted to assess the security of web applications.
Physical Security Test:
- Conducted to test security controls related to physical access. It includes areas such as building entrances, server rooms, and other physical spaces.
Social Engineering Test:
- Symbolizes the efforts of an attacker to manipulate people to obtain information. Methods may include phone calls, fake emails, and other manipulative approaches.
Stages:
- Information Gathering (Reconnaissance): The stage where information about the target is collected.
- Vulnerability Analysis (Scanning): The stage where the target is scanned, and security vulnerabilities are sought.
- Attack (Gaining Access): The stage where access to systems or networks is gained using discovered vulnerabilities.
- Persistence (Maintaining Access): The stage where persistence is established on accessed systems.
- Analysis and Reporting: The stage where test results are analyzed and reported.
Note: The term “Penetration Testing” and its associated concepts are widely used in the cybersecurity field. Some variations in terminology or interpretation may exist based on specific contexts or industry standards.
Internal Network Penetration Testing
Internal network penetration testing is a security assessment conducted to identify vulnerabilities within an organization’s internal network and evaluate how cyber attackers could potentially infiltrate internal systems and resources. Here are the general stages of the internal network penetration testing methodology:
Get Mert Turan’s stories in your inbox
Join Medium for free to get updates from this writer.
1. Information Gathering (Reconnaissance):
- The stage where general information about the target organization is collected.
- Information such as network infrastructure, IP addresses, domain names, employees, and technology usage is obtained.
- Social engineering techniques and open-source intelligence (OSINT) tools may be employed.
2. Network Scanning (Scanning):
- The organization’s internal network is scanned using scanning tools.
- Open ports, services, and employed security devices are identified.
- Tools like Nmap, Nessus, and others may be utilized.
3. Vulnerability Analysis:
- Security vulnerabilities in scanned systems are identified.
- Automatic and manual vulnerability scanning tools are used.
- Open-source or commercial vulnerability databases are referenced.
4. Exploitation:
- Attempting to gain unauthorized access to systems using the identified vulnerabilities.
- Tools like Metasploit, ExploitDB, and others may be employed.
- Malicious payloads controlled by the attacker can be used to gain access to target systems.
5. Lateral Movement:
- Moving within the network, transitioning from one system to another.
- Involves elevating access levels and attempting to infiltrate more critical systems.
6. Privilege Escalation:
- Searching for vulnerabilities to escalate obtained privileges.
- Investigating and leveraging specific vulnerabilities for Linux or Windows.
7. Persistence:
- Establishing continuous access to systems by leaving backdoors or malicious software.
- Malicious software like rootkits, trojans, etc., may be used.
8. Data Collection and Analysis (Data Exfiltration):
- Collecting and extracting sensitive data from systems.
- Employing data exfiltration methods.
9. Reporting:
- Presenting detailed results of the conducted test in a comprehensive report.
- Severity, impacts, and recommended remediation measures for vulnerabilities and findings are outlined in the report.
External Network Penetration Testing
External Network Penetration Testing is a security test conducted to identify vulnerabilities in an organization’s external network infrastructure, typically accessible over the internet, and evaluate how cyber attackers might infiltrate this network. Here are the general stages of the external network penetration testing methodology:
Information Gathering (Reconnaissance):
- This phase involves collecting general information about the target organization.
- Information such as domain names, IP addresses, employees, infrastructure details, and technology usage is gathered.
- Social engineering techniques and open-source intelligence (OSINT) tools may be utilized.
Network Scanning (Scanning):
- The organization’s external network is scanned using scanning tools.
- Open ports, services, and employed security devices are identified.
- Tools like Nmap, Nessus, or similar applications may be employed.
Target Analysis (Target Analysis):
- More detailed analysis is performed on the identified targets.
- Security vulnerabilities in target systems and potential attack points are assessed.
Vulnerability Analysis (Vulnerability Analysis):
- Security vulnerabilities in the scanned systems are identified.
- Open-source or commercial vulnerability databases may be referenced.
Exploitation:
- Attempts are made to gain access to systems or networks by exploiting identified vulnerabilities.
- Tools like Metasploit, ExploitDB, or similar applications may be used.
- Malicious software (payloads) under the attacker’s control may be utilized to gain access.
Lateral Movement:
- Movement within the system is executed, transitioning from one system to another.
- Includes attempts to elevate access levels and infiltrate more critical systems.
Privilege Escalation:
- Searches for vulnerabilities to escalate obtained privileges.
- Investigates and utilizes specific vulnerabilities for Linux or Windows systems.
Persistence of Access:
- Malicious backdoors or software are left to ensure continuous access to systems.
- Utilizes rootkits, trojans, or similar malicious software.
Data Collection and Analysis (Data Exfiltration):
- Involves collecting and extracting sensitive data from systems.
- Utilizes data exfiltration methods.
Reporting:
- Results of the conducted test are presented in a detailed report.
- The severity, impacts, and recommended corrective measures for identified vulnerabilities and findings are explained in the report.
External network penetration tests evaluate how resilient an organization is against external attacks and assess the effectiveness of security measures. Such tests assist organizations in strengthening their cybersecurity and proactively addressing potential vulnerabilities.








