Web agents have emerged as an effective paradigm for automating interactions with complex web environments, yet remain vulnerable to prompt injection attacks that embed malicious instructions into webpage content to induce unintended actions. This threat is further amplified for screenshot-based web agents, which operate on rendered visual webpages rather than structured textual representations, making predominant text-centric defenses ineffective. Although multimodal detection methods have been explored, they often rely on large vision-language models (VLMs), incurring significant computational overhead. The bottleneck lies in the complexity of modern webpages: VLMs must comprehend the global semantics of an entire page, resulting in substantial inference time and GPU memory usage. This raises a critical question: can we detect prompt injection attacks from screenshots in a lightweight manner? In this paper, we observe that injected webpages exhibit distinct characteristics compared to benign ones from both visual and textual perspectives. Building on this insight, we propose SnapGuard, a lightweight yet accurate method that reformulates prompt injection detection as multimodal representation analysis over webpage screenshots. SnapGuard leverages two complementary signals: a visual stability indicator that identifies abnormally smooth gradient distributions induced by malicious content, and action-oriented textual signals recovered via contrast-polarity reversal. Extensive evaluations across eight attacks and two benign settings demonstrate that SnapGuard achieves an F1 score of 0.75, outperforming GPT-4o-prompt while being 8x faster (1.81s vs. 14.50s) and introducing no additional memory overhead.


翻译:网页代理已成为自动化复杂网页环境交互的有效范式,但其仍易受提示注入攻击——攻击者将恶意指令嵌入网页内容以诱导代理执行非预期操作。这种威胁对基于截屏的网页代理更为严峻,因其处理的是渲染后的可视化网页而非结构化文本表示,导致主流文本防御机制失效。尽管多模态检测方法已被探索,但它们往往依赖大型视觉语言模型(VLM),带来巨大算力开销。瓶颈在于现代网页的复杂性:VLM必须理解整页的全局语义,导致推理时间与GPU内存消耗激增。由此引发关键问题:能否以轻量方式从截屏中检测提示注入攻击?本文观察到,被注入网页在视觉与文本维度均呈现与良性网页不同的特征。基于此发现,我们提出SnapGuard——一种将提示注入检测重构为网页截屏多模态表征分析的轻量精准方法。SnapGuard利用两种互补信号:视觉稳定性指标(识别恶意内容引发的异常平滑梯度分布)与通过对比极性反转恢复的面向操作的文本信号。在八种攻击场景与两种良性环境下的广泛评估表明,SnapGuard的F1分数达0.75,性能超越GPT-4o-prompt的同时,推理速度提升8倍(1.81秒对比14.50秒),且未引入额外内存开销。

0
下载
关闭预览

相关内容

《人工智能在网络防御中的机遇》
专知会员服务
12+阅读 · 6月8日
对抗机器学习在网络入侵检测领域的应用
专知会员服务
35+阅读 · 2022年1月4日
深度学习赋能的恶意代码攻防研究进展
专知会员服务
31+阅读 · 2021年4月11日
专知会员服务
57+阅读 · 2020年12月28日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
FaceNiff工具 - 适用于黑客的Android应用程序
黑白之道
151+阅读 · 2019年4月7日
ProxyDroid - 适用于黑客的Android应用程序
黑白之道
55+阅读 · 2019年3月9日
被动DNS,一个被忽视的安全利器
运维帮
11+阅读 · 2019年3月8日
网络安全态势感知
计算机与网络安全
26+阅读 · 2018年10月14日
NetworkMiner - 网络取证分析工具
黑白之道
16+阅读 · 2018年6月29日
SCENE-一个可扩展两层级新闻推荐系统
全球人工智能
11+阅读 · 2018年1月7日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
20+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
对抗环境下超视距目标打击的情报支援
专知会员服务
3+阅读 · 今天14:49
《无人机对海面作战影响评估》
专知会员服务
11+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
6+阅读 · 7月20日
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
6+阅读 · 7月20日
相关资讯
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
FaceNiff工具 - 适用于黑客的Android应用程序
黑白之道
151+阅读 · 2019年4月7日
ProxyDroid - 适用于黑客的Android应用程序
黑白之道
55+阅读 · 2019年3月9日
被动DNS,一个被忽视的安全利器
运维帮
11+阅读 · 2019年3月8日
网络安全态势感知
计算机与网络安全
26+阅读 · 2018年10月14日
NetworkMiner - 网络取证分析工具
黑白之道
16+阅读 · 2018年6月29日
SCENE-一个可扩展两层级新闻推荐系统
全球人工智能
11+阅读 · 2018年1月7日
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
20+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员