GUI自动化工具存在视觉状态不一致漏洞,可被攻击者利用完成隐蔽劫持。
Temporal UI State Inconsistency in Desktop GUI Agents: Formalizing and Defending Against TOCTOU Attacks on Computer-Use Agents

- 通过三重检测层在操作前重新验证界面状态
- 对两类攻击实现100%拦截率,延迟低于0.1秒
- 适用于桌面自动化系统安全防护场景
通过截图与点击循环控制桌面的GUI代理引入了一类新漏洞:观察到执行之间的平均6.51秒间隔形成时间检查-使用窗口(TOCTOU),使无权限攻击者可操纵界面状态。本文将其形式化为视觉原子性违规,并提出三种攻击原语:(A)通知覆盖劫持,(B)窗口焦点操控,(C)Web DOM注入。其中原语B(最接近Android动作重绑定)可在观察时刻零视觉痕迹下实现100%动作重定向成功率。为此提出轻量级三层防御机制PUSV——在每项操作前进行即时状态验证:点击目标掩码像素SSIM(L1)、全局截图差异(L2a)及X Window快照差异(L2b)。PUSV在180次对抗测试中(含135次原语A、45次原语B)实现100%动作拦截率,零误报,延迟小于0.1秒。对于原语C(零视觉足迹的DOM注入),PUSV存在约0%拦截率的结构盲点,提示需构建操作系统与DOM协同的纵深防御体系。单一层级无法实现全面覆盖,不同攻击依赖不同检测信号,验证了分层设计的必要性。
原文摘要 · Abstract (English)
GUI agents that control desktop computers via screenshot-and-click loops introduce a new class of vulnerability: the observation-to-action gap (mean 6.51 s on real OSWorld workloads) creates a Time-Of-Check, Time-Of-Use (TOCTOU) window during which an unprivileged attacker can manipulate the UI state. We formalize this as a Visual Atomicity Violation and characterize three concrete attack primitives: (A) Notification Overlay Hijack, (B) Window Focus Manipulation, and (C) Web DOM Injection. Primitive B, the closest desktop analog to Android Action Rebinding, achieves 100% action-redirection success rate with zero visual evidence at the observation time. We propose Pre-execution UI State Verification (PUSV), a lightweight three-layer defense that re-verifies the UI state immediately before each action dispatch: masked pixel SSIM at the click target (L1), global screenshot diff (L2a), and X Window snapshot diff (L2b). PUSV achieves 100% Action Interception Rate across 180 adversarial trials (135 Primitive A + 45 Primitive B) with zero false positives and < 0.1 s overhead. Against Primitive C (zero-visual-footprint DOM injection), PUSV reveals a structural blind spot (~0% AIR), motivating future OS+DOM defense-in-depth architectures. No single PUSV layer alone achieves full coverage; different primitives require different detection signals, validating the layered design.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。