Author:@m0x_mw4_d
π Introduction
In the ever-evolving world of web application security, Web Cache Deception (WCD) remains an underrated but impactful vulnerability. Discovered by Omer Gil in 2017, this class of bugs can expose sensitive information by tricking caching mechanisms into storing and serving private data.
While many tools exist for automated scanning, they often lack customization, scalability, or OS-specific handling for bug bounty hunters and penetration testers. Thatβs why I built a multi-threaded, Bash-powered Web Cache Deception scanner under my personal toolkit banner β CyberJsonTools.
In this article, Iβll break down the script, explain how it works, and show you how to use it for effective cache deception testing on your targets.
β‘οΈ What Is Web Cache Deception?
A Web Cache Deception vulnerability occurs when a public cache stores private or user-specific content, usually because an attacker manipulates the URL or request headers in a way that bypasses cache exclusion rules. Once cached, this sensitive content might become accessible to other users or attackers.
Example Scenario:
A URL like https://target.com/profile
is meant for authenticated users only. However, accessing https://target.com/profile.jpg
might return a cached response due to the .jpg
extension β potentially exposing private user data.
π οΈ Script Features
β
Bash 4+ compatibility check with auto-install via Homebrew (on macOS)
β
GNU parallel dependency check and installation
β
Multi-threaded URL testing with customizable concurrency
β
45+ common file extensions and 45+ query parameters tested for cache deception behavior
β
40+ custom headers and header values sent with each request
β
20 top User-Agents for rotation in requests
β
Detects Cache-Control: public and cache HIT responses via X-Cache or CF-Cache-Status headers
β
Results logged to a clean, timestamped log file
π¦ Dependencies
`Bash 4+
GNU parallel
curl`
The script auto-installs Bash and GNU parallel on macOS if missing.
π How It Works
1οΈβ£ Environment Setup
The script ensures the environment is suitable by verifying Bash version and GNU parallel installation.
2οΈβ£ URL and Payload Generation
It takes a list of base URLs and appends 45+ file extensions and 45+ parameters commonly used to trigger caching mechanisms.
3οΈβ£ Request Execution with Multi-threading
Each generated URL is tested concurrently using parallel with:
`Random User-Agent from a list of 20
Standard request
Requests with 45+ different HTTP headers and values`
4οΈβ£ Response Analysis
The response headers are checked for:
`Cache-Control: public
X-Cache: HIT
CF-Cache-Status: HIT`
If found, the endpoint is flagged as potentially vulnerable.
5οΈβ£ Reporting
Results are neatly logged to a file named cyberjson_wcd_results.log
, including request headers, response headers, and vulnerability status.
π₯ How to Use It
1οΈβ£ Prepare a file with target base URLs:
https://target.com/
https://target.com/private/
2οΈβ£ Run the script:
bash cyberjson_web_cache_tester.sh < urls.txt
3οΈβ£ Review the results:
Check `cyberjson_wcd_results.log`
Look for [!!!] markers indicating vulnerabilities.
π Sample Log Output
[+] URL: https://target.com/private/profile.jpg
Cache-Control: public
X-Cache: HIT
[!!!] https://target.com/private/profile.jpg is VULNERABLE to Web Cache Deception!
π― Why Build This Tool?
I built this script to address limitations I found in existing WCD scanners:
Lack of header manipulation tests
No User-Agent rotation
Inability to run multi-threaded scans via Bash
Poor OS support detection, especially for macOS setups in bug bounty workflows
This tool can be a reliable companion for hunters on platforms like HackerOne, Bugcrowd, or Intigriti.
π Conclusion
Web Cache Deception vulnerabilities are easy to overlook but can lead to serious data s. With the CyberJsonTools Web Cache Deception scanner, you can efficiently test for these issues across multiple endpoints using a fast, multi-threaded Bash workflow.
π¬ Get the Script
π Full code & updates: [ Repository β CyberJsonP]
π₯οΈ Follow me on X (Twitter) for bug bounty tips and tools.
π Related Resources
Original Web Cache Deception Research by Omer Gil
HackerOne β WCD Reports
Burp Suite Web Cache Deception Cheat Sheet
π£ Feedback & Collaboration
Iβd love to hear your thoughts or ideas for improving this tool!
Feel free to reach out on X (Twitter) or comment on this post.
Top comments (0)