> For the complete documentation index, see [llms.txt](https://cookiez.gitbook.io/red-team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cookiez.gitbook.io/red-team/cloud/general/enumeration/jwt.md).

# JWT

JSON Web Token (JWT) is a standard way to exchange information between client and server

Below is the "example JWT" from JWT.IO:

```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.5TLxTvyC1fCy7KfNPHgYtzbBxmR3y2LAuWd7mAXEqAjC
gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
```

Notice the "." between each value, and notice the beginning is "eyJ"; these are indicative of a JWT. They are not encrypted; they are signed and can be read. If you find a JWT in the wild and want to view the contents, use one of the JWT decoders like <mark style="color:orange;"><https://jwt.ms></mark> or <mark style="color:orange;"><https://jwt.io></mark>.

If the algorithm is HMAC with SHA like HS256 and has a shared key, try to brute force it. Maybe the key is something simple like Password123.

&#x20;If the algorithm is RSA with SHA like RS256 and signed with a certificate, you can try signing the request with the public key so that the signature is valid, and you can switch the protocol to a symmetric certificate algorithm to bypass the private key check. Has this happened in the wild? Absolutely.&#x20;

Once you modify the JWT you are ready to try upgrading your account, changing your user, or possibly take over the system.
