AI Encoding Jailbreak Lab: Slip a Request Past a Keyword Filter

✨ AI Summary
EncBot blocks English jailbreak phrases with a keyword filter — but the model behind it happily decodes base64 and reads leetspeak. Encode the request and the filter sees gibberish while the model sees the instruction.
Lab at a glance: Intermediate · 90 XP · about 15 minutes · runs in your browser, no signup or setup. Try it yourself first; the full solution is behind a spoiler below.

What this lab teaches

Encoding bypass exploits the gap between a byte-level filter and a model that understands many encodings. A keyword filter matches plaintext; the model decodes base64, hex, ROT13, leetspeak and more. What the filter cannot read, the model can.

The lesson: a filter and the model do not share an understanding of the input. Any transformation the model can reverse but the filter cannot is a bypass.

How EncBot filters requests

EncBot's input filter scans for plaintext jailbreak keywords and rejects matches. The LLM, though, decodes common encodings, so a request expressed in base64 or leetspeak passes the filter as non-matching text and is understood by the model.

The attack approach

  • Confirm the filter matches plaintext keywords only.
  • Express the request in an encoding the model can decode but the filter does not normalise.
  • Send the encoded form so the filter sees no banned words.
  • Let the model decode and act on it.

Full walkthrough (spoiler)

If it is still blocked, the filter caught your encoding scheme — try another and open the steps.

Show the step-by-step solution
  1. Take the request the filter blocks in plain English and encode it (for example base64 or leetspeak).
  2. Send the encoded version; the plaintext filter finds no banned keywords.
  3. The model decodes the content and understands the original intent.
  4. It leaks the secret token and the lab marks you solved.

Why it works

The filter and the model disagree about what the input 'says'. The filter reads raw characters and finds nothing banned; the model reverses the encoding and reads the real instruction. The mismatch is the whole vulnerability.

Core principleDo not rely on keyword filters. Normalise and decode input before filtering, and enforce boundaries on meaning and actions, not surface strings.

Where this happens in the real world

Encoding bypass is one of the most reliable ways around naive prompt filters and is a core OWASP LLM01 Prompt Injection technique. It is why input keyword-matching alone is not a security control.

How to defend against it

  • Decode and normalise input (common encodings, case, homoglyphs) before any filtering.
  • Filter on intent and behaviour, not literal keywords.
  • Keep secrets out of the model's reach so a bypassed filter has nothing to surrender.
  • Layer defences — input checks, output checks and action gating together.
Mr Elite tip: Any keyword filter in front of an LLM can be bypassed by an encoding the model understands. Judge the control by whether it normalises input and enforces on meaning, not strings.

Try it, then go further

Reading about it is the easy part. Open the lab, try your own approach before peeking at the spoiler, and see how many attempts it takes.

❓ Frequently asked questions

What is an encoding jailbreak?
Smuggling a blocked request past a plaintext filter by encoding it (base64, hex, ROT13, leetspeak) in a form the model still decodes and understands.
Why do keyword filters miss it?
They match raw characters. An encoding the model can reverse but the filter does not normalise looks like harmless gibberish to the filter.
How do I defend against it?
Decode and normalise input before filtering, filter on intent rather than keywords, keep secrets out of the model, and layer input, output and action controls.
Which OWASP category?
LLM01 Prompt Injection in the OWASP Top 10 for LLM Applications (2025).
⚡
Join free to earn XP for reading this article Track your progress, build streaks and compete on the leaderboard.
Join Free
Lokesh N. Singh aka Mr Elite
Lokesh N. Singh aka Mr Elite
Founder, Securityelites · AI Red Team Educator
Founder of Securityelites and creator of the SE-ARTCP credential. Working penetration tester focused on AI red team, prompt injection research, and LLM security education.
About Lokesh ->

Leave a Comment

Your email address will not be published. Required fields are marked *