2602.16958v1 Feb 18, 2026 cs.AI

구조적 템플릿 주입을 통한 에이전트 하이재킹 자동화

Automating Agent Hijacking via Structural Template Injection

Miao Chen
Miao Chen
Citations: 74
h-index: 2
Yue Xiao
Yue Xiao
Citations: 194
h-index: 7
Xinhao Deng
Xinhao Deng
Citations: 322
h-index: 7
Jiaqing Wu
Jiaqing Wu
Citations: 104
h-index: 3
Ke Xu
Ke Xu
Citations: 111
h-index: 6
Qi Li
Qi Li
Citations: 50
h-index: 3

OWASP에서 심각한 위협으로 지목된 에이전트 하이재킹은 공격자가 검색된 콘텐츠에 악성 명령어를 주입하여 실행을 조작하는 것을 의미합니다. 기존 공격 대부분은 수동으로 제작된 의미론 기반의 프롬프트 조작에 의존하며, 이는 종종 낮은 공격 성공률과 폐쇄형 상업 모델에 대한 제한적인 적용 가능성을 초래합니다. 본 논문에서는 LLM 에이전트의 근본적인 아키텍처 메커니즘을 대상으로 하는 자동화된 에이전트 하이재킹 프레임워크인 Phantom을 제안합니다. Phantom의 핵심 아이디어는 에이전트가 시스템, 사용자, 어시스턴트 및 도구 명령어를 구분하기 위해 특정 채팅 템플릿 토큰에 의존한다는 점입니다. 검색된 컨텍스트에 최적화된 구조적 템플릿을 주입함으로써, 역할 혼란을 유발하고 에이전트가 주입된 콘텐츠를 유효한 사용자 명령어 또는 이전 도구 출력으로 오해하도록 만듭니다. 블랙박스 에이전트에 대한 공격 적용 가능성을 향상시키기 위해, Phantom은 새로운 공격 템플릿 검색 프레임워크를 도입합니다. 먼저 다단계 템플릿 확장을 통해 구조적 다양성을 높이고, Template Autoencoder (TAE)를 사용하여 이산 템플릿을 연속적이고 검색 가능한 잠재 공간에 임베딩합니다. 그 후, 베이지안 최적화를 적용하여 효율적으로 최적의 적대적 벡터를 식별하고, 이를 고효율 구조적 템플릿으로 디코딩합니다. Qwen, GPT, Gemini에 대한 광범위한 실험 결과, Phantom 프레임워크는 공격 성공률 (ASR) 및 쿼리 효율성 측면에서 기존의 기준 모델보다 훨씬 뛰어난 성능을 보입니다. 또한, 실제 상업 제품에서 70개 이상의 취약점을 발견했으며, 이는 공급업체에 의해 확인되었습니다. 이는 구조적 템플릿 기반 하이재킹의 실제적인 심각성을 강조하며, 차세대 에이전트 시스템을 보호하기 위한 실증적인 기반을 제공합니다.

Original Abstract

Agent hijacking, highlighted by OWASP as a critical threat to the Large Language Model (LLM) ecosystem, enables adversaries to manipulate execution by injecting malicious instructions into retrieved content. Most existing attacks rely on manually crafted, semantics-driven prompt manipulation, which often yields low attack success rates and limited transferability to closed-source commercial models. In this paper, we propose Phantom, an automated agent hijacking framework built upon Structured Template Injection that targets the fundamental architectural mechanisms of LLM agents. Our key insight is that agents rely on specific chat template tokens to separate system, user, assistant, and tool instructions. By injecting optimized structured templates into the retrieved context, we induce role confusion and cause the agent to misinterpret the injected content as legitimate user instructions or prior tool outputs. To enhance attack transferability against black-box agents, Phantom introduces a novel attack template search framework. We first perform multi-level template augmentation to increase structural diversity and then train a Template Autoencoder (TAE) to embed discrete templates into a continuous, searchable latent space. Subsequently, we apply Bayesian optimization to efficiently identify optimal adversarial vectors that are decoded into high-potency structured templates. Extensive experiments on Qwen, GPT, and Gemini demonstrate that our framework significantly outperforms existing baselines in both Attack Success Rate (ASR) and query efficiency. Moreover, we identified over 70 vulnerabilities in real-world commercial products that have been confirmed by vendors, underscoring the practical severity of structured template-based hijacking and providing an empirical foundation for securing next-generation agentic systems.

1 Citations
0 Influential
3.5 Altmetric
18.5 Score

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!