컴백부터 K-뷰티까지 — K-컬쳐의 모든 것을 메일로 받아보세요메일로 받아보기

METAL MEDIA

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번 실험해봤다

  1. 01에이전트가 읽는 웹페이지·이메일·파일·스킬(재사용 가능한 명령 모음) 등에 공격자가 심어놓은 지시문이 있을 때 에이전트가 이를 따라 이메일 전송, 명령 실행, 송금 같은 민감한 행동을 시도하는지 측정했다
  2. 02실제 DSH의 TypeScript 실행 엔진을 그대로 가동하면서 A.I.G가 오염된 콘텐츠를 주입하고 실행 기록(trace)을 수집한 뒤, 규칙 기반 판정기(J_R)와 언어모델 기반 판정기(J_L) 두 가지로 결과를 평가했다
  3. 03전체적으로는 완전 성공률이 5.6%(J_R) 수준이었지만, 특정 조합에서는 훨씬 높게 나타났다: 텍스트 형태의 '가짜 완료(fake-completion)' 공격에서 17.0%, 파일 속에 숨긴 유니코드 문자에서 25.5%, 스킬 경로의 파일 형태에서 16.0%
  4. 04같은 채널이라도 텍스트로 줄 때와 실제 파일(HTML, PDF, 스프레드시트 등)로 줄 때 결과가 크게 달랐다. 숨긴 유니코드는 텍스트로는 0% 성공률이었지만 파일로는 25.5%까지 올라, 텍스트만으로 테스트하면 실제 위험을 놓칠 수 있음을 보여줬다
  5. 05연구진은 이 결과가 모델 하나의 결함이 아니라 콘텐츠 수집→파싱→모델에 보이는 형태로 만들기→계획 수립→도구 호출 승인으로 이어지는 전체 경로의 문제라며, 출처 정보를 끝까지 유지하고 민감한 행동은 모델의 판단과 독립적으로 승인하는 절차를 두라고 권고했다
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.

