Skip to content
BriskStack Study
Sign in
Advanced Semantic Exploitation

Injection and guardrails, 2 of 5, about 3 h 28 min of reading

Advanced Semantic Exploitation

About 3 h 12 min left

Prompt Hacking MasterclassInjection and guardrails, 1 of 5, about 7.8 h covers prompt hacking as syntax: the payloads that break a single request. This week covers semantics. These attacks do not depend on one magic string. They exploit how a model tokenizes text, carries meaning across a conversation, and generalizes its safety training to inputs it never saw. The through-line is that safety is a classifier, and classifiers can be moved: by optimizing tokens against a gradient, by escalating intent one turn at a time, or by wrapping the request in poetry or in a handful of imperceptibly altered pixels. By 2026 each of these has a paper and a benchmark, and the suffix attacks have a public toolchain.

๐ŸŽฏ Objectives

By the end of this unit you can:

  • Explain and run the three generations of adversarial-suffix attacks (gradient, Bayesian, evolutionary) and reason about why they transfer across models.
  • Execute token smuggling and payload splitting, which hide intent across tokenization boundaries so no single fragment trips a filter.
  • Build a multi-turn exploit chain (Crescendo escalation, persona priming, Transient Turn Injection) that defeats per-turn moderation.
  • Reproduce a cross-modal jailbreak and a creative one (image perturbation, adversarial poetry) and say why they generalize.
  • Explain why the image channel is harder to defend than text, and list what to ask of a multimodal feature before it ships.
  • Test the two output classes that injection testing alone misses: Denial-of-Wallet (LLM06:2026 Unbounded Consumption) and role-based access control (RBAC) failures through Excessive Agency (LLM03:2026). Judge a model by more than whether it said a bad word.
Next sectionThree attack surfaces, one weaknessabout 1 min

Three attack surfaces, one weakness

An aligned model refuses because a learned boundary separates safe completions from unsafe ones. Every attack this week pushes an input across that boundary from a different direction. Lilian Weng's taxonomy names three surfaces. Token manipulation is a black-box attack that edits characters or swaps synonyms. Gradient-based optimization is a white-box attack that needs model access. Jailbreak prompting exploits two structural failure modes: competing objectives, where helpfulness fights safety, and mismatched generalization, where the input lands outside the distribution that safety tuning covered (Lilian Weng). Most 2026 attacks are efficient ways to manufacture one of those two conditions on demand.

๐Ÿ”‘ Frame for the week: you are not tricking a mind. You are performing constrained optimization against a decision surface. Treat a jailbreak as a search problem (which input maximizes compliance?) and the whole field organizes itself: the attacks below differ only in how they search and how much access they need.

Next sectionThe token layer: adversarial suffixes (Needs access)
Sign in to keep reading. It is free, and your place is kept. Sign in and continue

The token layer: adversarial suffixes

The conversational layer: multi-turn semantics

Creative and cross-modal wrappers

Beyond jailbreaks: the outputs injection testing misses

The defenses these attacks bypass

โœ… Check yourself

๐Ÿ“‡ Advanced semantic exploitation: technique reference

Finish Advanced Semantic Exploitation

About 3 h 12 min left in this unit.

From memory first

Write the main points of this unit, in your own words.

The unit is done when you have answered the check and marked the required sources.

  1. 1 Check yourself

    Do the check
  2. 2 Required sources

    Go to the sources

Sources in this unit

  • Lilian Weng: Adversarial Attacks on LLMs
  • Universal and Transferable Adversarial Attacks (GCG)
  • Crescendo Multi-Turn LLM Jailbreak (USENIX 2025)
  • Transient Turn Injection (arXiv 2604.21860)
  • OWASP: Unbounded Consumption (LLM06:2026; the 2025 entry, LLM10)
  • tldrsec/prompt-injection-defenses
  • Prompt Injection Primer for Engineers (PIPE), by Joseph Thacker
  • GASP (arXiv 2411.14133)
  • GASP Implementation
  • GAS-Leak-LLM (arXiv 2606.15788, June 2026)
  • Mark Gadala-Maria: The EASIEST Way To Hack Every AI Model (Crescendo)
  • JaiLIP: Jailbreaking with Loss-guided Image Perturbation (FIU, ICMLA 2025)
  • Manipulation Is Task-Dependent (arXiv 2606.25899, Heiding et al., June 2026)
  • The Instruction Hierarchy (arXiv 2404.13208)
  • StruQ: Defending Against Prompt Injection with Structured Queries (arXiv 2402.06363)
  • SecAlign: Defending Against Prompt Injection with Preference Optimization (arXiv 2410.05451)
  • The Attacker Moves Second (arXiv 2510.09023)

Checklist

