In This Guide
- What Penetration Testing Is (and Isn't)
- The Seven Phases of a Professional Pentest
- Phase 1: Reconnaissance
- Phase 2: Scanning and Enumeration
- Phase 3: Exploitation
- Phase 4: Post-Exploitation
- The Report: Why It's the Most Important Output
- Web Application vs Network Pentesting
- Frequently Asked Questions
Key Takeaways
- What it is: Authorized simulated attack on a system to identify real, exploitable vulnerabilities — not just theoretical ones from automated scans.
- Key phases: Reconnaissance → Scanning/Enumeration → Exploitation → Post-Exploitation → Reporting. Each phase informs the next.
- The report matters most: The client hired you for the report, not the hacking. Findings with no actionable remediation are worthless.
- Pentest vs scan: Scanning finds what might be vulnerable. Pentesting proves what actually is exploitable and demonstrates business impact.
Penetration testing is not running a vulnerability scanner and delivering the output. It is a structured, methodical process of thinking like an attacker — chaining vulnerabilities together, discovering what access you can gain, and proving the real-world business impact of security weaknesses.
Understanding the methodology separates professionals from script kiddies. Whether you're starting a career in security, preparing for a certification like OSCP, or managing a team that performs tests for clients, this guide gives you the framework professionals actually use.
What Penetration Testing Is (and Isn't)
Penetration testing is an authorized, simulated cyberattack performed by a skilled practitioner to identify real, exploitable vulnerabilities in a system. It demonstrates what a real attacker could accomplish — not just a theoretical list of weaknesses.
It is not:
- Running Nessus and emailing the results
- Checking a compliance checklist
- A one-time event that guarantees security (it's a point-in-time assessment)
- Legal without written authorization
Types of penetration tests by target:
- Network pentest: External (from the internet) or internal (from inside the network). Finds exposed services, misconfigured firewalls, exploitable services, and weak credentials.
- Web application pentest: Tests web apps for OWASP Top 10 vulnerabilities: SQL injection, XSS, CSRF, IDOR, authentication flaws, and more.
- Active Directory / internal pentest: Focused on the Windows/AD environment. Kerberoasting, Pass-the-Hash, BloodHound attack path analysis, privilege escalation.
- Social engineering: Phishing campaigns, pretexting, physical security testing (tailgating, badge cloning).
- Red team engagement: Full-spectrum attack simulation over weeks. Combines multiple vectors — network, social, physical — to simulate a real APT-style attack.
The Seven Phases of a Professional Pentest
The Penetration Testing Execution Standard (PTES) defines seven phases: pre-engagement, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post-exploitation, and reporting. Professional engagements follow this structure.
Phase 1: Reconnaissance
Reconnaissance is gathering information about the target before any active probing begins. Passive recon uses publicly available sources; active recon involves direct interaction with target systems.
Passive reconnaissance sources:
- WHOIS: Domain registration info, name servers, registrant contact details
- DNS records: Dig, nslookup — reveals A, MX, TXT, NS, and CNAME records that map the organization's infrastructure
- Shodan / Censys: Search engines for internet-connected devices. Shows open ports, running services, SSL certificates on the target's IP ranges
- Google dorking: Advanced Google search operators to find exposed files, login pages, and misconfigured systems
- LinkedIn and job postings: Reveals tech stack, software versions, and team structure
- GitHub: Source code, API keys, credentials accidentally committed, internal tooling
- theHarvester: Automated email, hostname, and subdomain enumeration from public sources
This phase builds the attack surface map — all the systems and entry points that might be tested.
Phase 2: Scanning and Enumeration
Scanning actively probes target systems to discover open ports, running services, and software versions. Enumeration extracts detailed information — usernames, shares, configurations — from discovered services.
Core scanning tools and techniques:
- Nmap:
nmap -sV -sC -oA scan_output 10.10.10.0/24— discovers open ports, service versions, and runs default scripts. The foundation of every network assessment. - Nmap NSE scripts: Hundreds of scripts for specific enumeration tasks — SMB shares, FTP anonymous login, HTTP headers, SSL certificate info.
- Gobuster / ffuf: Web directory brute-forcing to discover hidden paths, admin panels, API endpoints.
- enum4linux: SMB and LDAP enumeration for Windows hosts — reveals user lists, shares, password policies.
- ldapdomaindump: Dumps Active Directory information from LDAP queries.
- nikto: Web server scanner for misconfigurations and default content.
At the end of enumeration, you have a complete picture: all systems in scope, all open services with version information, and detailed configuration data for further exploitation.
Phase 3: Exploitation
Exploitation is the phase where you attempt to gain unauthorized access using vulnerabilities identified during enumeration. The goal is achieving the initial foothold — the first access on a system.
Common exploitation categories:
- Known CVEs: Searchsploit and Metasploit's module database contain exploits for thousands of known vulnerabilities. Always check if a public exploit exists before writing your own.
- Credential attacks: Default credentials (admin/admin), password spraying, credential stuffing with leaked password databases, brute force on SSH/RDP/VNC.
- SQL injection: In web applications — manual testing and sqlmap automation to extract databases, user credentials, or achieve remote code execution.
- Command injection: Web inputs that pass data to system commands.
; idappended to a parameter — if it returns the user context, you have RCE. - Misconfiguration: Anonymous FTP access, unauthenticated databases, exposed .git directories, world-writable cron jobs.
- Phishing / social engineering: Malicious documents, fake login pages, pretexting phone calls.
When you get initial access, document everything: the vulnerability used, the exact commands, timestamps, and the access level gained. The report depends on this documentation.
Phase 4: Post-Exploitation
Post-exploitation is what happens after initial access — escalating privileges, moving laterally to other systems, and demonstrating the real business impact of the breach. This phase separates a complete pentest from a simple "I got in" result.
Key post-exploitation activities:
- Privilege escalation: Going from a low-privilege user to root/SYSTEM. Linux: SUID binaries, sudo misconfigurations, kernel exploits, cron job abuse. Windows: service misconfigurations, DLL hijacking, token impersonation, unquoted service paths.
- Lateral movement: Using credentials, hashes, or tickets from one system to access others. Pass-the-Hash, Pass-the-Ticket, Kerberoasting, DCSync.
- Data exfiltration simulation: Demonstrating that sensitive data could be extracted. Accessing databases, file shares, email, source code repositories.
- Domain dominance (AD): Achieving Domain Admin on a Windows environment — the "game over" scenario for enterprise networks. BloodHound maps the attack path.
- Persistence: Demonstrating persistence mechanisms — scheduled tasks, registry run keys, web shells — that would survive a reboot. Usually cleaned up at engagement end.
The Report: Why It's the Most Important Output
The penetration test report is the product. The client pays for the report, not the hacking. A technically brilliant pentest with a poor report wastes the client's money. A well-written report with clear findings, severity ratings, and actionable remediation is what actually improves security.
A professional pentest report includes:
- Executive Summary: 1-2 pages for non-technical leadership. Overall risk posture, most critical findings, key recommendations. No technical jargon.
- Scope and methodology: What was tested, from where, when, and using what methodology.
- Findings: Each finding gets: title, severity (Critical/High/Medium/Low/Informational), CVSS score, description, evidence (screenshots, command output), affected systems, and remediation guidance.
- Attack narrative: A step-by-step story of how access was gained and how far it progressed. Makes the abstract concrete for technical teams.
- Remediation summary: Prioritized list of fixes with enough detail for developers and system administrators to act on immediately.
Web Application vs Network Pentesting
Web application and network pentesting require different skills, tools, and mindsets. Web testing focuses on application logic, input validation, and OWASP Top 10. Network testing focuses on service exploitation, credential attacks, and Active Directory.
| Aspect | Web Application | Network/Infrastructure |
|---|---|---|
| Primary targets | HTTP/HTTPS applications, APIs | Servers, network devices, AD |
| Key framework | OWASP Testing Guide | PTES, MITRE ATT&CK |
| Core tools | Burp Suite, sqlmap, ffuf | Nmap, Metasploit, BloodHound |
| Common vulns | SQLi, XSS, IDOR, auth bypass | CVEs, weak creds, misconfigs, AD attacks |
| Certification | OSWE, eWPT, BSCP | OSCP, GPEN, eCPPT |
Frequently Asked Questions
What is penetration testing?
Authorized simulated cyberattack on a computer system to identify and demonstrate real, exploitable vulnerabilities. Pentesting proves what's actually exploitable and its business impact — unlike scanning which only identifies potential vulnerabilities.
What is the difference between penetration testing and vulnerability scanning?
Scanning is automated and finds potential vulnerabilities with many false positives. Pentesting is manual — a tester actually exploits vulnerabilities, chains them, and demonstrates real business impact. Pentesting tells you what's actually exploitable.
What is PTES?
The Penetration Testing Execution Standard — a community framework defining the standard phases of a professional pentest: pre-engagement, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post-exploitation, and reporting.
How long does a penetration test take?
Depends on scope. A single web app: 3-5 days. Internal network assessment: 1-2 weeks. Full red team engagement: 4-6 weeks or longer. Accurate scoping at the start determines realistic timelines.
Think like an attacker. Defend like a professional.
The Precision AI Academy bootcamp covers security fundamentals, penetration testing concepts, and AI-powered security tools. $1,490. October 2026.
Reserve Your Seat