Introduction
Reconnaissance is the foundation of every pentest. Before you touch a target system, you need to understand what you’re looking at. Imagine you are a journalist researching a company — you gather public information without alerting your subject.
Always obtain written, explicit authorization before beginning any reconnaissance. Even passive OSINT can violate terms of service if conducted against systems outside your authorized scope.
The attacker’s perspective at this layer: you know only what’s publicly visible — domain names, IP ranges, employees, technologies, documents left exposed in search engines. Your goal is to build a mental map of the attack surface without generating noise.
Passive OSINT
Purpose of the Test
Passive OSINT (Open Source Intelligence) means gathering information about a target using only publicly available sources — no direct contact with the target’s systems whatsoever. Think of it as reading everything the internet knows about your target before making any direct requests.
Impact
If an attacker can gather useful intelligence without triggering alerts, they can:
- Identify high-value employees for phishing campaigns
- Discover exposed credentials in public repositories
- Map the full technology stack and versions before attacking
- Find forgotten subdomains or staging environments with weaker security
Expected Outcomes
Positive finding: Sensitive information publicly accessible — employee names/roles, internal email formats, leaked credentials on GitHub, infrastructure details in job postings.
Clean result: Minimal surface area, no exposed sensitive data, email formats not guessable, no code repositories with secrets.
Ethical Considerations
- Only query public sources (search engines, DNS records, GitHub, LinkedIn, Shodan)
- Do not impersonate employees or create fake profiles
- Document every source and what you found — the trail matters
- Hard stops: Discovering credentials that appear to be real and active → stop immediately, do not test them, report to client
Testing Flow
flowchart LR
A["LLM ideation"]
B["Human review"]
C["Passive queries only"]
D["Document findings"]
A --> B --> C --> D
Manual Testing Steps
- Confirm written authorization covers OSINT activities
- Record the in-scope domains and IP ranges
- Query WHOIS for registrant data (
whois example.com) - Search LinkedIn for employee names, roles, and technologies
- Search GitHub for the company name, domain, and related keywords
- Check Shodan/Censys for exposed services on known IP ranges
- Use theHarvester to aggregate emails and names
- Check for exposed documents via search engine operators
- Document all findings with source URLs and timestamps
AI-Assisted Testing
How AI Helps Here
AI excels at synthesizing large amounts of public data, generating targeted search queries, and helping you structure raw OSINT into an organized picture of the target. AI should never perform the queries itself against live targets — it helps you plan what to look for.
Prompt Template — Search Query Generation
[ROLE] Senior OSINT analyst assistant
[TARGET] Company: Acme Corp, Domain: acme.com, Sector: financial services
[TASK] Generate a structured OSINT collection plan.
- Public data sources only (no direct target contact)
- Include: search engine operators, GitHub dork queries, LinkedIn search strategies
- Prioritize finding: email format, technology stack, exposed subdomains, any public code repos
[OUTPUT FORMAT]
- Categorized query list by source type
- What each query aims to find
- What a "positive finding" looks like for each query
[CONSTRAINTS] Passive sources only. No automated scanning. No credential testing.
Prompt Template — OSINT Findings Synthesis
[ROLE] Senior security analyst
[FINDINGS] Raw OSINT notes: [paste your collected data]
[TASK] Synthesize these findings into a structured recon summary.
- Identify the most significant exposures
- Map relationships between findings (e.g., leaked email format + employee names = phishing risk)
- Prioritize by likely attacker value
[OUTPUT FORMAT]
- Executive summary (2-3 sentences)
- Key findings table: finding, source, risk level
- Recommended follow-up tests for active phase
[CONSTRAINTS] White-hat framing throughout. Flag any findings that require immediate client notification.
AI Hard Stops for This Topic
- [NO] Never ask AI to perform live queries against target systems
- [NO] Discard AI output that suggests accessing non-public systems
- [NO] Never input real credentials discovered into AI prompts
- [YES] Use AI to plan queries, then execute manually and review results yourself
- [YES] Run all AI-suggested search queries through your own judgment before executing
Tools Reference
| Tool | Purpose | Safe Usage Note |
|---|---|---|
theHarvester | Email and subdomain discovery | Public APIs only; configure API keys for rate limiting |
| Shodan | Exposed services on known IPs | Read-only queries; never enumerate beyond authorized IP ranges |
| GitHub Search | Code and credential exposure | Manual review only; never clone or access private repos |
WHOIS / dig | DNS and registrant data | Standard DNS queries; no zone transfer unless explicitly in scope |
Resources
Subdomain Enumeration
Purpose of the Test
Many organizations expose far more attack surface than they realize through forgotten subdomains — old staging environments, legacy APIs, development servers, or acquired company infrastructure. Subdomain enumeration finds these doors before an attacker does.
Impact
Forgotten subdomains often have:
- Older software versions with known CVEs
- Weaker authentication (or none at all)
- Debug modes or verbose error messages left enabled
- Direct database access intended for internal use only
Expected Outcomes
Positive finding: Subdomains resolving to unexpected IPs, wildcard DNS misconfiguration, staging or dev environments accessible publicly, subdomains with admin panels exposed.
Clean result: Only documented subdomains resolve; staging environments require authentication or are IP-restricted.
Ethical Considerations
- Only enumerate subdomains of in-scope domains
- Passive DNS enumeration (certificate logs, public datasets) is lower risk than active brute-forcing
- Confirm subdomain ownership before testing — a subdomain may belong to a third-party SaaS
- Hard stop: If a subdomain appears to be a customer’s separate environment, stop and confirm scope with client
Testing Flow
flowchart LR
A["LLM ideation"]
B["Human review"]
C["Passive cert/DNS queries"]
D["Limited active wordlist"]
E["Document"]
A --> B --> C --> D --> E
Manual Testing Steps
- Verify the root domain is explicitly in scope
- Query Certificate Transparency logs:
curl https://crt.sh/?q=%.example.com&output=json - Use passive DNS datasets (SecurityTrails, Censys)
- Run
amass enum -passive -d example.comfor passive enumeration - Cross-reference results with known infrastructure
- For active enumeration (if in scope):
subfinder -d example.com - For each discovered subdomain: resolve IP, check HTTP response, check TLS cert
- Flag any subdomain resolving to cloud provider IP that isn’t in the scope documentation
AI-Assisted Testing
Prompt Template — Subdomain Analysis
[ROLE] Security researcher assistant
[INPUT] List of discovered subdomains and their HTTP response codes: [paste list]
[TASK] Analyze this subdomain inventory for security relevance.
- Identify patterns suggesting staging/dev/admin environments
- Flag subdomains with unusual response codes (403, 401, 500, 200 on non-standard ports)
- Identify potential subdomain takeover candidates (NXDOMAIN pointing to cloud services)
[OUTPUT FORMAT]
- Priority triage: high / medium / low interest per subdomain
- Reasoning for each priority
- Suggested next manual verification steps
[CONSTRAINTS] Analysis only — no automated probing suggestions.
AI Hard Stops for This Topic
- [NO] Do not brute-force DNS without explicit written scope permission
- [NO] Never test subdomains that resolve to IPs outside the authorized range
- [NO] Do not test subdomains belonging to third-party SaaS providers
- [YES] Passive CT log queries are always safer than active DNS brute-forcing
- [YES] Confirm each discovered subdomain’s ownership before testing
Tools Reference
| Tool | Purpose | Safe Usage Note |
|---|---|---|
amass | Passive + active enumeration | Start with -passive flag; active DNS brute-force requires explicit scope |
subfinder | Passive subdomain discovery | Uses public APIs; configure rate limits |
crt.sh | Certificate Transparency logs | Passive only; no target contact |
httpx | HTTP probing of discovered subdomains | Rate-limit to avoid triggering WAF alerts |
Resources
Tech Stack Fingerprinting
Purpose of the Test
Knowing what software versions are running tells you which CVEs to check. Tech stack fingerprinting is about reading the labels on the jars before opening them.
Impact
Identified technology stack enables:
- Targeted CVE research against specific versions
- Default credential testing for known admin panels
- Version-specific exploit path planning
- Identifying EOL (end-of-life) software still in production
Expected Outcomes
Positive finding: Outdated software versions with known CVEs, version information exposed in HTTP headers, default framework error pages visible, robots.txt revealing internal paths.
Clean result: No version information in headers, generic error pages, no technology indicators in response bodies.
Ethical Considerations
- Fingerprinting via passive observation of responses is low-risk
- Do not send exploit payloads during fingerprinting
- Record every version identified with the evidence source
- Hard stop: If you identify a critical CVE during fingerprinting, stop exploitation, document and report immediately
Testing Flow
flowchart LR
A["LLM ideation"]
B["Human review"]
C["Passive header/response analysis"]
D["Document versions"]
E["CVE research"]
A --> B --> C --> D --> E
Manual Testing Steps
- Send a basic HTTP request and analyze response headers:
curl -I https://example.com - Look for:
Server,X-Powered-By,X-AspNet-Version,X-Generator - Check page source for framework meta tags, JS library filenames with versions
- Check
robots.txtandsitemap.xmlfor technology clues - Run
whatweb https://example.comfor automated fingerprinting - Check error pages by requesting a non-existent resource (
/doesnotexist404) - Search identified versions against NVD (nvd.nist.gov) for CVEs
AI-Assisted Testing
Prompt Template — CVE Research from Fingerprint
[ROLE] Vulnerability research assistant
[STACK] Identified technologies: Apache 2.4.41, PHP 7.4.3, WordPress 5.8.2
[TASK] Research known CVEs and security issues for this stack.
- Focus on critical and high severity (CVSS >= 7.0)
- Identify any authentication bypass or RCE vulnerabilities
- Suggest non-destructive verification methods for each CVE
[OUTPUT FORMAT]
- CVE table: ID, CVSS, description, affected versions, patch version
- Safe detection method per CVE (no exploitation)
- Remediation recommendation
[CONSTRAINTS] Detection methods only — no exploit code, no weaponized payloads.
AI Hard Stops for This Topic
- [NO] Do not request exploit code from AI
- [NO] Never apply CVE exploits without written scope permission for exploitation testing
- [YES] Use AI for CVE research and detection verification planning only
- [YES] Always verify CVE applicability before escalating to a finding
Tools Reference
| Tool | Purpose | Safe Usage Note |
|---|---|---|
whatweb | Automated fingerprinting | Passive scan; generates HTTP requests — confirm scope |
curl -I | Manual header inspection | Single request; safe |
| Wappalyzer | Browser-based fingerprinting | Passive; uses page content only |
| NVD / CVE database | CVE lookup | Read-only research |
Resources
Google Dorking
Purpose of the Test
Google Dorking uses advanced search operators to find information that is technically public but not intentionally indexed — exposed configuration files, database backups, login panels, and sensitive documents.
Impact
Effective dorking can reveal:
- Configuration files containing database credentials
- Exposed admin panels without authentication
- Internal documents indexed by mistake
- API keys and tokens committed to public GitHub repos
Expected Outcomes
Positive finding: Search results returning files like config.php, .env, database dumps, or admin panels publicly accessible without authentication.
Clean result: No sensitive files indexed; robots.txt properly blocking sensitive paths; no internal paths exposed in search results.
Ethical Considerations
- Google dorking itself uses only Google’s public index — no direct target contact
- Do not access any file or URL discovered via dorking without confirming it is in scope
- If you find credentials, do NOT test them — report immediately
- Hard stop: Discovering customer data in indexed files → stop, do not download, report immediately
Testing Flow
flowchart LR
A["LLM ideation"]
B["Human review"]
C["Google queries only"]
D["Document results (URLs only, no access)"]
E["Report"]
A --> B --> C --> D --> E
Manual Testing Steps
- Confirm domain is in scope before running any dorks
- Use
site:operator to restrict to target domain:site:example.com - Search for exposed files:
site:example.com filetype:env OR filetype:sql OR filetype:log - Search for admin panels:
site:example.com inurl:admin OR inurl:login OR inurl:wp-admin - Search for sensitive configs:
site:example.com "DB_PASSWORD" OR "API_KEY" - Check GitHub:
org:example-corp "password" OR "secret" OR "api_key" - Document URL, search query, and what was found — do not click through to sensitive files
- Report any discovered credentials immediately without testing them
AI-Assisted Testing
Prompt Template — Dork Generation
[ROLE] OSINT research assistant
[TARGET] Domain: example.com, Industry: healthcare SaaS
[TASK] Generate a targeted list of Google dork queries for this domain.
- Focus on: exposed configs, admin interfaces, sensitive file types, credentials
- Include GitHub-specific dorks for the organization
- Prioritize by likelihood of finding something sensitive
[OUTPUT FORMAT]
- Categorized dork list with search engine (Google / GitHub / Bing)
- What each dork is looking for
- What action to take if results are found (document only vs. report immediately)
[CONSTRAINTS] Search queries only — no instructions to access found content.
AI Hard Stops for This Topic
- [NO] Never ask AI to generate payloads for accessing systems discovered via dorks
- [NO] Do not access any URL discovered via dorking before confirming scope
- [NO] Never download files discovered via dorks (even if they appear to be public)
- [YES] Document the search result URL and finding summary only
- [YES] Report any credential discovery immediately without testing
Tools Reference
| Tool | Purpose | Safe Usage Note |
|---|---|---|
| Google Advanced Search | Targeted dork queries | Search engine queries only; no target contact |
| GitHub Search | Code and secret exposure | Read search results only; do not clone private repos |
dorkbot | Automated dork scanning | Use with extreme care; generates real HTTP requests |
| Shodan | Internet-wide exposed service search | Read-only; no interaction with found services |
Resources
Comprehensive Information Targets
What to Look For
| Category | Specific Data Points | Why It Matters |
|---|---|---|
| Infrastructure | IP ranges, ASN numbers, SSL certificate hashes, cloud provider usage | Identifies attack surface boundaries and hosting relationships |
| Personnel | Email formats, naming conventions, job roles, reporting structures, work locations | Enables targeted phishing and physical pretexting |
| Technology | Web server versions, framework details, CDN usage, load balancers, database types, CMS platforms | Determines specific exploit paths and version-specific CVEs |
| Business Operations | Office hours, support schedules, third-party vendors, software procurement cycles, internal tools (Jira, Confluence, Slack) | Identifies windows of opportunity and supply chain vectors |
| Security Posture | SPF/DKIM/DMARC records, WAF providers, email filtering services, SOC information, bug bounty programs | Reveals defensive capabilities and detection thresholds |
| Exposed Secrets | API keys in public repos, hardcoded credentials in JS files, internal paths in comments, staging configs | Direct access or privileged information leakage |
| Relationships | Subsidiaries, acquisitions, parent companies, shared infrastructure, SSO relationships, trusted partners | Expands attack surface through trust boundaries |
Where to Search
Public Datasets (Zero Target Contact)
| Source | Data Type | Search Strategy |
|---|---|---|
| Certificate Transparency Logs (crt.sh, Entrust, Google) | Subdomains, internal hostnames, expired certs | Query %.target.com — reveals internal systems issued public certs by mistake |
| DNSDB (Farsight, SecurityTrails) | Historical DNS records, old subdomains, IP history | Look for records predating current security controls |
| ASN/Whois (ARIN, RIPE, APNIC, BGPView) | IP ownership, network ranges, peered networks | Map entire infrastructure footprint across cloud providers |
| Code Repositories (GitHub, GitLab, Bitbucket, SourceForge) | Commits, issues, wikis, actions, forks | Search: org:target extension:env password api_key token secret |
| Paste Sites (Pastebin, ControlFlag, Ghostbin) | Dumped logs, credentials, internal notes | Monitor continuously; set alerts for target keywords |
| Dark Web Markets (via monitored feeds) | Credential dumps, breached data | Use threat intelligence feeds; never access directly without authorization |
| Archives (Wayback Machine, Archive.today, Google Cache) | Historical site content, removed pages, old API endpoints | Check for endpoints that existed before security was implemented |
| Cloud Buckets (Grayhat Warfare, Public Bucket Search) | Exposed S3/Azure/Google buckets | Look for target in bucket names; check public listing permissions |
| Job Boards (LinkedIn, Indeed, Stack Overflow Jobs) | Tech stack mentions, internal tools, team structures | Parse job descriptions for exact software names and versions |
| Social Media (Twitter, Reddit, Hacker News, Medium) | Employee complaints, technical discussions, incident mentions | Search: "target" "VPN" "target" "database" "target" "breach" |
| Document Sharing (SlideShare, Scribd, Google Drive, Dropbox) | Internal presentations, network diagrams, security policies | Use site:slideshare.net "target" or search for file types |
| Collaboration Tools (Slack channels indexed, Trello public boards, Notion public pages) | Internal workflows, credentials, project names | Increasingly common source of accidental exposure |
Active Sources (Target Contact — Requires Authorization)
| Technique | Method | Stealth Consideration |
|---|---|---|
| DNS Enumeration | Zone transfers (AXFR), NSEC walking, brute-force subdomains | Use recursive resolvers not owned by target; randomize timing |
| Port Scanning | SYN scan, TCP connect, UDP scan | Use decoy scans, randomize order, low rate (--scan-delay, --max-rate) |
| HTTP Probing | Request headers, response analysis, directory fuzzing | Use common user-agents, mimic browser behavior, respect robots.txt |
| Banner Grabbing | Service identification, version extraction | Connect but disconnect before full handshake where possible |
| SNMP Enumeration | Community string guessing, MIB walking | Default strings only unless authorized for brute-force |
| Email Probing | SMTP VRFY, EXPN, RCPT TO | High risk of detection; avoid unless explicitly in scope |
Stealth Techniques
Stealth Scanning Principles
flowchart LR
A["Traditional Scanner\n1000 packets/second"] --> B["WAF alerts · IDS triggers · Log entries"]
C["Stealth Scanner\n1 packet / 10 seconds over 3 hours"] --> D["Blends with legitimate traffic"]
Low-and-Slow Techniques
| Technique | Implementation | Detection Risk |
|---|---|---|
| Randomized Scan Order | nmap -T2 --max-rate 50 --scan-delay 1s --randomize-hosts | Low — avoids pattern detection |
| Decoy Scanning | nmap -D RND:10 target (spoofs multiple source IPs) | Medium — requires spoofing capability |
| Idle/Zombie Scan | nmap -sI zombie_ip target (bounces off idle host) | Very Low — appears to come from innocent third party |
| DNS Resolution via Third Party | Use 8.8.8.8, 1.1.1.1, or open resolvers instead of target’s DNS | Low — target DNS logs show Google, not you |
| Split Scanning | Multiple scanners from different IPs, each scanning different port ranges | Low — fragments attribution |
| Timing Randomization | Random intervals between probes (not fixed delays) | Very Low — no predictable pattern |
| Mimic Legitimate Traffic | Copy user-agent, TCP window size, TTL from real browser traffic | Low — blends with real users |
| Cloud Scanning | Rotate through cloud provider IPs (AWS, Azure, GCP) | Medium — costs money, IPs can be traced to provider |
Active Recon Command Examples (Stealth)
# Nmap stealth scan — 20 packets per second max, random delays
nmap -sS -Pn -T2 --max-rate 20 --min-rate 5 --scan-delay 500ms \
--max-scan-delay 5s --randomize-hosts -p 1-10000 target.com
# DNS brute-force with randomized timing
for sub in $(cat subdomains.txt); do
sleep $(shuf -i 1-10 -n 1) # Random 1-10 second delay
dig $sub.target.com @8.8.8.8 +short
done
# HTTP probing with browser mimicry
curl -s -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" \
-H "Accept-Language: en-US,en;q=0.9" \
--connect-timeout 5 \
--retry 1 \
https://target.com/admin
What Triggers Detection (Avoid These)
| Action | Why It Triggers | Alternative |
|---|---|---|
| Full port scan | Sequential port probing is unnatural | Scan top 100 ports only, or use Shodan data |
| Default Nmap scripts | Known signatures (http-title, smb-os-discovery) | Write custom minimal probes |
| Aggressive timing (-T4/T5) | Obvious scanner behavior | Use -T1 or -T2 with custom rates |
| Identical payloads | Signature detection | Randomize payloads, add jitter |
| ICMP echo requests | Often monitored separately | Skip host discovery (-Pn) |
| Simultaneous scans | Multiple sources at same time | Stagger scans across hours/days |
| Scanning from single IP | Easy to block | Rotate IPs via VPN/proxy rotation |
| Non-standard TCP flags | NULL/FIN/XMAS scans are well-known signatures | Stick to SYN or connect scans |
Social Engineering Recon
Pretext Development
Before any social interaction, build a believable persona:
| Persona Element | How to Research | Example |
|---|---|---|
| Name | Common names in target’s region, not matching employees | ”Michael Chen” |
| Company | Real vendor/partner of target (via LinkedIn, news) | “DataSync Solutions” (real vendor) |
| Phone Number | Google Voice or burner — area code matching target | (512) 555-xxxx (Austin area) |
| Email Domain | Gmail/Proton (harder), or lookalike domain (requires setup) | m.chen@datasync-solutions.com (registered domain) |
| Backstory | Recent hire, contractor, vendor rep, auditor | ”New account manager handling Acme’s contract” |
| Supporting Artifacts | Fake LinkedIn, fake website, email signature | Quick one-page site on Netlify |
Information to Gather Before Phishing
| Pre-Phishing OSINT | Source | What It Enables |
|---|---|---|
| Email format | LinkedIn, Hunter.io, EmailHippo | first.last@company.com vs flast@company.com |
| Email signature | Public emails, LinkedIn messages | Real signatures for forgery |
| Internal terminology | Job posts, GitHub comments, presentations | ”TPS reports”, “Sprint 42”, “QBR” |
| Meeting cadence | LinkedIn “attended”, Calendar invites (public) | “Tomorrow’s standup at 10am” |
| Reporting structure | LinkedIn connections, Org charts (TheOrg) | “Your VP Sarah requested…” |
| Recent events | Press releases, SEC filings, employee social media | ”Congratulations on the Q3 acquisition!” |
| Travel schedules | LinkedIn check-ins, public calendars | ”I know you’re traveling to London next week” |
| Software used | Job posts, Stack Overflow, Slack screenshots | ”Slack is down, please click here for updates” |
| Vendor relationships | Press releases, SEC filings, LinkedIn | ”From our partners at [Real Vendor]“ |
Who to Target in an Organization
| Role | Access Value | Social Engineering Angle | Difficulty |
|---|---|---|---|
| Help Desk / IT Support | Password resets, VPN access, system privileges | ”I forgot my token” / “New laptop setup” | Low |
| Executive Assistants | Calendars, travel, sensitive docs, credentials | ”The CEO needs this signed urgently” | Medium |
| Sales / BD | Customer data, contracts, CRM access | ”This prospect needs a demo” | Low |
| HR | PII, payroll, employee records | ”New hire onboarding” / “Benefits change” | Medium |
| Finance / AP | Wire transfers, invoices, vendor payments | ”Urgent invoice payment” | High (but high reward) |
| Marketing | Social media accounts, customer lists | ”We need to update our social credentials” | Low |
| Developers | Code access, API keys, production credentials | ”Security audit of your repo” | Medium |
| Sysadmins | Root access, infrastructure, backups | ”Vendor support needs access to resolve incident” | High |
| New Hires | Willing to help, unaware of policies | ”IT here, we need to verify your setup” | Very Low |
| Contractors | Less security training, limited oversight | ”Update your billing information” | Low |
| Third-Party Vendors | Trusted access, often overlooked | ”We’re rotating all service account passwords” | Medium |
Targeting Priority Matrix
High Value + Easy Access → EXECUTIVE ASSISTANTS, NEW HIRES
High Value + Hard Access → SYSADMINS, FINANCE
Low Value + Easy Access → MARKETING, SALES
Low Value + Hard Access → HR (note: DEVELOPERS are high value for code access)
Phishing Emails
Components of a Believable Phishing Email
| Component | What to Research | Example |
|---|---|---|
| Sender Name | Real person, real vendor, internal system | ”Sarah Chen (IT Support)“ |
| Sender Domain | Lookalike domain or compromised vendor | @acme-helpdesk.com |
| Subject Line | Current events, urgency, relevance | ”ACTION REQUIRED: MFA Enrollment Deadline TODAY” |
| Preheader Text | Continuation of subject in email preview | ”Your account will be locked at 5pm…” |
| Timing | During business hours, relevant timezone | Tuesday 10:02 AM (not 3 AM Sunday) |
| Tone | Matches internal communication style | Formal vs casual — research via public emails |
| Signature | Copied from real email signature | Full signature with fake phone number |
| Call to Action | Urgent, but not panic-inducing | ”Verify your account” vs “Click now or else” |
| Landing Page | Replica of real login page, valid SSL cert | https://acme-verify.com/login |
| Tracking | Opens, clicks, user-agent | Use canary tokens or tracking pixels |
Phishing Email Templates by Target
For IT Support Request (Target: General Employee)
Subject: Urgent: Microsoft 365 MFA Re-registration Required
From: IT Security <no-reply@acme-security.com>
To: [Employee]
Dear [First Name],
Our logs indicate your Multi-Factor Authentication (MFA) settings are out of
sync with our new security policies implemented [yesterday/today].
Please re-register your MFA device within 2 hours to avoid interruption:
[Re-register MFA Device — LINK]
This is an automated security requirement. No further action needed after completion.
IT Security Team
[Real company signature block]
For Executive Assistant (Target: EA to CFO/CEO)
Subject: Urgent document for [CEO Name] signature
From: [Real Vendor Name] <contracts@vendor-partners.com>
To: [EA Name]
Hi [EA Name],
Attached is the revised MSA for [CEO Name]'s signature. The redline changes from
our previous discussion (Section 4.2 and 7.1) have been incorporated.
[CEO Name] mentioned this was time-sensitive. Please have them e-sign below:
[Review and Sign Document — LINK]
The original executed copy will follow via FedEx.
Best,
Michael Chen | Account Executive | [Real Vendor Name] | (512) 555-0123
For Help Desk Phishing (Target: IT Support)
Subject: VPN connectivity issue — urgent
From: [Employee Name from LinkedIn] <[fake domain]>
To: helpdesk@target.com
Hi Help Desk,
I'm traveling and cannot connect to the VPN. I've tried restarting and
resetting my token. I'm on a deadline for the [Project Name] deliverable.
Error screenshot: [Screenshot of fake error — LINK]
My extension is [real extension if found].
Thanks,
[Real Employee Name] | [Real Title]
Phishing Landing Page Best Practices
| Element | Implementation |
|---|---|
| URL | Lookalike domain with valid SSL (Let’s Encrypt free) |
| Design | Copy target’s login page HTML; modify form action |
| Credential Capture | POST to your server, then redirect to real site |
| Session Handling | Pass through to real site so user doesn’t notice |
| User-Agent Logging | Record what they used (Windows/Mac, browser) |
| 2FA Capture | If possible, capture token and replay immediately |
| Geofencing | Block IPs not in target’s region to avoid scanning |
Detection Avoidance for Phishing
| Technique | Why It Works |
|---|---|
| Send from real compromised vendor | Passes SPF/DKIM/DMARC |
| Use email marketing services | High deliverability, less scrutiny |
| Send in waves of 10–20 | Avoids volume thresholds |
| No links in first email | Build trust, link in follow-up |
| Rotate sending IPs | Avoids blacklisting |
| Send during target’s business hours | Blends with legitimate traffic |
| Text-only emails | Bypasses image-blocking, looks more legitimate |
| Reply-to monitoring | Handle responses manually to maintain illusion |
OPSEC
Reduce Your Digital Footprint
| Attack Surface | Problem | Solution |
|---|---|---|
| Your IP Address | Logged by target, WAF, CDN, cloud provider | VPN chain (Entry → Middle → Exit), Tor (for OSINT only), rotating proxies |
| Your Tools | Default user-agents, TCP fingerprints | Randomize all identifying fields |
| Your Timing | Non-business hours traffic | Schedule scans during target’s 9–5 |
| Your Volume | Spikes in traffic | Low and slow, spread across days/weeks |
| Your Patterns | Predictable intervals | Random jitter, varying packet sizes |
| Your Sources | Single source IP | Rotate exit nodes, use cloud functions as scanners |
| Your DNS | Leaks via local resolver | Use DoH (DNS over HTTPS) or third-party resolvers |
| Your Certificates | TLS handshake fingerprints | Use common ciphers, mimic browser TLS stack |
The OPSEC Checklist
Before Any Action:
- Written authorization in hand (scope, duration, methods)
- Emergency stop contact identified
- Burner infrastructure prepared (VPS, VPN, domains)
- Testing environment isolated from personal identity
- Time window selected (avoid simultaneous with real incidents)
During Recon:
- No direct contact with target infrastructure before passive phase complete
- All queries via third-party services (Google cache, Archive.org, CT logs)
- Active scans scheduled during target’s low-monitoring hours (if known)
- Rates limited to blend with legitimate traffic
- User-agents rotated from real browser pools
- No simultaneous scans from same source
- Regular pauses (scan 10 min, wait 60 min)
After Session:
- All logs cleared from infrastructure
- Burner VPS destroyed
- Domains allowed to expire or repurposed
- No findings stored on personal devices (use encrypted, air-gapped storage)
Detection Indicators You Can’t Control
| Signal | Why It’s Risky | Mitigation |
|---|---|---|
| RTT (Round Trip Time) | Consistent latency suggests VPN/proxy | Use geographically local exit nodes |
| TCP Window Size | OS fingerprinting | Use tools that mimic common OS |
| TLS Cipher Suites | Unique ordering identifies tool | Use curl with browser cipher list |
| HTTP/2 Support | Many scanners don’t support it | Use modern tools (httpx) |
| Traffic Timing Patterns | Machine-like precision | Add human jitter, random delays |
| Recursive DNS | Requests to target’s DNS servers | Use 8.8.8.8 or 1.1.1.1 |
| ICMP Unreachables | Scan triggers error responses | Use -Pn (skip host discovery) |
AI Assistance for Reconnaissance (Extended)
AI Prompt Template: Target Profiling
[ROLE] Senior OSINT analyst specializing in corporate reconnaissance
[TARGET] Company: {target_name}, Domain: {domain}, Industry: {industry}
[KNOWN DATA] {paste any existing intel}
[TASK] Generate a comprehensive intelligence collection plan.
Phase 1 — Passive OSINT (no target contact):
- Infrastructure: IP ranges, ASN, cloud providers, CDN, WAF
- Personnel: Key roles (C-suite, IT, Security, HR, Finance), naming patterns
- Technology: Stack fingerprinting sources (job posts, GitHub, Stack Overflow)
- Business: Subsidiaries, acquisitions, vendors, office locations
- Security: SPF/DKIM/DMARC, bug bounty, security.txt, breach history
Phase 2 — Low-Noise Active (requires authorization):
- Subdomain candidates based on naming patterns
- Port ranges most likely to be open (based on industry/stack)
- Service versions to probe for
- Directory structure patterns
For each data point, specify:
- Source to query (exact URL or tool)
- Search query string
- Expected output format
- False positive indicators
- Next step if found
[OUTPUT FORMAT] JSON with phases as keys, each containing array of query objects
[CONSTRAINTS] No automated scanning suggestions. No exploitation.
Flag any finding requiring client notification.
AI Prompt Template: Phishing Target Selection
[ROLE] Social engineering engagement planner
[TARGET OSINT] {paste employee list, org structure, vendor relationships}
[TASK] Identify optimal phishing targets based on access, click likelihood, and detection risk.
For each candidate:
- Role and department
- Publicly available email (Y/N)
- Social media activity level
- Likely security awareness (based on role/title)
- Access value (what credentials provide)
- Best pretext (IT issue, vendor request, executive urgency)
- Estimated success probability
- Estimated detection risk
Rank by: (success_probability × access_value) / detection_risk
[OUTPUT FORMAT] Table with rankings, recommended pretext per target
[CONSTRAINTS] Educational/authorized testing only.
No actual phishing without written authorization.
AI Prompt Template: Stealth Scan Planning
[ROLE] Red team infrastructure planner
[TARGET] IP ranges: {ranges}, Timezone: {tz}, Estimated monitoring: {low/medium/high}
[TASK] Generate a stealth scanning schedule that minimizes detection probability.
Parameters:
- Total ports to scan: {count}
- Available time window: {start} to {end} local time
- Maximum packets per minute: {rate}
- Available source IPs: {count}
Output:
- Day-by-day scan schedule with randomization
- Source IP rotation pattern
- Inter-probe delay distribution (mean, min, max)
- Port order randomization strategy
- Fallback if detection suspected
[CONSTRAINTS] All timing assumes authorized testing. Add 40% buffer to all estimates.
AI Prompt Template: Email Realism Analysis
[ROLE] Phishing email quality assurance reviewer
[DRAFT EMAIL] {paste your phishing email draft}
[TARGET CONTEXT] Industry: {industry}, Internal terms: {terms}, Sender names: {names}
[TASK] Analyze this email for realism and detection flags:
1. Red flags (technical): sender domain, SPF/DKIM implications, URL patterns
2. Red flags (behavioral): tone match, urgency level, request plausibility, timing
3. Suggested improvements: specific wording changes, context to add, elements to remove
4. Success likelihood: Low/Medium/High with reasoning
[OUTPUT FORMAT] Score each category 1–10, list specific fixes
[CONSTRAINTS] Educational use only. No actual sending without written authorization.
AI Hard Stops for AI-Assisted Recon
| Stop | Why | Action |
|---|---|---|
| AI generating live target queries | AI can’t know authorization boundaries | Never pipe AI output directly to scanning tools |
| AI suggesting credential testing | Legal boundary | Treat as theoretical only |
| AI providing exploit code | Violates responsible disclosure | Discard and re-prompt with constraints |
| AI identifying real credentials | May be live secrets | Stop, document, notify client immediately |
| AI hallucinating subdomains or IPs | Common LLM error | Verify every AI-suggested target against real data |
| AI suggesting dark web access | Legal and safety risk | Never follow; re-scope prompt |
Recon Tools Matrix
Passive OSINT Tools (No Target Contact)
| Tool | Purpose | Key Command |
|---|---|---|
| theHarvester | Emails, subdomains | theHarvester -d target.com -b all |
| Amass (passive) | Subdomain discovery | amass enum -passive -d target.com |
| Subfinder | Subdomain discovery | subfinder -d target.com -all |
| Shodan | Infrastructure exposure | shodan search "org:target" |
| Censys | Certificate/device search | censys search "target.com" |
| SecurityTrails | Historical DNS | API query for subdomains |
| crt.sh | Certificate transparency | curl "https://crt.sh/?q=%25.target.com" |
| Wayback Machine | Historical content | waybackurls target.com |
| GitHub Search | Code/secret exposure | Search API with org/extension/keyword tokens |
| Hunter.io | Email discovery | hunter.io domain/target.com |
| BuiltWith | Technology profile | builtwith.com/target.com |
Low-Noise Active Tools (Requires Authorization)
| Tool | Purpose | Stealth Configuration |
|---|---|---|
| Nmap | Port/service discovery | -T2 --max-rate 20 --scan-delay 1s -Pn -f |
| HTTPx | HTTP service probing | -t 10 -rl 10 -c 50 -random-agent |
| FFUF | Directory fuzzing | -t 5 -p 0.5 -rate 10 -fc 404 |
| GoBuster | DNS/URI brute | -t 5 -q --delay 500ms |
| Dig | DNS queries | Use third-party resolvers, random delays |
| Curl | HTTP requests | Browser user-agent, random referers |
Social Engineering Infrastructure
| Tool | Purpose | Notes |
|---|---|---|
| Gophish | Phishing campaign management | Self-hosted; no third-party visibility |
| Evilginx2 | 2FA capture proxy | Requires domain + SSL cert |
| Canary Tokens | Detection/alerting | Place in recon targets to detect counter-recon |
| Hunter | Email verification | API rate limits apply |
| PhoneInfoga | Phone number OSINT | Passive only |
Legal and Ethical Boundaries (Reinforced)
| Activity | Legal Status | Authorization Required |
|---|---|---|
| Public search engine queries | Legal | None (but document) |
| WHOIS lookups | Legal | None |
| Certificate transparency queries | Legal | None |
| Wayback Machine access | Legal | None |
| LinkedIn profile viewing | Legal | None (but rate limit) |
| DNS resolution (standard) | Legal | None |
| DNS brute-force (wordlist) | Gray area | Written authorization |
| Port scanning | Civil liability in some jurisdictions | Written authorization |
| Banner grabbing | Usually legal but can violate ToS | Written authorization |
| Directory fuzzing | May violate CFAA (US) | Written authorization |
| Credential testing | Illegal without authorization | Explicit written authorization |
| Phishing (simulated) | Requires prior approval | Explicit written authorization + legal review |
| Exploitation | Illegal without authorization | Explicit written authorization |
Key Takeaways
- Passive first, active last — Exhaust all passive sources before any direct contact.
- Stealth is deliberate — Low-and-slow beats fast-and-loud every time.
- Recon is continuous — Revisit findings as target changes over time.
- People are the weakest link — Social engineering prep is as important as technical recon.
- Document everything — Every query, source, and finding; your legal protection depends on it.
- AI assists, doesn’t act — Use AI for planning and synthesis, not execution against live targets.
- Know when to stop — Credentials found? Stop. Customer data exposed? Stop. Report immediately.