Back to rankings

lmammino/jwt-cracker

JavaScriptlmammino.github.io/jwt-cracker/

Simple HS256, HS384 & HS512 JWT token brute force cracker.

jwtjwt-crackersecretsalphabetcrackerbrute-forcebruteforcebrute-force-attacksjavascriptnodejscommand-linecommand
Star Growth
Stars
1.2k
Forks
167
Weekly Growth
Issues
10
5001k
Aug 2016Nov 2019Mar 2023Jul 2026
Artifactsnpmnpm install jwt-cracker
README

npm npm Rawsec's CyberSecurity Inventory GitHub stars GitHub license

jwt-cracker

Simple HS256, HS384 & HS512 JWT token brute force cracker.

Effective only to crack JWT tokens with weak secrets. Recommendation: Use strong long secrets or RS256 tokens.

Install

With npm:

npm install --global jwt-cracker

Usage

From command line:

jwt-cracker -t <token> [-a <alphabet>] [--max <maxLength>] [-d <dictionaryFilePath>] [-f]

Where:

  • token: the full HS256-512 JWT token string to crack
  • alphabet: the alphabet to use for the brute force (default: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
  • maxLength: the max length of the string generated during the brute force (default: 12)
  • dictionaryFilePath: path to a list of passwords (one per line) to use instead of brute force
  • force: force script to execute when the token isn't valid

Requirements

This script requires Node.js version 16.0.0 or higher

Example

Cracking the default jwt.io example:

jwt-cracker -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ -a abcdefghijklmnopqrstuwxyz --max 6

It takes about 2 hours in a Macbook Pro (2.5GHz quad-core Intel Core i7).

Or using a list of passwords taken from https://github.com/danielmiessler/SecLists

jwt-cracker -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ -d darkweb2017-top10000.txt

It takes less than a second.

Contributing

Everyone is very welcome to contribute to this project. You can contribute just by submitting bugs or suggesting improvements by opening an issue on GitHub.

License

Licensed under MIT License. © Luciano Mammino.

Related repositories
fastapi/full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

TypeScriptnpmMIT Licensepythonjson
44.4k8.8k
nextauthjs/next-auth

Authentication for the Web.

TypeScriptnpmISC Licensenodejsnextjs
authjs.dev
28.3k4k
flipped-aurora/gin-vue-admin

🚀Vite+Vue3+Gin拥有AI辅助的基础开发平台,企业级业务AI+开发解决方案,内置mcp辅助服务,内置skills管理,支持TS和JS混用。它集成了JWT鉴权、权限管理、动态路由、显隐可控组件、分页封装、多点登录拦截、资源权限、上传下载、代码生成器、表单生成器和可配置的导入导出等开发必备功能。

GoGo ModulesOthergin-vue-admingin
demo.gin-vue-admin.com
24.9k7.1k
shieldfy/API-Security-Checklist

Checklist of the most important security countermeasures when designing, testing, and releasing your API

MIT Licenseapisecurity
23.3k2.7k
elunez/eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.7.18、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由

JavaMavenApache License 2.0spring-bootspring-security
eladmin.vip/demo
21.9k7.4k
logto-io/logto

🧑‍🚀 Authentication and authorization infrastructure for SaaS and AI apps, built on OIDC and OAuth 2.1 with multi-tenancy, SSO, and RBAC.

TypeScriptnpmMozilla Public License 2.0authenticationauthorization
logto.io
14.2k1k
go-admin-team/go-admin

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;项目文档》:https://www.go-admin.pro V2 Demo: https://vue2.go-admin.dev V3 Demo: https://vue3.go-admin.dev Antd PRO:https://antd.go-admin.pro

GoGo ModulesMIT Licensegincasbin
go-admin.pro
12.7k2.6k
tymondesigns/jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen

PHPPackagistMIT Licensejwtlaravel
jwt-auth.com
11.5k1.5k
jwtk/jjwt

Java JWT: JSON Web Token for Java and Android

JavaMavenApache License 2.0jwtjava
11.1k1.4k
golang-jwt/jwt

Go implementation of JSON Web Tokens (JWT).

GoGo ModulesMIT Licensegogolang
golang-jwt.github.io/jwt/
9.2k440
teamhanko/hanko

Modern authentication, on your terms. Open source alternative to Auth0, Clerk, WorkOS, Stytch.

GoGo ModulesOtherpasskeyswebauthn
hanko.io
9k1k
panva/jose

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes

TypeScriptnpmMIT Licensejosejwa
7.7k375