_ jwt_tool.py _ is a toolkit for validating, forging and cracking JWTs (JSON Web Tokens). Its functionality includes: Checking the validity of a token Testing for the _ RS/HS256 _ public key mismatch vulnerability Testing for the _ alg=None _ signature-bypass vulnerability Testing the validity of a secret/key/key file Identifying _ weak keys _ via a High-speed _ Dictionary Attack _ Forging new token header and payload values and creating a new signature with the key or via another attack method Audience This tool is written for pentesters , who need to check the strength of the tokens in use, and their susceptibility to known attacks. It may also be useful for developers who are using JWTs in projects, but would like to test for stability and for known vulnerabilities, when using forged tokens. Requirements This tool is written natively in Python 2.x using the common libraries. Customised wordlists are recommended for the Dictionary Attack option. _ As a speed reference, an Intel i5 laptop can test ~1,000,000 passwords per second on HMAC-SHA256 signing. YMMV. _ Installation Installation is just a case of downloading the jwt_tool.py file (or git clone ing the repo). ( chmod the file too if you want to add it to your _ $PATH _ and call it from anywhere.) Usage $ python jwt_tool.py (filename) The first argument should be the JWT itself, followed by a filename/filepath (for cracking the token, or for use as a key file). For example: $ python jwt_tool.py eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpbiI6InRpY2FycGkifQ.aqNCvShlNT9jBFTPBpHDbt2gBB1MyHiisSDdp8SQvgw /usr/share/wordlists/rockyou.txt The toolkit will validate the token and list the header and payload values. It will then provide a menu of your available options. _ Note: _ signing the token is currently supported using HS256, HS384, HS512 algorithms Input is in either standard or url-safe JWT format, and the resulting tokens are output in both formats for your ease of use. Further Reading A great intro to JWTs – https://jwt.io/introduction/ A lot of the inspiration for this tool comes from the vulnerabilities discovered by Tim McLean. Check out his blog on JWT weaknesses here: https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ My introduction to using this toolkit, and a bit of the history behind it can be found on my blog – https://www.ticarpi.com/introducing-jwt-tool/ A whole bunch of exercises (7 at time of writing) for testing JWT vulnerabilities are provided by Pentesterlab . I’d highly recommend a PRO subscription if you are interested in Web App Pentesting. JWT (alg=None vulnerability) exercise JWT_II (RS/HS256 public key mismatch vulnerability) exercise JWT_III (key-id header field non-sanitisation vulnerability) exercise and just head on over to https://pentesterlab.com/exercises to search for the others! _ PLEASE NOTE: _ This toolkit will solve all of the Pentesterlab JWT exercises in a few seconds when used correctly, however I’d strongly encourage you to work through these exercises yourself, working out the structure and the weaknesses. After all, it’s all about learning… 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) Download Jwt_Tool
http://govanguard.com/wp-content/uploads/2018/04/Header_Logo.png 0 0 govanguard http://govanguard.com/wp-content/uploads/2018/04/Header_Logo.png govanguard2019-05-15 17:53:002019-05-15 17:53:00JWT Tool - A Toolkit For Testing, Tweaking And Cracking JSON Web Tokens
Our Standard Office Hours
Monday – Friday: 8:00AM – 5:00PM EDT
Saturday – Sunday: Closed
Where to Find Us
Data Privacy Notice
- – All product names, logos, and brands are property of their respective owners.
- – The use of these names, logos, and brands is for identification purposes only and does not imply endorsement.
- – Content syndication and aggregation of public information is solely for the purpose of identifying information security trends, all syndicated content contains source links to the content creator website. All content is owned by it’s respective content creators.
- – If you are an owner of some content and want it to be removed, please email email@example.com