Most cache poisoning scanners only check:
- whether a response changes with certain headers
- or whether cache-related headers exist
This produces tons of false positives and rarely confirms a real exploit.
CacheX is different.
It performs behavioral diffing, multi-threaded poisoning, and persistence verification, confirming only real, weaponizable cache poisoning.
If CacheX says [vuln] - it's legit.
- ⚡ High-speed multi-threaded scanning
- 🎯 Zero-FP design with behavioral diffing
- 🔁 Real-time cache poisoning attempts
- 🧪 Persistence confirmation for true vulnerabilities
- 🔍 Single and multi-header scan modes
- 🧩 YAML-based payload configuration
- 📤 JSON or pretty output formats
- 📁 Optional file-based export
- 🏷 Tentative vs confirmed vuln tagging
go install github.com/ayuxdev/cachex/cmd/cachex@latestOr build manually:
git clone https://github.com/ayuxdev/cachex
cd cachex
go build -o cachex "cmd/cachex/main.go"
./cachex -hcachex -u https://example.comcachex -l urls.txtecho"https://example.com"| cachexor:
cat urls.txt | cachex| Category | Flag | Description |
|---|---|---|
| Input | -u, --url | URL to scan |
-l, --list | File with list of URLs | |
| Concurrency | -t, --threads | Number of scanning threads |
-m, --scan-mode | single or multi | |
| HTTP Client | --timeout | Total request timeout |
--proxy | Proxy URL | |
| Persistence Check | --no-chk-prst | Disable persistence checker |
--prst-requests | Poisoning requests | |
--prst-threads | Threads for poisoning | |
| Output | -o, --output | Output file |
-j, --json | JSON output | |
| Payloads | --pcf | Custom payload config file |
cachex -l targets.txt -t 50 --pcf payloads.yaml --json -o results.jsonCacheX automatically loads:
~/.config/cachex/config.yaml
~/.config/cachex/payloads.yaml
You can configure:
- Payload headers
- Default request headers
- Timeouts & concurrency
- Logging mode
- Proxy settings
- Persistence checker behavior
[vuln] [https://target.com] [Location Poisoning] [header: X-Forwarded-Host: evil.com] [poc: https://target.com?cache=XYZ]
{
"URL": "https://target.com/",
"IsVulnerable": true,
"IsResponseManipulable": true,
"ManipulationType": "ChangedBody",
"RequestHeaders": {
"Accept": "*/*",
"User-Agent": "Mozilla/5.0"
},
"PayloadHeaders": {
"X-Forwarded-Host": "evil.com"
},
"OriginalResponse": {
"StatusCode": 200,
"Headers": {
"...": "..."
},
"Body": "...",
"Location": ""
},
"ModifiedResponse": {
"StatusCode": 200,
"Headers": {
"...": "..."
},
"Body": "...",
"Location": ""
},
"PersistenceCheckResult": {
"IsPersistent": true,
"PoCLink": "https://target.example.com/?cache=XYZ",
"FinalResponse": {
"StatusCode": 200,
"Headers": {
"...": "..."
},
"Body": "...",
"Location": ""
}
}
}single: precise, tests each header independentlymulti: fast, tests all payload headers together
Defined in:
~/.config/cachex/payloads.yaml
Example:
payload_headers:
X-Forwarded-Host: evil.comX-Forwarded-For: 127.0.0.1X-Original-URL: /evilpathX-Client-IP: 127.0.0.1scan_mode: singlethreads: 25request_headers:
Accept: '*/*'User-Agent: Mozilla/5.0 (...)client:
dial_timeout: 5handshake_timeout: 5response_timeout: 10proxy_url: ""persistence_checker:
enabled: truenum_requests_to_send: 10threads: 5logger:
log_error: falselog_mode: prettydebug: falseoutput_file: ""skip_tentative: true- Fetches baseline response
- Injects payload headers
- Detects response manipulation (body, code, redirect)
- If changed → launches concurrent poisoning attempts
- Fetches clean requests
- If poisoned response persists → confirmed vulnerability
- Outputs PoC link
cachex/├── cmd/│ └── cachex/│ └── main.go # CLI entrypoint│├── internal/│ ├── app/│ │ └── cachex/│ │ └── cmd/│ │ ├── banner.go # ASCII banner│ │ ├── flags.go # CLI flags + config binding│ │ ├── helper.go # Help message builder│ ├── root.go # Main CLI logic & runner│ └── utils.go # File helpers││ ├── pkg/│ │ ├── client/│ │ │ ├── client.go # Custom HTTP client & transport│ │ │ └── request.go # Fetch + send raw requests│ │ ├── config/│ │ │ └── config.go # Legacy internal config│ │ └── logger/│ │ ├── colors.go # Color themes│ │ └── logger.go # Pretty logger (info/warn/debug/vuln)││ └── scanner/│ ├── core.go # Core poisoning test logic│ ├── detector.go # Behavioral response diffing│ ├── logger.go # Pretty + JSON output formatter│ ├── output.go # JSON serialization helpers│ ├── persistchk.go # Persistence checker (real-time poisoning)│ ├── scanner.go # Scan controller (single/multi mode)│ ├── types.go # All scanner structs & enums│ └── utils.go # Cache buster, merging maps, helpers│├── pkg/│ └── cachex/│ ├── scanner.go # Public API wrapper for internal scanner│ ├── utils.go # Config mappers (log mode, scan mode)│ └── validate.go # Config validation││ └── config/│ ├── config.go # YAML config schema│ ├── default.go # Default paths + default config│ └── payloads.go # Default payload headers│├── .github/workflows/│ └── release.yml # Automated builds via GoReleaser│├── images/│ ├── cachex-logo.png # Logo│ └── cachex-demo.gif # Showcase GIF│├── .goreleaser.yaml # Multi-platform binary releases├── .gitignore├── go.mod├── go.sum├── LICENSE└── Makefile # Build / install helpersSure, PRs are welcome!
MIT © @ayuxdev

