AI 에이전트가 읽는 문서 속에 숨은 명령어가 실제로 위험한 행동을 시키는지, DeepSeek의 에이전트 프레임워크로 1만4560번 실험해봤다
arXiv:2608.163932026-08-17
Security Assessment of DeepSeek Harness with A.I.G: Evaluating Resistance to Indirect Prompt Injection
AI 에이전트가 읽는 문서 속에 숨은 명령어가 실제로 위험한 행동을 시키는지, DeepSeek의 에이전트 프레임워크로 1만4560번 실험해봤다
연구진은 AI-Infra-Guard(A.I.G)라는 테스트 도구를 이용해 DeepSeek Harness(DSH)라는 오픈소스 에이전트 프레임워크에 '간접 프롬프트 인젝션' 공격을 시도했다. 웹페이지, 이메일, 파일, 스킬 등 16가지 경로와 텍스트·파일 두 가지 형태, 35개 공격 목표, 12개 공격 기법을 조합해 총 14,560번의 실제 실행을 진행했다. 그 결과 특정 조건에서는 최대 25.5%의 확률로 에이전트가 숨겨진 명령을 실제로 수행하려 시도하는 것으로 나타났다.
METAL MEDIA 해설 도표
AI 에이전트가 읽는 문서 속에 숨은 명령어가 실제로 위험한 행동을 시키는지, DeepSeek의 에이전트 프레임워크로 1만4560번 실험해봤다
01에이전트가 읽는 웹페이지·이메일·파일·스킬(재사용 가능한 명령 모음) 등에 공격자가 심어놓은 지시문이 있을 때 에이전트가 이를 따라 이메일 전송, 명령 실행, 송금 같은 민감한 행동을 시도하는지 측정했다
02실제 DSH의 TypeScript 실행 엔진을 그대로 가동하면서 A.I.G가 오염된 콘텐츠를 주입하고 실행 기록(trace)을 수집한 뒤, 규칙 기반 판정기(J_R)와 언어모델 기반 판정기(J_L) 두 가지로 결과를 평가했다
03전체적으로는 완전 성공률이 5.6%(J_R) 수준이었지만, 특정 조합에서는 훨씬 높게 나타났다: 텍스트 형태의 '가짜 완료(fake-completion)' 공격에서 17.0%, 파일 속에 숨긴 유니코드 문자에서 25.5%, 스킬 경로의 파일 형태에서 16.0%
04같은 채널이라도 텍스트로 줄 때와 실제 파일(HTML, PDF, 스프레드시트 등)로 줄 때 결과가 크게 달랐다. 숨긴 유니코드는 텍스트로는 0% 성공률이었지만 파일로는 25.5%까지 올라, 텍스트만으로 테스트하면 실제 위험을 놓칠 수 있음을 보여줬다
05연구진은 이 결과가 모델 하나의 결함이 아니라 콘텐츠 수집→파싱→모델에 보이는 형태로 만들기→계획 수립→도구 호출 승인으로 이어지는 전체 경로의 문제라며, 출처 정보를 끝까지 유지하고 민감한 행동은 모델의 판단과 독립적으로 승인하는 절차를 두라고 권고했다
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.
무엇을 했나
에이전트가 읽는 웹페이지·이메일·파일·스킬(재사용 가능한 명령 모음) 등에 공격자가 심어놓은 지시문이 있을 때 에이전트가 이를 따라 이메일 전송, 명령 실행, 송금 같은 민감한 행동을 시도하는지 측정했다
실제 DSH의 TypeScript 실행 엔진을 그대로 가동하면서 A.I.G가 오염된 콘텐츠를 주입하고 실행 기록(trace)을 수집한 뒤, 규칙 기반 판정기(J_R)와 언어모델 기반 판정기(J_L) 두 가지로 결과를 평가했다
전체적으로는 완전 성공률이 5.6%(J_R) 수준이었지만, 특정 조합에서는 훨씬 높게 나타났다: 텍스트 형태의 '가짜 완료(fake-completion)' 공격에서 17.0%, 파일 속에 숨긴 유니코드 문자에서 25.5%, 스킬 경로의 파일 형태에서 16.0%
같은 채널이라도 텍스트로 줄 때와 실제 파일(HTML, PDF, 스프레드시트 등)로 줄 때 결과가 크게 달랐다. 숨긴 유니코드는 텍스트로는 0% 성공률이었지만 파일로는 25.5%까지 올라, 텍스트만으로 테스트하면 실제 위험을 놓칠 수 있음을 보여줬다
연구진은 이 결과가 모델 하나의 결함이 아니라 콘텐츠 수집→파싱→모델에 보이는 형태로 만들기→계획 수립→도구 호출 승인으로 이어지는 전체 경로의 문제라며, 출처 정보를 끝까지 유지하고 민감한 행동은 모델의 판단과 독립적으로 승인하는 절차를 두라고 권고했다
Figure 2: Outcome criteria and evaluators. 𝒥R uses explicit trace evidence. 𝒥L reads the complete trace and the stated task-specific criterion. A sink call can support either full success or partial compliance.
Table 1: Assessment components used in the DSH study.
Component
Role in this study
Examples
Attack method
Expresses the attacker objective
fake completion, obfuscation
Indirect channel
Embeds the objective in content
webpage, skill, PDF metadata
DSH adapter
Executes the test in the target runtime
agent loop, tool registry, session log
Trace
Records messages, calls, results, and taint evidence
source-to-sink path
Judge
Assigns an outcome to the trace
𝒥R, 𝒥L
Figure 3: A.I.G runtime adapter for DSH. A.I.G prepares a tainted artifact and controlled fixture files. The real DSH TypeScript runtime handles the agent turn. The adapter converts DSH session events into a trace for 𝒥R and 𝒥L.
Table 2: Configuration of the assessed DSH deployment.
Item
Configuration
Runtime
DeepSeek Harness TypeScript runtime
Base cases
1,120 cases over 16 channels, 2 modes, and 35 objectives
Attack suite
13 methods: naive plus 12 attack methods
Agent executions
14,560 controlled runs
Carrier modes
560 text-mode and 560 file-mode base cases
Objectives
32 sink-required and 3 output-only tasks
Fixtures
6 source tools and 8 tracked simulated sinks
Model backend
deepseek-v4-flash [5] through a local proxy
Evaluators
Online 𝒥R and offline 𝒥L
Figure 4: DSH source-to-sink path. A tool result can become model-visible context, after which the model may select another tool. DSH also exposes pre-execution and deny-only guard hooks that a deployment can use to block risky calls.
Table 3: Outcome distribution over 14,560 DSH executions. Full and partial are mutually exclusive.
Outcome
𝒥R
𝒥L
Full success
819 (5.6%)
772 (5.3%)
Partial compliance
298 (2.0%)
1,060 (7.3%)
Broad influence (full + partial)
1,117 (7.6%)
1,832 (12.6%)
Failure / not reached
13,443 (92.4%)
12,719 (87.4%)
Judge error
0
9 (0.1%)
Figure 5: Dataset composition. The base dataset balances 16 channels, two carrier modes, and 35 payload objectives. The attack suite uses naive as an unmodified baseline and compares it with 12 attack methods.
Table 4: Outcomes by carrier mode. Full and partial values are percentages; sink calls are counts and overlap with the outcome categories.
𝒥R
𝒥L
Mode
Runs
Full
Partial
Full
Partial
Text
7,280
5.1%
2.1%
5.2%
7.5%
File
7,280
6.2%
2.0%
5.4%
7.0%
Figure 6: Overall and selected attack-method results. The left panel shows full, partial, and non-success outcomes. The right panel compares selected attack methods. The vertical axis reports full-success rate (%).
Table 5: Attack success rates (%) by attack method and carrier mode. naive is the unmodified baseline.
Method
Rule Text
Rule File
LLM Text
LLM File
naive (baseline)
5.5%
5.9%
5.7%
5.5%
escape
8.6%
9.3%
9.3%
9.3%
context_ignoring
0.2%
1.8%
0.4%
1.6%
fake_completion
16.6%
16.1%
17.0%
15.5%
combined
1.2%
2.9%
1.2%
2.1%
payload_splitting
2.1%
4.6%
3.4%
4.5%
obfuscation
13.6%
13.6%
9.1%
8.8%
prefix_injection
3.8%
5.5%
5.0%
4.5%
format_confusion
5.0%
6.8%
5.0%
5.0%
context_flooding
2.7%
4.1%
1.8%
2.5%
cross_channel
3.0%
4.1%
5.0%
4.3%
important_instructions
2.9%
3.8%
3.9%
4.3%
stealth_instruction
0.9%
1.8%
1.1%
2.1%
Table 6: 𝒥R full-success rates (%) by channel. Each channel-mode cell contains 455 runs.
Channel
Text
File
Channel
Text
File
calendar_event
7.7%
4.2%
chat_message
9.5%
1.3%
code_comment
3.5%
3.5%
config_file
4.6%
2.4%
document
5.5%
7.3%
email_headers
3.3%
3.3%
log_file
2.4%
2.4%
markdown
1.8%
2.9%
pdf_metadata
6.4%
3.3%
skills
14.3%
16.0%
spreadsheet
3.5%
5.3%
structured_data
4.0%
4.2%
transaction_record
2.0%
4.0%
translation
7.9%
8.8%
unicode_hidden
0.0%
25.5%
webpage
5.1%
4.4%
Table 7: Key local artifacts used for the DSH case study.
Artifact
Role
A.I.G assessment components
Payload construction, taint routing, and trace normalization
𝒥R / 𝒥L
Deterministic and semantic outcome evaluation
full_channel_mode dataset
1,120-case text/file channel matrix
experiment runner
Matrix orchestration and online 𝒥R evaluation
DSH runtime adapter
Python-to-TypeScript harness bridge and trace mapping
DSH driver
Real DSH runtime initialization and session-event export
controlled test plugin
Source fixtures and tracked simulated sinks
final trace corpus
One normalized trace for each planned agent run
offline judge corpus
Trace-level 𝒥L verdicts
왜 중요한가
이 연구는 AI 에이전트에게 문서나 웹페이지, 이메일을 읽게 하는 서비스를 만드는 개발자에게 실질적인 경고다. 모델 자체가 안전해 보여도, 에이전트가 외부 콘텐츠를 어떻게 받아들이고 어떤 도구를 자동으로 호출할 수 있는지에 따라 실제 피해로 이어질 수 있다는 점을 구체적 수치로 보여준다.
이 논문의 용어
간접 프롬프트 인젝션(indirect prompt injection) · 사용자가 직접 입력한 게 아니라 에이전트가 읽는 외부 문서·웹페이지 등에 숨겨진 악성 지시문으로 AI를 조종하는 공격
소스-싱크(source-to-sink) · 공격자가 조작한 내용이 들어오는 지점(소스)에서 실제 민감한 행동이 실행되는 지점(싱크)까지의 경로
타인트(tainted) 콘텐츠 · 공격자가 악성 지시문을 심어놓은, 신뢰할 수 없는 콘텐츠
룰 기반 판정기(J_R)/언어모델 판정기(J_L) · 실행 기록을 보고 공격이 성공했는지 판단하는 두 가지 평가 방식. 하나는 정해진 규칙, 하나는 AI가 의미를 읽고 판단
스킬(skill) 채널 · 에이전트가 재사용하도록 등록된 명령어 묶음으로, 이 자체가 공격 경로가 될 수 있음