Skip to content

ASI03:身分與權限濫用

Identity and Privilege Abuse

說明

Identity & Privilege Abuse 會利用 Agent 中動態的信任與委派關係,透過操弄 delegation chain、角色繼承、control flow 與 Agent context 來提升存取權限並繞過控制;這裡的 context 包含跨互聯系統的 cached credential 或對話歷史。在此語境中,identity 同時指 Agent 所定義的 persona,以及任何代表該 Agent 的驗證資料。Agent-to-Agent 信任或繼承而來的憑證可能遭利用,以提升存取權限、劫持權限或執行未經授權的動作。

這項風險源自以使用者為中心的身分系統與 Agentic 設計之間的架構落差。若 Agent 沒有一個獨立且受到治理的身分,就會存在 attribution gap,使真正的最小權限無法被強制執行。此處的 identity 同時包含 Agent 被指定的 persona,以及代表它的任何驗證資料,例如 API key、OAuth token 或 delegated user session。

這與 ASI02(Tool Misuse) 的情境不同;ASI02 指的是一個安全主體在既有授權範圍內,以非預期或不安全方式誤用自己的工具。

Identity & Privilege Abuse 是 Excessive Agency(LLM06:2025) 在 Agentic 系統中的演進。它經常利用 Prompt Injection(LLM01:2025);由於 Agent 權限、工具整合與 multi-agent system 的存在,其影響可能被放大,甚至超越 Sensitive Information Disclosure(LLM02:2025),直接破壞 Agent 可觸及之系統與資料的機密性、完整性與可用性。

OWASP ASI Threats and Mitigations 中,本項一對一對應 T3: Privilege Compromise;在 OWASP AIVSS 中,則對應 Core Risk 2: Agent Access Control Violation

常見漏洞範例

  1. Un-scoped Privilege Inheritance — 高權限 manager 在委派工作時,沒有套用最小權限的 scope 限制,常見原因是方便性或架構限制,因而將完整 access context 一併傳遞。原本職責狹窄的 worker 因此取得過多權限。採用預設權限的 low-code 或 no-code Agent,例如預設具有不受限制的 Internet access,也可能繼承超出預期的權限。
  2. Memory-Based Privilege Retention & Data Leakage — Agent 為了 context 而快取 credential、key 或已擷取資料,之後又加以重用。若 memory 沒有在不同任務或使用者之間分段或清除,攻擊者便可能 Prompt Agent 重用已快取的 secret、提升權限,或把先前安全 session 的資料洩漏到較弱的 session。
  3. Cross-Agent Trust Exploitation(Confused Deputy) — 在 multi-agent system 中,Agent 經常預設信任內部 request。遭入侵的低權限 Agent 可以把看似有效的指令轉送給高權限 Agent,而後者在未重新確認原始使用者意圖的情況下執行,因而誤用其較高權限。
  4. Agent 工作流程中的 Time-of-Check to Time-of-Use(TOCTOU) — 權限可能在工作流程開始時通過驗證,但在真正執行前已變更或過期。Agent 仍以過時的 authorization 繼續執行,進而進行使用者已無權核准的動作。
  5. Synthetic Identity Injection — 攻擊者使用未經驗證的 descriptor(例如「Admin Helper」)冒充內部 Agent,以取得繼承而來的信任,並用捏造的身分執行 privileged action。

