• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2022
  • June
  • 29
  • Jwtear – Modular Command-Line Tool To Parse, Create And Manipulate JWT Tokens For Hackers

Jwtear – Modular Command-Line Tool To Parse, Create And Manipulate JWT Tokens For Hackers

June 29, 2022 Comments Off on Jwtear – Modular Command-Line Tool To Parse, Create And Manipulate JWT Tokens For Hackers
Jwtear - Modular Command-Line Tool To Parse, Create And Manipulate JWT Tokens For Hackers cybersecurity ethical hacking hack android hack app hack wordpress hacker news hacking hacking tools for windows keylogger kit kitploit password brute force penetration testing pentest pentest android pentest linux pentest toolkit pentest tools spy tool kit spyware tools

A modular command-line tool to parse, create and manipulate JSON Web Token(JWT) tokens for security testing purposes.

Features

  • Complete modularity.
    • All commands are plugins.
    • Easy to add new plugins.
    • Support JWS and JWE tokens.
  • Easy interface for plugins. (follow the template example)
  • Flexible
  • token generation based on production-class libraries (e.g. json-jwt, jwe).

Available plugins

  • Parse: parses jwt tokens.
  • jws: manipulate and generate JWS tokens.
  • jwe: manipulate and generate JWE tokens.
  • bruteforce: brutefocing JWS signing key
  • wiki: contains offline information about JWT, attacks ideas, references.

Installation

install it yourself as:

$ gem install jwtear

Usage

  • Show the main menu
    888888 888       888 88888888888
"88b 888 o 888 888
888 888 d8b 888 888
888 888 d888b 888 888 .d88b. 8888b. 888d888
888 888d88888b888 888 d8P Y8b "88b 888P"
888 88888P Y88888 888 88888888 .d888888 888
88P 8888P Y8888 888 Y8b. 888 888 888
888 888P Y888 888 "Y8888 "Y888888 888
.d88P v1.0.0
.d88P"
888P"
NAME
jwtear - Parse, create and manipulate JWT tokens.

SYNOPSIS
jwtear [global options] command [command options] [arguments...]

GLOBAL OPTIONS
-v, --version - Check current and latest version
-h, --help - Show this help message

COMMANDS
help - Shows a list of commands or help for one command
bruteforce, bfs - plugin to offline bruteforce and crack token's signature.
jws, s - Generate signature-based JWT (JWS) token.
jwe, e - Generate encryption-based JWT (JWE) token.
parse - Parse JWT token (accepts JWS and JWE formats).
wiki, w - A JWT wiki for hackers.
  • Show a subcommand help, use -h COMMAND
$jwtear -h jws

NAME
jws - Generate signature-based JWT (JWS) token.

SYNOPSIS
jwtear [global options] jws [command options]

DESCRIPTION
Generate JWS and JWE tokens.

COMMAND OPTIONS
-h, --header=JSON - JWT header (JSON format). eg. {"typ":"JWT","alg":"HS256"}. Run 'jwtear gen -l' for supported algorithms. (required, default: none)
-p, --payload=JSON - JWT payload (JSON format). eg. {"login":"admin"} (required, default: none)
-k, --key=PASSWORD|PUB_KEY_FILE - Key as a password string or a file public key. eg. [email protected] | eg. public_key.pem (default: none)
  • Use a plugin

plugins are defined as subcommands. Each subcommand may have one or more argument and/or switches.

$ jwtear parse -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.J8SS8VKlI2yV47C4BtfYukWPx_2welF34Mz7l-MNmkE
$ jwtear jws -h '{"alg":"HS256","typ":"JWT"}' -p '{"user":"admin"}' -k [email protected]
$ jwtear jwe -header '{"enc":"A192GCM","typ":"JWT"}' --payload '{"user":"admin"}' --key public.pem
$ jwtear bruteforce -v -t eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjpudWxsfQ.Tr0VvdP6rVBGBGuI_luxGCOaz6BbhC6IxRTlKOW8UjM -l ~/tmp/pass.list

Add plugin

To add a new plugin, create a new ruby file under plugins directory with the following structure

module JWTear
module CLI
extend GLI::App
extend JWTear::Helpers::Extensions::Print
extend JWTear::Helpers::Utils

desc "Plugin short description"
long_desc "Plugin long description"
command [:template, :pt] do |c|
c.action do |global, options, arguments|
print_h1 "Plugin template"
print_good "Hi, I'm a template."
template = TemplatePlugin.new
end
end
end

module Plugin
class TemplatePlugin
include JWTear::Helpers::Extensions::Print
include JWTear::Helpers::Utils

def initialize
check_dependencies
# ..code...
end

# ..code...
end
end
end

Instead of including all dependencies for each plugin into jwtear, you can add these dependencies as a hash to check_dependencies method which will require the library and throw a gentle error to the user to install any missing gems.

The hash key is the gem name to install, the hash value is the require string

deps = {'async-io' => 'async/ip'}
check_dependencies(deps)

Once the missing dependencies are installed by the user, the check_dependencies will require them once the plugin class initiated.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jwtear.

  1. Fork it ( https://github.com/KINGSABRI/jwtear/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Areas to contribute

  • contribution by reporting bugs.
  • contribution by perfecting the current code.
  • contribution by adding new plugins.
  • contribution by enhancing the jwtear wiki.
  • contribution by requesting features and/or plugins.

License

The gem is available as open source under the terms of the MIT License.

Download Jwtear

Post navigation

Nimc2 – A C2 Fully Written In Nim
Third and Final “EastSideHigh” Defendant Pleads Guilty

Related Articles

CVE-2022-2586/CVE-2022-2585/CVE-2022-2588: Linux kernel LPE flaw

CVE-2022-2586/CVE-2022-2585/CVE-2022-2588: Linux kernel LPE flaw

- Hack Tools
August 10, 2022
OSRipper: AV evading OSX Backdoor and Crypter Framework

OSRipper: AV evading OSX Backdoor and Crypter Framework

- Hack Tools
August 10, 2022
CVE-2022-36267: Airspan AirSpot unauthenticated remote command injection flaw

CVE-2022-36267: Airspan AirSpot unauthenticated remote command injection flaw

- Hack Tools
August 9, 2022
hacker gadgets
hacker phone covers

Recent Posts

BitMEX Employee Admits Violating Bank Secrecy Act

BitMEX Employee Admits Violating Bank Secrecy Act

August 10, 2022
CVE-2022-2586/CVE-2022-2585/CVE-2022-2588: Linux kernel LPE flaw

CVE-2022-2586/CVE-2022-2585/CVE-2022-2588: Linux kernel LPE flaw

August 10, 2022
OSRipper: AV evading OSX Backdoor and Crypter Framework

OSRipper: AV evading OSX Backdoor and Crypter Framework

August 10, 2022
Two Sentenced for Selling Fake Oxy Pills on the Darkweb

Two Sentenced for Selling Fake Oxy Pills on the Darkweb

August 10, 2022
CVE-2022-36267: Airspan AirSpot unauthenticated remote command injection flaw

CVE-2022-36267: Airspan AirSpot unauthenticated remote command injection flaw

August 9, 2022
MrKaplan - Tool Aimed To Help Red Teamers To Stay Hidden By Clearing Evidence Of Execution

MrKaplan – Tool Aimed To Help Red Teamers To Stay Hidden By Clearing Evidence Of Execution

August 9, 2022

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW