
Every organization has vulnerabilities. The real question is whether you find them first or an attacker does. Penetration testing answers that question by putting your systems under controlled, authorized attack, so you can see what a real adversary could reach and fix it before it matters.
This guide explains what penetration testing is, how it differs from vulnerability scanning and red teaming, the main types of penetration tests, how a typical engagement runs from scoping to retest, which standards professional testers follow and what to look for when choosing a provider.
Penetration testing (often shortened to pentest) is an authorized, simulated attack against a system, application or network, carried out to find and safely exploit security weaknesses. A penetration tester uses the same techniques as a real attacker, but within an agreed scope, with written permission and with the goal of helping the organization fix what they find.
The key word is exploit. A penetration test does not stop at listing potential issues. It proves which weaknesses are actually exploitable, shows how they can be chained together and demonstrates their business impact: which data could be read, which accounts could be taken over, which systems could be reached.
A penetration test typically answers questions such as:
The two are often confused, but they answer different questions. A vulnerability scan is automated and broad; a penetration test is manual, deep and focused on real-world impact.
Vulnerability scanning | Penetration testing | |
|---|---|---|
How it works | Automated tools compare systems against known vulnerability signatures | Skilled testers combine tools with manual analysis and exploitation |
What it finds | Known vulnerabilities and missing patches | Exploitable weaknesses, chained attack paths, business logic flaws |
False positives | Common | Findings are verified by exploitation |
Business logic and authorization flaws | Rarely detected | A core focus |
Typical frequency | Weekly or monthly | Annually and after significant changes |
Output | List of potential issues | Evidence-based report with impact and remediation |
The two complement each other. Regular scanning keeps known issues under control between tests; penetration testing finds what scanners cannot. For a deeper comparison, see our guide to vulnerability assessment vs penetration testing.
A penetration test tries to find as many exploitable weaknesses as possible within a defined scope and time frame. A red team engagement has a different goal: it simulates a specific, realistic adversary trying to reach a defined objective, such as access to payment systems, while staying undetected for as long as possible. Red teaming tests not only your vulnerabilities but also your detection and response capabilities. Most organizations start with penetration testing and move to red team exercises as their security program matures.
Security tools, policies and architecture diagrams describe how an environment should behave. A penetration test shows how it actually behaves under attack. The main benefits are:
Penetration tests are defined by the target. Most organizations need a combination of the types below, depending on what they build and run. You can find an overview of all our penetration testing services on our Offensive Security page.
External testing targets everything reachable from the internet: public IP ranges, VPN gateways, email and DNS services, remote access portals and exposed management interfaces. The question it answers is simple: can an outside attacker get in? See External Penetration Testing.
Internal testing assumes an attacker already has a foothold, for example through a phishing email or a compromised laptop. Testers look for weak internal services, credential exposure, Active Directory misconfigurations and paths to domain administrator. See Internal Network Penetration Testing.
Web application testing covers authentication, session management, access control, input handling and business logic, typically following the OWASP Web Security Testing Guide. Authorization flaws, where one user can access another user’s data, are among the most common and most damaging findings. See Web Application Penetration Testing.
APIs power mobile apps, single-page applications and partner integrations, and they expose business logic directly. API testing focuses on the OWASP API Security Top 10, including broken object level authorization, mass assignment and token weaknesses, for both REST and GraphQL. See API Security Testing.
Mobile testing examines iOS and Android applications and their back-end APIs: insecure local data storage, weak certificate validation, hardcoded secrets, reverse engineering risks and flaws in authentication flows, following the OWASP MASTG. See Mobile Application Penetration Testing.
Cloud testing targets AWS, Azure and Google Cloud environments, where most serious issues come from identity and configuration rather than software bugs: over-privileged IAM roles, public storage buckets, exposed secrets and privilege escalation paths across accounts. See Cloud Penetration Testing.
Container platforms introduce their own attack surface: over-privileged service accounts, privileged containers, missing network policies and weak admission control. Testing shows whether a compromised workload can take over the cluster. See Kubernetes Penetration Testing.
Wireless testing assesses Wi-Fi encryption and authentication, guest network isolation and the risk of rogue access points that could give an attacker a way into the internal network from the parking lot. See Wireless Network Testing.
People are often the easiest way in. Social engineering tests use controlled phishing campaigns, phone-based pretexting and sometimes physical access attempts to measure how employees respond and how quickly incidents are reported. See Social Engineering Testing.
Applications built on large language models face new risks such as prompt injection, sensitive data leakage and agents that can be manipulated into misusing their tools. Testing follows the OWASP Top 10 for LLM Applications. See AI & LLM Security Testing.
Modern software depends on CI/CD pipelines, package registries and third-party components. Supply chain testing looks for ways an attacker could tamper with builds, steal pipeline secrets or inject malicious dependencies. Our analysis of the supply chain attack on Trivy, KICS and LiteLLM shows why this matters. See Software Supply Chain Penetration Testing.
Besides the target, a penetration test is defined by how much information the testers receive in advance.
Approach | What testers know | Simulates | Strength | Limitation |
|---|---|---|---|---|
Black box | Only the target name or URL | An external attacker with no inside knowledge | Realistic outside view | Time spent on discovery, lower coverage |
Gray box | User accounts, basic documentation | An attacker with some access, or a malicious user | Best balance of realism and coverage | Requires test accounts and preparation |
White box | Source code, architecture, credentials | A well-informed insider, or a deep review | Maximum coverage and depth | Less representative of an outside attacker |
For most web, API and mobile applications, gray box testing gives the best value: testers receive accounts for each user role, so they can spend their time testing authorization and business logic instead of guessing how the application works. White box testing, often combined with a secure code review, is the most thorough option for critical applications.
Every provider has its own methodology, but professional engagements follow the same overall flow.
The engagement starts by agreeing on what will be tested and how: target systems and IP ranges, user roles, testing windows, out-of-scope systems, contacts for emergencies and how critical findings will be communicated. All of this is captured in a written authorization. Testing without it is not a penetration test; it is unauthorized access.
Testers gather information about the target: domains and subdomains, exposed services, technologies in use, employee information relevant to the scope, leaked credentials and public code repositories. Good reconnaissance often reveals forgotten assets that nobody knew were exposed.
Using automated tools and manual techniques, testers map open ports, services, application endpoints and user roles, and identify potential vulnerabilities. This is where a vulnerability scan would end.
Testers attempt to exploit the identified weaknesses in a controlled way to confirm they are real and to measure their impact: bypassing authentication, accessing other users’ data, executing code or extracting sensitive information. Exploitation is done carefully to avoid disrupting production systems.
Once initial access is achieved, testers examine how far an attacker could go: escalating privileges, moving to other systems, reaching sensitive data and testing whether segmentation and monitoring stop them. This step turns individual findings into a realistic attack path.
Findings are documented with evidence, risk ratings, business impact and clear remediation guidance, alongside an executive summary for leadership. Critical issues are usually reported immediately during testing rather than waiting for the final report.
The engagement is not finished when the report is delivered. After your team fixes the findings, testers verify the fixes and update the report. A retest confirms that vulnerabilities are actually closed and gives auditors and customers evidence of remediation.
Professional testers do not improvise. They follow recognized methodologies so that tests are consistent, repeatable and comparable over time:
When you evaluate a provider, ask which of these they follow and how they adapt them to your environment.
The report is what you are really paying for. A strong report is useful to two audiences: leadership, who need to understand risk, and engineers, who need to fix the issues. It should include:
Be cautious with reports that are mostly exported scanner output with a cover page. If a report has no evidence of manual exploitation and no attack narrative, it is a vulnerability scan, not a penetration test. For a detailed walkthrough, see what to expect in a penetration test report.
The common baseline is at least once a year and after every significant change. PCI DSS, for example, requires internal and external penetration testing at least every 12 months and after significant infrastructure or application changes, and ISO/IEC 27001 expects technical vulnerabilities to be managed through regular testing.
In practice, frequency should follow how fast your environment changes:
An annual test of an application that ships every week leaves long gaps. For those environments, combine periodic manual testing with DevSecOps practices that catch issues as code is written.
A well-prepared test produces better results in the same amount of time. Before testing starts:
The quality of a penetration test depends almost entirely on the people doing it. When comparing providers, look at:
Red flags: a very low fixed price with no scoping call, a promise to test everything in one or two days, a report delivered without any evidence of exploitation, or a provider unwilling to share who will perform the work.
Penetration testing shows you your organization the way an attacker sees it. Done well, it goes beyond a list of vulnerabilities: it proves what is exploitable, explains the business impact and gives your teams a clear path to fix the issues that matter most.
The most effective approach is to treat penetration testing as part of a continuous security program: test before launches and after major changes, fix and retest every finding, and combine manual testing with automated checks throughout development.
Ready to see what an attacker would find? Explore our penetration testing services or talk to our team to scope your first engagement. If you want your own engineers to learn these techniques, see our penetration testing training programs.

Subscribe to our cyber security newsletter