Skip to content

A CLI tool to test web forms/api endpoints with fuzzed data and for the OWASP top 10

Notifications You must be signed in to change notification settings

cshnimble/web-fuzzing-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Application Fuzzing Tool

A comprehensive security testing tool that generates fuzzed test cases to identify vulnerabilities in web applications. This tool is designed for test engineers to perform automated security testing with known good test data and various attack payloads.

Features

  • Comprehensive Fuzzing: Tests authentication, input fields, API endpoints, and more
  • Multiple Attack Vectors: SQL injection, XSS, command injection, path traversal, LDAP injection, and boundary testing
  • Flexible Configuration: YAML/JSON configuration files with customizable settings
  • Rich Reporting: Beautiful console output with color-coded severity levels
  • Multiple Output Formats: Console output and file export options
  • Extensible Architecture: Modular design for easy extension and customization

Installation

Prerequisites

  • Python 3.11 or higher
  • uv package manager (recommended) or pip

Using uv (Recommended)

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone <repository-url>
cd web-fuzzing-tool

# Install dependencies
uv sync

# Activate the virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

Using pip

# Clone the repository
git clone <repository-url>
cd web-fuzzing-tool

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -e .

Quick Start

1. Create a Configuration File

Create a configuration file (YAML or JSON) with your target application details:

target:
  base_url: "https://your-app.com"
  auth_endpoint: "/api/login"
  endpoints:
    - "/api/users"
    - "/api/products"
    
test_data:
  valid_credentials:
    username: "testuser"
    password: "ValidPass123!"
  valid_inputs:
    email: "user@example.com"
    age: 25

fuzzing:
  intensity: "medium"
  payload_types: ["sql_injection", "xss", "command_injection", "boundary"]
  request_delay: 0.1
  timeout: 5

2. Run the Fuzzer

# Basic usage
web-fuzzer --config config.yaml

# With verbose output
web-fuzzer --config config.yaml --verbose

# Save results to file
web-fuzzer --config config.yaml --output results.txt

# Validate configuration only
web-fuzzer --config config.yaml --validate-config

3. Create Example Configuration

# Create example YAML config
web-fuzzer --create-example example.yaml

# Create example JSON config
web-fuzzer --create-example example.json

Configuration

Target Configuration

  • base_url: Base URL of the target application
  • auth_endpoint: Authentication endpoint (optional)
  • endpoints: List of endpoints to test
  • headers: Default headers to include in requests
  • cookies: Default cookies to include in requests

Test Data Configuration

  • valid_credentials: Known good authentication credentials
  • valid_inputs: Valid input data for testing

Fuzzing Configuration

  • intensity: Fuzzing intensity level (low/medium/high)
  • payload_types: Types of payloads to generate
  • request_delay: Delay between requests in seconds
  • timeout: Request timeout in seconds
  • max_retries: Maximum retry attempts
  • follow_redirects: Whether to follow HTTP redirects

Payload Types

The tool supports the following payload types:

  • SQL Injection: Classic and blind SQL injection attacks
  • XSS: Cross-site scripting payloads (reflected, stored, DOM-based)
  • Command Injection: Command injection attacks
  • Path Traversal: Directory traversal attacks
  • LDAP Injection: LDAP injection attacks
  • Boundary Testing: Input boundary and edge case testing
  • Authentication Bypass: Authentication bypass attempts

Usage Examples

Basic Fuzzing

web-fuzzer --config config.yaml

Verbose Output

web-fuzzer --config config.yaml --verbose

Save Results to File

web-fuzzer --config config.yaml --output results.txt

Quiet Mode

web-fuzzer --config config.yaml --quiet

Disable Colored Output

web-fuzzer --config config.yaml --no-color

Output

The tool provides comprehensive output including:

  • Configuration Summary: Target URL, endpoints, and settings
  • Progress Updates: Real-time progress during fuzzing
  • Vulnerability Table: Summary of found vulnerabilities
  • Detailed Results: Individual vulnerability details
  • Statistics: Summary statistics by severity and type
  • Error Reporting: Any errors encountered during testing

Example Output

Web Application Fuzzing Tool
Comprehensive security testing for web applications

Configuration
Target URL: https://example.com
Endpoints: 3
Payload Types: sql_injection, xss, command_injection, boundary
Intensity: medium
Timeout: 5s

Starting fuzzing process...

Fuzzing Summary
┌─────────────────┬─────────────────┬────────┐
│ Metric          │ Value           │ Color  │
├─────────────────┼─────────────────┼────────┤
│ Target URL      │ https://example.com │ blue │
│ Total Requests  │ 150             │ blue   │
│ Execution Time  │ 45.23s          │ blue   │
│ Vulnerabilities Found │ 3          │ red    │
│ Critical        │ 1               │ red    │
│ High            │ 1               │ red    │
│ Medium          │ 1               │ yellow │
│ Low             │ 0               │ green  │
│ Info            │ 0               │ blue   │
│ Errors          │ 0               │ green  │
└─────────────────┴─────────────────┴────────┘

Development

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src/fuzzer

# Run specific test file
pytest tests/test_models.py

Code Quality

# Run linting
ruff check src/ tests/

# Fix linting issues
ruff check --fix src/ tests/

Project Structure

src/fuzzer/
├── __init__.py
├── cli.py              # CLI interface
├── config_loader.py    # Configuration loading
├── fuzzer_engine.py    # Main fuzzing engine
├── auth_fuzzer.py      # Authentication fuzzing
├── input_fuzzer.py     # Input field fuzzing
├── api_fuzzer.py       # API endpoint fuzzing
├── payloads.py          # Payload generators
├── reporter.py         # Console reporting
└── models.py           # Pydantic models

tests/                  # Test suite
config_examples/        # Example configurations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Security Notice

This tool is designed for authorized security testing only. Always ensure you have permission to test the target application. Unauthorized testing may violate laws and terms of service.

Support

For issues, questions, or contributions, please:

  1. Check the existing issues
  2. Create a new issue with detailed information
  3. Follow the contribution guidelines

Changelog

v0.1.0

  • Initial release
  • Basic fuzzing capabilities
  • YAML/JSON configuration support
  • Rich console output
  • Comprehensive test suite

About

A CLI tool to test web forms/api endpoints with fuzzed data and for the OWASP top 10

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages