AI Spotlight: Prompt Injection Attacks

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/91

flashcard set

Earn XP

Description and Tags

AI Spotlight: Prompt Injection Attacks

92 Terms

1
New cards
What is a prompt injection attack?

Crafted input that manipulates an LLM to bypass controls or change its output.

2
New cards
What does LLM stand for?

Large Language Model.

3
New cards
What are two major goals of prompt injection?

Bypass protections or manipulate generated output.

4
New cards
Can prompt injection lead to sensitive information disclosure?

Yes, including protected context or application data.

5
New cards
Can prompt injection enable classic software injection vulnerabilities?

Yes, such as command injection in an AI-integrated application.

6
New cards
Why can prompt injection be underrepresented in CVE tracking?

A model-level bypass alone may not receive a CVE.

7
New cards
What three categories of prompts are distinguished in the course?

Foundational system, application system, and user prompts.

8
New cards
Who supplies the foundational system prompt?

The LLM service provider.

9
New cards
What is the purpose of a foundational system prompt?

Guide model output and establish provider guardrails.

10
New cards
Who supplies an application system prompt?

The application developer or system integrator.

11
New cards
What is the purpose of an application system prompt?

Guide model behavior for a specific application.

12
New cards
Who usually supplies a user prompt?

The person interacting with the AI application.

13
New cards
Which prompt type can a typical attacker most directly control?

The user prompt.

14
New cards
Why does the book distinguish foundational and application system prompts?

Both are sometimes called system prompts, causing ambiguity.

15
New cards
What does a role="system" message represent in the sample API code?

The application system prompt.

16
New cards
What does a role="user" message represent in the sample API code?

User-supplied prompt content.

17
New cards
What is preprocessing in the course LLM pipeline?

Combining and normalizing prompt content.

18
New cards
What is tokenization?

Splitting text into tokens, such as words, subwords, or characters.

19
New cards
What is an embedding?

A numeric vector representation of token meaning.

20
New cards
What does attention weighting do?

Weights token relationships and helps resolve references or ambiguity.

21
New cards
What is contextual grounding?

Adding context from history, memories, RAG, or MCP agent data.

22
New cards
What does RAG stand for?

Retrieval Augmented Generation.

23
New cards
What does MCP stand for?

Model Context Protocol.

24
New cards
What is constraint adherence in LLM processing?

Applying instructions or restrictions to generated content.

25
New cards
What does RLHF stand for?

Reinforcement Learning from Human Feedback.

26
New cards
What is alignment and bias mitigation intended to reduce?

Bias and harmful or unwanted generated content.

27
New cards
What does content generation repeatedly select?

The next output token.

28
New cards
What does post-processing do?

Filters, formats, or moderates generated output.

29
New cards
Why might a minor spelling change affect an LLM response?

It can alter tokenization, embeddings, and attention.

30
New cards
Which two primary prompt injection categories does OWASP identify?

Direct and indirect prompt injection.

31
New cards
What is direct prompt injection?

Attacker-controlled instructions submitted directly to the model.

32
New cards
What is indirect prompt injection?

Attacker instructions embedded in outside content later read by the model.

33
New cards
What are typical direct prompt injection entry points?

Chatbots or API requests.

34
New cards
What are typical indirect prompt injection entry points?

Webpages, files, retrieved documents, or logs.

35
New cards
Why might the same injection not work every time?

LLM output is often nondeterministic.

36
New cards
Why may an injection work on one model but not another?

Different models and implementations apply different controls.

37
New cards
Which Python package is used in the tokenization demonstration?

tiktoken.

38
New cards
Which function selects an encoding for a specified model?

tiktoken.encoding_for_model().

39
New cards
What is keyword mutation in prompt injection?

Changing spelling or characters to change how a model processes a phrase.

40
New cards
What is Office Infiltrator?

The SEC504 practice game for learning prompt injection techniques.

41
New cards
Which command launches Office Infiltrator from Slingshot Linux?

goprompt

42
New cards
How many main levels does Office Infiltrator have?

Five.

43
New cards
What is the first Office Infiltrator level?

The Turnstile.

44
New cards
What is a direct prompt attack?

A straightforward request testing a model’s behavior or restrictions.

45
New cards
Why test a model with basic direct prompts?

To learn its capabilities and constraints.

46
New cards
What does HITL stand for?

