Information Gathering Workflow
Attack Chain Position
graph LR
A[Pre-Engagement] --> B[Passive Recon]
B --> C[Active Recon]
C --> D[Vulnerability Analysis]
D --> E[Exploitation]
E --> F[Post-Exploitation]
F --> G[Reporting]
B --> B1[OSINT]
B --> B2[DNS Enumeration]
B --> B3[Search Engines]
B --> B4[CT Logs]
C --> C1[Port Scanning]
C --> C2[Service Enumeration]
C --> C3[Web Discovery]
C --> C4[Network Mapping]
style B fill:#a8e6cf,stroke:#333,stroke-width:2px
style C fill:#f9d56e,stroke:#333,stroke-width:2px
Position: Information Gathering spans the entire Reconnaissance phase (Passive + Active) and feeds directly into Vulnerability Analysis and Exploitation. A structured workflow ensures comprehensive coverage while managing time effectively.
Table of Contents
- Complete Reconnaissance Workflow
- OSCP-Specific Recon Checklist
- Notes Taking Template
- Decision Points During Recon
- Time Management for OSCP Exam
- Iterative Reconnaissance Approach
- Finding Correlation Techniques
- Building an Attack Vector List
- Transitioning from Recon to Exploitation
- Common Workflow Mistakes
- Documentation Requirements for OSCP Report
- Post-Exploitation Recon Follow-up
- OSCP Exam Tips
Complete Reconnaissance Workflow
High-Level Workflow Diagram
graph TD
A[Start: Target Assignment] --> B[Phase 1: Passive Recon]
B --> C[Phase 2: Active Recon]
C --> D[Phase 3: Vulnerability Analysis]
D --> E{Vulnerabilities Found?}
E -->|Yes| F[Phase 4: Exploitation]
E -->|No| G[Deepen Recon]
G --> C
F --> H{Access Gained?}
H -->|Yes| I[Phase 5: Post-Exploitation]
H -->|No| J[Try Alternative Vectors]
J --> F
I --> K[Phase 6: Documentation]
K --> L[End: Report Generation]
style A fill:#e8e8e8,stroke:#333,stroke-width:1px
style B fill:#a8e6cf,stroke:#333,stroke-width:2px
style C fill:#f9d56e,stroke:#333,stroke-width:2px
style D fill:#ff8b94,stroke:#333,stroke-width:1px
style F fill:#ff6b6b,stroke:#333,stroke-width:1px
style I fill:#6bcb77,stroke:#333,stroke-width:1px
style K fill:#4d96ff,stroke:#333,stroke-width:1px
Phase 1: Passive Reconnaissance
Goal: Gather information about the target without directly interacting with it.
Duration: 15-30 minutes (OSCP)
graph LR
A[Passive Recon] --> B[Domain Intelligence]
A --> C[Subdomain Discovery]
A --> D[Email Harvesting]
A --> E[Technology Stack]
A --> F[Historical Data]
B --> B1[WHOIS Lookup]
B --> B2[DNS Records]
B --> B3[Domain Age]
C --> C1[theHarvester]
C --> C2[Amass Passive]
C --> C3[Subfinder]
C --> C4[CT Logs]
D --> D1[theHarvester]
D --> D2[Hunter.io]
D --> D3[Search Engines]
E --> E1[Wappalyzer]
E --> E2[BuiltWith]
E --> E3[Shodan]
F --> F1[Wayback Machine]
F --> F2[CT History]
F --> F3[DNS History]
style A fill:#a8e6cf,stroke:#333,stroke-width:2px
Passive Recon Tasks:
| Task | Tool | Time Budget | Output |
|---|---|---|---|
| WHOIS lookup | whois, dig |
2 min | Domain registration info |
| DNS record enumeration | dig, nslookup |
3 min | A, AAAA, MX, NS, TXT, SOA records |
| Subdomain discovery (passive) | theHarvester, Amass, Subfinder | 10 min | List of subdomains |
| CT log analysis | crt.sh | 5 min | Certificate-based subdomains |
| Email harvesting | theHarvester | 5 min | Email addresses |
| Search engine dorking | Google, Bing | 5 min | Indexed pages, files, directories |
| Technology detection | Wappalyzer, BuiltWith | 3 min | Tech stack information |
| Historical data | Wayback Machine | 5 min | Historical snapshots |
Phase 2: Active Reconnaissance
Goal: Actively probe the target to discover live hosts, open ports, and running services.
Duration: 30-60 minutes (OSCP)
graph LR
A[Active Recon] --> B[Host Discovery]
A --> C[Port Scanning]
A --> D[Service Enumeration]
A --> E[OS Detection]
A --> F[Network Mapping]
B --> B1[Ping Sweep]
B --> B2[ARP Scan]
B --> B3[Nmap -sn]
C --> C1[Quick Scan]
C --> C2[Full TCP Scan]
C --> C3[UDP Scan]
C --> C4[Aggressive Scan]
D --> D1[Service Version]
D --> D2[Script Scanning]
D --> D3[Banner Grabbing]
E --> E1[Nmap OS Detection]
E --> E2[TCP/IP Fingerprinting]
F --> F1[Traceroute]
F --> F2[Network Topology]
style A fill:#f9d56e,stroke:#333,stroke-width:2px
Active Recon Tasks:
| Task | Tool | Time Budget | Output |
|---|---|---|---|
| Host discovery | nmap -sn, fping |
5 min | Live hosts |
| Quick port scan | nmap -sV -p Top 100 |
10 min | Open ports and services |
| Full TCP scan | nmap -sV -sC -O |
20-30 min | Comprehensive port/service data |
| UDP scan | nmap -sU -p Top 20 |
15-20 min | UDP services |
| Service enumeration | Manual + scripts | 15-30 min | Service details, versions |
| OS detection | nmap -O, nmap -A |
5 min | Operating system info |
| Web directory enumeration | gobuster, dirb |
10-15 min | Web directories and files |
| Web technology detection | whatweb, wpscan |
5-10 min | Web tech stack |
Phase 3: Vulnerability Analysis
Goal: Identify potential vulnerabilities in discovered services and applications.
Duration: 20-40 minutes (OSCP)
graph LR
A[Vuln Analysis] --> B[Service Vulns]
A --> C[Web App Vulns]
A --> D[Config Issues]
A --> E[Default Credentials]
B --> B1[SearchSploit]
B --> B2[ExploitDB]
B --> B3[CVSS Lookup]
C --> C1[Nikto]
C --> C2[Dirbusting]
C --> C3[Param Miner]
D --> D1[Config Files]
D --> D2[Exposed Panels]
D --> D3[Debug Interfaces]
E --> E1[Common Creds]
E --> E2[Default Passwords]
E --> E3[Weak Auth]
style A fill:#ff8b94,stroke:#333,stroke-width:2px
Vulnerability Analysis Tasks:
| Task | Tool | Time Budget | Output |
|---|---|---|---|
| Exploit search | searchsploit |
10 min | Potential exploits |
| Web vulnerability scan | nikto |
10 min | Web vulnerabilities |
| Default credential check | Manual, hydra |
10 min | Weak/default credentials |
| Configuration review | Manual | 10 min | Misconfigurations |
| CMS enumeration | wpscan, joomscan |
10 min | CMS vulnerabilities |
| API enumeration | Manual, burpsuite |
15 min | API endpoints and issues |
Phase 4: Exploitation
Goal: Exploit identified vulnerabilities to gain initial access.
Duration: Variable (30 min - several hours)
Phase 5: Post-Exploitation
Goal: Maintain access, escalate privileges, and pivot to other systems.
Duration: Variable (30 min - several hours)
Phase 6: Documentation
Goal: Document all findings, methods, and results for the final report.
Duration: 2-4 hours (after exam)
OSCP-Specific Recon Checklist
Phase 1: Passive Recon (15-30 minutes)
┌─────────────────────────────────────────────────────────────────┐
│ PASSIVE RECON CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ □ WHOIS Lookup │
│ □ whois target.com │
│ □ Note: Registrar, Creation Date, Expiry, Nameservers │
│ │
│ □ DNS Record Enumeration │
│ □ dig AXFR target.com @ns1.target.com │
│ □ dig A target.com │
│ □ dig AAAA target.com │
│ □ dig MX target.com │
│ □ dig NS target.com │
│ □ dig TXT target.com │
│ □ dig SOA target.com │
│ □ dig CNAME target.com │
│ │
│ □ Subdomain Discovery │
│ □ theHarvester -d target.com -b bing,google,virustotal │
│ -l 500 -f passive_results -n │
│ □ amass enum -passive -d target.com -o amass_passive.txt │
│ □ subfinder -d target.com -o subfinder_results.txt │
│ □ curl crt.sh for certificate-based subdomains │
│ □ Combine and deduplicate all results │
│ │
│ □ Search Engine Dorking │
│ □ site:target.com │
│ □ site:target.com filetype:pdf │
│ □ site:target.com filetype:doc │
│ □ site:target.com filetype:xls │
│ □ site:target.com inurl:admin │
│ □ site:target.com inurl:login │
│ □ site:target.com inurl:phpmyadmin │
│ │
│ □ Email Harvesting │
│ □ theHarvester -d target.com -b hunter,linkedin,google │
│ -l 500 -f email_results │
│ □ Note email formats for password spraying │
│ │
│ □ Technology Detection │
│ □ Wappalyzer browser extension │
│ □ BuiltWith browser extension │
│ □ whatweb target.com │
│ │
│ □ Historical Data │
│ □ Wayback Machine: web.archive.org/web/*/target.com │
│ □ crt.sh historical certificates │
│ │
└─────────────────────────────────────────────────────────────────┘
Phase 2: Active Recon (30-60 minutes)
┌─────────────────────────────────────────────────────────────────┐
│ ACTIVE RECON CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ □ Host Discovery │
│ □ nmap -sn 10.10.10.0/24 -oA host_discovery │
│ □ fping -a -g 10.10.10.0/24 > live_hosts.txt │
│ │
│ □ Quick Port Scan (Top 100 ports) │
│ □ nmap -sV -p 1-1000 10.10.10.10 -oA quick_scan │
│ □ Note: Open ports, service versions │
│ │
│ □ Full TCP Scan │
│ □ nmap -sV -sC -O -p- 10.10.10.10 -oA full_scan │
│ □ Note: All open ports, service details, OS detection │
│ │
│ □ UDP Scan (Top 20 ports) │
│ □ nmap -sU -p 53,67,68,69,123,161,162,389,500,514, │
│ 520,521,1434,1900,4500,5060,5353,6901,8545,19000 │
│ 10.10.10.10 -oA udp_scan │
│ │
│ □ Service Enumeration │
│ □ SMB: enum4linux -a 10.10.10.10 │
│ □ SNMP: snmpwalk -v2c -c public 10.10.10.10 │
│ □ FTP: ftp 10.10.10.10 (anonymous login) │
│ □ SSH: ssh -v user@10.10.10.10 (banner grab) │
│ □ HTTP: Manual browsing + Nikto │
│ □ DNS: dig AXFR, zone transfer attempts │
│ □ LDAP: ldapsearch -x -h 10.10.10.10 │
│ │
│ □ Web Directory Enumeration │
│ □ gobuster dir -u http://10.10.10.10 │
│ -w /usr/share/wordlists/dirb/common.txt │
│ -o gobuster_results │
│ □ ffuf -u http://10.10.10.10/FUZZ │
│ -w /usr/share/seclists/Discovery/Web-Content/common.txt │
│ -o ffuf_results │
│ │
│ □ Web Technology Detection │
│ □ whatweb http://10.10.10.10 │
│ □ wpscan --url http://10.10.10.10 (if WordPress) │
│ □ joomscan --url http://10.10.10.10 (if Joomla) │
│ │
└─────────────────────────────────────────────────────────────────┘
Phase 3: Vulnerability Analysis (20-40 minutes)
┌─────────────────────────────────────────────────────────────────┐
│ VULNERABILITY ANALYSIS CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ □ Exploit Search │
│ □ searchsploit <service> <version> │
│ □ searchsploit -m <exploit_id> │
│ □ Note: Exploit IDs, conditions, reliability │
│ │
│ □ Web Vulnerability Scan │
│ □ nikto -h http://10.10.10.10 -o nikto_results.html │
│ □ Note: Interesting findings, false positives │
│ │
│ □ Default Credential Check │
│ □ Try common defaults for each service │
│ □ admin/admin, root/toor, test/test, etc. │
│ □ hydra -l admin -P common_passwords.txt │
│ ssh://10.10.10.10 (if needed) │
│ │
│ □ Configuration Review │
│ □ Check for exposed config files │
│ □ Check for debug interfaces │
│ □ Check for default pages │
│ □ Check for information disclosure │
│ │
│ □ CMS Enumeration │
│ □ wpscan --url http://10.10.10.10 --enumerate ap,tt,db │
│ □ joomscan --url http://10.10.10.10 --enum-plugins │
│ □ Note: Plugin versions, known vulnerabilities │
│ │
└─────────────────────────────────────────────────────────────────┘
Notes Taking Template
Comprehensive Notes Template
# Reconnaissance Notes: [TARGET]
## Target Information
- **Target Domain:** [domain.com]
- **Target IP(s):** [IP addresses]
- **Exam Date:** [YYYY-MM-DD]
- **Start Time:** [HH:MM]
- **End Time:** [HH:MM]
---
## Phase 1: Passive Reconnaissance
### WHOIS Information
[Copy whois output here]
**Key Findings:**
- Registrar: [registrar name]
- Creation Date: [date]
- Expiry Date: [date]
- Nameservers: [ns1, ns2, ...]
- Organization: [org name]
### DNS Records
| Record Type | Value | Notes |
|-------------|-------|-------|
| A | [IP] | [notes] |
| AAAA | [IPv6] | [notes] |
| MX | [mail server] | [notes] |
| NS | [nameserver] | [notes] |
| TXT | [txt record] | [notes] |
| CNAME | [alias] | [notes] |
### Subdomain Discovery
| Subdomain | IP Address | Source | Notes |
|-----------|-----------|--------|-------|
| www.target.com | [IP] | theHarvester | [notes] |
| mail.target.com | [IP] | Amass | [notes] |
| dev.target.com | [IP] | CT Logs | [notes] |
**Total Subdomains Found:** [count]
**Unique IPs:** [count]
### Email Addresses Found
- [email1@target.com]
- [email2@target.com]
- [email3@target.com]
**Email Format Pattern:** [firstname.lastname, firstinitiallastname, etc.]
### Search Engine Results
- [Interesting indexed pages]
- [Exposed files]
- [Admin panels found]
### Technology Stack
- [Web server: Apache/Nginx/IIS]
- [CMS: WordPress/Joomla/Custom]
- [Programming Language: PHP/Python/Java]
- [Framework: Django/Laravel/Spring]
- [Database: MySQL/PostgreSQL/MongoDB]
---
## Phase 2: Active Reconnaissance
### Host Discovery
[Copy nmap -sn output here]
**Live Hosts:**
| IP Address | Hostname | Notes |
|-----------|----------|-------|
| [IP] | [hostname] | [notes] |
### Port Scan Results
#### Target: [IP/Hostname]
| Port | Protocol | Service | Version | State | Notes |
|------|----------|---------|---------|-------|-------|
| 22 | TCP | SSH | OpenSSH 8.2p1 | open | [notes] |
| 80 | TCP | HTTP | Apache 2.4.41 | open | [notes] |
| 443 | TCP | HTTPS | Apache 2.4.41 | open | [notes] |
| 3306 | TCP | MySQL | 8.0.23 | open | [notes] |
**OS Detection:** [Operating system and version]
### Service Enumeration Details
#### SSH (Port 22)
- Version: [version]
- Key Exchange: [algorithms]
- Authentication Methods: [password, publickey, etc.]
- Notes: [any interesting findings]
#### HTTP/HTTPS (Port 80/443)
- Server: [server software]
- Title: [page title]
- Technologies: [detected technologies]
- Directories Found:
- [/admin]
- [/api]
- [/uploads]
- Interesting Files:
- [/.git/config]
- [/backup.zip]
- Notes: [any interesting findings]
#### SMB (Port 445)
- Share Names: [shares]
- Anonymous Access: [yes/no]
- Users Found: [users]
- Groups Found: [groups]
- Notes: [any interesting findings]
#### DNS (Port 53)
- Zone Transfer: [success/fail]
- Records Found: [records]
- Notes: [any interesting findings]
### Web Directory Enumeration
#### gobuster Results
[Copy interesting gobuster results here]
**Interesting Directories:**
| Directory | Status Code | Size | Notes |
|-----------|------------|------|-------|
| /admin | 200 | 1234 | [notes] |
| /api | 200 | 567 | [notes] |
| /backup | 403 | 0 | [notes] |
---
## Phase 3: Vulnerability Analysis
### Potential Vulnerabilities
| Target | Service | Version | Vulnerability | Exploit ID | Confidence |
|--------|---------|---------|---------------|------------|------------|
| [IP] | [service] | [version] | [vuln name] | [EDB-ID] | [High/Med/Low] |
### Exploit Search Results
#### [Service] [Version]
[Copy searchsploit output here]
**Selected Exploits:**
| Exploit ID | Path | Reliability | Notes |
|-----------|------|-------------|-------|
| [EDB-ID] | [path] | [confirmed/unconfirmed] | [notes] |
### Default Credential Attempts
| Service | Username | Password | Result | Notes |
|---------|----------|----------|--------|-------|
| [service] | [user] | [pass] | [success/fail] | [notes] |
---
## Attack Vector Prioritization
### Priority 1 (Immediate)
1. [Vulnerability/Vector] - [Reason]
2. [Vulnerability/Vector] - [Reason]
### Priority 2 (Secondary)
1. [Vulnerability/Vector] - [Reason]
2. [Vulnerability/Vector] - [Reason]
### Priority 3 (Fallback)
1. [Vulnerability/Vector] - [Reason]
2. [Vulnerability/Vector] - [Reason]
---
## Commands Used
### Passive Recon
```bash
[Copy all passive recon commands here]
Active Recon
[Copy all active recon commands here]
Vulnerability Analysis
[Copy all vuln analysis commands here]
Notes and Observations
Interesting Findings
- [Finding 1]
- [Finding 2]
- [Finding 3]
Questions/Unknowns
- [Question 1]
- [Question 2]
Next Steps
- [Action 1]
- [Action 2]
- [Action 3]
Timeline
| Time | Activity | Duration | Result |
|---|---|---|---|
| [HH:MM] | [Activity] | [min] | [Result] |
| [HH:MM] | [Activity] | [min] | [Result] |
### Quick Notes Template (Exam Day)
```markdown
# [TARGET] - Quick Notes
## IPs Found
- [IP1]: [ports/services]
- [IP2]: [ports/services]
## Subdomains
- [sub1.domain.com] -> [IP]
- [sub2.domain.com] -> [IP]
## Open Ports
| IP | Port | Service | Version |
|----|------|---------|---------|
| [IP] | [port] | [service] | [version] |
## Potential Vulns
1. [vuln] - [exploit]
2. [vuln] - [exploit]
## Attack Plan
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Commands Used
```bash
[commands]
---
## Decision Points During Recon
### When to Pivot
```mermaid
graph TD
A[Current Target] --> B{Interesting Finding?}
B -->|Yes| C{High Value?}
B -->|No| D[Continue Current Path]
C -->|Yes| E[PIVOT: Follow New Lead]
C -->|No| F[Note for Later]
E --> G[Document Original Path]
G --> H[Explore New Lead]
H --> I{Success?}
I -->|Yes| J[Continue Exploitation]
I -->|No| K[Return to Original Path]
style E fill:#f9d56e,stroke:#333,stroke-width:2px
Pivot Decision Criteria:
| Signal | Action | Example |
|---|---|---|
| New IP range discovered | Pivot to scan new range | Found 10.10.20.0/24 via SMB |
| Interesting service found | Pivot to enumerate service | Found MongoDB on port 27017 |
| Credential found | Pivot to try credential elsewhere | Found SSH key, try on other hosts |
| Vulnerability confirmed | Pivot to exploitation | Confirmed RCE in Apache Struts |
| Internal hostname found | Pivot to DNS enumeration | Found internal.corp.target.com |
| API endpoint found | Pivot to API testing | Found /api/v1/ endpoint |
When to Go Deeper
| Condition | Action | Example |
|---|---|---|
| Service has known exploits | Deep dive into exploit research | Apache Struts 2.5.10 has RCE |
| Multiple services on one host | Enumerate all services thoroughly | Host has SSH, HTTP, SMB, MySQL |
| Web application found | Full web app enumeration | WordPress site with plugins |
| Database service exposed | Check for anonymous access | MySQL on port 3306 |
| Unusual port/service | Investigate further | Custom service on port 8443 |
When to Move On
| Condition | Action | Example |
|---|---|---|
| No vulnerabilities found after 30 min | Move to next target | Scanned all ports, no vulns |
| Exploit failed twice | Try alternative vector | Metasploit exploit crashed |
| Time budget exceeded | Move to next phase | Spent 45 min on passive recon |
| Dead end confirmed | Return to previous path | Anonymous SMB, no shares |
| Low-confidence finding | Note and move on | Unconfirmed exploit for old version |
Decision Matrix
┌─────────────────────────────────────────────────────────────────┐
│ RECON DECISION MATRIX │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Finding Quality Time Spent Action │
│ ────────────── ────────── ────── │
│ High (confirmed) Any EXPLOIT IMMEDIATELY │
│ High < 15 min GO DEEPER │
│ High > 30 min TRY EXPLOIT, then MOVE ON │
│ Medium < 15 min GO DEEPER │
│ Medium 15-30 min TRY QUICK EXPLOIT │
│ Medium > 30 min NOTE AND MOVE ON │
│ Low Any NOTE AND MOVE ON │
│ │
│ Finding Quality Assessment: │
│ ───────────────────────────────── │
│ High: Confirmed vulnerability with known exploit │
│ Medium: Potential vulnerability, needs verification │
│ Low: Unconfirmed, low probability of success │
│ │
└─────────────────────────────────────────────────────────────────┘
Time Management for OSCP Exam
Overall Time Budget
The OSCP exam provides 24 hours for exploitation across multiple machines. Here’s a realistic time allocation:
gantt
title OSCP Exam Time Allocation (Per Machine)
dateFormat HH:mm
axisFormat %H:%M
section Passive Recon
WHOIS & DNS :00:00, 5min
Subdomain Discovery :00:05, 10min
Search & CT Logs :00:15, 10min
section Active Recon
Host Discovery :00:25, 5min
Quick Port Scan :00:30, 10min
Full Port Scan :00:40, 20min
Service Enumeration :01:00, 20min
Web Enumeration :01:20, 15min
section Vuln Analysis
Exploit Search :01:35, 15min
Vuln Verification :01:50, 15min
section Exploitation
Initial Exploit :02:05, 30min
Post-Exploitation :02:35, 30min
Privilege Escalation :03:05, 30min
Time Budget by Phase
| Phase | Minimum | Recommended | Maximum | Notes |
|---|---|---|---|---|
| Passive Recon | 10 min | 20 min | 30 min | Don’t exceed 30 min |
| Active Recon | 30 min | 45 min | 60 min | Nmap scans take time |
| Vuln Analysis | 15 min | 25 min | 40 min | Focus on confirmed vulns |
| Exploitation | 30 min | 60 min | 120 min | Variable based on difficulty |
| Post-Exploitation | 20 min | 40 min | 60 min | Include privesc |
| Documentation | 10 min | 20 min | 30 min | Per machine notes |
Time Management Rules
- Set a timer for each phase: Don’t let any phase run indefinitely.
- 20-minute rule: If no progress in 20 minutes, reassess approach.
- 30-minute hard limit: If stuck for 30 minutes, move to another machine.
- Park and return: Note where you left off and return later.
- Parallel processing: Run long scans while working on other tasks.
- Quick wins first: Exploit easy vulnerabilities before hard ones.
Time Tracking Template
## Time Log
| Time | Activity | Duration | Result | Next Action |
|------|----------|----------|--------|-------------|
| 08:00 | Start passive recon | - | - | WHOIS, DNS |
| 08:10 | WHOIS + DNS complete | 10 min | Found 3 subdomains | Subdomain discovery |
| 08:25 | Subdomain discovery | 15 min | 12 subdomains found | Active recon |
| 08:30 | Nmap quick scan | - | - | Top 100 ports |
| 08:45 | Quick scan complete | 15 min | 5 open ports | Full scan |
| 09:10 | Full scan complete | 25 min | 8 open ports, services | Service enum |
| 09:30 | Service enumeration | 20 min | Found WordPress | Vuln analysis |
| 09:45 | Exploit search | 15 min | Found plugin vuln | Exploitation |
| 10:15 | Initial access gained | 30 min | Shell as www-data | Post-exploitation |
| 10:45 | Privilege escalation | 30 min | Root access | Document |
Iterative Reconnaissance Approach
The Iterative Cycle
graph TD
A[Initial Recon] --> B[Findings Analysis]
B --> C{New Leads?}
C -->|Yes| D[Targeted Deep Dive]
C -->|No| E[Expand Scope]
D --> F[New Findings]
E --> F
F --> B
B --> G{Vulnerability Found?}
G -->|Yes| H[Exploitation]
G -->|No| A
style A fill:#a8e6cf,stroke:#333,stroke-width:2px
style H fill:#ff6b6b,stroke:#333,stroke-width:2px
Iteration Examples
Iteration 1: Initial Broad Recon
# Quick broad scan
nmap -sV -p 1-1000 10.10.10.10 -oA initial_scan
Findings: SSH (22), HTTP (80), HTTPS (443)
Iteration 2: Deep Dive on HTTP
# Enumerate web application
gobuster dir -u http://10.10.10.10 -w common.txt -o gobuster_results
nikto -h http://10.10.10.10
Findings: WordPress installation, /wp-admin, /wp-content/uploads
Iteration 3: WordPress-Specific Recon
# WordPress enumeration
wpscan --url http://10.10.10.10 --enumerate ap,tt,db,u
Findings: Vulnerable plugin, user list
Iteration 4: Exploitation
# Exploit vulnerable plugin
msfconsole
use exploit/multi/http/wp_vulnerable_plugin
set RHOSTS 10.10.10.10
exploit
Result: Shell access
Iteration Decision Points
| Finding | Next Iteration | Tool |
|---|---|---|
| Web server found | Directory enumeration | gobuster, ffuf |
| CMS identified | CMS-specific enumeration | wpscan, joomscan |
| Database exposed | Database enumeration | Manual, sqlmap |
| SMB shares found | Share enumeration | enum4linux, smbclient |
| New subdomain | Subdomain-specific scan | nmap, gobuster |
| Internal hostname | DNS enumeration | dig, nslookup |
| API endpoint | API testing | Burp Suite, manual |
Finding Correlation Techniques
Cross-Reference Matrix
graph TD
A[Subdomain List] --> D[Correlation Engine]
B[Port Scan Results] --> D
C[Service Versions] --> D
E[Exploit Database] --> D
F[Default Credentials] --> D
D --> G[Attack Vector List]
G --> H[Priority 1: Confirmed Vulns]
G --> I[Priority 2: Potential Vulns]
G --> J[Priority 3: Informational]
style D fill:#f9d56e,stroke:#333,stroke-width:2px
Correlation Process
Step 1: Map Services to Known Vulnerabilities
# For each service found, search for exploits
for service in "Apache 2.4.41" "OpenSSH 8.2p1" "MySQL 8.0.23"; do
echo "=== $service ==="
searchsploit "$service"
echo ""
done
Step 2: Cross-Reference Subdomains with Live Hosts
# Check which subdomains resolve to target IPs
while read sub; do
ip=$(dig +short "$sub" 2>/dev/null)
if [[ "$ip" == *"10.10."* ]]; then
echo "$sub -> $ip (TARGET)"
fi
done < subdomains.txt
Step 3: Build Attack Vector List
| Target | Service | Version | Vulnerability | Exploit | Priority |
|---|---|---|---|---|---|
| 10.10.10.10:80 | Apache | 2.4.41 | Path traversal | EDB-49362 | High |
| 10.10.10.10:22 | OpenSSH | 8.2p1 | None known | - | Low |
| 10.10.10.10:3306 | MySQL | 8.0.23 | Auth bypass | EDB-49175 | Medium |
| 10.10.10.10:80 | WordPress | 5.8 | Plugin vuln | EDB-50125 | High |
Correlation Checklist
┌─────────────────────────────────────────────────────────────────┐
│ CORRELATION CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ □ Map each open port to a service │
│ □ Map each service to a version │
│ □ Map each version to known vulnerabilities │
│ □ Map each vulnerability to available exploits │
│ □ Map each exploit to reliability rating │
│ □ Cross-reference subdomains with live hosts │
│ □ Cross-reference emails with service accounts │
│ □ Cross-reference tech stack with known vulns │
│ □ Identify default credential opportunities │
│ □ Identify configuration weaknesses │
│ │
└─────────────────────────────────────────────────────────────────┘
Building an Attack Vector List
Attack Vector Template
# Attack Vector List: [TARGET]
## Priority 1: Immediate Exploitation
### Vector 1: [Name]
- **Target:** [IP:Port]
- **Service:** [Service Name]
- **Version:** [Version]
- **Vulnerability:** [CVE/Description]
- **Exploit:** [ExploitDB ID / Path]
- **Reliability:** [Confirmed / Unconfirmed / Theoretical]
- **Difficulty:** [Easy / Medium / Hard]
- **Expected Result:** [Shell / Info Disclosure / RCE]
- **Prerequisites:** [Any requirements]
- **Command:**
```bash
[exploit command]
- Status: [Not Attempted / Attempted / Successful / Failed]
- Notes: [Additional notes]
Vector 2: [Name]
- Target: [IP:Port]
- Service: [Service Name]
- Version: [Version]
- Vulnerability: [CVE/Description]
- Exploit: [ExploitDB ID / Path]
- Reliability: [Confirmed / Unconfirmed / Theoretical]
- Difficulty: [Easy / Medium / Hard]
- Expected Result: [Shell / Info Disclosure / RCE]
- Prerequisites: [Any requirements]
- Command:
[exploit command] - Status: [Not Attempted / Attempted / Successful / Failed]
- Notes: [Additional notes]
Priority 2: Secondary Vectors
Vector 3: [Name]
- Target: [IP:Port]
- Service: [Service Name]
- Version: [Version]
- Vulnerability: [CVE/Description]
- Exploit: [ExploitDB ID / Path]
- Reliability: [Confirmed / Unconfirmed / Theoretical]
- Difficulty: [Easy / Medium / Hard]
- Expected Result: [Shell / Info Disclosure / RCE]
- Prerequisites: [Any requirements]
- Command:
[exploit command] - Status: [Not Attempted / Attempted / Successful / Failed]
- Notes: [Additional notes]
Priority 3: Fallback Vectors
Vector 4: [Name]
- Target: [IP:Port]
- Service: [Service Name]
- Version: [Version]
- Vulnerability: [CVE/Description]
- Exploit: [ExploitDB ID / Path]
- Reliability: [Confirmed / Unconfirmed / Theoretical]
- Difficulty: [Easy / Medium / Hard]
- Expected Result: [Shell / Info Disclosure / RCE]
- Prerequisites: [Any requirements]
- Command:
[exploit command] - Status: [Not Attempted / Attempted / Successful / Failed]
- Notes: [Additional notes]
### Prioritization Criteria
| Criteria | Weight | Description |
|----------|--------|-------------|
| **Exploit Reliability** | 40% | Confirmed > Unconfirmed > Theoretical |
| **Ease of Exploitation** | 25% | Easy (one-click) > Medium > Hard (custom) |
| **Impact** | 20% | RCE > Info Disclosure > DoS |
| **Time to Exploit** | 15% | Quick (<5 min) > Medium (>5 min) > Long (>15 min) |
### Priority Scoring Formula
Priority Score = (Reliability × 40) + (Ease × 25) + (Impact × 20) + (Speed × 15)
Where:
- Reliability: Confirmed=3, Unconfirmed=2, Theoretical=1
- Ease: Easy=3, Medium=2, Hard=1
- Impact: RCE=3, Info Disclosure=2, DoS=1
- Speed: Quick=3, Medium=2, Long=1
Max Score: 100 Min Score: 20
Priority Levels:
- 80-100: Critical (exploit immediately)
- 60-79: High (exploit soon)
- 40-59: Medium (exploit if time allows)
- 20-39: Low (fallback option)
---
## Transitioning from Recon to Exploitation
### Transition Checklist
┌─────────────────────────────────────────────────────────────────┐ │ RECON TO EXPLOITATION TRANSITION │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ □ All recon phases completed │ │ □ Attack vector list built and prioritized │ │ □ Exploits downloaded and ready │ │ □ Payloads prepared (reverse shells, etc.) │ │ □ Listener configured (nc, socat, msfvenom) │ │ ✓ Notes saved and organized │ │ □ Timeline documented │ │ □ Commands used recorded │ │ │ │ Pre-Exploitation Setup: │ │ ───────────────────────────────── │ │ □ Netcat listener: nc -lvnp 4443 │ │ □ Python HTTP server: python3 -m http.server 8080 │ │ □ Metasploit handler ready │ │ □ Custom exploits compiled/tested │ │ □ Wordlists available │ │ │ └─────────────────────────────────────────────────────────────────┘
### Exploitation Readiness Checklist
| Item | Status | Notes |
|------|--------|-------|
| **Exploit code ready** | [ ] | Downloaded from ExploitDB |
| **Payload prepared** | [ ] | Reverse shell generated |
| **Listener configured** | [ ] | Netcat/Metasploit handler |
| **Target confirmed** | [ ] | IP, port, service verified |
| **Backup vector ready** | [ ] | Alternative exploit available |
| **Notes accessible** | [ ] | Recon notes open in editor |
| **Time tracked** | [ ] | Timer started for exploitation |
### Common Transition Patterns
```mermaid
graph LR
A[Recon Complete] --> B{Vuln Type}
B -->|Remote Code Execution| C[Prepare Reverse Shell]
B -->|Authentication Bypass| D[Prepare Credentials]
B -->|SQL Injection| E[Prepare SQLmap/Manual]
B -->|File Upload| F[Prepare Web Shell]
B -->|Default Credentials| G[Prepare Credential List]
B -->|Information Disclosure| H[Extract Sensitive Data]
C --> I[Exploitation]
D --> I
E --> I
F --> I
G --> I
H --> I
style A fill:#a8e6cf,stroke:#333,stroke-width:2px
style I fill:#ff6b6b,stroke:#333,stroke-width:2px
Common Workflow Mistakes
Top 10 Mistakes
| Mistake | Consequence | Prevention |
|---|---|---|
| Skipping passive recon | Missing subdomains and services | Always start with passive recon |
| Not taking notes | Can’t write report later | Take notes continuously |
| Spending too much time on one target | Not enough time for other machines | Set time limits per phase |
| Not deduplicating results | Wasted scanning time | Always deduplicate subdomain lists |
| Ignoring UDP ports | Missing DNS, SNMP, etc. | Always scan top UDP ports |
| Not checking for default credentials | Missing easy wins | Always try common defaults |
| Skipping service enumeration | Missing version info | Always run -sV with Nmap |
| Not saving raw output | Missing data for report | Save all tool outputs |
| Rushing to exploitation | Missing vulnerabilities | Complete recon before exploiting |
| Not documenting commands | Can’t reproduce findings | Record all commands used |
Mistake Prevention Checklist
┌─────────────────────────────────────────────────────────────────┐
│ MISTAKE PREVENTION CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Before Starting: │
│ □ Notes template ready │
│ □ Timer set for each phase │
│ □ All tools installed and tested │
│ □ Wordlists available │
│ │
│ During Recon: │
│ □ Taking notes continuously │
│ □ Saving all tool outputs │
│ □ Recording all commands used │
│ □ Checking time spent per phase │
│ □ Deduplicating results │
│ □ Cross-referencing findings │
│ │
│ Before Exploitation: │
│ □ All recon phases completed │
│ □ Attack vector list built │
│ □ Exploits ready │
│ □ Listeners configured │
│ □ Notes saved │
│ │
└─────────────────────────────────────────────────────────────────┘
Documentation Requirements for OSCP Report
Report Structure
The OSCP report requires detailed documentation of all reconnaissance activities:
# OSCP Penetration Test Report
## Executive Summary
[Brief overview of findings and methodology]
## Methodology
[Description of reconnaissance approach]
## Reconnaissance
### Passive Reconnaissance
- WHOIS information
- DNS records
- Subdomain discovery results
- Search engine results
- Technology stack identification
### Active Reconnaissance
- Host discovery results
- Port scan results (include Nmap output)
- Service enumeration details
- Web application findings
### Vulnerability Analysis
- Identified vulnerabilities
- Exploit research
- Risk assessment
## Exploitation
[Detailed exploitation steps]
## Post-Exploitation
[Privilege escalation and lateral movement]
## Conclusion
[Summary of findings and recommendations]
Required Documentation Elements
| Element | Required | Format |
|---|---|---|
| Nmap scan output | Yes | Full output or screenshot |
| Commands used | Yes | Command + output |
| Vulnerability details | Yes | CVE, description, impact |
| Exploit code | Yes | Code or reference |
| Screenshots | Yes | Key findings and exploitation |
| Timeline | Recommended | Activity timeline |
| Notes | Recommended | Recon notes |
Documentation Best Practices
- Save everything: Keep all raw tool outputs
- Timestamp everything: Record when each activity occurred
- Screenshot key findings: Visual evidence for the report
- Record commands: Every command used during the exam
- Note failures: Document what didn’t work (shows thoroughness)
- Organize by target: Separate notes for each machine
- Use consistent formatting: Make the report easy to read
Post-Exploitation Recon Follow-up
Internal Reconnaissance
After gaining initial access, perform internal reconnaissance:
# System information
uname -a
cat /etc/os-release
hostname
whoami
id
# Network information
ifconfig
ip addr
route -n
netstat -tulpn
ss -tulpn
# User information
cat /etc/passwd
cat /etc/shadow
groups
last
# Scheduled tasks
crontab -l
ls -la /etc/cron*
systemctl list-timers
# Running processes
ps aux
top
# Installed software
dpkg -l
rpm -qa
which python
which perl
# File system
df -h
ls -la /tmp
ls -la /var/www
find / -name "*.conf" -type f 2>/dev/null
# Network discovery (internal)
nmap -sV -sn 10.10.10.0/24
nmap -sV -p- 10.10.10.11
Internal Recon Checklist
┌─────────────────────────────────────────────────────────────────┐
│ INTERNAL RECON CHECKLIST │
├─────────────────────────────────────────────────────────────────┤
│ │
│ □ System information (OS, kernel, hostname) │
│ □ User information (current user, groups, other users) │
│ □ Network information (interfaces, routes, listening ports) │
│ □ Running processes │
│ □ Scheduled tasks (cron, systemd timers) │
│ □ Installed software │
│ □ File system layout │
│ □ Sensitive files (configs, credentials, keys) │
│ □ Network discovery (internal hosts) │
│ □ Service enumeration (internal services) │
│ □ Privilege escalation vectors │
│ │
└─────────────────────────────────────────────────────────────────┘
OSCP Exam Tips
Key Takeaways
┌─────────────────────────────────────────────────────────────────┐
│ OSCP WORKFLOW TIPS │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Time Management: │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ • Passive recon: 15-20 minutes MAX │ │
│ │ • Active recon: 30-45 minutes MAX │ │
│ │ • Vuln analysis: 20-30 minutes MAX │ │
│ │ • Set timers for each phase │ │
│ │ • If stuck 30 min, move to another machine │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ Notes Taking: │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ • Start notes template BEFORE beginning recon │ │
│ │ • Record EVERY command used │ │
│ │ • Save ALL tool outputs │ │
│ │ • Take screenshots of key findings │ │
│ │ • Note failures (shows thoroughness) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ Workflow: │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ • Always start passive, then active │ │
│ │ • Quick scan first, then full scan │ │
│ │ • Enumerate services before searching for exploits │ │
│ │ • Build attack vector list before exploitation │ │
│ │ • Have backup vectors ready │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ Decision Making: │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ • Pivot when finding high-value leads │ │
│ │ • Go deeper on confirmed vulnerabilities │ │
│ │ • Move on after 30 min of no progress │ │
│ │ • Park and return to difficult targets │ │
│ │ • Exploit easy wins first │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Quick Reference Workflow
# OSCP Recon Quick Workflow
# Phase 1: Passive (15-20 min)
whois target.com
dig AXFR target.com @ns1.target.com
theHarvester -d target.com -b bing,google,virustotal -l 500 -f passive -n
amass enum -passive -d target.com -o amass.txt
# Phase 2: Active (30-45 min)
nmap -sn 10.10.10.0/24 -oA hosts
nmap -sV -p 1-1000 10.10.10.10 -oA quick
nmap -sV -sC -O -p- 10.10.10.10 -oA full
nmap -sU -p 53,67,68,69,123,161,162,389,500,514,520,521,1434,1900,4500,5060,5353,6901,8545,19000 10.10.10.10 -oA udp
# Phase 3: Vuln Analysis (20-30 min)
searchsploit <service> <version>
nikto -h http://10.10.10.10
gobuster dir -u http://10.10.10.10 -w common.txt
# Phase 4: Exploitation
# [Execute prioritized attack vectors]
Summary
A structured information gathering workflow is essential for OSCP success. Key principles:
- Follow a phased approach: Passive → Active → Vulnerability Analysis → Exploitation
- Manage time strictly: Set limits for each phase and stick to them
- Take comprehensive notes: Document everything for the final report
- Make smart decisions: Know when to pivot, go deeper, or move on
- Build attack vector lists: Prioritize exploitation targets systematically
- Iterate when needed: Return to recon when new leads emerge
- Correlate findings: Cross-reference data from multiple sources
- Avoid common mistakes: Don’t skip phases, don’t rush, don’t forget notes
Remember: The goal of reconnaissance is not to find everything — it’s to find enough to successfully exploit the target within the time constraints. Focus on quality over quantity, and always keep the end goal (exploitation) in mind.