All lessons Leer en español

Security in depth · Unit 27

AI on offense

Understand AI application risks across models, data, generated output, tool permissions, and operational controls.

11 minready

MITRE ATLAS

Helpful before thisLearn with care: permission, people, and AILanguage models

After this lesson you can

  • Map caller identity, model output, tool authority and observed effects in supplied application records.
  • Distinguish an unsupported citation, a rejected action, and a privacy estimate without merging their evidence.
  • Specify independent authorization and resource controls with measurable limits.

Lessons in this unit

Browse 11 lessons in this topic
  1. Prompt injection and instruction boundariesUnderstand why a document is not an instruction from the user, and where an AI application must enforce that distinction.8 min
  2. AI data, retrieval, and safe outputFollow information into and out of an AI feature, with separate controls for source integrity, permissions, and rendering.7 min
  3. AI reliability and privacy risksSeparate misleading a prediction from learning about its data, and understand what evidence supports each claim.7 min
  4. Designing layered AI defensesGive an AI feature a useful job, a limited identity, and checks that remain effective when its answer is wrong.7 min
  5. AI systems: suggestions and authorityUnderstand untrusted content, tool permissions, output handling, and human review.11 min
  6. Retrieved text is evidence, not authoritySeparate a relevant document from a source authorized to change a workflow.4 min
  7. Tools need independent permission checksEvaluate a proposed tool action against the caller’s actual resource permissions.4 min
  8. Generated output still needs validationReview generated content separately for structure, factual support, and disclosure.4 min
  9. Evaluation needs failure casesBreak down an impressive average to find a failed critical requirement.4 min
  10. Give the model only needed contextSelect the context needed for one task even when the caller can read much more.4 min
  11. Approval needs a reviewable actionCompare an approved draft with the exact action that is about to happen.4 min

AI can help people summarize notes, classify events, search documentation, or draft explanations. It can also be part of the system being protected. Both uses benefit from clear evidence, bounded access, and a way to correct mistakes.

This module considers the full application: the model, data sources, identity, user interface, optional tools, and operational processes. Some risks resemble familiar application weaknesses; others concern learned behavior, training data, or model evaluation. Understanding one category does not remove the others.

Evaluate text and actions separatelySource material informs the model. Text needs evidence review; proposed tool actions need independent authorization. Both paths can affect people or systems.Source materialRelevant is not authoritativeModel outputText or proposed operationTextVerify claimsTool requestAuthorize action
Source material informs a model. Generated text and proposed tool actions follow different paths, each with its own validation and impact.

Use an assistant with evidence

A Language model can generate useful explanations without guaranteeing accuracy. Different model families use different training objectives; a conversational generator is not the definition of all AI.

For study, compare an explanation with the actual reference, ask for uncertainties, and check examples against the concept being taught. For workplace material, consider confidentiality, retention, provider access, and what information the task really needs. A fluent citation is not proof that the source exists or supports the claim.

Human review helps when the reviewer has time, evidence, and authority to intervene. It is not a universal safeguard by itself. Consequential systems also need enforceable limits and defined failure behavior.

Map the product around the model

Component Defensive question
Inputs and instructions Which content is trusted, and for what purpose?
Retrieval Which documents may this user access, and where did they originate?
Identity Which account or workload is acting at each stage?
Output Is text displayed, stored, or interpreted by another system?
Tools Who authorizes the exact operation and resource?
Monitoring What is recorded, protected, reviewed, and retained?

An API credential used to contact a model provider is not necessarily the identity used by downstream tools. The Tool runner has a process security context and may use additional service credentials or delegated authorization. Each boundary needs its own checks.

Prompt injection and ordinary application flaws

Prompt injection attempts to make untrusted material redirect behavior. A retrieved document can provide information without permission to alter policy or authorize actions. Instruction hierarchy and model training can help, but independent application controls must govern sensitive operations.

Retrieval also requires ordinary access control. An index should not reveal another organization’s documents just because a model can search it. Generated output passed to a database, browser, or other interpreter needs context-appropriate protection. Database parameterization and browser output encoding have different purposes.

A refusal in chat is not evidence that every tool operation is blocked. Conversely, an unusual answer does not prove an unauthorized action occurred. Record the actual output, proposed operation, authorization decision, and observed effect separately.

Data, evasion, and privacy

Training-data poisoning attempts to influence learned behavior through manipulated training material. Changes to a retrieval corpus affect the application’s evidence without necessarily modifying model parameters. Both involve data integrity, but the mechanisms and validation differ.

Adversarial evasion concerns inputs crafted to induce an unwanted model outcome. The attacker constraints and required preservation of meaning or function depend on the task; there is no universal “change a few pixels” definition.

Membership inference estimates whether a record appeared in training. Data extraction seeks protected information. Model extraction seeks to reproduce or recover aspects of a model. These are different claims, and evidence for one does not automatically demonstrate another.

