VisualTrap: A Stealthy Backdoor Attack on GUI Agents via Visual Grounding Manipulation

Ziang Ye, Yang Zhang, Wentao Shi, Xiaoyu You, Fuli Feng, Tat-Seng Chua

TL;DR

This paper introduces VisualTrap, a novel backdoor attack that exploits the visual grounding capabilities of GUI agents powered by Large Vision-Language Models (LVLMs). By injecting subtly crafted triggers during the model's pre-training phase, VisualTrap can hijack the agent's decision-making, causing it to misinterpret instructions and perform malicious actions, even after fine-tuning on clean data.

What Problem Does This Paper Address?

Graphical User Interface (GUI) agents, built upon powerful LVLMs, are increasingly used to automate tasks on personal devices. While this offers convenience, it also introduces significant security risks. Existing research has largely focused on adversarial attacks that manipulate inputs or environments. However, a critical vulnerability lies in the "visual grounding" mechanism – how agents map textual commands to specific interface elements (like buttons or text fields). This paper addresses the largely unexplored threat of backdoor attacks specifically targeting this visual grounding capability, which could lead to severe consequences like data theft and unauthorized access.

Methods

The core of VisualTrap is a backdoor attack injected during the visual grounding pre-training phase of LVLMs. The authors propose a method to create poisoned training data by:

  1. Trigger Generation: Creating small, visually imperceptible Gaussian noise patches as triggers.
  2. Trigger Placement: Randomly overlaying these triggers onto GUI screenshots.
  3. Coordinate Replacement: Crucially, the original correct coordinates for an interface element are replaced with the trigger's location.

When the LVLM is trained on a mixture of clean and poisoned data, it learns to associate textual instructions with the trigger location whenever the trigger is present, effectively hijacking its grounding ability. This attack is designed to be stealthy, with triggers that are invisible to the human eye. The method is also designed to be practical, as it targets the pre-training phase, making it feasible for attackers to release compromised pre-trained models.

Datasets

The paper utilizes several datasets for training and evaluation:

  • Pretraining Data: The SeeClick dataset (Cheng et al., 2024) is used for normal grounding pre-training, comprising Web UI and Mobile UI grounding data. Additional data from RICO, LLaVA, and Common Crawl are also mentioned.
  • Pretraining Phase Evaluation: ScreenSpot benchmark (Cheng et al., 2024) is used, covering Mobile, Desktop, and Web environments.
  • Downstream Task Evaluation (End-to-End Architecture):
    • Aitw (Rawles et al., 2023) for mobile phone tasks (Install, WebShopping subsets).
  • Mind2Web (Zheng et al., 2024a) for web tasks (Domain, Task, Website subsets).
  • Downstream Task Evaluation (Modular Architecture):
    • OmniACT benchmark (Kapoor et al., 2024) for web and desktop tasks.

Key Insights and Ideas

  • Visual Grounding is a Critical Vulnerability: The paper convincingly demonstrates that the visual grounding mechanism, essential for GUI agents, is a prime target for backdoor attacks. Hijacking this fundamental capability can lead to widespread compromise.
  • Stealthy and Effective Triggers: The use of small, Gaussian noise triggers that are invisible to the human eye makes the attack highly stealthy, making detection difficult during normal operation.
  • Persistence Through Fine-tuning: A key insight is that the backdoor's effect persists even after the LVLM is fine-tuned on clean data for specific downstream tasks. This means attackers can compromise agents built by others without needing to know the specific task details.
  • Cross-Environment Transferability: The attack is effective across different GUI environments (mobile, web, desktop), highlighting its broad applicability.
  • Vision Component is Key: Attacking the vision component of the LVLM is shown to be more effective for visual grounding attacks than attacking only the language component.

Key Results

  • High Attack Success Rate (ASR): VisualTrap achieves an average ASR of over 90% in hijacking visual grounding during pre-training, even with as little as 5% poisoned data.
  • Minimal Impact on Clean Performance: The attack has a negligible impact on the agent's performance on clean, untriggered inputs (CI-ACC remains high).
  • Downstream Task Compromise: In downstream tasks, agents built with attacked LVLMs show significantly higher ASR, indicating the backdoor successfully transfers. For example, in the Aitw benchmark, ASR can reach over 90% for the "Install" task when the vision component is attacked.
  • Desktop Generalization: The attack trained on Web and Mobile data successfully generalizes to the Desktop domain.
  • Robustness to Fine-tuning: While fine-tuning with clean data can reduce the attack's effectiveness when only the LLM component is targeted, it has a much smaller impact when the vision component is compromised.

Limitations and Future Work

The authors acknowledge several limitations:

  • Downstream Fine-tuning Assumption: The attack assumes users may not have sufficient resources for full fine-tuning of the LVLM, which could potentially "forget" the backdoor. Further research is needed to understand how full fine-tuning affects the attack.
  • Poisoned Data Implantation: The current method relies on traditional poisoned data injection. More efficient and sophisticated trigger implantation techniques could be explored.
  • Defense Exploration: The paper only briefly explores a fine-tuning-based defense. More robust defense mechanisms against this type of attack need to be developed.

Future work suggested includes exploring more efficient trigger implantation, developing more robust defense strategies, and investigating the impact of full fine-tuning on backdoor persistence.

Summary updated

BibTeX
@inproceedings{ye2025visualtrap,
  author = {Ziang Ye and Yang Zhang and Wentao Shi and Xiaoyu You and Fuli Feng and Tat-Seng Chua},
  title = {{VisualTrap: A Stealthy Backdoor Attack on GUI Agents via Visual Grounding Manipulation}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=7HPuAkgdVm},
}
Figure