Post-Exploitation
After gaining initial access, assess the true impact by exploring what an attacker could achieve: data access, privilege escalation, lateral movement, and persistence.
π― Why Post-Exploitation Matters
β οΈ Critical: Always stay within scope. Document everything. Never access real customer data or make permanent changes without explicit authorization.
Post-Exploitation Methodology
Post-exploitation isn't random β follow a structured approach to maximize coverage and demonstrate realistic impact:
- 1. Situational Awareness β What access do I have? Map the current user's role, permissions, and session tokens. Identify the application's data model and backend services.
- 2. Privilege Escalation β Can I reach admin? Test vertical escalation (userβadmin), horizontal escalation (userβother user), and role manipulation via parameter/cookie tampering.
- 3. Data Access Assessment β What sensitive data is reachable? Enumerate databases, API endpoints, file storage, and cloud resources accessible from the current context.
- 4. Lateral Movement β Can I pivot? Use SSRF, cloud metadata, database links, or internal APIs to reach adjacent systems not directly exposed to the internet.
- 5. Persistence Analysis β Could an attacker maintain access? Identify if session tokens are long-lived, API keys are exposed, service worker registration is possible, or webhooks can be planted.
- 6. Evidence & Cleanup β Document everything, then remove all test artifacts, temporary accounts, uploaded files, and injected data.
Data Exfiltration Considerations
Demonstrating data access is critical for conveying business impact. However, handling sensitive data during a pentest requires careful boundaries.
β Safe Demonstration
- β’ Show record count without extracting full data
- β’ Screenshot column names/table structure
- β’ Extract only your own test account data
- β’ Redact PII in screenshots (last 4 digits only)
- β’ Use
SELECT COUNT(*)instead ofSELECT * - β’ Demonstrate access to the first row with hashed/masked fields
β Avoid
- β’ Downloading complete database dumps
- β’ Storing real customer PII locally
- β’ Sending sensitive data through external services
- β’ Accessing medical, financial, or legal records
- β’ Retaining evidence beyond report delivery
- β’ Exfiltrating data not covered in the Rules of Engagement
Danger
π Post-Exploitation Guides
Explore in-depth guides for each post-exploitation technique. Each guide includes tools, techniques, and practical exercises for mastering the skill.
Session Attacks
AuthSession hijacking, cookie theft, JWT manipulation, token replay, session fixation, and OAuth/OIDC attack techniques.
Privilege Escalation
AccessVertical and horizontal privilege escalation, IDOR exploitation, role manipulation, parameter tampering, and access control bypass.
Lateral Movement
PivotingSSRF pivoting, cloud metadata exploitation, database pivoting, internal API discovery, Kubernetes escape, and network tunneling.
Cleanup & Documentation
ReportEvidence collection, artifact cleanup, client communication, professional documentation, and screenshot best practices.
Post-Exploitation Workflow
π οΈ Essential Post-Exploitation Tools
Stay Within Scope
β Quick Checklist
Ensure you've covered all post-exploitation categories:
- β Cookie theft tested
- β JWT manipulation
- β Session fixation
- β OAuth/OIDC tested
- β Vertical escalation
- β Horizontal escalation
- β IDOR testing
- β Role manipulation
- β SSRF pivoting
- β Cloud metadata
- β Database pivoting
- β Internal API discovery
- β Test accounts removed
- β Uploads deleted
- β Evidence documented
- β Client notified
Next Steps