The penetration testing process is a structured sequence of phases that takes a test from an initial agreement to a final report, and following it is what separates a professional test from a random attempt to break in. The best-known structure is the Penetration Testing Execution Standard, or PTES, which defines seven phases: Pre-engagement Interactions, Intelligence Gathering, Threat Modelling, Vulnerability Analysis, Exploitation, Post Exploitation, and Reporting. This guide explains each phase, what happens in it, and what a good outcome looks like.
Structure matters because a pen test is not just technical work. It involves legal permission, agreed limits, sensitive data and real systems, and a process keeps all of that under control. It also makes results repeatable, so a test run this year can be compared with one run next year.
NIST SP 800-115, a widely used guide to penetration testing, describes the same work in four broader stages: planning, discovery, attack and reporting. The PTES phases fit neatly inside those stages, and the two frameworks agree on the essentials.
Key takeaways
- PTES defines seven phases: pre-engagement, intelligence gathering, threat modelling, vulnerability analysis, exploitation, post exploitation and reporting.
- Pre-engagement sets the legal basis, scope and rules before any testing begins.
- Threat modelling decides which attack paths are worth pursuing, so testing time is spent on the most likely risks.
- Exploitation proves a flaw is real, and post exploitation shows what an attacker could do next.
- Reporting turns technical findings into prioritised, actionable fixes with evidence.
Phase 1: Pre-engagement Interactions
Pre-engagement is the phase that happens before any testing, and it is the most important one to get right. The testers and the organisation agree the scope, which systems are in bounds and which are off limits, and the rules of engagement, which set out what the testers may and may not do. Dangerous actions, such as denial-of-service attacks or testing production databases, are usually excluded.
This phase also establishes the legal basis. The organisation gives written authorisation, the testers confirm they will stay within scope, and both sides agree how sensitive data will be handled. A test without this paperwork is not a pen test, and in most jurisdictions it is a crime.
Practical details are agreed here too: the schedule, the contacts on both sides, how the testers will identify themselves if challenged, and what happens if they find something critical. A critical finding should be reported immediately, not saved for the final report, and the process for doing that is agreed in advance.
Best for: any engagement, because a test that starts without agreed scope and authorisation is a liability rather than a service.
Phase 2: Intelligence Gathering
Intelligence gathering is the process of collecting information about the target, using public sources and, where permitted, direct probing. Testers look for domain names, IP addresses, employee details, technologies in use and anything else that describes the target’s footprint. Much of this information is public, which is itself a useful finding: organisations are often surprised by how much an attacker can learn without touching their systems.
The phase has two parts. Passive gathering uses only public sources, such as search engines, public records and social media, and leaves no trace on the target. Active gathering interacts with the target, for example by scanning ports or querying DNS, and is more revealing but also more visible.
Good intelligence gathering shapes everything that follows. Knowing which technologies a target uses tells the tester which vulnerabilities to look for, and knowing the organisation’s structure suggests which people and systems an attacker would target first. Testers who skip this phase waste time probing blind.
Phase 3: Threat Modelling
Threat modelling turns information into a plan. The testers ask which attackers are most likely, what they would want, and which paths they would take to get it. A financially motivated criminal, a disgruntled insider and a state-backed actor have different goals and different methods, and the test should reflect the threats that matter most to the organisation.
The output is a set of attack scenarios, ranked by likelihood and impact. For a retailer, the obvious scenario might be stealing customer payment data through the web application. For a manufacturer, it might be disrupting production systems. Each scenario becomes a thread that the testers will pursue in the later phases.
This phase also decides where not to spend time. A test has limited hours, and threat modelling is how those hours are allocated to the highest-value targets. Without it, testers may spend days on a low-value system while the critical one goes untested. Our guide to enterprise AI security shows how the same risk-first thinking applies to AI systems.
Phase 4: Vulnerability Analysis
Vulnerability analysis is where weaknesses are identified, using a mix of automated scanning and manual review. Scanners check for known flaws in software versions, configurations and services, while manual analysis looks for the problems scanners miss, such as broken access control, flawed business logic and misconfigurations that only make sense in context.
Findings at this stage are unproven. A scanner may report a vulnerability that does not apply to this system, or one that cannot be exploited because of another control. The testers triage the list, checking which findings are real and which are false positives, and ranking the rest by likely impact.
This phase also involves research. When a tester finds an unusual service or a custom application, they study how it works and where its weaknesses might lie. The analysis phase ends with a shortlist of vulnerabilities worth attempting to exploit, ordered by the threat model from the previous phase.
Best for: teams that want a clear picture of their weaknesses before any exploitation begins, including false positives filtered out.