攻擊情境範例

  1. Delegated Privilege Abuse — Finance Agent 將工作委派給「DB query」Agent,卻把自己的全部權限一併傳遞。攻擊者操弄 query prompt,利用繼承的存取權限外洩 HR 與 legal data。
  2. Memory-Based Escalation — IT admin Agent 在 patch 過程中快取 SSH credential。之後,一名非 admin 使用者重用同一 session,並 Prompt Agent 使用那些 credential 建立未經授權的帳號。
  3. Cross-Agent Trust Exploitation — 一封偽裝成來自 IT 的特製 email,指示 email sorting Agent 要求 finance Agent 將資金移轉至特定帳戶。Sorting Agent 轉送指令後,finance Agent 因信任內部 Agent,未經驗證便處理了詐欺付款。
  4. Device-code phishing across agents — 攻擊者分享一個 device-code link,瀏覽 Agent 跟隨該連結;另一個「helper」Agent 完成 code 流程,使受害者 tenant 綁定至攻擊者的 scope。
  5. Workflow Authorization Drift — Procurement Agent 在採購流程開始時驗證核准。數小時後,使用者的支出上限被降低,但工作流程仍以舊 authorization token 繼續,完成此時已未獲授權的交易。
  6. Forged Agent Persona — 攻擊者在內部 Agent2Agent registry 註冊一個偽造的「Admin Helper」Agent,並提供偽造的 agent card。其他 Agent 因信任該 descriptor,將高權限維護工作路由給它。由攻擊者控制的 Agent 隨後在被假定為內部信任的情況下發出 system-level command。
  7. Identity Sharing — Agent 代表某位使用者(通常是建立它的人)取得系統存取權限,之後又允許其他使用者透過呼叫該 Agent 的工具,隱含地使用相同身分。

預防與緩解指南

  1. Enforce Task-Scoped, Time-Bound Permissions — 每個任務簽發短生命週期、窄 scope 的 token,並以 permission boundary 限制權利;使用 per-agent identity 與短生命週期 credential(例如 mTLS certificate 或 scoped token),以縮小 blast radius、阻擋 delegated-abuse 與 maintenance-window attack,並緩解 un-scoped inheritance、orphaned privilege 與 reflection-loop elevation。
  2. Isolate Agent Identities and Contexts — 每個 session 使用權限與 memory 分離的 sandbox,並在任務之間清除 state,以防止 Memory-Based Escalation,並降低 Cross-Repository Data Exfiltration。
  3. Mandate Per-Action Authorization — 透過會檢查外部資料的集中式 policy engine,重新驗證每一個 privileged step,以阻止 Cross-Agent Trust Exploitation 與 Reflection Loop Elevation。
  4. Apply Human-in-the-Loop for Privilege Escalation — 高權限或不可逆動作要求人工核准,作為可阻止 Memory-Based Escalation、Cross-Agent Trust Exploitation 與 Maintenance Window attack 的安全網。
  5. Define Intent — 將 OAuth token 綁定至已簽章的 intent,其中包含 subject、audience、purpose 與 session。若 token 所綁定的 intent 與目前 request 不符,就拒絕使用。
  6. Evaluate Agentic Identity Management Platforms — 主要平台正把 Agent 整合進 identity and access management system,將其視為受管理的 non-human identity,具備 scoped credential、audit trail 與 lifecycle control。例子包括 Microsoft Entra、AWS Bedrock Agents、Salesforce Agentforce、Workday 的 Agentic System of Record(ASOR)model,以及 Google Vertex AI 中類似的新興模式。
  7. 將權限綁定至 subject、resource、purpose 與 duration — context switch 時要求重新驗證。除非重新驗證原始 intent,否則阻止 Agent 之間的 privilege inheritance。當 idle 或出現 anomaly 時自動撤銷權限。
  8. Detect Delegated and Transitive Permissions — 監控 Agent 何時透過 delegation chain 間接取得新權限。若低權限 Agent 在 multi-agent workflow 中繼承或被交付較高權限 scope,應加以標記。
  9. 偵測異常的 cross-agent privilege elevation 與 device-code 類型 phishing flow — 監控 Agent 何時要求新的 scope,或在原始 signed intent 之外重用 token。

參考資料

  1. https://research.aimultiple.com/agentic-ai-cybersecurity/
  2. https://www.docker.com/blog/mcp-horror-stories-github-prompt-injection/
  3. https://css.csail.mit.edu/6.858/2015/readings/confused-deputy.html
  4. 15 Ways to Break Your Copilot, BHUSA 2024
  5. NVD - cve-2025-31491

原作:OWASP Top 10 For Agentic Applications 2026
專案:OWASP Gen AI Security Project - Agentic Security Initiative
授權:CC BY-SA 4.0
本翻譯為非官方繁體中文版本,並依 CC BY-SA 4.0 授權釋出。