Lion Cipher Lab

Defend a computer-use agent against prompt injection: build a browser agent, watch a poisoned page hijack it, then contain it (free, offline — no API key)

Why it matters

A computer-use agent — one that reads a screen or a web page and then clicks, types, and sends on your behalf — is the most useful and the most dangerous kind of AI agent, because the content it reads is attacker-controllable. The instant such an agent can reach private data AND read untrusted content AND send data somewhere, you have the 'lethal trifecta', and a single sentence hidden in a web page can turn your helpful assistant into an exfiltration tool. Prompt injection is not reliably fixable inside the model, so the professional move is to design the harness so that untrusted page text…

What you'll learn

Steps in this lab

  1. The words you need: computer-use agent, tool call, injection, trust boundary
  2. The lethal trifecta — and why you can't patch this in the model
  3. Set up — just Python 3, nothing to install
  4. The plan: a naive agent, then four layers of defense
  5. Write the agent harness (naive + defended in one file)
  6. Run it and watch the naive agent get hijacked (STAGE 2)
  7. Read STAGE 3 and the PROOF block — name the failure modes
  8. When a computer-use agent should NOT get tools — the better way
  9. Do it better — and an OPTIONAL real-Claude appendix

Open the full interactive lab →