무엇을 했나

  1. 에이전트가 읽는 웹페이지·이메일·파일·스킬(재사용 가능한 명령 모음) 등에 공격자가 심어놓은 지시문이 있을 때 에이전트가 이를 따라 이메일 전송, 명령 실행, 송금 같은 민감한 행동을 시도하는지 측정했다
  2. 실제 DSH의 TypeScript 실행 엔진을 그대로 가동하면서 A.I.G가 오염된 콘텐츠를 주입하고 실행 기록(trace)을 수집한 뒤, 규칙 기반 판정기(J_R)와 언어모델 기반 판정기(J_L) 두 가지로 결과를 평가했다
  3. 전체적으로는 완전 성공률이 5.6%(J_R) 수준이었지만, 특정 조합에서는 훨씬 높게 나타났다: 텍스트 형태의 '가짜 완료(fake-completion)' 공격에서 17.0%, 파일 속에 숨긴 유니코드 문자에서 25.5%, 스킬 경로의 파일 형태에서 16.0%
  4. 같은 채널이라도 텍스트로 줄 때와 실제 파일(HTML, PDF, 스프레드시트 등)로 줄 때 결과가 크게 달랐다. 숨긴 유니코드는 텍스트로는 0% 성공률이었지만 파일로는 25.5%까지 올라, 텍스트만으로 테스트하면 실제 위험을 놓칠 수 있음을 보여줬다
  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.
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.
ComponentRole in this studyExamples
Attack methodExpresses the attacker objectivefake completion, obfuscation
Indirect channelEmbeds the objective in contentwebpage, skill, PDF metadata
DSH adapterExecutes the test in the target runtimeagent loop, tool registry, session log
TraceRecords messages, calls, results, and taint evidencesource-to-sink path
JudgeAssigns 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.
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.
ItemConfiguration
RuntimeDeepSeek Harness TypeScript runtime
Base cases1,120 cases over 16 channels, 2 modes, and 35 objectives
Attack suite13 methods: naive plus 12 attack methods
Agent executions14,560 controlled runs
Carrier modes560 text-mode and 560 file-mode base cases
Objectives32 sink-required and 3 output-only tasks
Fixtures6 source tools and 8 tracked simulated sinks
Model backenddeepseek-v4-flash [5] through a local proxy
EvaluatorsOnline 𝒥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.
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 success819 (5.6%)772 (5.3%)
Partial compliance298 (2.0%)1,060 (7.3%)
Broad influence (full + partial)1,117 (7.6%)1,832 (12.6%)
Failure / not reached13,443 (92.4%)12,719 (87.4%)
Judge error09 (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.
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
ModeRunsFullPartialFullPartial
Text7,2805.1%2.1%5.2%7.5%
File7,2806.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 (%).
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.
MethodRule TextRule FileLLM TextLLM File
naive (baseline)5.5%5.9%5.7%5.5%
escape8.6%9.3%9.3%9.3%
context_ignoring0.2%1.8%0.4%1.6%
fake_completion16.6%16.1%17.0%15.5%
combined1.2%2.9%1.2%2.1%
payload_splitting2.1%4.6%3.4%4.5%
obfuscation13.6%13.6%9.1%8.8%
prefix_injection3.8%5.5%5.0%4.5%
format_confusion5.0%6.8%5.0%5.0%
context_flooding2.7%4.1%1.8%2.5%
cross_channel3.0%4.1%5.0%4.3%
important_instructions2.9%3.8%3.9%4.3%
stealth_instruction0.9%1.8%1.1%2.1%
Table 6: 𝒥R full-success rates (%) by channel. Each channel-mode cell contains 455 runs.
ChannelTextFileChannelTextFile
calendar_event7.7%4.2%chat_message9.5%1.3%
code_comment3.5%3.5%config_file4.6%2.4%
document5.5%7.3%email_headers3.3%3.3%
log_file2.4%2.4%markdown1.8%2.9%
pdf_metadata6.4%3.3%skills14.3%16.0%
spreadsheet3.5%5.3%structured_data4.0%4.2%
transaction_record2.0%4.0%translation7.9%8.8%
unicode_hidden0.0%25.5%webpage5.1%4.4%
Table 7: Key local artifacts used for the DSH case study.
ArtifactRole
A.I.G assessment componentsPayload construction, taint routing, and trace normalization
𝒥R / 𝒥LDeterministic and semantic outcome evaluation
full_channel_mode dataset1,120-case text/file channel matrix
experiment runnerMatrix orchestration and online 𝒥R evaluation
DSH runtime adapterPython-to-TypeScript harness bridge and trace mapping
DSH driverReal DSH runtime initialization and session-event export
controlled test pluginSource fixtures and tracked simulated sinks
final trace corpusOne normalized trace for each planned agent run
offline judge corpusTrace-level 𝒥L verdicts

왜 중요한가

이 연구는 AI 에이전트에게 문서나 웹페이지, 이메일을 읽게 하는 서비스를 만드는 개발자에게 실질적인 경고다. 모델 자체가 안전해 보여도, 에이전트가 외부 콘텐츠를 어떻게 받아들이고 어떤 도구를 자동으로 호출할 수 있는지에 따라 실제 피해로 이어질 수 있다는 점을 구체적 수치로 보여준다.

이 논문의 용어

  • 간접 프롬프트 인젝션(indirect prompt injection) · 사용자가 직접 입력한 게 아니라 에이전트가 읽는 외부 문서·웹페이지 등에 숨겨진 악성 지시문으로 AI를 조종하는 공격
  • 소스-싱크(source-to-sink) · 공격자가 조작한 내용이 들어오는 지점(소스)에서 실제 민감한 행동이 실행되는 지점(싱크)까지의 경로
  • 타인트(tainted) 콘텐츠 · 공격자가 악성 지시문을 심어놓은, 신뢰할 수 없는 콘텐츠
  • 룰 기반 판정기(J_R)/언어모델 판정기(J_L) · 실행 기록을 보고 공격이 성공했는지 판단하는 두 가지 평가 방식. 하나는 정해진 규칙, 하나는 AI가 의미를 읽고 판단
  • 스킬(skill) 채널 · 에이전트가 재사용하도록 등록된 명령어 묶음으로, 이 자체가 공격 경로가 될 수 있음

저자 · Zonghao Ying

arXiv에서 원문 보기

최신 논문

논문 전체 보기 →

METAL MEDIA 최신 기사

그림 출처: Zonghao Ying et al., arXiv:2608.16393, CC BY 4.0