This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Burp Suite extension for testing JWT (JSON Web Token) vulnerabilities in web applications. The extension intercepts HTTP requests, extracts JWT tokens from Authorization headers or cookies, modifies claims, and tests various JWT attack vectors to identify security weaknesses.
./gradlew build./gradlew clean build./gradlew jarThe JAR will be created at build/libs/burp-jwt-claim-probe-1.0.0.jar
-
JwtClaimProbeExtension (
src/main/java/jwtprobe/JwtClaimProbeExtension.java)- Main extension entry point implementing BurpExtension
- Initializes settings, UI panel, and proxy handler
- Registers the extension with Burp Suite
-
ProxyJwtHandler (
src/main/java/jwtprobe/ProxyJwtHandler.java)- Implements ProxyRequestHandler to intercept HTTP requests
- Extracts JWT tokens from Authorization headers or cookies
- Performs JWT vulnerability testing with various attack vectors
- Logs findings to
/tmp/jwt-claim-probe-issues.log
-
JwtUtils (
src/main/java/jwtprobe/JwtUtils.java)- Utility functions for JWT manipulation
- Token validation, Base64 encoding/decoding
- JWT modification methods for different attack types:
buildTokenKeepSignature()- Modifies payload without re-signingbuildTokenAlgNone()- Sets algorithm to 'none' (removes signature)buildTokenHS256EmptyKey()- Signs with empty HMAC key
-
Settings (
src/main/java/jwtprobe/Settings.java)- Configuration class with attack options and settings
- Thread-safe atomic booleans for toggles
- Configurable claim names, values, and types
-
SettingsPanel (
src/main/java/jwtprobe/SettingsPanel.java)- Swing-based UI for extension configuration
- Allows enabling/disabling attack vectors
- Configures target claims and expected responses
The extension tests three main JWT vulnerability classes:
- Modify-Only Attack: Changes claim values without re-signing the token
- Algorithm None Attack: Sets
algheader tononeto bypass signature verification - Empty Key Attack: Signs tokens using HS256 with an empty secret key
- Authorization Header: Extracts Bearer tokens from
Authorization: Bearer <token> - Cookie Extraction: Extracts tokens from configurable cookie names
- Scope Filtering: Only processes requests within Burp's defined scope
- Anti-Loop Protection: Uses
X-JWT-Claim-Probeheader to prevent infinite loops
Key settings in the Settings class:
claimNameandclaimValue: The claim to modify and its new valueclaimType: Data type (STRING, BOOLEAN, NUMBER, NULL)okStatus: Expected HTTP status code for successful exploitationallowedMethods: HTTP methods to process (default: GET, POST)ignoreExt: Regex pattern for file extensions to skip
- Java 17+
- Burp Suite Montoya API (2024.11)
- Gradle build system
This tool is designed for authorized security testing to identify:
- JWT implementations that don't properly validate signatures
- Applications accepting unsigned tokens (alg=none)
- Weak key management (empty HMAC keys)
- Insufficient claim validation
Results are logged both to Burp's output and to /tmp/jwt-claim-probe-issues.log in JSON format for further analysis.