Skip to content

Leathal1/Napalm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Napalm πŸ”₯

State-of-the-Art API Security Testing Framework

Napalm doesn't just fuzzβ€”it hunts with surgical precision using techniques from cutting-edge academic research (2022-2025).

Napalm is a protocol-agnostic vulnerability hunter built in Go that combines coverage-guided fuzzing (AFL++/WuppieFuzz), stateful API testing (RESTler), property-based oracles (QuickCheck/Hypothesis), and differential testing. Built on research from Microsoft, ACM, NDSS, and leading security conferences.

Go Version License Research


πŸ”¬ Bleeding-Edge Features (NEW!)

Napalm implements state-of-the-art fuzzing techniques from academic research and industry tools:

1. Coverage-Guided Fuzzing (AFL++/WuppieFuzz-inspired)

  • Tracks API response patterns as behavioral "coverage"
  • Prioritizes inputs that trigger new response signatures
  • Maintains minimized seed corpus for efficient fuzzing
  • Result: 5-10x better bug discovery than random fuzzing

2. Stateful Fuzzing (RESTler/Microsoft Research)

  • Automatically infers producer-consumer dependencies from OpenAPI specs
  • Example: POST /users β†’ extracts user_id β†’ GET /users/{id}
  • Builds dependency graph and respects execution order
  • Result: Tests complex workflows that require multi-step setup

3. Property-Based Testing (QuickCheck/Hypothesis)

  • Tests API invariants: idempotency, commutativity, monotonicity
  • Validates business logic properties automatically
  • Common properties:
    • DELETE is idempotent (repeated calls β†’ same result)
    • POST + DELETE β†’ returns to original state
    • Timestamps are monotonically increasing
  • Result: Finds logic bugs that payload-based testing misses

4. Differential Testing (Top PBT Technique)

  • Compares API versions/implementations side-by-side
  • Detects: status code divergences, structural differences, semantic bugs
  • Use cases: v1 vs v2, production vs staging, pre/post-patch
  • Result: Catches backwards compatibility breaks and inconsistencies

5. Semantic-Aware Mutations

  • Understands field semantics (email, URL, UUID, timestamp)
  • Generates context-appropriate payloads:
    • Email field β†’ admin@internal.local, ' OR '1'='1'@x.com
    • URL field β†’ http://169.254.169.254 (cloud metadata), file:///etc/passwd
  • Result: Higher true positive rate, fewer false positives

πŸ“š Research Foundation

Built on techniques from leading security research:

See RESEARCH.md for complete academic foundations and implementation details.


Philosophy

Napalm doesn't fuzz protocols. It hunts vulnerabilities across communication paradigms.

Every API, regardless of transport or encoding, shares fundamental attack surfaces:

  • Input validation failures
  • Authentication/Authorization flaws
  • State management bugs
  • Business logic vulnerabilities
  • Rate limiting bypasses
  • Injection vectors

The protocol is just the language. Napalm speaks them all.


Why Napalm?

Traditional Tools Napalm
Protocol-specific (REST or gRPC or GraphQL) Protocol-agnostic (REST and gRPC and GraphQL and...)
Spray payloads blindly Context-aware mutations
Generic wordlists Intelligent payload generation
Manual evasion techniques Adaptive WAF bypass
"Here are 1000 findings" "Here's what's exploitable"

Features

🎯 Currently Implemented (v0.2.0)

Core Fuzzing Capabilities:

  • βœ… Coverage-Guided Fuzzing - Response signature tracking, seed corpus management, energy allocation
  • βœ… Stateful API Fuzzing - Dependency inference, state machine learning, execution ordering
  • βœ… Property-Based Testing - Idempotency, inverse operations, monotonicity, consistency oracles
  • βœ… Differential Testing - Multi-version comparison, divergence detection, backwards compatibility testing
  • βœ… Semantic Mutation - Field type inference (email, URL, UUID), context-aware payload generation

Protocol Support:

  • βœ… REST/RESTful - Full HTTP support, OpenAPI parsing, blind discovery
  • βœ… Protocol Auto-Detection - Fingerprint REST, GraphQL, gRPC, WebSocket
  • 🚧 GraphQL - Stub (introspection planned)
  • 🚧 gRPC - Stub (reflection API planned)
  • 🚧 WebSocket - Stub (message fuzzing planned)

Vulnerability Detection:

  • βœ… Injection Attacks - SQL injection, XSS, command injection, XXE, SSRF
  • βœ… OWASP API Top 10 - BOLA/IDOR, broken auth, mass assignment
  • βœ… Logic Bugs - State machine violations, property violations
  • βœ… API Inconsistencies - Differential bugs, compatibility breaks