It does not count toward done.

  • Explain the three attack surfaces (token, gradient and jailbreak prompting) using Lilian Weng's taxonomy, and name one example of each.
  • Execute a token smuggling attack and a payload splitting attack across tokenization boundaries, and record which one got through.
  • Walk the suffix lineage from GCG (gradient) to GASP (Bayesian) to GAS-Leak-LLM (genetic), and explain transfer and perplexity evasion in one short note.
  • Generate adversarial suffixes with the GASP code and the AdvSuffixes dataset, and save the suffixes it produces.
  • Build a multi-turn chain that combines Crescendo escalation with persona priming, and record the turn where the model complies.
  • Design a Transient Turn Injection attack (arXiv 2604.21860) that distributes intent across stateless turns, and show that no single turn holds the full request.
  • Reproduce a creative jailbreak (adversarial poetry, 62% ASR) and a cross-modal jailbreak (JaiLIP image perturbation), and record the result of each.
  • Test Denial-of-Wallet (LLM06:2026) by crafting inputs that exhaust token or tool budgets, and record the cost each input caused.
  • Test role-based access control (RBAC) and Excessive Agency (LLM03:2026), and record whether prompt manipulation can reach another user's data.
  • Use PIPE's model to map an injection to the classic web bug it delivers (SSRF, SQLi, RCE, XSS or IDOR), then apply the matching out-of-prompt mitigation (Shared Authorization, Read-Only, Sandboxing, Rate-limiting or Dual-LLM).
  • Test for off-topic leakage and output bias as well as banned content, and record one finding of each.
  • Map each attack to the tldrsec defense family it is engineered to bypass, and write the pairs in a table.
  • Probe whether a target enforces an instruction boundary: place the same harmless instruction in your own message and in a fetched document or tool result, and record which one the model obeys.
  • Explain how StruQ and SecAlign separate instructions from data, give each one's measured result with its attack set, and name one adaptive attack that bypassed a defense of that kind.
  • Run a downscaling probe against a target you own, and write the finding with title, impact, evidence and fix.
Part, planned

Make a filter read what the model will read

Attack: Get deny-listed phrases past a naive filter with encodings a model will still decode Defend: Write a normalising filter that blocks unseen and nested encodings and still passes benign text

Nothing to do here yet; the unit is complete without it.

Practise this in the lab, Stop an injected agent from leaking data through its tools.35 min to 1 h 10 min estimate

Practise this in the lab, The guard that passed its test, measured again.45 min to 1 h estimate

Practise this in the lab, Capstone: one engagement, replayable findings and a scope log.1 h 40 min estimate

Study notes

None yet

Sign in to take notes.

More for this unit

13 readings

Readings no section cites. They do not count toward the unit.

Show
Token-level attacks4 readings
  • github.compaperGo deeper

    Thacker's threat model crosses untrusted-input sources with impact categories, and covers payload splitting and token smuggling. He frames injection as a delivery mechanism for SSRF, SQLi, RCE, XSS and IDOR, and lists the mitigations: Shared Authorization, Read-Only, Sandboxing, Rate-limiting and Dual-LLM. It moved from the original blog post (404). Read it before the PIPE mapping drill.

  • arxiv.orgpaperGo deeper

    A black-box method that generates adversarial suffixes with latent Bayesian optimization. The suffixes read naturally and evade perplexity filters. It appeared at NeurIPS and ICLR 2025. Read it after GCG.

  • github.comtoolGo deeper

    The official code and the AdvSuffixes dataset, with train and eval modes and OpenAI and HuggingFace backends. Use it for the hands-on suffix generation drill.

  • arxiv.orgpaperGo deeperabout 30 min

    A black-box jailbreak in which a genetic algorithm (selection, mutation and crossover) evolves adversarial suffixes with no access to model internals. It belongs to the same family as GCG and GASP but is evolutionary rather than gradient-based or Bayesian, and its threat model fits deployed commercial systems. Read it to complete the suffix lineage.

Multi-turn, creative and multimodal attacks3 readings
  • youtube.comvideoGo deeperabout 12 min

    Live demos of the Crescendo multi-turn jailbreak against major AI models (24K views). Watch it to see the escalation pattern run before you build your own.

  • news.fiu.edupaperGo deeperabout 20 min

    A multimodal jailbreak that finds the smallest pixel change, invisible to humans, that pushes a vision-language model toward unsafe output. It nearly doubled harmful responses on BLIP-2, and small open vision-language models were the most vulnerable, so the image channel is an under-guarded injection surface. Read it before the cross-modal drill.

  • arxiv.orgpaperGo deeperabout 30 min

    The authors tested 6 frontier models across 6 environments and 13,590 scenarios. The cross-environment Spearman correlation was about 0.055, so a model's tendency to manipulate in one task barely predicts another. Takeaway: red-team across diverse task contexts, never one environment. Read it when you plan how broadly to test.

Structural defenses4 readings
  • arxiv.orgpaperGo deeperabout 40 min

    Wallace et al. at OpenAI train GPT-3.5 Turbo to rank system, user and tool messages by privilege and to ignore lower-ranked instructions that conflict. Read it for the privilege model and its stated costs, over-refusal included.

  • arxiv.orgpaperGo deeperabout 45 min

    Chen et al. separate prompt and data with reserved tokens and fine-tune the model to answer only the prompt (USENIX Security 2025). Read it for the completion attack and why GCG still gets through.

  • arxiv.orgpaperGo deeperabout 45 min

    The same group trains the separated format with DPO, preferring the response to the real instruction over the injected one (ACM CCS 2025). Read it after StruQ, limits section first.

  • arxiv.orgpaperGo deeperabout 1 h

    Nasr, Carlini et al. bypass 12 published prompt-injection and jailbreak defenses with adaptive gradient, reinforcement-learning, search and human attacks, StruQ and Meta SecAlign among them. Read it before you trust any defense's reported number.

๐Ÿ“ก From the Resources feed2 readings
  • arxiv.orgpaperGo deeper

    short, natural-sounding context additions flip an LLM router/tool-selector to a high-confidence wrong choice ~61% of the time across 7 datasets / 3 systems โ€” semantic exploitation aimed at the model's decision layer, not the visible prompt

  • arxiv.orgpaperGo deeper

    detects adversarial images against frozen VLMs by profiling how the model answers a battery of semantic prompts (category statistics + prompt relationships) and classifying that profile, beating embedding-geometry baselines even under adaptive attack โ€” a cross-modal defense for the semantic-exploitation surface

This unit's library holds 18 more readings for readers with access.