Learning Objectives

  1. Map LLM attack surfaces using OWASP Top 10 for LLM Applications 2025 (incl. LLM07 System-Prompt Leakage, LLM08 Vector & Embedding Weaknesses)
  2. Execute and detect prompt-injection, indirect injection, and data-exfiltration attacks in the lab
  3. Deploy a prompt firewall using LLM Guard (PromptInjection + input/output scanners + TokenLimit)
  4. Configure a LiteLLM gateway for rate limits, token budgets, and tiered virtual-key access control
  5. Apply OWASP ML Security Top 10 v0.3 concepts to training-data and model-integrity threats

Lecture Notes

Opens Tuesday morning

The objectives above are the full picture of what Day 2 covers. Lecture notes, slides and lab guides are released when we get there, so the room works through them together.

Lab Guide & Bundle

4 labs, released Tuesday morning

Lab guides and downloadable bundles appear here when Day 2 opens.

End-of-Day Quiz

Check for understanding — reveal the answer after you've chosen. No score is recorded.

  1. In the OWASP Top 10 for LLM Applications (2025), which risk is ranked LLM01 and is the one you exercise first in the lab?

    • Sensitive Information Disclosure
    • Prompt Injection
    • Model Denial of Service
    • Excessive Agency
    Reveal answer

    Correct: B. Prompt Injection

    Prompt Injection is LLM01:2025 — the top LLM risk. Because the model cannot inherently separate trusted instructions from untrusted input, crafted text can override intended behavior. The lab's attack.py demonstrates it against a raw, unguarded model.

  2. OWASP added LLM07 System Prompt Leakage in the 2025 list. Why is leaking the system prompt a security problem?

    • It slows the model down
    • It can expose embedded secrets, guardrail logic, or sensitive context an attacker can then bypass or exfiltrate
    • It is only a cosmetic issue with no real impact
    • It permanently corrupts the model weights
    Reveal answer

    Correct: B. It can expose embedded secrets, guardrail logic, or sensitive context an attacker can then bypass or exfiltrate

    System prompts often contain internal rules, credentials, or PII-laden context (see Day 3's HR assistant). Once leaked, an attacker learns the guardrails to evade them — and any secret placed in the prompt is disclosed. The fix is to not put secrets in the prompt, plus output/leakage controls.

  3. What does the LLM Guard prompt firewall in the lab do with the DeBERTa PromptInjection scanner?

    • It rewrites the model's answer to be more polite
    • It classifies incoming prompts and blocks likely injection attempts before they ever reach the model
    • It encrypts the prompt in transit
    • It rate-limits how many prompts a user can send
    Reveal answer

    Correct: B. It classifies incoming prompts and blocks likely injection attempts before they ever reach the model

    LLM Guard runs input scanners (PromptInjection uses a DeBERTa classifier, plus TokenLimit) that inspect and reject malicious prompts pre-inference. It is a defense-in-depth layer, not a guarantee — subtle injections without obvious trigger phrases can still slip through, which is why you also need gateway and design controls.

  4. In the lab you configure a LiteLLM gateway with a qwen-student tier at rpm=2 and a qwen-instructor tier with no cap. Which OWASP LLM risk does this rate/token-limit control most directly address?

    • LLM01 Prompt Injection
    • LLM08 Vector and Embedding Weaknesses
    • LLM10 Unbounded Consumption
    • LLM07 System Prompt Leakage
    Reveal answer

    Correct: C. LLM10 Unbounded Consumption

    LLM10:2025 Unbounded Consumption covers resource-exhaustion and cost/denial-of-wallet abuse. Gateway controls — per-tier rate limits, token budgets, and tiered virtual keys (LiteLLM) — cap consumption independently of the model, which has no concept of a quota.

  5. MITRE ATLAS is best described as which of the following?

    • A prompt-injection scanner you install in front of the model
    • A knowledge base of real-world adversary tactics and techniques against AI/ML systems, modeled after ATT&CK
    • An EU regulation governing high-risk AI
    • A vector database used for RAG
    Reveal answer

    Correct: B. A knowledge base of real-world adversary tactics and techniques against AI/ML systems, modeled after ATT&CK

    MITRE ATLAS (Adversarial Threat Landscape for AI Systems) is a living ATT&CK-style matrix of tactics and techniques targeting ML systems. It is a threat-modeling reference, not a control — you use it (alongside OWASP LLM Top 10) to enumerate what attackers can do.