CRLFuzz
Overview
Sezione intitolata “Overview”CRLFuzz is a lightweight, fast CRLF (Carriage Return Line Feed) injection vulnerability scanner written in Go. It efficiently detects CRLF injection vulnerabilities across web applications by testing parameters and headers against multiple payloads. The tool is ideal for bug bounty hunters and penetration testers conducting security assessments on web applications.
Installation
Sezione intitolata “Installation”Prerequisites
Sezione intitolata “Prerequisites”- Go 1.11+ (for building from source)
- Or download precompiled binaries
From Source
Sezione intitolata “From Source”git clone https://github.com/dwisiswant0/crlfuzz.git
cd crlfuzz
go build -o crlfuzz
macOS/Linux (Binary)
Sezione intitolata “macOS/Linux (Binary)”wget https://github.com/dwisiswant0/crlfuzz/releases/download/v1.5.0/crlfuzz_1.5.0_linux_amd64.tar.gz
tar -xvf crlfuzz_1.5.0_linux_amd64.tar.gz
chmod +x crlfuzz
Homebrew (macOS)
Sezione intitolata “Homebrew (macOS)”brew install dwisiswant0/tap/crlfuzz
Windows
Sezione intitolata “Windows”Download .exe from releases: https://github.com/dwisiswant0/crlfuzz/releases
Basic Usage
Sezione intitolata “Basic Usage”| Command | Description |
|---|---|
crlfuzz -u <url> | Scan single URL |
crlfuzz -l <file> | Scan URLs from file |
crlfuzz -u <url> -v | Verbose output |
crlfuzz --help | Show help menu |
crlfuzz -u <url> -c 10 | Set concurrency level |
Single URL Scanning
Sezione intitolata “Single URL Scanning”Basic Scan
Sezione intitolata “Basic Scan”crlfuzz -u 'http://example.com/?page=test'
With Verbose Output
Sezione intitolata “With Verbose Output”crlfuzz -u 'http://example.com/?page=test' -v
Show Request/Response Details
Sezione intitolata “Show Request/Response Details”crlfuzz -u 'http://example.com/?name=value' -v --show-req --show-resp
Batch Scanning
Sezione intitolata “Batch Scanning”Scan Multiple URLs from File
Sezione intitolata “Scan Multiple URLs from File”crlfuzz -l urls.txt
Create urls.txt:
http://example.com/?page=test
http://example.com/?user=admin
http://example.com/?id=123
Scan All URLs with Verbose Mode
Sezione intitolata “Scan All URLs with Verbose Mode”crlfuzz -l urls.txt -v
Output Results to File
Sezione intitolata “Output Results to File”crlfuzz -l urls.txt -o results.txt
Concurrency and Performance
Sezione intitolata “Concurrency and Performance”Adjust Concurrency Level
Sezione intitolata “Adjust Concurrency Level”crlfuzz -l urls.txt -c 25
Default is 10 concurrent requests. Increase for larger scans.
Maximum Concurrency
Sezione intitolata “Maximum Concurrency”crlfuzz -l urls.txt -c 100
Use cautiously to avoid overwhelming target servers.
Timeout Configuration
Sezione intitolata “Timeout Configuration”crlfuzz -u 'http://example.com/?test=value' -t 30
Set timeout in seconds (default is 10 seconds).
Payload Configuration
Sezione intitolata “Payload Configuration”Default Payloads
Sezione intitolata “Default Payloads”CRLFuzz includes built-in CRLF injection payloads:
%0d%0a (URL-encoded CRLF)
%0d (CR only)
%0a (LF only)
\r\n (Raw CRLF)
Custom Payload File
Sezione intitolata “Custom Payload File”crlfuzz -u 'http://example.com/?page=test' -payloads custom-payloads.txt
Create custom-payloads.txt:
%0d%0a
%0d%0aSet-Cookie:admin=true
%0d%0aLocation:http://evil.com
%0d%0aX-Injected:value
Test Specific Injection Points
Sezione intitolata “Test Specific Injection Points”crlfuzz -u 'http://example.com/?param=VALUE' -payloads payloads.txt
CRLFuzz replaces VALUE with each payload.
Header Testing
Sezione intitolata “Header Testing”Test Custom Headers
Sezione intitolata “Test Custom Headers”crlfuzz -u 'http://example.com/' -H 'X-Forwarded-For: test' -v
Multiple Custom Headers
Sezione intitolata “Multiple Custom Headers”crlfuzz -u 'http://example.com/' -H 'User-Agent: test' -H 'X-Custom: value'
Test All Headers
Sezione intitolata “Test All Headers”crlfuzz -u 'http://example.com/?page=test' --test-headers
Parameter Fuzzing
Sezione intitolata “Parameter Fuzzing”Scan All Parameters
Sezione intitolata “Scan All Parameters”crlfuzz -u 'http://example.com/?page=test&user=admin&id=123'
Automatically tests all parameters for CRLF injection.
Focus on Specific Parameter
Sezione intitolata “Focus on Specific Parameter”crlfuzz -u 'http://example.com/?page=test' -param 'page'
Exclude Parameters from Testing
Sezione intitolata “Exclude Parameters from Testing”crlfuzz -u 'http://example.com/?page=test&id=123' -skip 'id'
Output Formats
Sezione intitolata “Output Formats”Default Text Output
Sezione intitolata “Default Text Output”crlfuzz -u 'http://example.com/?test=value'
Output shows:
- URL
- Vulnerable parameter
- Payload used
- Response status code
JSON Output
Sezione intitolata “JSON Output”crlfuzz -l urls.txt -o results.json -json
CSV Export
Sezione intitolata “CSV Export”crlfuzz -l urls.txt -o results.csv -csv
Suppress Output
Sezione intitolata “Suppress Output”crlfuzz -l urls.txt -q
Quiet mode - only shows results.
Proxy Configuration
Sezione intitolata “Proxy Configuration”HTTP Proxy
Sezione intitolata “HTTP Proxy”crlfuzz -u 'http://example.com/?test=value' -proxy http://127.0.0.1:8080
SOCKS5 Proxy
Sezione intitolata “SOCKS5 Proxy”crlfuzz -u 'http://example.com/?test=value' -socks5 127.0.0.1:1080
Proxy with Authentication
Sezione intitolata “Proxy with Authentication”crlfuzz -u 'http://example.com/?test=value' -proxy http://user:pass@127.0.0.1:8080
SSL/TLS Options
Sezione intitolata “SSL/TLS Options”Ignore SSL Certificate Errors
Sezione intitolata “Ignore SSL Certificate Errors”crlfuzz -u 'https://example.com/?test=value' --insecure
Use Custom CA Certificate
Sezione intitolata “Use Custom CA Certificate”crlfuzz -u 'https://example.com/?test=value' --ca-cert /path/to/ca.crt
HTTP Methods and Request Customization
Sezione intitolata “HTTP Methods and Request Customization”Test POST Parameters
Sezione intitolata “Test POST Parameters”crlfuzz -u 'http://example.com/' -method POST -data 'param=VALUE&user=test'
PUT Request
Sezione intitolata “PUT Request”crlfuzz -u 'http://example.com/api/resource' -method PUT -data 'field=VALUE'
Custom Request Body
Sezione intitolata “Custom Request Body”crlfuzz -u 'http://example.com/api' -method POST -data '{"key":"VALUE"}'
Add Request Headers
Sezione intitolata “Add Request Headers”crlfuzz -u 'http://example.com/?test=VALUE' -H 'Authorization: Bearer token' -H 'Content-Type: application/json'
Response Analysis
Sezione intitolata “Response Analysis”Show Response Headers
Sezione intitolata “Show Response Headers”crlfuzz -u 'http://example.com/?test=value' -v --show-resp
Show Response Body
Sezione intitolata “Show Response Body”crlfuzz -u 'http://example.com/?test=value' -v --show-body
Filter by Status Code
Sezione intitolata “Filter by Status Code”crlfuzz -l urls.txt --filter-status 200
Only test URLs that return status 200.
Advanced Filtering
Sezione intitolata “Advanced Filtering”Match Success by Response Content
Sezione intitolata “Match Success by Response Content”crlfuzz -u 'http://example.com/?test=value' -match 'Set-Cookie'
Consider vulnerability confirmed if response contains “Set-Cookie”.
Filter Responses Containing Text
Sezione intitolata “Filter Responses Containing Text”crlfuzz -l urls.txt -match 'Location:' -o vulnerable.txt
Rate Limiting
Sezione intitolata “Rate Limiting”Request Delay (Milliseconds)
Sezione intitolata “Request Delay (Milliseconds)”crlfuzz -l urls.txt -delay 100
Add 100ms delay between requests.
Requests Per Second
Sezione intitolata “Requests Per Second”crlfuzz -l urls.txt -rate 10
Limit to 10 requests per second.
Common Workflows
Sezione intitolata “Common Workflows”Quick Vulnerability Scan
Sezione intitolata “Quick Vulnerability Scan”crlfuzz -u 'http://example.com/?page=home&user=test'
Comprehensive Bug Bounty Scan
Sezione intitolata “Comprehensive Bug Bounty Scan”crlfuzz -l target-urls.txt -v --show-req --show-resp -o findings.txt
Stealth Scanning
Sezione intitolata “Stealth Scanning”crlfuzz -l urls.txt -delay 500 -c 5 --insecure
Large-Scale Assessment
Sezione intitolata “Large-Scale Assessment”crlfuzz -l thousands-of-urls.txt -c 50 -t 30 -json -o results.json
CRLF Injection Attack Vectors
Sezione intitolata “CRLF Injection Attack Vectors”Header Injection Attack
Sezione intitolata “Header Injection Attack”Payload: %0d%0aSet-Cookie:admin=true
Result: Response header contains injected Set-Cookie
Response Splitting
Sezione intitolata “Response Splitting”Payload: %0d%0a%0d%0aHTTP/1.1 200 OK
Result: Ability to split HTTP response
Session Fixation
Sezione intitolata “Session Fixation”Payload: %0d%0aSet-Cookie:SESSIONID=attacker-controlled
Result: Force victim session ID
Open Redirect via Headers
Sezione intitolata “Open Redirect via Headers”Payload: %0d%0aLocation:http://evil.com
Result: Redirect user to malicious site
Cache Poisoning
Sezione intitolata “Cache Poisoning”Payload: %0d%0aX-Original-URL:/cache-buster
Result: Poison cached responses
Understanding CRLFuzz Output
Sezione intitolata “Understanding CRLFuzz Output”Example Output
Sezione intitolata “Example Output”[CRLF] http://example.com/?page=VALUE
[PARAMETER] page
[PAYLOAD] %0d%0aSet-Cookie:admin=true
[STATUS] 200
[FOUND] Yes
Vulnerability Indicators
Sezione intitolata “Vulnerability Indicators”- Status code change after injection
- Additional headers in response
- Response splitting evidence
- Cookie manipulation detection
Detection Evasion
Sezione intitolata “Detection Evasion”Randomize User-Agent
Sezione intitolata “Randomize User-Agent”crlfuzz -u 'http://example.com/?test=value' -H 'User-Agent: Mozilla/5.0 (random)'
Vary Request Patterns
Sezione intitolata “Vary Request Patterns”crlfuzz -l urls.txt -delay 500 -c 3
Rotate Through Payloads
Sezione intitolata “Rotate Through Payloads”crlfuzz -u 'http://example.com/?test=value' -payloads rotating-payloads.txt
Troubleshooting
Sezione intitolata “Troubleshooting”Connection Timeout
Sezione intitolata “Connection Timeout”crlfuzz -u 'http://slow-server.com/?test=value' -t 60
Increase timeout to 60 seconds.
Too Many Errors
Sezione intitolata “Too Many Errors”crlfuzz -l urls.txt -c 5 -t 30
Reduce concurrency and increase timeout.
SSL Certificate Issues
Sezione intitolata “SSL Certificate Issues”crlfuzz -u 'https://example.com/?test=value' --insecure
Bypass SSL verification.
Not Finding Vulnerabilities
Sezione intitolata “Not Finding Vulnerabilities”crlfuzz -u 'http://example.com/?test=value' -payloads extended-payloads.txt -v
Try with custom payloads and verbose mode.
Best Practices
Sezione intitolata “Best Practices”- Obtain authorization before scanning production systems
- Start with low concurrency and increase gradually
- Use appropriate timeouts for slow servers
- Test parameters individually for precise results
- Review all findings carefully for false positives
- Combine with other scanners for comprehensive testing
- Keep tool updated for latest payload detection
Payload Examples
Sezione intitolata “Payload Examples”Basic CRLF
Sezione intitolata “Basic CRLF”%0d%0a
Header Injection
Sezione intitolata “Header Injection”%0d%0aX-Injected-Header:value
Cookie Injection
Sezione intitolata “Cookie Injection”%0d%0aSet-Cookie:name=value
Location Redirect
Sezione intitolata “Location Redirect”%0d%0aLocation:http://attacker.com
Integration with Other Tools
Sezione intitolata “Integration with Other Tools”Pipe URLs from httpx
Sezione intitolata “Pipe URLs from httpx”httpx -l domains.txt | crlfuzz -
With Wayback Machine URLs
Sezione intitolata “With Wayback Machine URLs”waybackurls example.com | crlfuzz -
Combine with Parameter Fuzzer
Sezione intitolata “Combine with Parameter Fuzzer”ffuf -w params.txt -u 'http://example.com/?FUZZ=test' | crlfuzz -
Performance Tips
Sezione intitolata “Performance Tips”- Increase concurrency for large URL lists
- Use shorter timeouts for quick scans
- Test parameters in separate scans if needed
- Monitor CPU and network usage
- Use filtering to reduce false positives
Legal Considerations
Sezione intitolata “Legal Considerations”CRLFuzz is for authorized security testing only. Always obtain explicit written permission before testing any system. Unauthorized access and scanning is illegal.
Resources
Sezione intitolata “Resources”- GitHub: https://github.com/dwisiswant0/crlfuzz
- CRLF Injection Guide: https://owasp.org/
- Bug Bounty Resources: https://hackerone.com/
- Community: Active GitHub discussions and issues