Skip to main content

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

Total Payloads WAF Detection Recon Checks OWASP Coverage

PyPI Python License GitHub stars

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 vendors
  • fray test โ€” 5,500+ payloads across 24 OWASP categories (incl. prototype pollution)
  • fray report โ€” HTML & Markdown reports
  • Zero dependencies โ€” pure Python stdlib, pip install fray and 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 demo


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:

  1. Crawls โ€” BFS spider, follows same-origin links, seeds from robots.txt + sitemap.xml
  2. Discovers โ€” Extracts params from URLs, HTML forms, and JavaScript API calls
  3. Injects โ€” Tests each parameter with payloads from your chosen category
  4. Detects reflection โ€” Confirms when payloads appear verbatim in the response body
  5. 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
WAF Rule Gap Analysis Cross-reference vendor against known bypasses, detection gaps, technique matrix

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: soc@dalisec.io ยท SECURITY.md


๐Ÿ“– All Documentation (30 guides) ยท PyPI ยท Issues ยท Discussions

Project details


Release history Release notifications | RSS feed

This version

3.2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fray-3.2.0.tar.gz (510.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fray-3.2.0-py3-none-any.whl (498.0 kB view details)

Uploaded Python 3

File details

Details for the file fray-3.2.0.tar.gz.

File metadata

  • Download URL: fray-3.2.0.tar.gz
  • Upload date:
  • Size: 510.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fray-3.2.0.tar.gz
Algorithm Hash digest
SHA256 55692f5aced31393efcb2be2f3908edb046180fb95b6d27b33b9fc8df6f1b535
MD5 4892f874cf6636ef5ae05fab5393223c
BLAKE2b-256 d5a23c4c3ebff2a910e6a37bd57c2b65a4f180373e902c1564910326147d851d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fray-3.2.0.tar.gz:

Publisher: publish.yml on dalisecurity/Fray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fray-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: fray-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 498.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fray-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4f629c238070fc86609c14fc9504aa6a437865ecef20a6d285b7e8b75a6b2a
MD5 44359c3aff602440c7da6110bda0d1c0
BLAKE2b-256 9bc7884300094a30e0bbc4fd94b7b9e4313c2f31657a54204821e60869881524

See more details on using hashes here.

Provenance

The following attestation bundles were made for fray-3.2.0-py3-none-any.whl:

Publisher: publish.yml on dalisecurity/Fray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page