🔍 Anatomy of a Pen Test: From Recon to Exploitation and Reporting
By James K. Bishop, vCISO | Founder, Stage Four Security
Penetration testing isn’t a black box of hackers and hunches. It’s a structured, goal-driven process built on methodology, tooling, and rules of engagement. This post breaks down each phase of a modern pen test, what tools and tactics are used, and what defenders should expect to learn from one.
🧭 1. Scoping & Rules of Engagement
- Define objectives: Is this a compliance test? Purple team? Red team? Are there specific threat models (e.g., insider, external, partner)?
- Set constraints: Test windows, business unit exclusions, targets off-limits (e.g., production databases)
- Determine test type: Black box (no internal knowledge), gray box (credentials/partial access), white box (full access + architecture awareness)
- Agree on ROE (Rules of Engagement): What’s fair game, what’s not, and how impacts will be handled
🔎 2. Reconnaissance & OSINT
This phase involves identifying exposed assets, technologies, employees, or weak signals in public or semi-public spaces.
- Tools: Shodan, Censys, Amass, Spiderfoot, Maltego
- Targets: DNS records, subdomains, misconfigured GitHub repos, public buckets (S3, Blob), employee profiles
- Objectives: Map the attack surface, discover forgotten or shadow assets, identify potential social engineering or phishing vectors
🧪 3. Scanning & Vulnerability Analysis
Once targets are known, ethical hackers enumerate services, look for misconfigurations, and assess known vulnerabilities.
- Port scanning: Nmap, Masscan
- Web scanning: Nikto, OWASP ZAP, Burp Suite
- Vuln scanning: Nessus, OpenVAS, Nexpose
- Enumerating software versions: to identify unpatched components or known CVEs
- Banner grabbing and fingerprinting: What services are running, and how can they be probed safely?
💥 4. Exploitation
This is where vulnerabilities are actively used to gain access or escalate privileges—without causing production damage.
- Exploitation frameworks: Metasploit, Cobalt Strike (licensed), Exploit-DB/PayloadsAllTheThings
- Web exploitation: SQLi, XSS, IDOR, insecure deserialization
- Credential attacks: Password spraying, brute forcing, Kerberoasting, NTLM relay
- Privilege escalation: Exploiting misconfigurations (SUID binaries, Docker breakout, Azure AD misdelegations)
- Custom payloads: Encoded reverse shells, stagers, or binary droppers created to evade detection
🎯 5. Post-Exploitation & Persistence
- Enumerate the environment: Where am I? What can I touch? What’s sensitive?
- Lateral movement: Pass-the-hash, RDP pivoting, credential harvesting, impersonation attacks
- Establish persistence: Scheduled tasks, registry keys, cron jobs, IAM tokens
- Simulate data access/exfil: Read-only checks to demonstrate data at risk (without stealing it)
🧾 6. Reporting, Debrief, and Defense Handoff
- Executive summary: Clear explanation of risk, business impact, and recommendations
- Technical findings: Step-by-step exploitation paths, payloads used, and evidence collected
- Risk rating: Using CVSS, OWASP Top 10, or context-sensitive evaluation
- Remediation guidance: Fix paths, configuration hardening, patch prioritization
- Optional debrief: Walkthrough with defenders (blue team) to improve detection and incident response
🔁 Pen Tests Are Not One-and-Done
The best organizations treat pen testing as an iterative, strategic process—not a checkbox exercise. Regular testing ensures that:
- Cloud and infrastructure changes are reviewed
- New applications and APIs are assessed
- Controls like EDR and MFA are validated in real-world simulations
- Security awareness (especially social engineering) is tested and improved
📣 Final Thought
A good pen test doesn’t just find bugs—it tells a story. It shows how weaknesses align, how attackers think, and where defenders can do better. Treat it as a strategy accelerator, not just a security scan.
Need a structured, transparent, and business-aligned penetration test? Let’s talk.