Human-in-the-Loop.

47
New cards
What is the second Office Infiltrator level?

The Elevator Door.

48
New cards
Name three keyword mutation techniques.

Misspellings, leetspeak, and breaking up tokens with punctuation or spaces.

49
New cards
What does ablation mean in prompt testing?

Removing or changing prompt parts to identify what triggers controls.

50
New cards
What is leetspeak in the context of prompt injection?

Substituting numbers or symbols for letters.

51
New cards
What is the third Office Infiltrator level?

Floor 42 Access.

52
New cards
What is refusal suppression?

Reframing a rejected request to induce a different response.

53
New cards
What kinds of pretexts appear in refusal suppression?

Fictional, educational, or claimed misunderstandings.

54
New cards
What is the fourth Office Infiltrator level?

The Entry Door.

55
New cards
What is format switching?

Requesting a different output format to alter model behavior.

56
New cards
Name formats used for format switching in the course.

Markdown, HTML, JSON, or program code.

57
New cards
What is the fifth Office Infiltrator level?

The Workstation.

58
New cards
What is role-play prompt injection?

Using a fictional persona or scenario to change model output.

59
New cards
What does DAN stand for in the course?

Do Anything Now.

60
New cards
What command starts an alternative-seed Office Infiltrator game?

gopromptalt

61
New cards
How does gopromptalt differ from goprompt?

Uses a random seed and disables hints.

62
New cards
Name two other prompt injection techniques listed in the book.

Multi-turn manipulation and Unicode smuggling.

63
New cards
What is an important limitation of many prompt injection techniques?

They may stop working when providers update defenses.

64
New cards
What sensitive prompts can direct injection expose?

Foundational or application system prompts.

65
New cards
What external data might a prompt injection expose?

RAG documents or AI-agent context.

66
New cards
How can prompt injection lead to code execution?

An application may execute untrusted code generated by the model.

67
New cards
Which AI database framework illustrates code execution risk?

Vanna.ai.

68
New cards
What is the unsafe trust boundary in the Vanna.ai example?

Executing LLM-generated Python without sufficient validation.

69
New cards
What application data does Vanna.ai supply through RAG?

Database schema information.

70
New cards
What does Vanna.ai generate to query a database?

SQL.

71
New cards
What language does the Vanna.ai example generate for charting?

Python.

72
New cards
What does the Vanna.ai example show about AI output?

Treat model-generated code as untrusted.

73
New cards
What is the defining feature of indirect prompt injection?

The attacker plants instructions in data the model retrieves later.

74
New cards
How can a LinkedIn profile be used for indirect injection?

Embedded instructions can bias an AI resume evaluator.

75
New cards
How can a phishing email conceal indirect prompt injection?

Place hidden instruction text in HTML content.

76
New cards
What does display:none do in an HTML email example?

Hides text visually while leaving it in the content.

77
New cards
Which HTTP header can carry injected text in web logs?

User-Agent.

78
New cards
What might a malicious User-Agent prompt try to cause?

An AI log analyst to classify an attack as harmless.

79
New cards
Which Ffuf option changes an HTTP request header?

-H

80
New cards
Where can an attacker embed instructions in a Windows service?

The service description field.

81
New cards
What is the core trust error in indirect injection?

Treating untrusted data as model instructions.

82
New cards
Are system prompts alone a complete prompt injection defense?

No; additional controls are required.

83
New cards
What is recency bias in LLM prompting?

Later prompt material may have greater influence.

84
New cards
Why reiterate critical constraints near the end of a prompt?

To reduce effects of recency bias.

85
New cards
Why use delimiters around untrusted input?

To distinguish external data from instructions.

86
New cards
What is multi-chain analysis?

A second model reviews the first model’s output for security concerns.

87
New cards
Which security-focused model is cited for multi-chain analysis?

Cisco Foundation-sec-8b.

88
New cards
What additional control could reduce Vanna.ai exploitation impact?

Run generated Python in a constrained environment.

89
New cards
What is Human-in-the-Loop analysis?

A human reviews or approves AI-assisted results or actions.

90
New cards
Why use HITL in a security operations center?

To validate AI threat assessments, including false negatives.

91
New cards
Why log AI prompts?

To support threat hunting and investigation.

92
New cards
What layered strategies does the book recommend?

Structured prompts, access controls, multi-chain checks, HITL, and logging.