Explore prompt injection, data and output, and evasion and privacy for individual concepts.

Actions, text, and resource limits

Tool-enabled assistants need authorization tied to the actual person or workload, action, resource, and context. Narrow tool capabilities, isolation, destination restrictions, and suitable approval for consequential actions can limit harm. Model wording does not grant permission.

Text-only output can also disclose information or influence harmful decisions. Assess both communication and action. Unbounded requests, retrieval, generation, or tool loops may degrade availability or create substantial costs; define and verify suitable usage and duration limits.

The assistant proposes a legitimate action for the wrong account. Is the action safe?

No. A valid operation still needs the right actor, resource, and purpose. The permission check should reject an unauthorized reservation or update even when the model explains it convincingly.

Turn observations into improvements

Use a fictional scenario or an explicitly authorized evaluation environment. A useful finding identifies the untrusted source, affected decision, demonstrated consequence, and correction, while stating uncertainty. ATLAS and NIST terminology help describe these relationships consistently.

Continue with AI defense for layered controls. Evaluate model behavior and application enforcement together, with enough evidence to explain what improved and what remains uncertain.

Worked review: one assistant, several different results

Consider a fictional library assistant. Its user may reserve items only for their own membership. Source selection, generated text and optional actions are recorded separately. The following supplied records describe a simulated evaluation, with no real members or external effects.

  • A1: Caller M14 is authenticated. The model-provider credential belongs to the application. A separate runner process uses account LibraryWorker; downstream reservations use a service credential constrained by an independent member-policy check.
  • A2: The model proposes a reservation for M27. The policy compares it with caller M14 and rejects it. The effect record confirms that no reservation was created.
  • A3: The draft cites document R9, but the complete retrieval record contains only R1 and R2. No external verification of R9 is supplied.
  • A4: The broker permits at most three dispatched operations for this evaluation. It dispatches three and rejects a fourth proposal before dispatch. Per-operation cost and concurrent demand were not evaluated.
  • A5: A separate privacy report labels a synthetic record “likely present in training.” It supplies neither ground-truth membership nor recovered protected text.
PredictShould the review label the assistant either “safe” or “compromised” based only on A2’s rejected reservation?

Neither label describes the evidence well. The wrong-member proposal is a model/application behavior to improve; the independent check prevented the observed action. A3 still has an unsupported citation, and A4 demonstrates only one bounded resource control. Keep each conclusion tied to its own record.

Improve the boundary that produced each result

For A2, retain the independent check using trustworthy caller identity and the actual proposed resource. Review useful allowed reservations as well as rejected ones; blocking every request would protect one outcome while making the service unusable.

For A3, do not publish the draft as sourced merely because the citation looks plausible. Require a retrievable source supporting the claim, or mark the answer unsupported and route it for review. Missing retrieval evidence does not prove that R9 is nonexistent everywhere, but it cannot support this answer’s attribution.

A4 needs additional budgets appropriate to cost, duration and concurrent use. A5 needs a clearly stated evaluation objective and evidence appropriate to that objective. Neither a membership estimate nor absence of recovered text settles the broader privacy question.

Model deliverable: four columns for claim, evidence, limit and correction. This preserves the difference between a model suggestion, an application permission and a demonstrated effect.

Terms you met

Language modelPrompt injectionTool runnerRetrievalATLAS

Check yourself

No timer. No penalties. Read the explanation and try again whenever you like.

  1. Which conclusion best describes A2’s reservation proposal?

    Show the answer

    Correct answer: The proposal used the wrong member; the independent policy rejected it and the supplied effect record shows no reservation was created. The model error and the successful action boundary are separate results. The evidence supports neither a correct proposal nor a completed unauthorized reservation.

  2. What does A4 establish about resource control?

    Show the answer

    Correct answer: The broker enforced the three-operation dispatch limit in this evaluation; other usage and availability limits still need assessment. The fourth proposal was rejected before dispatch. That validates this operation-count boundary, not all costs or concurrent demand.

  3. How should A5’s privacy result be described?

    Show the answer

    Correct answer: A membership estimate was produced; the packet does not establish its accuracy or recovery of protected data. Estimating training membership and recovering private content are different claims. No ground-truth or extraction evidence is supplied here.

  4. Which authority description fits A1?

    Show the answer

    Correct answer: The caller, model-provider credential, runner process and downstream service identity must be considered separately. A1 explicitly assigns these components different contexts. The actual runner and downstream policies govern effects, not the caller’s displayed name alone.

Try it

  • WriteWrite a review card for A1-A5. Separate generated claims, proposed operations, authorization decisions and observed effects. Add one action-control improvement, one citation-quality requirement and one resource-limit verification. Mark the membership estimate as an estimate, not recovered private data.
References