Skip to content

Repository files navigation

🌪️ ChaosWalker (Alpha)

"Give me a URL, and I will find a way to crash it."

ChaosWalker is an automated Chaos Engineering tool for modern web applications. It uses a headless browser (Playwright) to navigate your site, inject "nasty" payloads into every input it finds, and monitor for crashes, console errors, and network failures.

⚠️ DISCLAIMER: Use this tool ONLY on applications you own or have explicit permission to test. Generating crash reports on unauthorized targets is illegal.

✨ Features

  • 🕷️ Smart Crawling: Automatically discovers links and navigates within the same domain.
  • 💣 Input Fuzzing: Injects SQLi, XSS, Path Traversal, and Buffer Overflow payloads into forms.
  • 👀 Error Monitoring: Captures:
    • JavaScript Console Errors (console.error)
    • Uncaught Exceptions (Page Crashes)
    • Failed Network Requests (500s, 404s, Timeouts)
  • 📸 Evidence Collection: Automatically takes screenshots when errors are detected.
  • 🔄 Auto-Replay: Generates a standalone Python script (repro_xxx.py) for every crash found. You can run this script to instantly reproduce the bug.
  • 📝 Markdown Reports: Generates a clean summary of all issues found.

🚀 Quick Start

1. Install Dependencies

Requires Python 3.8+.

cd chaos_walker
pip install -r requirements.txt
playwright install chromium

2. Run the Chaos

Target a URL. By default, it runs in headless mode.

# Attack a page
python chaos_walker/main.py attack "http://example.com" --depth 1

# See the browser in action (Headful mode)
python chaos_walker/main.py attack "http://example.com" --depth 1 --headless false

# Crawl deeper (Depth 3)
python chaos_walker/main.py attack "http://example.com" --depth 3

2.1 Run Web UI

python chaos_walker/main.py web --host 0.0.0.0 --port 9000

3. Check Reports

After the run completes, check the reports/ directory for:

  • chaos_report.md: The summary log.
  • error_*.png: Screenshots of the application state during errors.
  • repro_*.py: Standalone scripts to reproduce specific crashes.

4. Reproduce a Bug

Found a crash? Run the generated script to replay the attack:

python reports/repro_20240320_123456.py

🧪 Run Example Target

Don't have an API target? We included a vulnerable API service for you to practice on:

python chaos_walker/examples/vulnerable_api.py

🛠️ Configuration

You can customize the attack payloads via src/chaos_walker/fuzzer/payloads.txt, or pass a custom payload file.

LLM-assisted input generation (optional)

When enabled, ChaosWalker will generate more reasonable values for common fields (email/phone/password/number/date/url/username/name) while fuzzing.

Environment variables:

  • CHAOSWALKER_LLM_ENABLED=1
  • CHAOSWALKER_LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
  • CHAOSWALKER_LLM_API_KEY=...
  • CHAOSWALKER_LLM_MODEL=qwen-plus

🤝 Contributing

Pull requests are welcome! We are looking for:

  • More specialized payloads (GraphQL, JSON injection).
  • Better "Crash Detection" heuristics.
  • Integration with CI/CD pipelines.

📄 License

MIT

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages