Incident Response & Forensics

Penetration Testing

About 4 min read

What Is Penetration Testing

Penetration testing (pen testing) is a practical security assessment method that attempts to infiltrate systems and networks using the same techniques as real attackers to discover security weaknesses.

The purpose of penetration testing is to identify actual attack paths that cannot be found through theoretical assessments, and to verify how effective an organization's security measures are against real attacks. It demonstrates how individual vulnerabilities detected through vulnerability management can chain together to lead to a breach.

The scope of testing spans web applications, network infrastructure, mobile apps, cloud environments, physical security, and social engineering. The test targets and scope must be clearly agreed upon and defined in writing beforehand.

Test Types and Execution Process

Penetration tests are classified into three types based on the amount of prior information given to the tester.

Black Box Testing: No prior information is given to the tester, who attempts infiltration under the same conditions as an external attacker. This is closest to a real attack scenario but requires more time and cost.

White Box Testing: Internal information such as source code, network diagrams, and credentials is provided to the tester. This enables efficient discovery of deep vulnerabilities but weakens the external attacker's perspective.

Gray Box Testing: An intermediate approach where limited information (such as a regular user account) is provided.

PTES (Penetration Testing Execution Standard) divides the execution process into seven sections: (1) pre-engagement interactions (including scope definition), (2) intelligence gathering (reconnaissance), (3) threat modeling, (4) vulnerability analysis, (5) exploitation, (6) post exploitation (such as privilege escalation and lateral movement), and (7) reporting.

Key Attack Techniques and Commonly Found Vulnerabilities

Here are representative attack techniques used in penetration testing and the vulnerabilities they examine.

Web Applications: Major attack targets include Cross-Site Scripting (XSS), SQL Injection, authentication and authorization flaws, CSRF, SSRF, and insecure deserialization. One reference is the OWASP Top 10, an awareness document on the most critical security risks to web applications.

Network: Tests verify unnecessary open ports, use of outdated protocols, default credentials left unchanged, unencrypted communications, and network segmentation deficiencies.

Authentication and Authorization: Tests verify weak password policies, lack of multi-factor authentication, privilege escalation possibilities, and session management flaws.

Social Engineering: Techniques that exploit human psychological weaknesses, such as sending phishing emails, phone-based information extraction, and physical intrusion testing. These make visible the threats that technical measures alone cannot prevent.

Beyond unknown flaws of the kind used in zero-day attacks, combinations of known vulnerabilities can also reveal unexpected attack paths.

Leveraging Test Results and Practical Considerations

A penetration testing report includes a list of discovered vulnerabilities, risk assessments (CVSS scores, etc.), detailed attack paths, reproduction steps, and recommended countermeasures.

What you do after receiving the report is important. Prioritize discovered vulnerabilities by severity and develop a remediation plan. After remediation, conduct a retest to confirm that vulnerabilities have been definitively resolved.

Practical considerations:

  • Clearly agree on the test scope and prohibited actions in writing. Attacking systems outside the scope can lead to legal issues
  • When testing in production environments, consider the risk of service disruption and conduct tests during low-impact time windows
  • In cloud environments, review the cloud provider's penetration testing policy in advance (as of October 2026, AWS does not require prior approval for its listed permitted services, but prohibits certain activities such as DoS)
  • Including WAF effectiveness verification in the test scope helps confirm the actual effectiveness of defenses

Plan tests on a regular schedule and also consider testing after major system changes.

To learn more about this topic, see API Security Basics: Protecting the Backend of Web Services.

Common Misconceptions

Vulnerability scanning and penetration testing are the same thing
Vulnerability scanning uses automated tools to comprehensively scan for known vulnerabilities, efficiently covering a wide range. Penetration testing involves human testers who actually attempt infiltration, demonstrating vulnerability chains and attack paths. The two are complementary: scan broadly with vulnerability scanning and verify deeply with penetration testing.
If a system passes a penetration test, it is secure
Penetration tests are conducted within limited time and scope, so they cannot discover all vulnerabilities. They are merely a snapshot of the security state at the time of testing, and new vulnerabilities are discovered daily. Continuous vulnerability management and regular repeated testing are necessary.

Penetration Testing vs. Vulnerability Scanning

Penetration Testing

Human testers actually attempt infiltration. Demonstrates vulnerability chains and attack paths. Enables deep analysis but requires more time and cost.

Vulnerability Scanning

Automated tools comprehensively detect known vulnerabilities. Efficiently covers a wide range. Requires review of false positives. Suitable for regular monthly or quarterly execution.

Share

Related Terms

Related Articles