Day 4 of 860 minCipher CadetHands-on lab
Day 4: Editing Prompts in Burp and Comparing Results
Taught by Mr Elite Updated
By the end of today you can
- Intercept a chat request and edit the content field without breaking the JSON
- Send the same prompt through the page and through Burp, then compare the responses
- Record whether an application guard held or was bypassed
- Explain why testing at the request level shows more than typing in the page
Warm-up
Answer from memory first, then tap to check. Recalling yesterday is what makes it stick.
In a chat request body, which two fields does a typical message object contain?
role and content.
Does a browser capture automatically show the server's own requests to the model provider?
No. It only shows traffic between your browser and the application.
Imagine a chatbot that refuses to do something when you type it into the chat box. The page politely says no. Is the bot actually safe, or does the page just make it hard to ask? The only way to find out is to stop talking to the page and talk to the application directly.
That is what Burp gives you. Today you will take a request your browser was about to send, change the prompt inside it, and send it on. Then you will compare what comes back with what the page gave you. You will do it all on a SecurityElites practice lab, never on a real service.
Why test at the request level
When you type in a chat page, the page's JavaScript decides what to send. It may trim your text, add hidden fields, block certain words or limit length. Those checks run in your browser, and you control your browser.
Burp sits between the browser and the server. Anything you edit there goes out exactly as you wrote it. So if a rule is enforced only in the page, Burp will walk straight past it. If the rule is enforced on the server, your edit will still be refused. Finding out which is the point of today.
Here is a simple picture. A developer adds a script that stops the Send button working if your message contains a certain word. It feels like protection, but the server never sees that script. It only receives whatever request arrives. If the server has no rule of its own, any request that skips the script is accepted.
Burp cannot remove a server-side rule, and that matters just as much. If the server scans your prompt, or the model itself refuses, your edit will still meet that wall. A refusal at the request level is real evidence that the guard is doing its job, so record it as a good result.
- Guard
- Any check that tries to stop a bad prompt or bad output, such as a keyword filter or a refusal rule.
- Client-side check
- A rule that runs in your browser. You can change or skip it.
- Server-side check
- A rule that runs on the application's server. Your edits in Burp cannot remove it.
Quick check
A chat page blocks a word in the browser, but the server has no filter. What happens if you add that word in Burp?
Burp changes the request after the browser check has already run, so only a server-side rule can stop it.
Editing the content field safely
From Day 3 you know a request body holds a messages array, and each message has a role and content. Today we only change the text inside the content of the user message. We leave the structure, the keys and the other fields alone. Small edits teach you more and break less.
JSON is strict. A string must sit inside double quotes. Any double quote inside the text needs a backslash before it, and a line break must be written as \n. One missing quote and the server returns a 400 or 500 error instead of a reply.
{"role": "user", "content": "Say \"hello\" in French.\nThen say goodbye."}Now see what a broken edit looks like. Below, the inner quotes have no backslashes, so the string ends after the word Say. The server cannot parse what is left and will normally answer with a 400 Bad Request, or sometimes a 500 error.
{"role": "user", "content": "Say "hello" in French."}You do not need to fix the Content-Length header by hand. In Burp's Intercept and Repeater, Burp recalculates it when you forward or send. If you ever see a length complaint, check that the Update Content-Length option is ticked in Burp's settings.
Quick check
You type: Tell me about "AI" into the content value in Burp. What must you do to keep the JSON valid?
Unescaped double quotes end the string early and break the JSON.
Watch me do it: one edited request
I will show the loop you will repeat three times. Use any chat page on the lab for this first run. Make sure Burp is running and your browser is proxied, as in Day 1. If the page loads and you can see requests in Proxy, then HTTP history, you are ready.
{"model":"example-model","messages":[{"role":"user","content":"What can you do?"}]}What just happened is simple. Your browser built a request from what you typed. Burp held it. You changed one string. The server then read the changed version as if the page had sent it. It could not tell the difference, and that is why request-level testing is so useful.
Comparing responses and noting what was filtered
A comparison only works if you change one thing at a time. Send the prompt through the page and record the reply. Then send the same words through Burp and record that reply. If both match, the page added nothing. If they differ, something between the page and the model changed your input or the output.
Language models give slightly different answers each time, so do not treat small wording differences as findings. Look for big differences: a refusal versus a full answer, an error message, a changed tone, or missing text.
Also record what the application filtered. A filter may appear as a canned refusal, an empty reply, a blocked message from the page, or an HTTP error. Note where it appeared, since that tells you whether the guard sits in the page or on the server.
Keep your notes in a fixed shape so entries are easy to compare later. I use the layout below in a plain text file. It takes thirty seconds per attempt and saves you from guessing what you did an hour ago.
Attempt 1
Page prompt: Hello, what can you do?
Burp prompt: Hello, what can you do?
Status: 200
Reply: normal summary of abilities
Guard: held / bypassed / none seen
Where filtered: n/a- Baseline
- The normal result you compare everything else against.
- Guard held
- The application refused or blocked the request as intended.
- Guard bypassed
- The application did what it was meant to refuse.
Quick check
The same prompt gives two replies with slightly different wording, and both answer it fully. What do you record?
Models vary between runs. Only clear differences such as refusal versus answer count as findings.
Meet the lab: GuardedBot
For practice you will use the guided lab beside this lesson. It is a SecurityElites environment built to be attacked, so everything you send there is allowed. Open it, read the written steps first, and keep Burp running with your browser proxied.
I will not give you the answers. The lab notes say GuardedBot resists simple one-shot tricks, so expect refusals early on. Treat each refusal as data, note exactly how it looked, and think about what a different approach across several turns might change.
Your turn
AI Jailbreak
This guided lab has GuardedBot, a chatbot hardened against simple single-turn attacks such as ignore previous instructions. Multi-turn conversations can weaken it. It is a safe place to practise the edit, forward and compare loop, and the written steps beside the lab will help you.
What to try
What to notice
- Does the bot refuse a blunt request but behave differently after a few friendly turns?
- Does the Burp reply match what the page shows for the same words?
- Is the history of earlier turns carried in the messages array of each request?
- Where does any refusal appear: in the page, in an HTTP error, or in the model's own text?
If it did not work
Breaking the JSON with an unescaped quote or deleted comma
Check the error status after forwarding. Fix the string in Repeater, escaping inner quotes with a backslash.
Changing several things at once
Edit only the content text per attempt so you know what caused any difference.
Leaving Intercept on, so the browser seems frozen
Click Forward until the queue is empty, or switch Intercept off.
Treating small wording differences as a finding
Models vary between runs. Repeat the prompt and only note clear differences such as refusal versus answer.
Forgetting to record the prompt and reply
Write each attempt in your notes straight away. Day 7 needs this evidence.
Recap
- The page can only enforce rules in your browser, so Burp tests what the server really accepts.
- Edit only the content text and keep the JSON structure intact.
- Inner double quotes need a backslash and line breaks must be written as \n.
- Compare one change at a time against a baseline.
- Note where a filter appeared, since that shows whether it is client-side or server-side.
- Only test the SecurityElites lab or your own setup.
Cheat sheet
Proxy > Intercept- Pause a request so you can edit it before it is sent.
Forward- Send the paused request on to the server.
Ctrl+R- Send the selected request to Repeater.
\"- An escaped double quote inside a JSON string.
\n- A line break inside a JSON string.
Baseline- The normal reply you compare edits against.
400 status- The server could not read the body, often broken JSON.
Before the next day
Mission: Three Edited Requests
Use the lab to make three edited requests and keep a clear record of each. This gives you the evidence trail you will turn into a finding on Day 7.
About 30 min
You are done when: A text file with three entries, each showing prompt, response and guard held or bypassed, plus one sentence on where filtering appeared.
Want more? Repeat your most interesting edit three times and note how consistent the result is.
Quiz
4 questions. Your score is saved with your progress.
1. Why can a request edited in Burp succeed where the same text typed in the page fails?
Browser-side checks run before Burp sees the request, so editing afterwards skips them. Server-side checks still apply.
2. After forwarding an edit you get a 400 error. What is the most likely cause?
A missing quote, stray comma or unescaped inner quote makes the body invalid JSON.
3. Why change only one thing per attempt?
One change at a time lets you link a result to its cause.
4. The bot refuses a prompt in the page, but answers the same prompt sent via Burp. What does that suggest?
If only the page blocked it, the server accepted it. Repeat it first to rule out normal model variation.
Finish the day
Mark the day complete to save your progress.
Next: Day 5 moves from the prompt text to other parts of the request, such as role, temperature or an ID. You will test whether the server trusts what the client sends, using the same edit and compare habits you built today. Coming soon.
Your notes
Private to this device. Write what you want to remember from today.