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 | LinkFinder-style: hidden APIs, hostnames, cloud buckets (S3/GCS/Azure), API keys, secrets |
| 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 |
| Rate Limit Fingerprint | Map threshold (req/s before 429), burst limit, lockout duration, safe delay |
| WAF Detection Mode | Signature vs anomaly vs hybrid โ body diff, timing diff, header diff |
Plus: 28 exposed file probes (.env, .git, phpinfo, actuator) ยท subdomains via crt.sh
--js parses inline and external JavaScript files โ LinkFinder-style extraction of fetch(), axios, XMLHttpRequest calls, full absolute URLs, internal hostnames/subdomains, cloud storage buckets (AWS S3, GCS, Azure Blob, Firebase, DO Spaces), and leaked secrets (AWS keys, Google API keys, GitHub tokens, Stripe keys, Slack webhooks, JWTs, Bearer tokens, generic API keys).
--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.
Recon guide โ
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:
OWASP coverage โ
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.
Detection signatures โ
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 explain results.json # Human-readable findings: impact, remediation, next steps
fray payloads # List all 24 payload categories
Payload database โ ยท CVE coverage โ
AI-Ready Output โ --ai Flag
fray scan target.com --ai # LLM-optimized JSON for AI agents
fray test target.com -c xss --ai # Pipe into any AI workflow
fray recon target.com --ai # Structured recon for Claude, GPT, etc.
# Example pipeline:
fray scan target.com --ai | ai analyze
Output: structured JSON with technologies, vulnerabilities (CWE-tagged, confidence-scored), security posture, and suggested next actions โ ready for direct LLM consumption.
Attack Surface Graph
fray graph example.com # Visual tree of the entire attack surface
fray graph example.com --deep # + JS endpoints + Wayback historical URLs
fray graph example.com --json # Machine-readable graph
Output:
๐ example.com
โโโ ๐ Subdomains (8)
โ โโโ ๐ api.example.com
โ โโโ ๐ admin.example.com
โ โโโ ๐ cdn.example.com
โโโ ๐ก๏ธ WAF: Cloudflare
โโโ ๐ Technologies
โ โโโ โ๏ธ nginx (95%)
โ โโโ โ๏ธ wordpress (70%)
โโโ ๐ Admin Panels (2)
โ โโโ ๐ /admin/ [200] OPEN
โโโ ๐ GraphQL: /graphql (introspection OPEN)
โโโ ๐ Exposed Files (3)
โ โโโ ๐ .env
โ โโโ ๐ .git/config
โโโ ๐ Recommended Attacks
โโโ โ๏ธ xss
โโโ โ๏ธ sqli
Aggregates all 21 recon checks into a single tree view โ subdomains (crt.sh), DNS, WAF/CDN, technologies, admin panels, API endpoints, GraphQL, exposed files, CORS issues, parameters, and recommended attack categories.
SARIF Output โ GitHub Security Tab
fray scan target.com --sarif -o results.sarif # SARIF 2.1.0 from scan
fray test target.com -c xss --sarif -o results.sarif # SARIF from test
# Upload to GitHub:
gh code-scanning upload-sarif --sarif results.sarif
Fray findings appear directly in GitHub's Security tab alongside CodeQL and Semgrep. Each finding includes CWE tags, severity levels, and payload details.
Diff โ Visual Regression Testing
fray diff before.json after.json # Color-coded visual diff
fray diff before.json after.json --json # Machine-readable diff
Git-style visual output: regressions in red (- BLOCKED โ + BYPASS), improvements in green (- BYPASS โ + BLOCKED), with per-category breakdown table. Exit code 1 on regressions โ perfect for CI/CD gates.
MCP Server โ AI Integration
pip install 'fray[mcp]'
Claude Desktop โ One-Liner Setup
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"fray": {
"command": "python",
"args": ["-m", "fray.mcp_server"]
}
}
}
Restart Claude Desktop. Ask: "What XSS payloads bypass Cloudflare?" โ Fray's 10 MCP tools are called directly.
10 MCP Tools
| Tool | What it does |
|---|---|
list_payload_categories |
List all 24 attack categories |
get_payloads |
Retrieve payloads by category |
search_payloads |
Full-text search across 5,500+ payloads |
get_waf_signatures |
WAF fingerprints for 25 vendors |
get_cve_details |
CVE lookup with payloads and severity |
suggest_payloads_for_waf |
Best bypass payloads for a specific WAF |
analyze_scan_results |
Risk assessment from scan/test JSON |
generate_bypass_strategy |
Mutation strategies for blocked payloads |
explain_vulnerability |
Beginner-friendly payload explanation |
create_custom_payload |
Generate payloads from natural language |
Claude Code guide โ ยท ChatGPT guide โ ยท mcp.json โ
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
โโโ mcp.json # MCP manifest (tools, inputs, outputs)
โโโ smithery.yaml # Smithery.ai registry manifest
โโโ 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: [email protected] ยท SECURITY.md
๐ All Documentation (30 guides) ยท PyPI ยท Issues ยท Discussions