Open-source WAF Security Testing Platform โ 5,500+ attack payloads, 25 WAF fingerprints, beautiful CLI output
Project description
Fray
๐ Language: English | ๆฅๆฌ่ช
โ๏ธ Open-source WAF security testing toolkit โ scan, detect, test, report
FOR AUTHORIZED SECURITY TESTING ONLY โ Only test systems you own or have explicit written permission to test.
Why Fray?
Most payload collections are static text files. Fray is a complete workflow:
fray scanโ Auto crawl โ param discovery โ payload injection (new)fray reconโ 21 automated checks (TLS, headers, DNS, CORS, params, JS, history, GraphQL, API, Host injection, admin panels)fray detectโ Fingerprint 25 WAF vendorsfray testโ 5,500+ payloads across 24 OWASP categories (incl. prototype pollution)fray reportโ HTML & Markdown reports- Zero dependencies โ pure Python stdlib,
pip install frayand go
Who Uses Fray?
- Bug Bounty Hunters โ Discover hidden params, old endpoints, bypass WAFs, file reports
- Pentesters โ Full recon + automated scan with client-ready HTML reports
- Blue Teams โ Validate WAF rules, regression test after config changes
- DevSecOps โ CI/CD pipeline WAF testing, fail builds on bypasses
- Security Researchers โ Find WAF bypasses, contribute payloads
- Students โ Interactive CTF tutorials, learn attack vectors hands-on
Quick Start
pip install fray
fray demo # Try it now โ WAF detect + XSS scan
fray scan https://example.com # Auto scan (crawl + inject)
fray recon https://example.com # Reconnaissance
fray test https://example.com --smart # Smart payload testing
fray detect https://example.com # WAF detection
fray explain CVE-2021-44228 # CVE intelligence
fray report -i results.json -o report.html # Generate report
Demo
fray demo detects the WAF, crawls the target, and injects XSS payloads. โฉ REFLECTED = payload confirmed in response body. Found 9 XSS bypasses in 28 seconds.
fray scan โ Automated Attack Surface Mapping
One command: crawl your target, discover injection points, test payloads, report results.
fray scan https://example.com -c xss -m 3 -w 4
โโโโโโโโโโโโโโโโโโโโ Crawling https://example.com โโโโโโโโโโโโโโโโโโโโ
[ 1] https://example.com
[ 2] https://example.com/search
[ 3] https://example.com/guestbook.php
โ Crawled 10 pages, found 7 injection points (3 forms, 1 JS endpoints)
โโโโโโโโโโโโโโโโโโโโโโโโ Payload Injection โโโโโโโโโโโโโโโโโโโโโโโโโโโ
[1/7] POST /guestbook.php ?name= (form)
BLOCKED 403 โ <script>alert(1)</script>
PASSED 200 โ <img src=x onerror=alert(1)> โฉ REFLECTED
[2/7] GET /search ?q= (form)
BLOCKED 403 โ <script>alert(1)</script>
PASSED 200 โ <img src=x onerror=alert(1)> โฉ REFLECTED
โญโโโโโโโโโโโโ Scan Summary โโโโโโโโโโโโโฎ
โ Total Tested 21 โ
โ Blocked 15 (71.4%) โ
โ Passed 6 โ
โ Reflected 4 โ confirmed โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Reflected payloads are highlighted with โฉ REFLECTED โ confirmed injection where the payload appears verbatim in the response body.
What it does:
- Crawls โ BFS spider, follows same-origin links, seeds from
robots.txt+sitemap.xml - Discovers โ Extracts params from URLs, HTML forms, and JavaScript API calls
- Injects โ Tests each parameter with payloads from your chosen category
- Detects reflection โ Confirms when payloads appear verbatim in the response body
- Auto-backoff โ Handles 429 rate limits with exponential backoff
# Scope-restricted scan (bug bounty)
fray scan https://target.com --scope scope.txt -w 4
# Authenticated scan with stealth
fray scan https://app.target.com --cookie "session=abc" --stealth
# Deep scan with SQLi payloads
fray scan https://target.com -c sqli --depth 5 --max-pages 100
# JSON output for CI pipelines
fray scan https://target.com --json -o results.json
Full scan options + examples โ
fray recon โ 21 Automated Checks
fray recon https://example.com
fray recon https://example.com --js # JS endpoint extraction
fray recon https://example.com --history # Historical URL discovery
fray recon https://example.com --params # Parameter brute-force mining
| Check | What It Finds |
|---|---|
| Parameter Discovery | Query strings, form inputs, JS API endpoints |
| Parameter Mining | Brute-force 136 common param names, detect hidden ?id=, ?file=, ?redirect= |
| JS Endpoint Extraction | Hidden APIs, admin routes, GraphQL, auth endpoints from .js files |
| Historical URLs | Old endpoints via Wayback Machine, sitemap.xml, robots.txt |
| GraphQL Introspection | Probe 10 common endpoints, detect exposed schema (types, fields, mutations) |
| API Discovery | Swagger/OpenAPI specs, /api/v1/, /api-docs, health endpoints โ exposes every route & param |
| Host Header Injection | Password reset poisoning, cache poisoning, SSRF via Host: / X-Forwarded-Host manipulation |
| Admin Panel Discovery | 70 paths: /admin, /wp-admin, /phpmyadmin, /actuator, /console, debug tools |
| TLS | Version, cipher, cert expiry |
| Security Headers | HSTS, CSP, X-Frame-Options (scored) |
| Cookies | HttpOnly, Secure, SameSite flags |
| Fingerprinting | WordPress, PHP, Node.js, nginx, Apache, Java, .NET |
| DNS | A/CNAME/MX/TXT, CDN detection, SPF/DMARC |
| CORS | Wildcard, reflected origin, credentials misconfig |
Plus: 28 exposed file probes (.env, .git, phpinfo, actuator) ยท subdomains via crt.sh
--js parses inline and external JavaScript files for fetch(), axios, XMLHttpRequest, /api/, /graphql, /admin/, /internal/ paths.
--history queries Wayback Machine CDX API, sitemap.xml, and robots.txt Disallow paths. Old endpoints often have weaker WAF rules.
--params brute-forces 136 common parameter names against discovered endpoints. Detects hidden params by response diff (status, size, reflection). Risk-rated: HIGH (SSRF/LFI/injection), MEDIUM (XSS/IDOR).
GraphQL introspection runs automatically during full recon. Probes /graphql, /api/graphql, /v1/graphql, /graphiql, /playground, etc.
API discovery probes 30+ common paths: swagger.json, openapi.json, /api-docs, /swagger-ui/, versioned API roots. Parses specs to extract every endpoint, method, and auth scheme.
New to Fray? Run fray help for a friendly guide to every command.
fray test --smart โ Adaptive Payload Selection
Runs recon first, then recommends payloads based on detected stack:
fray test https://example.com --smart
Stack: wordpress (100%), nginx (70%)
Recommended:
1. sqli (1200 payloads)
2. xss (800 payloads)
3. path_traversal (400 payloads)
[Y] Run recommended [A] Run all [N] Cancel [1,3] Pick:
fray detect โ 25 WAF Vendors
fray detect https://example.com
Cloudflare, AWS WAF, Akamai, Imperva, F5 BIG-IP, Fastly, Azure WAF, Google Cloud Armor, Sucuri, Fortinet, Wallarm, Vercel, and 13 more.
Key Features
| Feature | How | Example |
|---|---|---|
| Scope Enforcement | Restrict to permitted domains/IPs/CIDRs | --scope scope.txt |
| Concurrent Scanning | Parallelize crawl + injection (~3x faster) | -w 4 |
| Stealth Mode | Randomized UA, jitter, throttle โ one flag | --stealth |
| Authenticated Scanning | Cookie, Bearer, custom headers | --cookie "session=abc" |
| CI/CD | GitHub Actions with PR comments + fail-on-bypass | fray ci init |
Auth guide โ ยท Scan options โ ยท CI guide โ
5,500+ Payloads ยท 24 Categories ยท 120 CVEs
| Category | Count | Category | Count |
|---|---|---|---|
| XSS | 867 | SSRF | 167 |
| SQLi | 456 | SSTI | 98 |
| Command Injection | 234 | XXE | 123 |
| Path Traversal | 189 | AI/LLM Prompt Injection | 370 |
fray explain log4shell # CVE intelligence with payloads
fray payloads # List all 24 payload categories
Payload database โ ยท CVE coverage โ
MCP Server โ AI Integration
pip install fray[mcp]
fray mcp
Ask Claude: "What XSS payloads bypass Cloudflare?" โ calls Fray's MCP tools directly.
Claude Code guide โ ยท ChatGPT guide โ
Project Structure
fray/
โโโ fray/
โ โโโ cli.py # CLI entry point
โ โโโ scanner.py # Auto scan: crawl โ inject
โ โโโ recon.py # 14-check reconnaissance
โ โโโ detector.py # WAF detection (25 vendors)
โ โโโ tester.py # Payload testing engine
โ โโโ reporter.py # HTML + Markdown reports
โ โโโ mcp_server.py # MCP server for AI assistants
โ โโโ payloads/ # 5,500+ payloads (22 categories)
โโโ tests/ # 624 tests
โโโ docs/ # 30 guides
โโโ pyproject.toml # pip install fray
Roadmap
- Auto scan: crawl โ discover โ inject (
fray scan) - Reflected payload detection (confirmed injection)
- Scope file enforcement + concurrent workers
- 14-check reconnaissance, smart mode, WAF detection
- HTML/Markdown reports, MCP server
- HackerOne API integration (auto-submit findings)
- Web-based report dashboard
- ML-based payload effectiveness scoring
Contributing
See CONTRIBUTING.md.
Legal
MIT License โ See LICENSE. Only test systems you own or have explicit authorization to test.
Security issues: soc@dalisec.io ยท SECURITY.md
๐ All Documentation (30 guides) ยท PyPI ยท Issues ยท Discussions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fray-3.0.1.tar.gz.
File metadata
- Download URL: fray-3.0.1.tar.gz
- Upload date:
- Size: 462.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09bb6d3b82a620ed0b3a326155325de921158c2c826971b6c1cd330f54637fce
|
|
| MD5 |
6c0dbb8c1222c858cd1ef7b20512b7c3
|
|
| BLAKE2b-256 |
3765d1b4ebb7765497de12a56361df8a367cc9b842f30d87efed80fa94af5723
|
File details
Details for the file fray-3.0.1-py3-none-any.whl.
File metadata
- Download URL: fray-3.0.1-py3-none-any.whl
- Upload date:
- Size: 451.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca0b63c698511ca9b11ee882d078b0543cdaf25136b72c28871df58f3e5bda85
|
|
| MD5 |
3b98ab6341d489d88789767a6f5469c8
|
|
| BLAKE2b-256 |
e06f661614fd569484be949b36fc38546b631536b24135db6999ec363082014a
|