<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: testing-jwt-implementation-flaws
description: >-
  Test JWT implementation for algorithm confusion (none/HS256 vs RS256), key brute-forcing, claim manipulation, JWK injection, and token replay vulnerabilities.
domain: cybersecurity
subdomain: bug-bounty
tags:
  - jwt
  - algorithm-confusion
  - token
  - authentication-bypass
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1078"]
  frameworks: ["MITRE ATT&CK", "OWASP"]
  tools: ["jwt-tool", "burpsuite", "hashcat"]
---

# Testing Jwt Implementation Flaws

## Overview

Test JWT implementation for algorithm confusion (none/HS256 vs RS256), key brute-forcing, claim manipulation, JWK injection, and token replay vulnerabilities.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `jwt-tool` | Security tooling |
| `burpsuite` | Security tooling |
| `hashcat` | Security tooling |
| jwt_tool, Burp Suite, target JWT-authenticated application | Environment requirement |

## Quick Reference

```bash
# Quick start commands
node scripts/agent.js --help
node scripts/agent.js analyze --token eyJ0eXAi...
```

## Workflow

### Step 1: Analyze JWT Structure

```bash
node scripts/agent.js analyze --token eyJ0eXAi...
```

### Step 2: Test Algorithm Confusion

```bash
node scripts/agent.js test --url https://target.com --vector alg-none
```

### Step 3: Brute Force Weak Secret

```bash
node scripts/agent.js crack --token eyJ0eXAi... --wordlist secrets.txt
```


## Verification

- **Verify JWT analysis**: `node scripts/agent.js analyze --token eyJ0eXAi...`
- **Confirm algorithm confusion**: `node scripts/agent.js test --url https://target.com --vector alg-none`

## References

- MITRE ATT&CK: T1078
- Frameworks: MITRE ATT&CK, OWASP
- Tools: jwt-tool, burpsuite, hashcat