Phase 5: Exploitation
Exploitation is the phase most people picture when they think of penetration testing: the tester attempts to use a vulnerability to gain access. The goal is to prove that the flaw is real and to show what it enables, whether that is reading data, running commands or taking control of a system.
Exploitation is done carefully and within the agreed rules. Testers use the least intrusive method that proves the point, and they stop if an action risks damaging a system. They record every step, including the exact commands and the evidence of success, so the organisation can reproduce the finding and verify the fix later.
Not every vulnerability can be exploited, and a failed attempt is itself useful information. It may mean the flaw is not reachable, or that another control blocks it. Testers document the attempt either way, because the organisation needs to know which flaws are genuinely dangerous and which are only theoretical.
Phase 6: Post Exploitation
Post exploitation asks what an attacker could do after the first break-in, and it is often the most revealing phase of the test. A single compromised account or system is rarely the end of the story. The tester explores how far they can move, what other systems they can reach, and what sensitive data they can access from the position they have gained.
This is where weak internal controls show up. If a tester who compromises one workstation can reach the finance database, the backup server and the domain controller, the problem is not the initial flaw alone, but the lack of segmentation and monitoring inside the network. These findings change the conversation from fixing one vulnerability to fixing an architecture.
Testers also look at persistence, asking whether an attacker could stay hidden in the environment, and at data exfiltration, asking whether sensitive information could leave unnoticed. Both are realistic attacker goals, and both are often achievable in organisations that focus only on keeping attackers out. Our practical AI incident response playbook explains what happens when such access goes undetected.
Phase 7: Reporting
Reporting turns the test into something the organisation can act on. A good report opens with an executive summary in plain language, stating the overall risk, the most serious findings and the recommended priorities. It then gives the technical detail for each finding: what the flaw is, how it was exploited, what it enables, and how to fix it.
Severity ratings should reflect real risk, not just a scanner’s score. A flaw that gives access to customer data matters more than a technically severe flaw in a system nobody can reach, and the report should explain the reasoning. Evidence matters too: screenshots, logs and the steps to reproduce each finding let the team verify the fix.
Remediation advice should be specific and prioritised, with the most urgent fixes first. The report should also record the scope, the methods used and the limitations of the test, so nobody mistakes a clean result for proof of security. A follow-up retest, usually a few weeks after fixes are applied, closes the loop and confirms that the remediation worked.
The seven phases at a glance
| Phase | Main activity | Key output |
|---|---|---|
| 1. Pre-engagement | Scope, rules, authorisation | Signed agreement |
| 2. Intelligence Gathering | Public and active research | Target footprint |
| 3. Threat Modelling | Attacker goals and paths | Ranked scenarios |
| 4. Vulnerability Analysis | Scanning and manual review | Shortlist of real flaws |
| 5. Exploitation | Proving flaws are usable | Evidence of access |
| 6. Post Exploitation | Lateral movement, data access | Full impact picture |
| 7. Reporting | Findings and fixes | Prioritised report |
The table is a useful check during a test. If a phase is skipped, the test loses something: without threat modelling it loses focus, without post exploitation it loses the impact picture, and without reporting it loses the fixes. Our guide to AI production runbooks shows how the same discipline helps when incidents happen for real.
Running a test well: a checklist
- Agree scope, rules and authorisation in writing before any testing begins.
- Insist on a clear process, such as PTES, and ask the testers to follow it.
- Brief your monitoring team so the test is detected and handled correctly.
- Agree how critical findings will be reported during the test, not only at the end.
- Make sure the report includes evidence and reproduction steps for every finding.
- Fix findings in priority order and schedule a retest to confirm the fixes.
- Feed the lessons into training, configuration and development practices.
Frequently asked questions
How long does each phase take?
It depends on scope. Pre-engagement usually takes days, intelligence gathering and threat modelling a few days each, and exploitation and post exploitation the largest share of the test. Reporting typically takes several days after testing ends.
Do all penetration tests follow PTES?
No. PTES is a widely used standard, but some testers follow NIST SP 800-115, the OWASP testing guide, or their own methodology. What matters is that the test follows a clear, documented process.
What is the difference between vulnerability analysis and exploitation?
Vulnerability analysis identifies weaknesses that might be exploitable, while exploitation attempts to use them. Analysis produces a shortlist; exploitation proves which items on it are real.
Why does post exploitation matter?
Because the first break-in is rarely the attacker’s goal. Post exploitation shows how far an attacker could move, what data they could reach, and whether they could stay hidden, which is the true measure of the risk.
What should I do if a test finds a critical flaw?
Act immediately. Critical findings should be reported during the test, and the affected system should be isolated or patched as soon as possible, rather than waiting for the final report.
How do I choose a penetration testing provider?
Ask for sample reports, check experience with your technology stack, and confirm they follow a recognised methodology such as PTES. The quality of the sample report is the best guide to the quality of the work.







