> For the complete documentation index, see [llms.txt](https://alham-rizvi.gitbook.io/alhamrizvi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/web-exploitation/jawt-scratchpad.md).

# JaWT-scratchpad

First, log in to the website. Then open Inspect → Network tab and refresh the page.

You will see a JWT token in the requests. Since JWT uses a signature, we need the secret key to modify the payload.

\*\*\*\*

To find the key, I used John the Ripper to brute-force the JWT secret, and I got the key: ilovepico.

Next, I used a JWT decoder/editor tool (like <https://tribestream.io/tools/jwt/> — or you can use my custom-built tool 😄) to decode and modify the token.

<img src="https://github.com/user-attachments/assets/542376bc-0ec4-4201-b35e-478529b45325" alt="image" height="665" width="1040">

After decoding, I edited the payload (for example, changing the role/permissions as required), and then re-signed the token using the secret key ilovepico now on the network tab change the value to this payload and you will ghet tyhe flag lol


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alham-rizvi.gitbook.io/alhamrizvi/picoctf-writeups/picoctf/web-exploitation/jawt-scratchpad.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
