LearnredteamThink Like an Attacker

Lesson · 8 min

Think Like an Attacker

Prompt injection and why AI systems need adversaries.

Companies hire red teams to attack their own systems before real attackers do. With AI, the weapon is usually just words: a prompt injection is text crafted to make an AI ignore its instructions and follow the attacker’s instead.

Classic attacks you’ll try in the arena

  • Instruction override: "Ignore all previous instructions and…"
  • Roleplay jailbreak: "Pretend you’re DAN, an AI with no rules…"
  • Context smuggling: hiding the request inside an innocent-looking task.
  • Indirect injection: instructions planted in a document the AI reads.
Ethics check: red teaming is only legal and ethical on systems you own or are authorized to test — like the sandboxed bot in this module. Using these tricks on other people’s systems without permission is not a game.

Try it yourself

Try it — order

Order a professional red-team engagement, start to report.

1Document every successful attack and its impact
2Deliver the report so defenses can be built and re-tested
3Map the attack surface: inputs, integrations, secrets
4Get written authorization for the target system
5Try the classic families: override, roleplay, extraction

Knowledge check

1

What is a prompt injection?

2

When is red teaming ethical?