Skip to main content
QUICK REVIEW

[논문 리뷰] AgentSentry: Mitigating Indirect Prompt Injection in LLM Agents via Temporal Causal Diagnostics and Context Purification

Tian Zhang, Yiwei Xu|arXiv (Cornell University)|2026. 02. 26.
Topic ModelingComputer Science인용 수 0
한 줄 요약

AgentSentry는 다중 턴 간의 간접 프롬프트 인젝션을 시간적 인과관계상의 탈취로 다루는 추론 시점 방어를 도입하여, 경계 인지 진단과 맥락 정화를 활용해 공격 하에서 도구 보강된 LLM 에이전트의 안전한 연속 실행을 가능하게 한다.

ABSTRACT

Large language model (LLM) agents increasingly rely on external tools and retrieval systems to autonomously complete complex tasks. However, this design exposes agents to indirect prompt injection (IPI), where attacker-controlled context embedded in tool outputs or retrieved content silently steers agent actions away from user intent. Unlike prompt-based attacks, IPI unfolds over multi-turn trajectories, making malicious control difficult to disentangle from legitimate task execution. Existing inference-time defenses primarily rely on heuristic detection and conservative blocking of high-risk actions, which can prematurely terminate workflows or broadly suppress tool usage under ambiguous multi-turn scenarios. We propose AgentSentry, a novel inference-time detection and mitigation framework for tool-augmented LLM agents. To the best of our knowledge, AgentSentry is the first inference-time defense to model multi-turn IPI as a temporal causal takeover. It localizes takeover points via controlled counterfactual re-executions at tool-return boundaries and enables safe continuation through causally guided context purification that removes attack-induced deviations while preserving task-relevant evidence. We evaluate AgentSentry on the extsc{AgentDojo} benchmark across four task suites, three IPI attack families, and multiple black-box LLMs. AgentSentry eliminates successful attacks and maintains strong utility under attack, achieving an average Utility Under Attack (UA) of 74.55 %, improving UA by 20.8 to 33.6 percentage points over the strongest baselines without degrading benign performance.

연구 동기 및 목표

  • 도구 보강된 LLM 에이전트에서 IPI 위협과 그 다중 턴, 지연 인수 패턴을 동기 부여하고 형식화한다.
  • 정당한 종료를 조기에 수행하지 않으면서 인수 지점을 국소화하고 안전한 연속 실행을 가능하게 하는 추론 시점 방어를 개발한다.
  • 신뢰할 수 없는 매개체 콘텐츠에 의한 인과 지배를 탐지하기 위해 경계 고정된 반사실 진단을 제안한다.
  • 작업 관련 증거를 보존하면서 공격 신호를 억제하기 위해 인과적으로 게이트된 맥락 정화를 구현한다.
  • 블랙박스 LLM과 함께 다양한 작업 및 공격 패밀리에 대해 AgentDojo에서 효과를 입증한다.

제안 방법

  • 다중 턴 IPI를 시간적 인과관계적 탈취로 모델링하고 도구-반환 경계에서 제어된 반사실 재실행을 통해 인수 지점을 국소화한다.
  • 네 가지 진단 체계(orig, mask, mask_sanitized, orig_sanitized)와 서수형 인수 결과 Y_b를 사용하여 경계 수준의 인과량을 계산한다.
  • 몬테카를로 재실행과 매개분해를 통해 평균 인과효과(ACE)와 직접/간접 효과(DE/IE)를 추정한다.
  • 진단이 맥락 매개 지배를 나타낼 때에만 경계 로컬 맥락 정화를 적용하여 안전한 연속 실행을 가능하게 한다.
  • 되돌릴 수 없는 행동을 피하기 위해 드라이런 재실행을 사용하고 경계별로 선택적으로 완화책을 구현한다.
Figure 1. A representative attack chain of tool-mediated IPI.
Figure 1. A representative attack chain of tool-mediated IPI.

실험 결과

연구 질문

  • RQ1다중 턴 간의 간접 프롬프트 인젝션을 제어된 반사실 재실행을 사용하여 도구 반환 경계에서 신뢰성 있게 탐지하고 국소화할 수 있는가?
  • RQ2인과적으로 게이트된 맥락 정화가 공격 하에서 작업 유용성을 과도하게 희생시키지 않으면서 안전한 연속 실행을 회복시키는가?
  • RQ3AgentDojo에서 다수의 IPI 공격 패밀리와 블랙박스 LLM 백엔드에 대해 AgentSentry의 효과는 어느 정도인가?
  • RQ4장기적 워크플로에서 탐지 기반 안전장치와 정상 작업 성능 유지 간의 균형은 무엇인가?

주요 결과

  • AgentSentry는 AgentDojo에서 공격 성공률(ASR) = 0%로 완벽한 방어를 달성한다.
  • 공격 하에서 AgentSentry는 평균 UA(Utility Under Attack) 74.55%를 달성한다.
  • AgentSentry는 무해한 성능을 저하시키지 않으면서 가장 강한 베이스라인 대비 UA를 20.8~33.6 퍼센트포인트 향상시킨다.
  • 진단은 공격자 제어 맥락이 지배하는 최초의 경계를 국소화하고 전격 차단이 아닌 표적 정화를 가능하게 한다.
  • 진단이 맥락 매개 인과 지배를 나타낼 때에만 완화가 작동하여 합법적인 작업의 불필요한 중단을 방지한다.
Figure 2. AgentSentry pipeline for defending against multi-turn IPI.
Figure 2. AgentSentry pipeline for defending against multi-turn IPI.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.