Skip to content

PortSwigger/json-web-tokens

 
 

Repository files navigation

build status licence open issues

JWT4B

JSON Web Tokens (JWT) support for the Burp Interception Proxy. JWT4B will let you manipulate a JWT on the fly, automate common attacks against JWT and decode it for you in the proxy history. JWT4B automagically detects JWTs in the form of 'Authorization Bearer' headers as well as customizable post body parameters and body content.

Logo

Screenshots

Screenshot - Intercept View

Screenshot - Decode View

Screenshot - Suite Tab View

Testing

The following url contains links to four pages which simulate a JWT being sent via XHR or as cookie. https://oz-web.com/jwt/

Configuration

A config file will be created under "%user.home%.JWT4B\config.json" with the following content:

{
  "resetEditor": true,
  "highlightColor": "blue",
  "interceptComment": "Contains a JWT",
  "tokenKeywords": [
    "id_token",
    "ID_TOKEN",
    "access_token",
    "token"
  ],
  "cveAttackModePublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuNCJ/1Tawe8DUIbQDxjRr+bVSoIdcOjJm5wskbMUjHopTWERzLo65yLPjCVcRudQ8DNJIs3yb+hzxi0b8uyKXK6nYTaxdwtRN61NMgI/ecNYw1A3nMLRJ4KetLCUqCehVV+OavJqwGXb0k4OhJu7VefLD9PxOQxLd/MxJLMTChqYYQWY069oNTB9uRaBRLwcEv3i8uiM3HAdx4di0FZLHN5yAt6Zq7TR53CUDSI74q/AH4zeuo+D/UscVTq2bInfJmN3NdA6XqPdjnu6DtT7VQZif+06sFXgnoieuUaeRE0Jn8ZY72hljToFZmsLUPPhTSzmFTgko4+MGnS29w1rbQIDAQAB",
  "cveAttackModePrivateKey": "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC40In/VNrB7wNQhtAPGNGv5tVKgh1w6MmbnCyRsxSMeilNYRHMujrnIs+MJVxG51DwM0kizfJv6HPGLRvy7IpcrqdhNrF3C1E3rU0yAj95w1jDUDecwtEngp60sJSoJ6FVX45q8mrAZdvSTg6Em7tV58sP0/E5DEt38zEksxMKGphhBZjTr2g1MH25FoFEvBwS/eLy6I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su8NEzMOptrxA7nGu/JUmL0HgQvnTRLYYE2JWJYEcYJGvGtUkO8/xWY2RCKYkc9Dfn6dvJ57wFV5Dgvdz7V18e47+JIg6NcKkIXL7wxxZ1RwhQKBgQDd4nlMdJue4zA7hO2YGxUqX+ALVY6ikZ/SBOQIDrnI9aixwXYQ3t3Nwjim73/0uiLXLOpO92dBSym7GeSPYqWZhkyQ8C05tDyGvDI5b7bVmD1pxmnhG9sOktrkDVkOsYUnAhRwCgmuExkoeGWPvUt+85cmMpJfHHqbrb5FLqTeXQ=="
}

Changing the config requires a reload of the extension or BURP. If you messed something up, just delete the file, it will be created again with the default values. Note: If resetEditor is set to false, all options such as the re-singing and alg attack won't be reset for every new request. This might be useful when working in the repeater.

Building your own version (with Eclipse)

  1. Clone repository and create new Eclipse Java Project
  2. Rightclick -> Configure -> Convert to Gradle Project (downloading all required libraries)
  3. Open Burp -> Extensions -> APIs -> Save interface files -> Copy all files to JWT4B\src\burp
  4. Gradle -> build jar
  5. Load the JAR in Burp through the Extender Tab -> Extensions -> Add (Good to know: CTRL+Click on a extension to reload it)

Installation from BApp Store

This extension is available in the BApp Store.

Packages

No packages published

Languages

  • Java 99.8%
  • HTML 0.2%