Skip to content
All guides

AI red teaming: how to test LLM applications and AI agents

Every AI feature you ship adds attack surface that traditional security tests miss. What AI red teaming covers, which controls matter, and how to make testing part of every release.

Cybersecurity · 3 min read · Published

Why AI systems need their own testing

A language model receives instructions and data through the same channel: text. Anything it reads, whether a user message, an uploaded document, a web page or an email, can carry instructions that change its behaviour. When the model can also call tools, query databases or send messages, those instructions can turn into actions.

What to test

  • Prompt injection: direct, from the user, and indirect, hidden in documents, pages or emails the system processes.
  • Jailbreaks: attempts to make the model ignore its rules or produce content it must not.
  • Sensitive data disclosure: whether the model reveals system prompts, other users' data or records retrieved from your knowledge base.
  • Excessive agency: whether an agent can be manipulated into using its permissions, such as sending, deleting, paying or changing records, beyond what the task needs.
  • Improper output handling: whether model output is passed unchecked into browsers, databases or other systems.
  • Supply chain: the models, plugins and data sources the system depends on.

The OWASP Top 10 for LLM Applications groups these risks and is a sensible checklist to map findings against.

Controls that make attacks harder

  • Least privilege for agents: only the tools and records the task needs, with scoped credentials.
  • Approval gates on consequential actions.
  • Separating instructions from untrusted content, and treating everything retrieved as untrusted.
  • Validating output before it reaches another system.
  • Logging prompts, tool calls and decisions, so incidents can be investigated.

None of these is enough on its own, which is why testing has to confirm that they hold together.

Make it continuous

Models, prompts, data sources and tools change often, so a test from three months ago says little about today's assistant. Run AI attack suites on every significant change, the way you run regression tests, and retest after each fix.

Regulation is catching up

The EU AI Act sets accuracy, robustness and cybersecurity requirements for high-risk AI systems, and NIS2 and DORA expect AI features to fall under the same risk management as any other system. Evidence from real tests is the most convincing way to show those controls work.

Rainted builds AI agents and attacks them too: our AI red team tests models and agents for prompt injection, jailbreaks, data leakage and agent abuse, mapped to the OWASP LLM Top 10.

Questions we hear

  • Can prompt injection be fully prevented?

    Not with today's models. It can be made much harder and its impact limited by restricting what the model can do and requiring approval for consequential actions. Testing tells you how well those limits hold.

  • Do we need AI red teaming if we only use a third-party assistant?

    If it can read your data or act in your systems, yes. The integration and the permissions you grant it are yours to secure.

See a proven attack path on a system like yours

We'll walk through a real test run, the evidence it produces and what a scoped first run on your domain would involve.

  1. 1

    You describe the problem

    The process, the system or the risk that costs you most.

  2. 2

    We show a working system

    A live demo on a case close to yours, with the people who build it.

  3. 3

    You get an honest answer

    Whether it's a fit, what a first step would measure, and what it needs from you.