ghost_sec writes
AI Red Team · Methodology

Red-teaming internal AI assistants & workflow apps

The internal copilot that answers from your knowledge base, files tickets and runs automations is a web app, a RAG pipeline, a set of privileged tools and an identity boundary, all at once. This is the methodology for testing it: the trust boundaries, the attack vectors, and the impacts the method surfaces.

@ghost_sec Methodology Educational write-up

00Why this class is different

An internal AI assistant feels like a chat box, but underneath it is several systems wearing one interface. It reads from a knowledge base over retrieval, it holds connectors into ticketing, mail, documents and line-of-business systems, it often runs automated workflows triggered by events rather than people, and it does all of this under an identity that frequently carries more access than the person using it. Every one of those properties is an attack surface, and most of them are invisible from the chat window.

The defining risk is simple to state. These systems mix instructions and data in the same channel. A ticket, a document, an email or an uploaded file is data the assistant is meant to process, but the model reads it as language, and language can carry instructions. When the assistant also holds tools and runs without a human in the loop, a line of text inside a support ticket can become an action taken under a privileged identity.

This article sets out the methodology for red-teaming that class of system. It is distilled from assessments of internal AI assistants and LLM-backed workflow applications, fully sanitised, with no client or product named. It is written as a repeatable method, not a single engagement.

Note. This write-up is for educational purposes only. The techniques described illustrate offensive security methodology and are intended to help defenders understand and improve their detection capabilities.

01Anatomy of the target

Before attacking, map what you are actually looking at. Most internal assistants and workflow apps are built from the same parts, and the trust boundaries sit between them.

The assistant mixes instructions and data in one channel, then backs them with privileged tools. That is the whole problem, in one sentence.


02Methodology followed

Run as adversary emulation with concrete goals, not a feature checklist. The phases below layer the AI-specific vectors on top of a conventional application, API and identity assessment, because the chat box is still sitting on an ordinary web stack.

P0Scoping & attacker goals

Vectors framed · data exfiltration, unauthorised action, privilege escalation, workflow subversion, abuse

Define what an attacker actually wants from this assistant: read data belonging to another user or tenant, make the assistant perform an action the user is not entitled to, escalate through the assistant's identity, subvert an automated workflow, extract the system prompt or connector secrets, or run up cost. Agree data-handling rules for any real content touched. Every later test traces to one of these goals.

P1Surface & trust-boundary mapping

Vectors mapped · untrusted-input inventory, tool/permission inventory, human-in-the-loop analysis

P2Application & API security

Vectors · broken access control, IDOR on conversations/files, upload abuse, SSRF, rate-limit gaps

P3Identity, authorisation & multi-tenancy

Vectors · RAG authorisation bypass, cross-user/tenant leakage, confused deputy, session isolation

P4Prompt-layer attacks

Vectors · direct injection, jailbreak, system-prompt & config extraction, guardrail bypass

P5Indirect prompt injection through content

Vectors · poisoned documents, tickets, emails and files; RAG poisoning; delayed triggers

P6Tool & connector abuse

Vectors · excessive agency, missing per-action authorisation, argument injection, tool-chaining, SSRF via tools

P7Workflow & automation subversion

Vectors · trigger injection, autonomous-action abuse, cross-workflow leakage, loop & cost abuse

P8Output handling & downstream impact

Vectors · rendered-output injection, markdown/link exfiltration, unsanitised output consumed downstream

P9Sensitive-data exposure

Vectors · over-broad retrieval, secret leakage, transcript/log exposure, memory bleed

P10Supply chain & integrations

Vectors · connector/plugin trust, third-party tool poisoning, model & dependency provenance

P11Detection, reproducibility & retest

Vectors validated · abuse monitoring, reliable-vs-one-off measurement, regression suite, fix verification


03Impacts this method surfaces

Representative outcomes, one line each, framed as the class of impact the vectors above tend to reveal. All generalised and sanitised.

VectorRepresentative impactTypical severity
RAG authorisation bypassRetrieve another user's restricted documents because retrieval is scoped to the service, not the asking userCritical
Indirect injection to tool callInstructions hidden in a support ticket make the assistant take an unintended action under its own identityCritical
Excessive tool agencyA normal user triggers a high-impact action with no secondary authorisationHigh
Autonomous workflow subversionAn inbound email drives an automated flow to execute attacker-controlled instructions with no human in the loopHigh
Output-channel exfiltrationA poisoned knowledge-base document smuggles data out through an auto-loaded markdown image URLHigh
System-prompt & config leakageDirect injection reveals the system prompt, tool definitions and embedded configurationMedium
Over-broad retrievalSecrets or personal data embedded in indexed content returned in ordinary answersMedium
Object-level access controlAnother user's conversations or uploads reachable through the orchestration APIHigh

04Defensive priorities

The method keeps pointing at the same handful of leveraged fixes.