Penetration testing steps: The 8-step process, step by step

Contents
The penetration testing steps run in a fixed order because each one produces the artifact the next one needs: signed rules of engagement, an attack surface inventory, ranked attack scenarios, validated findings, proof of concept evidence and finally a report.
Skip an artifact and the test drifts out of scope, chases tool output, or ends with a report nobody can act on.
Black, gray or white box changes depth, not order.
What are the eight penetration testing steps?
The eight penetration testing steps, in order, are pre-engagement interactions, intelligence gathering, scanning, threat modeling, vulnerability analysis, exploitation, post-exploitation, and reporting. Each step takes the previous step's output as its input.
A test that skips one usually ends with findings nobody can rank, reproduce, or trace to a business asset.
Penetration testing goes wrong earliest when the rules of engagement are vague, and again when threat modeling is skipped and effort follows whatever the scanner flags. We recommend signing the rules of engagement before any traffic is sent, because every later step inherits its limits from that document.
Netguru designs, builds and secures web and mobile products, and advises engineering teams on cybersecurity strategy and penetration testing.
The Penetration Testing Execution Standard (PTES) defines seven phases and has no separate scanning phase. We split scanning out because it is a distinct activity with its own output. NIST SP 800-115 groups the work into four phases. The eight steps side by side:
| Step | Goal | Output |
|---|---|---|
| 1. Pre-engagement interactions | Agree scope, rules of engagement and authorization | Signed scope and rules of engagement |
| 2. Intelligence gathering | Map the attack surface through passive OSINT and active probing | Asset and exposure inventory |
| 3. Scanning | Find live hosts, open ports and services, typically with Nmap | Raw scan results |
| 4. Threat modeling | Rank assets and attack paths by business risk | Prioritized attack scenarios |
| 5. Vulnerability analysis | Validate scan results and remove false positives | Validated findings |
| 6. Exploitation | Prove exploitability under agreed stop conditions | Proof of concept per finding |
| 7. Post-exploitation | Show business impact, then remove tester accounts and artifacts | Impact evidence and a cleanup record |
| 8. Reporting | Communicate findings with asset context | Report with ranked, actionable remediation |
The circular diagram below shows the same eight steps as a loop, because a retest after remediation feeds back into scoping.

Pre-engagement interactions: Scope, rules of engagement, authorization
Pre-engagement interactions produce one artifact you should demand before anything else: signed rules of engagement that fix scope, testing windows, contacts, and stop conditions before any scanning starts.