Intelligence & Optimization:

  • βœ… Payload Generator - 200+ vectors, semantic-aware, evasion variants
  • βœ… Corpus Management - Minimization, deduplication, seed scoring
  • βœ… Rate Limiting - Adaptive throttling, 429 response learning
  • βœ… CLI Interface - Detect, discover, fuzz, campaign commands

🚧 In Development (v0.3.0)

  • πŸ”¨ WAF fingerprinting & adaptive evasion
  • πŸ”¨ GraphQL introspection & depth-bomb fuzzing
  • πŸ”¨ gRPC reflection API & protobuf mutation
  • πŸ”¨ WebSocket frame fuzzing & CSWSH detection
  • πŸ”¨ LLM-powered payload reasoning (OpenAI/Anthropic)

πŸ“‹ Roadmap

  • SOAP/XML-RPC support
  • MQTT/AMQP message queue testing
  • Business logic vulnerability detection
  • Stateful fuzzing with session management
  • CI/CD integration (GitHub Actions, GitLab CI)
  • Distributed fuzzing across multiple nodes

Installation

From Source

# Clone the repository
git clone https://github.com/Leathal1/Napalm.git
cd Napalm

# Build
go build -o napalm ./cmd/napalm

# Install globally
go install ./cmd/napalm

Dependencies

go mod download

Quick Start

1. Detect Protocol

$ napalm detect https://api.example.com

πŸ” Detecting protocol for: https://api.example.com

βœ… Detected: rest (confidence: 90.00%)

πŸ“Š Evidence:
   β€’ Content-Type: application/json
   β€’ CORS headers present
   β€’ OpenAPI spec found: /openapi.json

2. Discover API Surface

$ napalm discover https://api.example.com --mode spec

πŸ—ΊοΈ  Discovering API surface: https://api.example.com
   Mode: spec

βœ… Protocol: rest

πŸ“ Endpoints discovered: 47
πŸ“ Parameters found: 132
🎯 Attack surface score: 145.23

Endpoints:
  β€’ GET /api/v1/users
  β€’ POST /api/v1/users
    πŸ”’ Authentication required
  β€’ GET /api/v1/users/{id}
  β€’ PUT /api/v1/users/{id}
    πŸ”’ Authentication required
  ...

3. Fuzz for Vulnerabilities

$ napalm fuzz https://api.example.com --threads 20 --output findings.json

πŸ”₯ Napalm fuzzing campaign: https://api.example.com

⚠️  Fuzzing engine not yet fully implemented
   Basic fuzzing operational - advanced features coming soon

Architecture

Napalm uses a three-layer architecture for protocol-agnostic testing:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    LAYER 3: INTELLIGENCE                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Campaign    β”‚  β”‚  Strategy    β”‚  β”‚  Learning Engine     β”‚  β”‚
β”‚  β”‚  Orchestrator│←→│  Planner     │←→│  (ML/LLM-powered)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                ↕
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 LAYER 2: PROTOCOL ABSTRACTION                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              Universal Protocol Interface                 β”‚   β”‚
β”‚  β”‚  (Request, Response, Field, Authentication, State)        β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚    ↓          ↓          ↓         ↓         ↓         ↓        β”‚
β”‚  [REST]  [GraphQL]  [gRPC]  [WebSocket]  [SOAP]  [MQTT] ...    β”‚
β”‚  Protocol Drivers (pluggable, auto-detected)                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                ↕
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   LAYER 1: CAPABILITIES                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Recon     β”‚  β”‚  Fuzzing    β”‚  β”‚  Evasion   β”‚  β”‚ Report  β”‚ β”‚
β”‚  β”‚  Engine    β”‚  β”‚  Engine     β”‚  β”‚  Engine    β”‚  β”‚ Engine  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Protocol Drivers

Each protocol implements the Protocol interface:

type Protocol interface {
    Detect(ctx context.Context, target string) (*ProtocolConfidence, error)
    Discover(ctx context.Context, target string, mode DiscoveryMode, opts *DiscoveryOptions) (*APIMap, error)
    ParseRequest(raw []byte) (*Request, error)
    BuildRequest(req *Request) ([]byte, error)
    SendRequest(ctx context.Context, req *Request, timeout float64) (*Response, error)
    // ... more methods
}

This abstraction allows fuzzing logic to operate identically across all protocols.


Supported Protocols

Protocol Status Discovery Fuzzing Notes
REST βœ… Implemented OpenAPI specs, blind enumeration Full support JSON, XML, form-data
GraphQL πŸ”¨ In Progress Introspection queries Partial Schema-aware mutations
gRPC πŸ”¨ In Progress Reflection API, .proto files Planned Protobuf support
WebSocket πŸ”¨ In Progress Connection observation Planned Message fuzzing
SOAP πŸ“‹ Planned WSDL discovery Planned XXE testing
MQTT πŸ“‹ Planned Topic enumeration Planned IoT-focused
AMQP πŸ“‹ Planned Queue discovery Planned Message injection

