Co-Pilot / 辅助式
更新于 a month ago

ffuf-skill

Jjthack
0.1k
jthack/ffuf_claude_skill/ffuf-skill
84
Agent 评分

💡 摘要

为渗透测试场景中使用 ffuf web 模糊测试工具提供专家指导和命令模板。

🎯 适合人群

渗透测试工程师漏洞赏金猎人安全研究员红队成员Web应用安全分析师

🤖 AI 吐槽:这个技能本质上是一个美化版的 ffuf 手册页,提供专家指导但没有实际的自动化或集成功能。

安全分析中风险

该技能指导执行网络扫描/模糊测试工具(ffuf)。主要风险是对系统进行未经授权或攻击性的扫描,可能导致拒绝服务或法律问题。缓解措施:确保所有扫描仅针对获得明确授权的目标进行。


name: ffuf-web-fuzzing description: Expert guidance for ffuf web fuzzing during penetration testing, including authenticated fuzzing with raw requests, auto-calibration, and result analysis

FFUF (Fuzz Faster U Fool) Skill

Overview

FFUF is a fast web fuzzer written in Go, designed for discovering hidden content, directories, files, subdomains, and testing for vulnerabilities during penetration testing. It's significantly faster than traditional tools like dirb or dirbuster.

Installation

# Using Go go install github.com/ffuf/ffuf/v2@latest # Using Homebrew (macOS) brew install ffuf # Binary download # Download from: https://github.com/ffuf/ffuf/releases/latest

Core Concepts

The FUZZ Keyword

The FUZZ keyword is used as a placeholder that gets replaced with entries from your wordlist. You can place it anywhere:

  • URLs: https://target.com/FUZZ
  • Headers: -H "Host: FUZZ"
  • POST data: -d "username=admin&password=FUZZ"
  • Multiple locations with custom keywords: -w wordlist.txt:CUSTOM then use CUSTOM instead of FUZZ

Multi-wordlist Modes

  • clusterbomb: Tests all combinations (default) - cartesian product
  • pitchfork: Iterates through wordlists in parallel (1-to-1 matching)
  • sniper: Tests one position at a time (for multiple FUZZ positions)

Common Use Cases

1. Directory and File Discovery

# Basic directory fuzzing ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ # With file extensions ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -e .php,.html,.txt,.pdf # Colored and verbose output ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -c -v # With recursion (finds nested directories) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -recursion -recursion-depth 2

2. Subdomain Enumeration

# Virtual host discovery ffuf -w /path/to/subdomains.txt -u https://target.com -H "Host: FUZZ.target.com" -fs 4242 # Note: -fs 4242 filters out responses of size 4242 (adjust based on default response size)

3. Parameter Fuzzing

# GET parameter names ffuf -w /path/to/params.txt -u https://target.com/script.php?FUZZ=test_value -fs 4242 # GET parameter values ffuf -w /path/to/values.txt -u https://target.com/script.php?id=FUZZ -fc 401 # Multiple parameters ffuf -w params.txt:PARAM -w values.txt:VAL -u https://target.com/?PARAM=VAL -mode clusterbomb

4. POST Data Fuzzing

# Basic POST fuzzing ffuf -w /path/to/passwords.txt -X POST -d "username=admin&password=FUZZ" -u https://target.com/login.php -fc 401 # JSON POST data ffuf -w entries.txt -u https://target.com/api -X POST -H "Content-Type: application/json" -d '{"name": "FUZZ", "key": "value"}' -fr "error" # Fuzzing multiple POST fields ffuf -w users.txt:USER -w passes.txt:PASS -X POST -d "username=USER&password=PASS" -u https://target.com/login -mode pitchfork

5. Header Fuzzing

# Custom headers ffuf -w /path/to/wordlist.txt -u https://target.com -H "X-Custom-Header: FUZZ" # Multiple headers ffuf -w /path/to/wordlist.txt -u https://target.com -H "User-Agent: FUZZ" -H "X-Forwarded-For: 127.0.0.1"

Filtering and Matching

Matchers (Include Results)

  • -mc: Match status codes (default: 200-299,301,302,307,401,403,405,500)
  • -ml: Match line count
  • -mr: Match regex
  • -ms: Match response size
  • -mt: Match response time (e.g., >100 or <100 milliseconds)
  • -mw: Match word count

Filters (Exclude Results)

  • -fc: Filter status codes (e.g., -fc 404,403,401)
  • -fl: Filter line count
  • -fr: Filter regex (e.g., -fr "error")
  • -fs: Filter response size (e.g., -fs 42,4242)
  • -ft: Filter response time
  • -fw: Filter word count

Auto-Calibration (USE BY DEFAULT!)

CRITICAL: Always use -ac unless you have a specific reason not to. This is especially important when having Claude analyze results, as it dramatically reduces noise and false positives.

# Auto-calibration - ALWAYS USE THIS ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -ac # Per-host auto-calibration (useful for multiple hosts) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -ach # Custom auto-calibration string (for specific patterns) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -acc "404NotFound"

Why -ac is essential:

  • Automatically detects and filters repetitive false positive responses
  • Removes noise from dynamic websites with random content
  • Makes results analysis much easier for both humans and Claude
  • Prevents thousands of identical 404/403 responses from cluttering output
  • Adapts to the target's specific behavior

When Claude analyzes your ffuf results, -ac is MANDATORY - without it, Claude will waste time sifting through thousands of false positives instead of finding the interesting anomalies.

Rate Limiting and Timing

Rate Control

# Limit to 2 requests per second (stealth mode) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -rate 2 # Add delay between requests (0.1 to 2 seconds random) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -p 0.1-2.0 # Set number of concurrent threads (default: 40) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -t 10

Time Limits

# Maximum total execution time (60 seconds) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -maxtime 60 # Maximum time per job (useful with recursion) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -maxtime-job 60 -recursion

Output Options

Output Formats

# JSON output ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -o results.json # HTML output ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -of html -o results.html # CSV output ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -of csv -o results.csv # All formats ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -of all -o results # Silent mode (no progress, only results) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -s # Pipe to file with tee ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -s | tee results.txt

Advanced Techniques

Using Raw HTTP Requests (Critical for Authenticated Fuzzing)

This is one of the most powerful features of ffuf, especially for authenticated requests with complex headers, cookies, or tokens.

Workflow:

  1. Capture a full authenticated request (from Burp Suite, browser DevTools, etc.)
  2. Save it to a file (e.g., req.txt)
  3. Replace the value you want to fuzz with the FUZZ keyword
  4. Use the --request flag
# From a file containing raw HTTP request ffuf --request req.txt -w /path/to/wordlist.txt -ac

Example req.txt file:

POST /api/v1/users/FUZZ HTTP/1.1 Host: target.com User-Agent: Mozilla/5.0 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... Cookie: session=abc123xyz; csrftoken=def456 Content-Type: application/json Content-Length: 27 {"action":"view","id":"1"}

Use Cases:

  • Fuzzing authenticated endpoints with complex auth headers
  • Testing API endpoints with JWT tokens
  • Fuzzing with CSRF tokens, session cookies, and custom headers
  • Testing endpoints that require specific User-Agents or Accept headers
  • POST/PUT/DELETE requests with authentication

Pro Tips:

  • You can place FUZZ in multiple locations: URL path, headers, body
  • Use -request-proto https if needed (default is https)
  • Always use -ac to filter out authenticated "not found" or error responses
  • Great for IDOR testing: fuzz user IDs, document IDs, etc. in authenticated contexts
# Common authenticated fuzzing patterns ffuf --request req.txt -w user_ids.txt -ac -mc 200 -o results.json # With multiple FUZZ positions using custom keywords ffuf --request req.txt -w endpoints.txt:ENDPOINT -w ids.txt:ID -mode pitchfork -ac

Proxy Usage

# HTTP proxy (useful for Burp Suite) ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -x http://127.0.0.1:8080 # SOCKS5 proxy ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -x socks5://127.0.0.1:1080 # Replay matched requests through proxy ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -replay-proxy http://127.0.0.1:8080

Cookie and Authentication

# Using cookies ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -b "sessionid=abc123; token=xyz789" # Client certificate authentication ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -cc client.crt -ck client.key

Encoding

# URL encoding ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -enc 'FUZZ:urlencode' # Multiple encodings ffuf -w /path/to/wordlist.txt -u https://target.com/FUZZ -enc 'FUZZ:urlencode b64encode'

Testing for Vulnerabilities

# SQL injection testing ffuf -w sqli_payloads.txt -u https://target.com/page.php?id=FUZZ -fs 1234 # XSS testing ffuf -w xss_payloads.txt -u https://target.com/search?q=FUZZ -mr "<script>" # Command injection ffuf -w cmdi_payloads.txt -u https://target.com/execute?cmd=FUZZ -fr "error"

Batch Processing Multiple Targets

# Process multiple URLs cat targets.txt | xargs -I@ sh -c 'ffuf -w wordlist.txt -u @/FUZZ -ac' # Loop through multiple targets with results for url in $(cat targets.txt); do ffuf -w wordlist.txt -u $url/FUZZ -ac -o "results_$(echo $url | md5sum | cut -d' ' -f1).json" done

Best Practices

1. ALWAYS Use Auto-Calibration

Use -ac by default for every scan. This is non-negotiable for productive pentesting:

ffuf -w wordlist.txt -u https://target.com/FUZZ -ac

2. Use Raw Requests for Authentication

Don't struggle with command-line flags for complex auth. Capture the full request and use --request:

# 1. Capture authenticated request from Burp/DevTools # 2. Save to req.txt with FUZZ keyword in place # 3. Run with -ac ffuf --request req.txt -w wordlist.txt -ac -o results.json

3. Use Appropr

五维分析
清晰度9/10
创新性6/10
实用性10/10
完整性9/10
可维护性8/10
优缺点分析

优点

  • 提供了极其全面且实用的命令示例。
  • 强烈强调自动校准等关键最佳实践。
  • 涵盖了如认证模糊测试等高级真实用例。

缺点

  • 并非可执行技能;纯粹是文档/指南。
  • 完全依赖用户自行安装和配置 ffuf。
  • 除了 ffuf 自身文档外,未提供新颖功能。

相关技能

raptor

A
toolCo-Pilot / 辅助式
82/ 100

“RAPTOR可能会自动安装工具,带来不必要的软件和依赖漏洞的风险。缓解措施包括使用受控环境,如开发容器.”

burpsuite-project-parser

A
toolCo-Pilot / 辅助式
82/ 100

“看起来很能打,但别让配置把人劝退。”

ctfskill

A
toolCo-Pilot / 辅助式
80/ 100

“看起来很能打,但别让配置把人劝退。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 jthack.