Skip to content

Sparrrgh/JWT_pwn

This branch is 19 commits ahead of, 59 commits behind ticarpi/jwt_tool:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Franco Marino
Aug 17, 2020
e1900a6 · Aug 17, 2020

History

33 Commits
Aug 17, 2020
Dec 7, 2019
Dec 12, 2019
Nov 25, 2019
Oct 17, 2019

Repository files navigation

The JSON Web Token PWNing Toolkit

jwt_PWN.py is a toolkit for validating, forging and cracking JWTs (JSON Web Tokens).

Features:

  • Checking the validity of a token (Only HMAC-SHA)
  • Testing for the RS/HS256 public key mismatch vulnerability
  • Testing for the alg=none signature-bypass vulnerability
  • Identifying weak keys via Dictionary Attack
  • Forging tokens header and payloads

Requirements

Python 3, that's it.

Usage

$ python3 JWT_pwn.py <token>

The first argument should be the JWT itself.

For example:
$ python jwt_PWN.py eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbiI6InRpY2FycGkifQ.aqNCvShlNT9jBFTPBpHDbt2gBB1MyHiisSDdp8SQvgw

Further Reading

Tips

Regex for finding JWTs in Burp Search
(make sure 'Case sensitive' and 'Regex' options are ticked)
[= ]ey[A-Za-z0-9_-]*\.[A-Za-z0-9._-]* - url-safe JWT version
[= ]ey[A-Za-z0-9_\/+-]*\.[A-Za-z0-9._\/+-]* - all JWT versions (higher possibility of false positives)

TODO

  • Support RSA signed tokens
  • Multithread cracking of keys(Probably with a module written in Go)

About

Tool to test, tamper and pwn JWTs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%