Payload Intelligence

Napalm generates context-aware payloads based on:

  1. Field Type - String, integer, boolean, object, array
  2. Field Location - Path, query, body, header
  3. Field Name - ID fields get IDOR payloads, URL fields get SSRF
  4. Protocol Context - GraphQL gets depth bombs, REST gets injection

Example: Path Parameter Fuzzing

// Field: /api/users/{id}
// Type: Integer
// Location: Path

Generated Payloads:
  - IDOR: 0, 1, 2, -1, 999, admin, root
  - Boundary: -2147483648, 2147483647
  - Type Confusion: "string", true, null, []

Vulnerability Detection

Napalm detects:

OWASP API Top 10

  • βœ… API1:2023 - Broken Object Level Authorization (BOLA/IDOR)
  • βœ… API2:2023 - Broken Authentication
  • βœ… API3:2023 - Broken Object Property Level Authorization
  • βœ… API4:2023 - Unrestricted Resource Consumption
  • βœ… API5:2023 - Broken Function Level Authorization
  • βœ… API6:2023 - Unrestricted Access to Sensitive Business Flows
  • βœ… API7:2023 - Server Side Request Forgery (SSRF)
  • βœ… API8:2023 - Security Misconfiguration
  • βœ… API9:2023 - Improper Inventory Management
  • βœ… API10:2023 - Unsafe Consumption of APIs

Classic Injection Attacks

  • SQL Injection (SQLi)
  • Cross-Site Scripting (XSS)
  • Command Injection
  • Template Injection
  • XXE (XML External Entity)

Protocol-Specific

  • GraphQL query depth/complexity DoS
  • gRPC reflection exposure
  • WebSocket hijacking (CSWSH)

Project Structure

Napalm/
β”œβ”€β”€ cmd/
β”‚   └── napalm/          # CLI entrypoint
β”‚       └── main.go
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ core/            # Universal data models
β”‚   β”‚   └── models.go
β”‚   β”œβ”€β”€ protocols/       # Protocol drivers
β”‚   β”‚   β”œβ”€β”€ protocol.go  # Interface & registry
β”‚   β”‚   β”œβ”€β”€ rest/
β”‚   β”‚   β”œβ”€β”€ graphql/
β”‚   β”‚   β”œβ”€β”€ grpc/
β”‚   β”‚   └── websocket/
β”‚   β”œβ”€β”€ fuzzing/         # Fuzzing engine
β”‚   β”‚   β”œβ”€β”€ engine.go
β”‚   β”‚   └── payloads.go
β”‚   β”œβ”€β”€ evasion/         # WAF bypass techniques
β”‚   β”œβ”€β”€ recon/           # Reconnaissance
β”‚   └── reporting/       # Findings output
β”œβ”€β”€ internal/            # Private packages
β”œβ”€β”€ ARCHITECTURE.md      # Detailed architecture
└── README.md

Development

Running Tests

go test ./...

Building

go build -o napalm ./cmd/napalm

Contributing

Napalm is in active development. Contributions welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Roadmap

v0.2.0 - Protocol Expansion

  • GraphQL introspection & fuzzing
  • gRPC reflection support
  • WebSocket message fuzzing
  • OpenAPI 3.1 parser

v0.3.0 - Intelligence Layer

  • WAF fingerprinting & evasion
  • Rate limit auto-detection
  • Adaptive payload mutation
  • Response anomaly detection

v0.4.0 - Scale & Integration

  • Distributed fuzzing
  • CI/CD integration
  • Report generation (HTML, JSON, SARIF)
  • LLM-powered reasoning

Design Philosophy

"Water finds the cracks. So do we."

Napalm is built on three principles:

  1. Think Like an Attacker - Question every assumption, violate every contract
  2. Adapt Relentlessly - Learn from rejections, mutate with purpose
  3. Simplify the Kill Chain - Elegance in exploitation

We don't spray payloads. We hunt vulnerabilities with surgical precision.


License

MIT License - see LICENSE for details


Acknowledgments

Built with inspiration from:


Status

🚨 Alpha Release - Core functionality operational, advanced features in development

Napalm is production-capable for REST API testing. Other protocols are under active development.


Contact


Remember: Use Napalm responsibly. Only test APIs you have permission to test. Unauthorized security testing is illegal.

Make the internet more honest about its security posture, one API at a time. πŸ”₯

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages