Skip to main content
Glama

fuzzing_directories

Discover hidden directories and files on web servers using ffuf or wfuzz to identify potential security vulnerabilities during penetration testing.

Instructions

Fuzz directories and files using ffuf/wfuzz

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesTarget base URL
toolNoFuzzing tool to use
extensionsNoFile extensions to test

Implementation Reference

  • Main execution logic for the fuzzing_directories tool. Configures ffuf/wfuzz for directory bruteforcing, runs the scan, analyzes results for interesting directories/files, and returns structured ScanResult.
    async fuzzDirectories(baseUrl: string, config: Partial<FuzzingConfiguration> = {}): Promise<ScanResult> {
      try {
        const defaultConfig: FuzzingConfiguration = {
          tool: 'ffuf',
          threads: 20,
          timeout: 10,
          delay: 50,
          wordlist: this.getDefaultWordlist('directories'),
          extensions: ['php', 'asp', 'aspx', 'jsp', 'html', 'txt', 'xml', 'json'],
          filter_codes: [404],
          ...config
        };
        
        console.error(`🔍 Directory fuzzing on ${baseUrl}`);
        
        let results: FuzzingResult[] = [];
        
        if (defaultConfig.tool === 'ffuf') {
          results = await this.runFFUFDirectories(baseUrl, defaultConfig);
        } else if (defaultConfig.tool === 'wfuzz') {
          results = await this.runWfuzzDirectories(baseUrl, defaultConfig);
        }
        
        const analyzedResults = this.analyzeDirectoryResults(results);
        const interestingFindings = analyzedResults.filter(r => r.vulnerability_detected || r.response_code === 200);
        
        return {
          target: baseUrl,
          timestamp: new Date().toISOString(),
          tool: 'directory_fuzzing',
          results: {
            total_requests: results.length,
            found_directories: interestingFindings.length,
            accessible_paths: interestingFindings.filter(r => r.response_code === 200).length,
            sensitive_files: interestingFindings.filter(r => this.isSensitiveFile(r.url)).length,
            fuzzing_results: results,
            interesting_findings: interestingFindings
          },
          status: 'success'
        };
        
      } catch (error) {
        return {
          target: baseUrl,
          timestamp: new Date().toISOString(),
          tool: 'directory_fuzzing',
          results: {},
          status: 'error',
          error: error instanceof Error ? error.message : String(error)
        };
      }
    }
  • src/index.ts:555-559 (registration)
    Tool dispatch in the main server handler switch statement, calling the FuzzingEngine.fuzzDirectories method.
    case "fuzzing_directories":
      return respond(await this.fuzzingEngine.fuzzDirectories(args.target, { 
        tool: args.tool || 'ffuf',
        extensions: args.extensions 
      }));
  • Input schema definition for the fuzzing_directories tool, listed in the tools array returned by ListToolsRequest.
    {
      name: "fuzzing_directories",
      description: "Fuzz directories and files using ffuf/wfuzz",
      inputSchema: {
        type: "object",
        properties: {
          target: { type: "string", description: "Target base URL" },
          tool: { 
            type: "string", 
            enum: ["ffuf", "wfuzz"],
            description: "Fuzzing tool to use" 
          },
          extensions: { 
            type: "array", 
            items: { type: "string" },
            description: "File extensions to test" 
          }
        },
        required: ["target"]
      }
    },
  • Core helper executing ffuf commands for both directory and file extension fuzzing, parsing output into results.
    private async runFFUFDirectories(baseUrl: string, config: FuzzingConfiguration): Promise<FuzzingResult[]> {
      try {
        const results: FuzzingResult[] = [];
        
        // Directory fuzzing
        const dirCommand = `ffuf -u ${baseUrl}/FUZZ -w ${config.wordlist} -t ${config.threads} -timeout ${config.timeout} -fc ${config.filter_codes?.join(',')} -o /dev/null -s`;
        
        const { stdout: dirOutput } = await execAsync(dirCommand, { 
          timeout: 120000,
          maxBuffer: 1024 * 1024 * 5 
        });
        
        // Parse directory results
        this.parseFFUFOutput(dirOutput, baseUrl, results);
        
        // File extension fuzzing
        if (config.extensions) {
          for (const ext of config.extensions) {
            const extCommand = `ffuf -u ${baseUrl}/FUZZ.${ext} -w ${config.wordlist} -t ${config.threads} -timeout ${config.timeout} -fc ${config.filter_codes?.join(',')} -o /dev/null -s`;
            
            try {
              const { stdout: extOutput } = await execAsync(extCommand, { 
                timeout: 60000,
                maxBuffer: 1024 * 1024 
              });
              
              this.parseFFUFOutput(extOutput, baseUrl, results, ext);
              
            } catch {
              // Continue with other extensions
            }
          }
        }
        
        return results;
        
      } catch (error) {
        console.error('FFuf directory fuzzing error:', error);
        return [];
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tools used ('ffuf/wfuzz') but doesn't describe what the tool actually does (e.g., enumerates hidden paths, tests for common files), potential side effects, rate limits, or output format. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a fuzzing tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, output, error handling, and differentiation from siblings, making it inadequate for an agent to fully understand how to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters ('target', 'tool', 'extensions') with descriptions and enums. The description adds no additional meaning beyond what's in the schema, such as example usage or parameter interactions, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fuzz directories and files') and specifies the tools used ('using ffuf/wfuzz'), providing a specific verb and resource. However, it doesn't explicitly differentiate from sibling tools like 'directory_bruteforce' or 'directory_scan', which appear to perform similar functions, so it doesn't reach the highest clarity level.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'directory_bruteforce', 'directory_scan', and 'fuzzing_parameters' available, there's no indication of the specific context, prerequisites, or differences that would help an agent choose appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adriyansyah-mf/mcp-pentest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server