Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jwt2john not working with some input strings / formats? #3

Open
gripedthumbtacks opened this issue Mar 23, 2017 · 1 comment
Open

Comments

@gripedthumbtacks
Copy link

This hmac-sha256 input string does not seem to be interpreted by john (with or without bleeding jumbo patches) following jwt2john even if forced to hmac-sha256. Any thoughts? What algorithms are supported? Maybe I am missing something?

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMGUyOWViNC1iYWNhLTRiMGItYWE3OS00YzlmMDMxMjg5NWQiLCJ1c2VySWQiOjUwNywidXNlclVpZCI6ImQzMjQwZGZmLTEwZTktNDM2MC05ZjdkLWE4YzdmOTllMzc4MSIsImVtYWlsIjoiYWxpY2UuZGF0YXNjaWVuY2VAZ3VhcmRzaWdodC5jb20iLCJyb2xlcyI6WyJTVEFOREFSRCJdLCJuYW1lIjoiQWxpY2UgR3VhcmRzaWdodCIsImlhdCI6MTQ5MDE0NTU3MH0.J0KJ3N7WwqE9MIL2nABdLVSfseej4BiUFREJl8eSUqU

$ echo -en 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' | base64 -d
{"alg":"HS256","typ":"JWT"}
$ jwt2john eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjMGUyOWViNC1iYWNhLTRiMGItYWE3OS00YzlmMDMxMjg5NWQiLCJ1c2VySWQiOjUwNywidXNlclVpZCI6ImQzMjQwZGZmLTEwZTktNDM2MC05ZjdkLWE4YzdmOTllMzc4MSIsImVtYWlsIjoiYWxpY2UuZGF0YXNjaWVuY2VAZ3VhcmRzaWdodC5jb20iLCJyb2xlcyI6WyJTVEFOREFSRCJdLCJuYW1lIjoiQWxpY2UgR3VhcmRzaWdodCIsImlhdCI6MTQ5MDE0NTU3MH0.J0KJ3N7WwqE9MIL2nABdLVSfseej4BiUFREJl8eSUqU > hash.txt
$ john hash.txt
Using default input encoding: UTF-8
No password hashes loaded (see FAQ
@Sjord
Copy link
Owner

Sjord commented May 30, 2017

This is because of a length restriction in john. You can try increasing SALT_LIMBS in the source code to support larger data sizes.

Also, I noticed that jumbo-john now supports the JWT format, so you don't need jwt2john anymore to convert it to another format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants