Topic 4
What an attacker can get
AI Engineering (Ch. 5, "Defensive Prompt Engineering") names three main types of prompt attack:
- Prompt extraction: getting the application's prompt, including the system prompt, "either to replicate or exploit the application".
- Jailbreaking and prompt injection: "Getting the model to do bad things".
- Information extraction: getting the model to reveal its training data or "information used in its context".
Its list of risks: remote code or tool execution, data leaks, social harms, misinformation, service interruption and subversion, and brand risk. OWASP's LLM01:2025 list overlaps: disclosure of sensitive information, revealing the system prompt, manipulated output, unauthorised access to the model's functions, arbitrary commands in connected systems, and manipulated decisions.
Predict first
Scroll sideways to see the whole diagram
The book names three main types of prompt attack an application developer should defend against.
Text version
- The book names three main types of prompt attack an application developer should defend against.
- They lead to the book's list of risks. The more the application can do, the worse a successful attack is.
Attack types from AI Engineering, Ch. 5, "Defensive Prompt Engineering".
Two of these need care:
- A leaked system prompt is a liability, not a secret. The book quotes advice to "write your system prompt assuming that it will one day become public," and notes that an "extracted" prompt is often hallucinated.
- Exfiltration doesn't need a send tool. OWASP's scenario 2: hidden instructions on a web page make the model insert an image link to an outside address, and loading it leaks the conversation.
Quick check