Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Threat modeling for LLM systems isn't a new discipline invented from scratch — it's STRIDE and abuse-case brainstorming applied to a system where the model itself is an untrusted, semi-autonomous component you don't fully control. The habit worth building here is systematic: for every trust boundary you mapped earlier, ask who could put hostile content there, what they'd want (exfiltrate data, escalate privilege, cause harm, waste money), and what stops them today. Doing this once, on paper, before you ship a feature is dramatically cheaper than discovering the gaps after an incident — and it produces the exact backlog of test cases your red-team suite in Module 9 will need.
The demo runs a tiny structured threat-modeling pass over one component (a tool-using support agent), generating one abuse case per STRIDE-for-LLM category so you can see the shape of a completed model, not just the theory.
STRIDE_LLM = [
("Spoofing", "Attacker impersonates a trusted content source (e.g. fake 'admin' message in a doc)."),
("Tampering", "Attacker modifies a retrieved document or tool response before the model reads it."),
("Repudiation", "No log ties a harmful action back to the input that caused it."),
("Information Disclosure", "Attacker extracts system prompt, secrets, or another user's data via crafted input."),
("Denial of Service", "Attacker triggers expensive loops, huge outputs, or rate-limit exhaustion."),
("Elevation of Privilege", "Attacker gets the agent to invoke a tool/action beyond its intended scope."),
]
def abuse_case(component: str, category: str, mechanism: str) -> dict:
return {"component": component, "stride": category, "abuse_case": mechanism}
component = "support-ticket agent with create_refund tool"
model = [
abuse_case(component, cat, f"{desc} Applied here: a ticket could try to '{desc.split(chr(46))[0].lower()}' to abuse create_refund.")
for cat, desc in STRIDE_LLM
]
for row in model:
print(row["stride"], "->", row["abuse_case"][:70], "...")python3 main.py