图标木马:通过ICO Alpha通道实现的可执行隐写术利用
Favicon Trojans: Executable Steganography Via Ico Alpha Channel Exploitation
July 11, 2025
作者: David Noever, Forrest McKee
cs.AI
摘要
本文提出了一种新颖的可执行隐写方法,利用ICO图像文件的alpha透明层在网页浏览器中嵌入并传递自解压的JavaScript有效载荷。通过针对非透明alpha层图像值的最低有效位(LSB),该方法成功地将压缩的JavaScript代码隐藏在网站图标(favicon)图像中,且不影响视觉保真度。全球网络流量每天加载2940亿个网站图标,消耗0.9拍字节的网络带宽。概念验证实现表明,一个64x64的ICO图像最多可嵌入512字节的未压缩数据,或在使用轻量级双重压缩时嵌入0.8千字节的数据。页面加载时,浏览器作为标准行为获取网站图标,使得嵌入的加载脚本能够利用原生JavaScript API和画布像素访问,在内存中提取并执行有效载荷。这创建了一个无需额外网络或用户请求的两阶段隐蔽通道。在桌面和移动环境下的多种浏览器测试中,均确认了嵌入脚本的成功且静默执行。我们评估了威胁模型,将其与规避基于网站图标检测的多态钓鱼攻击相关联,并分析了规避内容安全策略和反病毒扫描器的情况。我们将MITRE ATT&CK框架中的九个示例目标映射到单行JavaScript代码,以在ICO文件中任意执行。讨论了现有的隐写分析和净化防御措施,强调了在检测或中和alpha通道利用方面的局限性。结果表明,这种隐秘且可重复利用的攻击面模糊了静态图像与可执行内容之间的传统界限。由于现代浏览器在开发者未能加载ICO文件时报告静默错误,这一攻击面提供了一个有趣的例子,展示了必要的网络行为如何反过来损害安全性。
English
This paper presents a novel method of executable steganography using the
alpha transparency layer of ICO image files to embed and deliver
self-decompressing JavaScript payloads within web browsers. By targeting the
least significant bit (LSB) of non-transparent alpha layer image values, the
proposed method successfully conceals compressed JavaScript code inside a
favicon image without affecting visual fidelity. Global web traffic loads 294
billion favicons daily and consume 0.9 petabytes of network bandwidth. A
proof-of-concept implementation demonstrates that a 64x64 ICO image can embed
up to 512 bytes uncompressed, or 0.8 kilobyte when using lightweight two-fold
compression. On page load, a browser fetches the favicon as part of standard
behavior, allowing an embedded loader script to extract and execute the payload
entirely in memory using native JavaScript APIs and canvas pixel access. This
creates a two-stage covert channel requiring no additional network or user
requests. Testing across multiple browsers in both desktop and mobile
environments confirms successful and silent execution of the embedded script.
We evaluate the threat model, relate it to polymorphic phishing attacks that
evade favicon-based detection, and analyze evasion of content security policies
and antivirus scanners. We map nine example MITRE ATT&CK Framework objectives
to single line JavaScript to execute arbitrarily in ICO files. Existing
steganalysis and sanitization defenses are discussed, highlighting limitations
in detecting or neutralizing alpha-channel exploits. The results demonstrate a
stealthy and reusable attack surface that blurs traditional boundaries between
static images and executable content. Because modern browsers report silent
errors when developers specifically fail to load ICO files, this attack surface
offers an interesting example of required web behaviors that in turn compromise
security.