Skip to content
Offensive Security Glossary / Penetration Testing

Penetration Testing: Proving What an Attacker Could Actually Do

The definition, phases, types and outputs of a penetration test, and how it differs from vulnerability scanning and red teaming.

What Is Penetration Testing

Penetration testing is a security assessment, carried out with the owner's permission, in which testers use attacker techniques against a system, application or network to circumvent or defeat its security controls, in order to identify exploitable weaknesses and demonstrate their real impact. NIST defines it as a test methodology in which assessors, typically working under specific constraints, attempt to circumvent or defeat the security features of an information system.

The output that distinguishes a penetration test from other assessments is evidence. A finding should show that a weakness was exploited, what access or data it yielded, and how to reproduce it. That is what makes a pentest different from a vulnerability scan, which reports potential issues, and from a vulnerability assessment, which inventories and rates them.

The Four Phases (NIST SP 800-115)

PhaseActivities
PlanningScope, objectives, rules of engagement, authorization, test windows, contacts
DiscoveryReconnaissance, asset and service enumeration, vulnerability identification
AttackGaining access, escalating privileges, moving through the system, and looping back to discovery when new access reveals new targets
ReportingFindings with evidence, impact, reproduction steps and remediation guidance

NIST SP 800-115 describes the attack phase as iterative: each new level of access can expose new systems and information, which sends the tester back into discovery. This is how individual weaknesses become an attack path.

Types of Penetration Tests

TypeTarget
Web applicationAuthentication, authorization, input handling and business logic of web apps
APIREST, GraphQL and other APIs, mapped to the OWASP API Security Top 10
Network (external and internal)Internet-facing hosts and services; internal networks and Active Directory
CloudCloud configuration, identities and services
MobileMobile apps and their back-end APIs
LLM applicationPrompts, retrieval, tools and outputs of AI features
Social engineering and physicalPeople and premises, usually within red team engagements

Black Box, Gray Box and White Box

Tests also differ in how much the tester knows in advance: nothing (black box), credentials and some documentation (gray box), or full access to source and architecture (white box). Gray box is the most common for applications because it reaches authenticated functionality efficiently. See black box, gray box and white box testing.

Penetration Testing vs Related Activities

ActivityQuestion it answersOutput
Vulnerability scanningWhat known weaknesses might exist?Automated list of potential issues
Vulnerability assessmentWhat weaknesses exist and how severe are they?Prioritized inventory
Penetration testingWhat can an attacker actually exploit and reach?Exploited findings with evidence
Red teamingCan the organization detect and stop a realistic, objective-driven attack?Attack narrative and detection gaps
Bug bountyWhat can outside researchers find over time?Individual reports, paid per valid finding

How Often to Test

Many standards set an annual minimum. PCI DSS Requirement 11.4, for example, requires internal and external tests at least every 12 months and after significant changes. Applications that ship weekly change far faster than an annual test can track, which is why continuous penetration testing and automated penetration testing are used to cover the time between engagements.

What the Report Must Show

  • Scope, dates, methodology and any limitations.
  • Each finding with severity, affected asset, evidence of exploitation (proof of concept), business impact and reproduction steps.
  • Remediation guidance specific enough for engineers to act on.
  • Retest results confirming fixes.

See the penetration testing report example.

How FireCompass Performs Penetration Testing

FireCompass uses AI agents to run web application, API and external network penetration tests on demand or continuously, reporting findings with proof of exploit and reproducible steps. See AI penetration testing and the continuous automated pen testing page.

Sources and Standards

Frequently Asked Questions

What is penetration testing?

An authorized, simulated attack in which testers try to circumvent security controls to find exploitable weaknesses and demonstrate their impact with evidence.

What are the phases of a penetration test?

NIST SP 800-115 describes four: planning, discovery, attack and reporting, with the attack phase looping back to discovery as new access is gained.

What is the difference between a penetration test and a vulnerability scan?

A scan reports potential vulnerabilities automatically. A penetration test attempts to exploit them and shows what an attacker could actually access.

How often should penetration testing be done?

At least annually and after significant changes is a common compliance minimum. Organizations that release frequently add continuous or automated testing between engagements.

What is the difference between penetration testing and red teaming?

Penetration testing aims to find as many exploitable weaknesses as possible in a defined scope. Red teaming pursues a specific objective stealthily to test detection and response.

Further Reading

Reviewed against the primary sources cited on this page. Verified 2026-12-02.

Run a Penetration Test This Week, Not Next Quarter

Run a free AI pentest against your web app and API surface and get proof-of-exploit findings.

Free AI Pen Test

No credit card. Findings include reproducible steps and exploit code.

Firecompass ranked #1 AI on HackerOne. Read more →