Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Practice library / Web attacks

Lab · Medium · 2 hoursFree account

OAuth & JWT Attacks

alg:none bypass, RS256→HS256 confusion, JWT cracking, and OAuth code theft.

  • oauth
  • jwt
  • algorithm-confusion
  • authentication
On this page 6 sections
  1. ·Topics Covered
  2. Locked: JWT Anatomy
  3. Locked: Algorithm None Attack
  4. Locked: RS256 to HS256 Confusion
  5. Locked: Brute Force Weak Secret
  6. Locked: OAuth Attacks

Before you start

A JSON Web Token carries its own claims and signs them — change the header's alg to none or to HS256 with the server's public key and a weak implementation accepts whatever body you sign. OAuth adds a redirect-based dance on top, and a missing state parameter or a loose redirect_uri lets an attacker steal the code mid-flow. Here you forge tokens, crack HMAC secrets and steal an OAuth code.

Lab Objectives

  • Decode and understand JWT structure and signature verification
  • Exploit algorithm=none to forge tokens without a secret
  • Exploit HMAC-RSA confusion (RS256 to HS256) attacks
  • Brute force weak JWT secrets with hashcat
  • Attack OAuth 2.0 authorization code flows
  • Exploit OAuth CSRF via missing state parameter and open redirect_uri

Topics Covered

  • JWT header, payload, and signature breakdown
  • alg:none attack — unsigned token forgery
  • RS256 to HS256 key confusion attack
  • JWT secret cracking with hashcat and jwt_tool
  • OAuth 2.0 flows and implicit grant vulnerabilities
  • OAuth CSRF and redirect_uri manipulation for code theft

Sign in to continue

5 more sections are for signed-in members. It is free: sign in with Google.

Related