This step takes your business goals and an asset list and produces that signed document, plus written authorization from whoever owns each target. NDAs and an MSA usually sit alongside it.
A usable rules of engagement document names:
- Attack surface in scope: IP ranges, hostnames, DNS zones, applications, APIs, and cloud accounts.
- Exclusions: including third-party and hosted systems you cannot authorize.
- Permitted techniques: social engineering, physical access, denial-of-service, and how far exploitation may go.
- Operations: testing windows, named emergency contacts on both sides, and stop conditions such as service degradation or exposure of real customer data.
- Evidence handling: how findings, screenshots, and captured data are stored and destroyed.
Vague scope is the usual failure. "Test our web app" leaves testers guessing whether the API, the admin subdomain, or shared hosting counts, and that guessing starts scope drift and production disruption. The risk is highest when scope is very limited or includes production systems. An early sign is a scope sheet that lists application names but no hostnames or ranges.
Narrow scope fails differently. It produces a clean report on one slice of the estate and a false picture of overall security. We recommend scoping as much of the attack surface as the budget allows, with separate agreed windows for production-sensitive parts.
Decide too whether offline routes are in scope. Testers can reach targets through documents found in the trash, onsite reconnaissance, and inspection of security equipment.
Intelligence gathering: Passive OSINT versus active probing
Intelligence gathering splits into passive OSINT, which never touches the target's systems, and active probing, which does and therefore needs the authorization signed during pre-engagement. The step produces an attack surface inventory that scanning consumes.
The three routes side by side:
| Route | What testers collect | Touches the target? |
|---|---|---|
| Passive OSINT | Employee roles, job posts that reveal the tech stack, public code repositories, certificate transparency logs, archived pages, credentials exposed in past breaches | No |
| Active probing | DNS enumeration of subdomains and mail servers, service identification, web application mapping | Yes, and it shows up in the target's logs |
| Offline | Discarded documents, onsite walk-throughs, inspection of badge readers and other security equipment | Physically, so it needs explicit written permission |
Onsite work needs its own line in the rules of engagement. The building owner may not be the client.
The handoff artifact is the attack surface inventory: every domain, subdomain, IP range, third-party service, and person-linked exposure found, each tagged with its source, a confidence level, and an in-scope check against the signed scope. Anything out of scope goes back to the client and stays untested until its owner authorizes it.
The mistake that ruins this step is treating it as a formality. Testers who skip to scanning with the client's asset list inherit its gaps, and forgotten staging hosts and acquired-company domains are where those gaps tend to sit.
A vague scope also invites active probing of systems nobody meant to include, which disrupts day-to-day operations.
Scanning: What it does and how it differs from a pentest
Scanning turns the attack surface inventory into a map of live hosts, open ports and running services, using port scanning and service fingerprinting, typically with Nmap.
Port scanning in a penetration test means probing target addresses to see which ports respond, then fingerprinting the service and version behind each one. Nmap maps exposure. It does not assess vulnerabilities: an open port running an outdated SSH daemon is a lead for the next step, not a finding.
We recommend keeping scanning separate from vulnerability analysis, so testers and the client can check the host and service map against scope before anyone judges risk. PTES places port scanning inside intelligence gathering, and NIST SP 800-115 places port and service identification inside its discovery phase.
A vulnerability scan matches services against known weaknesses automatically and stops at a list. A pentest adds tester judgment: validating which findings are real, chaining them, and attempting exploitation within the rules of engagement. The scan is one input to a pentest and does not replace it.
Two failure modes show up at this step:
- Scans outside the agreed window. Scoping that left hours or address ranges vague leads to testing the wrong systems at the wrong time.
- Intensity that disrupts production. Aggressive timing can overload fragile devices such as legacy network gear or small appliances.
Both trace back to pre-engagement. Write permitted hours, ranges and rate limits into the rules of engagement, and start with low-intensity scans of a narrow range. Teams without in-house testers can get this scoped through our cybersecurity services.
Threat modeling: Why it gets its own step
Threat modeling is the step where testers rank attack paths across the attack surface by business impact and reachability, so testing effort follows risk.
It sits between scanning and vulnerability analysis because it needs both of their inputs: the asset list agreed at pre-engagement and the map of live services.
PTES also treats threat modeling as a separate phase. The step produces a short, ranked list of attack paths with a stated reason for each, which becomes the test plan for the steps that follow.
The decision rule we recommend scores each path on two questions. How much would the business lose if this asset were compromised? How many steps and what level of access does an attacker need to reach it from the starting position the rules of engagement define?
| Impact | Reachability | Testing effort |
|---|---|---|
| High | High | Test first, manually, in depth |
| High | Low | Targeted attempts on the most plausible routes |
| Low | High | Quick confirmation, no deep work |
| Low | Low | Note and park |
STRIDE gives a vocabulary for what could go wrong at each component. The MITRE ATT&CK enterprise matrix gives a shared vocabulary for how an adversary would move, which helps you check whether testers are covering realistic behavior. Both label paths without ranking them.
When this step is skipped, effort follows tool output. Testers spend days on the hosts with the most scanner findings, such as an unpatched marketing site, while the path from a compromised support account to the billing admin panel goes untested. An early sign is a report whose findings group by host and not by asset value.
On a single web application with one trust boundary, the model can fit on one page. On a multi-network estate it deserves a workshop with the asset owners.
Vulnerability analysis: From scan results to validated findings
Vulnerability analysis turns raw scan results into validated findings through CVE matching, false positive validation, and CVSS severity scoring.
The inputs are the Nmap service and version inventory from scanning and the ranked attack paths from threat modeling. Testers match each version string against NVD entries, then confirm the match by hand.
Version matching alone misfires, for example when a distribution has backported a patch without changing the version number.
For web targets, the work follows the OWASP Web Security Testing Guide and maps onto steps 3 to 6 like this:
- Scanning: Burp Suite proxies the tester's browser, with its target scope limited to the in-scope hostnames from the rules of engagement. Third-party APIs and analytics domains stay out.
- Threat modeling: the tester picks the functions worth the effort, usually authentication, session handling, access control, and payment flows.
- Vulnerability analysis: the tester works through the WSTG test cases for those functions and replays each scanner hit as a manual request to see whether it holds.
- Exploitation: a minimal proof of concept shows real impact on the confirmed items only.
Authenticated testing needs test accounts agreed at pre-engagement. Without them, this step covers only the login page.
Each validated finding is then scored with CVSS v4.0. The base score rates technical severity, not risk to your business, so we recommend adding the threat and environmental metrics before ranking the fix queue.
The failure mode is pasting scanner output into the report. Unvalidated false positives cost your engineers triage time and make the real findings easier to dismiss. An early sign is a finding with no request, response, or screenshot attached.
The step's output should be a short list in which every item has evidence, a CVSS vector, and an affected asset.
Exploitation: Controlled proof under stop conditions
Exploitation is the penetration testing step where testers use validated findings to gain access, and it stops at the first convincing proof, under stop conditions agreed beforehand.
Testers work from the findings that survived vulnerability analysis. For network services they typically use a framework such as Metasploit, and for web applications they work by hand in Burp Suite.
Good proof of concept evidence is small and reproducible: the affected asset, a timestamp, the action taken, and a screenshot or output showing the access gained. It supports the severity score of each finding in the report.
We suggest writing these stop conditions into the rules of engagement:
- Latency spikes, error bursts or a crashed service on a production host halt testing and trigger a call to the named contact.
- An exploit that would touch an out-of-scope or third-party-hosted asset is skipped.
- Real customer data is recorded as reachable, never copied beyond a minimal sample.
- Exploit classes with a known crash risk on legacy hosts need written approval first.
The usual failure is exploiting past scope or without stop conditions on a live system. An early sign is a tester who cannot say which asset an exploit touched.
Experienced testers keep this controlled when scope is narrow or includes production. They also bring industry knowledge from other engagements, which helps them judge which exploits are safe on a given system.
A narrow scope has its own risk: it can give a false picture of overall security. Where production cannot be tested, use a faithful staging replica, and have the report say so, since staging rarely matches production exactly.
Teams that want security checks built into the delivery pipeline between tests can draw on DevSecOps consulting services.
Post-exploitation: Showing real business impact
Post-exploitation is the penetration testing step that shows what a foothold is worth to the business: what an attacker could reach, change or extract from the access exploitation produced. Testers use privilege escalation and lateral movement to answer that, inside the limits set in the rules of engagement.
A shell on one web server is a finding. The same access reaching a customer database, a CI/CD secrets store or a payment admin panel is a business risk. Stopping at the first foothold hides that difference, and the report becomes a list of technical issues nobody can rank.
At planning level, testers do three things:
- Check what the compromised account can do and whether its privileges can be raised.
- Map which neighboring systems and trust relationships the host exposes.
- Locate the data the business cares about and prove access with minimal evidence, such as a masked record or a screenshot, never a bulk copy.
PTES treats this as its own phase. NIST SP 800-115 folds it into the attack phase, where new access can send testers back to discovery. We recommend agreeing the high-value targets before the test starts, because lateral movement toward production-adjacent or third-party systems needs explicit authorization.
The second failure mode is what testers leave behind. Forgotten tester accounts, keys and implants become real attack surface. Use this cleanup checklist:
- Remove every account, token, API key and SSH key the testers created.
- Delete uploaded files, tools, scheduled tasks and persistence mechanisms.
- Revert changed configurations, permissions, group memberships and test data.
- Keep a timestamped log of each artifact placed and removed, so the client can verify it.
- Transfer evidence securely and delete tester-side copies under the agreed retention terms.
The output is a demonstrated attack path with a stated impact, which the reporting step turns into prioritized findings.
Reporting: What a penetration test report should contain
A penetration test report should let an engineer reproduce every finding and let an executive see which risk to fix first. Use the table below to judge a vendor's sample report before you sign.
| Report section | What it should contain | Reject it if |
|---|---|---|
| Engagement details | Start date, estimated duration, contact persons, scope and rules of engagement | No dates or named contacts, so you cannot match test traffic to your logs |
| Executive summary | Business impact in plain language, the top risks, the attack paths that mattered | It restates scanner totals with no narrative |
| Methodology | Frameworks followed (PTES, NIST SP 800-115, OWASP Web Security Testing Guide), tools used, a log of what was touched and when | It says "industry-standard methods" and nothing more |
| Findings | Affected asset, CVSS vector, proof of concept evidence, business impact | It pastes raw Nmap or scanner output with unvalidated false positives |
| Remediation | Specific fixes, a priority order, retest criteria | The advice reads "apply patches" |
Proof of concept evidence is what separates a finding from an assumption. A screenshot, a captured request and response, or redacted output shows the issue was exploited, and your team can reproduce it before it spends a sprint on the fix.
Ranking findings by CVSS base score alone is the most common way to misread a report. The CVSS v4.0 separates base, threat and environmental metrics so that severity can be adjusted for your context. We recommend asking the vendor to rank by exploitability and reach, using the post-exploitation results, and to show the CVSS vector next to that ranking.
A tester with experience will also record the test in a way that shows it ran safely and in a controlled manner. That record is what you check against your own monitoring.
What happens after the pentest report: Fix, retest, close
After a pentest report, each finding is fixed, retested, and closed only when retest evidence shows the original attack path no longer works.
Triage comes first. A CVSS score is a technical baseline, so adjust it for context: a medium finding on an internet-facing service holding customer data can outrank a high on an isolated test host.
The checklist we recommend:
- Run false positive validation. Reproduce each finding from the report's proof of concept. If your team cannot, send it back to the tester with your evidence before assigning it, so a disputed finding does not sit in a queue unowned.
- Re-score by asset context. Adjust the CVSS score for exposure, data sensitivity, and compensating controls, and record the reasoning next to the finding.
- Assign one owner and a deadline per finding. Set the deadline by adjusted severity, not by the tester's raw rating.
- Fix the cause. Patching one endpoint leaves the same flaw class alive in sibling services, so search for it there too.
- Retest the fix and its neighbors. The tester repeats the original attack path, tries variations of it, and checks adjacent components that share the code or configuration.
- Close on evidence. Attach the tester's retest note to the ticket. A developer marking a ticket "fixed" does not close it. Accepted risks get a named approver and a review date.
Retest scope matters most when the original scope was very limited or included production systems, because a narrow test leaves little else to catch a regression. Write the retest into the rules of engagement before the first test starts. For how penetration testing fits a wider security program, see our cybersecurity strategy guide.
How the eight steps map to PTES, NIST SP 800-115 and OWASP WSTG
The eight penetration testing steps map onto the seven phases of PTES and the four phases of NIST SP 800-115, while the OWASP Web Security Testing Guide covers web applications only.
The side-by-side alignment:
| Our step | PTES (7 phases) | NIST SP 800-115 (4 phases) | OWASP WSTG |
|---|---|---|---|
| Pre-engagement interactions | Pre-engagement Interactions | Planning | Assumes scope exists |
| Intelligence gathering | Intelligence Gathering | Discovery | Information gathering tests |
| Scanning | No separate phase | Discovery | Configuration and deployment tests |
| Threat modeling | Threat Modeling | No explicit phase | Not a category |
| Vulnerability analysis | Vulnerability Analysis | Discovery | Per-category test cases |
| Exploitation | Exploitation | Attack | Per-category test cases |
| Post-exploitation | Post-Exploitation | Attack | Limited coverage |
| Reporting | Reporting | Reporting | Reporting guidance |
Step counts differ because each source draws boundaries for a different reader. PTES keeps scanning inside intelligence gathering and vulnerability analysis, which is why the table shows no separate phase.
NIST groups everything before an attack into Discovery.
We recommend PTES vocabulary for contracts and scoping, NIST SP 800-115 when an auditor expects a government-grade reference, and WSTG as the test-case checklist for any web target.
Netguru's best practices for the penetration tester
Four practices separate a useful penetration test from a noisy one: a written scope, experienced and ethical testers, regular testing, and a plan to act on the report.
- Define the test scope in writing. Company systems have many interconnected layers: network services, web applications, infrastructure and employee devices. Name each layer in the rules of engagement, along with test windows and off-limits actions. Reference the OWASP Web Security Testing Guide for web targets, so vendors quote against the same boundary.
- Choose experienced, ethical testers. Ask for sample reports, tester certifications and a data-handling policy for anything found during testing. Testers who have worked across industries bring sector knowledge that helps them judge which findings matter for your systems. Stop conditions and an emergency contact belong in the rules of engagement, so a fragile service is not knocked over mid-test.
- Test regularly. We recommend tying tests to events: major releases, infrastructure changes and new integrations. A fixed calendar cadence, such as yearly, is a reasonable floor, but a system that changes monthly outgrows a yearly report quickly.
- Act on the report. Give every finding an owner and a due date, ordered by CVSS severity and business impact, then retest the fixes to confirm they hold.
Penetration testing steps FAQ
What are the 7 stages of penetration testing?
Which of the 7 stages of penetration testing does port scanning fall under?
What are the top 5 penetration testing tools?
What are the main three types of penetration testing?
Run your next pentest with a clear process
A clear penetration testing process starts with signed rules of engagement before anyone scans a host, and it ends with fixes that get retested.
If you want a second opinion on scope or finding triage before your next test, talk to our team and we will walk you through our cybersecurity services.
