0:00
–:––
React at 0:00
Black Hat USA 2025

Universal and Context-Independent Triggers for Precise Control of LLM Outputs

Jiashuo Liang, Tencent Xuanwu Lab; Guancheng Li, Tencent Xuanwu LabAI, ML, & Data Science

When and where

Day
Wed 6 Aug 2025
Time
15:20 to 16:00 PDT
Room
South Seas A & B, Level 3

Speakers

  • Jiashuo LiangTencent Xuanwu Lab

    Jiashuo Liang is a developer and security researcher at Tencent Security Xuanwu Lab. He has extensive experience in software development and security analysis of concurrent programming and large language models.

  • Guancheng LiTencent Xuanwu Lab

    Guancheng Li (@atuml1) is a senior researcher at Tencent Security Xuanwu Lab. His research interests are focused on software and system security, IoT security, software engineering and AI. He is also a founder and former captain of r3kapig CTF Team.

Abstract

In this talk, we will introduce a novel gradient-based prompt-injection technique that can generate universal triggers to manipulate open-source Large Language Model (LLM) outputs. While previous attacks often depend heavily on prompt context or require multiple iterations to fully control the model's behavior, our method discovers "universal and context-independent triggers" that force the LLM to produce precisely crafted, attacker-chosen text—regardless of the original prompt or task. We will outline how these triggers are discovered via discrete gradient descent on extensive and diverse instruction datasets. Our demonstrations will show how such triggers can be applied to attack open source LLM applications to achieve remote code execution. Furthermore, we will discuss the substantial threats posed by such attacks to LLM-based applications, highlighting the potential for adversaries to take over the decisions and actions made by AI agents.

What you'll get from it

Most prompt injection depends on the surrounding prompt, or takes several tries to steer a model. Jiashuo Liang and Guancheng Li describe a gradient-based method that finds universal triggers, which make open-source LLMs output exactly the text an attacker chooses whatever the original task. They explain how the triggers are found by discrete gradient descent over large instruction datasets, and show them used against open-source LLM applications to get remote code execution. People building LLM apps or AI agents will see how an attacker could take over their decisions.

Did you find what you came for?