Zero Breach
v0.1.4 版本在可选的 Candiru 模式检查中优先处理本地 COM 注册文件,并扩展了 Windows DNS 历史记录的覆盖范围。详见 v0.1.4 更新范围 与 模式验证。该模式需要固定版本的 YARA-X 依赖;默认检查仍然仅使用标准库。
一款本地、只读的扫描器,用于检查计算机上是否留有 AdFection / Candiru 间谍软件活动的痕迹——在这一行动中,一家广告技术公司利用实时广告竞价向目标人群投放了零点击间谍软件。已在 Windows、macOS 和 Linux(Python 3.8–3.12)上通过 CI 测试。
它搜索机器自身留下的记录——浏览器历史、cookie、缓存与连接记录、文件指纹、自启动注册、已知恶意软件文件路径以及 DNS 解析器缓存——以查找已公布的指标(indicators),并报告发现了什么、证据强度如何,以及同样重要的它无法检查哪些内容。
结果干净并不等于健康证明。 这种级别的间谍软件正是为了击溃此类检查而设计的,其留下的大部分证据会在数周内失效,而且除非有人主动开启,Windows 并不会记录 DNS 历史。这个工具只能缩小不确定性,无法消除它。如果你有切实的理由相信自己成为了攻击目标,正确的做法是寻求专家帮助——例如 Access Now 数字安全热线 或 国际特赦组织安全实验室——而不是依赖自助脚本。
背景
2026 年 10 月,The Citizen Lab 详细记录了广告技术公司 Discover-Tech 如何利用其 Controlium 平台在广告渲染的瞬间对设备进行指纹识别并植入感染,无需任何点击即投放 Candiru 间谍软件。2024 至 2025 年间,半岛电视台至少有 45 台设备成为攻击目标。本文的指标集合来源于该报告以及 Recorded Future 对同一基础设施的独立追踪。
该投放载体滥用实时广告竞价。请保持操作系统和浏览器更新,通过广告过滤降低暴露风险,并在适当情况下排查残留痕迹。本工具检查这些痕迹;它不能替代系统更新,也无法证明设备安全。
- The Citizen Lab,《Exposing AdFection》(2026-10-15)
- Recorded Future / Insikt Group,《Tracking Candiru’s DevilsTongue Spyware》(CTA-2025-0805)
检查内容
| 区域 | 读取内容 |
|---|---|
| 浏览器 | 历史、cookie(仅主机名和时间戳)、网站图标、HTTP 缓存、Local/Session Storage、Service Worker 缓存,以及 HSTS/连接记录——覆盖 Chrome、Edge、Brave、Vivaldi、Chromium 和 Firefox,包括在受支持位置发现的配置文件 |
| 文件 | 对间谍软件投放到用户可写位置的候选文件计算 SHA-256,与已知样本哈希比对——同时(刻意分开处理)计算该攻击者滥用的一款合法签名驱动程序的哈希,作为线索而非证据上报 |
| 主机(Windows) | 每用户 COM 注册(该活动已记录的持久化机制)、DNS 解析器缓存、DNS 历史日志是否已启用、hosts 文件,以及已知固定路径的驱动程序投递(如 HW.sys 易受攻击的驱动程序) |
每个匹配结果都会进行证据分级,因为具体产物决定了其含义。Cookie 元数据和存储的连接记录可以支持"曾经接触"的判断,但不能证明感染,也无法解释记录如何产生。某个域名仅仅出现在缓存网页中,可能只是保存的引用,比如一篇关于该活动的文章。该工具会区分"保存的引用"与"连接证据",以便每项发现都能结合上下文解读。
支持的浏览器
| 浏览器家族 | 浏览器 | 检查的配置文件位置 |
|---|---|---|
| Chromium | Chrome、Edge、Brave、Vivaldi、Chromium | Windows %LOCALAPPDATA%\<vendor>\User Data;macOS ~/Library/Application Support/<vendor>;Linux ~/.config/<vendor>,以及 snap 和 Flatpak 位置 |
| Firefox | Firefox | 标准配置文件和缓存目录 |
Vivaldi 路径:%LOCALAPPDATA%\Vivaldi\User Data(Windows)、~/Library/Application Support/Vivaldi(macOS)、~/.config/vivaldi、~/.config/vivaldi-snapshot 以及 Flatpak com.vivaldi.Vivaldi 配置(Linux)。其他基于 Chromium 的浏览器(Opera、Arc 等)尚未支持。不受支持的浏览器和自定义配置文件位置不会被检查,也可能不会出现在报告中;无匹配结果不涵盖这些情况。扫描前请关闭浏览器,以免其数据库被锁定。
版本说明: Vivaldi 支持包含在 v0.1.2 中。更早的下载版本不包含该支持。请通过各自的签名和校验和验证每个版本。
安装与运行
默认检查要求 Python 3.8 或更新版本,无需管理员权限,也无需安装额外软件包。
单文件(最简单): 下载 zero-breach.py,使用发布校验和验证,然后在下载文件夹中打开终端。在 Windows 上使用 python;在 macOS 或 Linux 上,将下述命令中的 python 替换为 python3。
python -X utf8 zero-breach.py # full scan
python -X utf8 zero-breach.py --quick # faster; skips file fingerprinting
python -X utf8 zero-breach.py --json report.json
可选的 Candiru 文件模式: 从与扫描器相同的发布版本下载 requirements-patterns.txt。此模式需要 Python 3.9 或更新版本。在同时包含两个下载文件的文件夹中,创建一个独立的 Python 环境并安装哈希固定的 YARA-X wheel:
# Windows PowerShell
python -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements-patterns.txt
.venv\Scripts\python.exe -X utf8 zero-breach.py --patterns
# macOS / Linux
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-patterns.txt
.venv/bin/python -X utf8 zero-breach.py --patterns
--pattern-path ABSOLUTE_PATH 将此额外文件检查限制为选定的本地文件或文件夹;该参数可重复使用。常规的浏览器、哈希和主机检查保持原有范围。模式匹配只是调查线索,并非活动感染的证据。无匹配结果不能排除 Candiru 或其他间谍软件。在不带 --pattern-path 的情况下,可选检查首先检查由每用户 Windows COM 注册所指明的最多 128 个安全的本地文件,然后检查其常规文件根目录。COM 注册本身并不构成间谍软件发现。已发布的两条规则仅适用于小于约 1 MB 的文件,因此更大的文件不在其检测范围之内。
在 Windows 上,DNS 历史检查最多读取所保留的最新 50,000 条事件。如果仍有更早的保留记录,报告会将该历史标记为"部分"而非"完整"。这不会开启日志记录,也不会恢复从未被记录的事件。
从源码运行:
python -X utf8 scan/adint-scan.py
扫描不会更改任何系统设置,也不需要管理员权限。它不会主动发起网络请求或指标查询。重定向路径和 Windows 远程驱动器会被跳过,且在线证书验证被禁用。在 POSIX 系统上,网络挂载仍可能通过普通文件系统调用被读取。被锁定数据库的快照是临时性的;使用后会尝试清理,任何清理失败都会连同保留位置一并报告。--json 会写入所请求的报告。
退出码:0 未发现任何内容,2 有指标匹配,1 扫描无法建立(例如指标文件损坏)。
验证你下载的内容
请使用上方官方仓库,并在运行之前检查下载的文件。
1. 验证发布者的签名。 v0.1.4 版本包含扫描器及其校验和清单的分离式 GPG 签名,使用 ArchiveGenocide 的既有发布密钥。请遵循 SIGNING.md,并将完整密钥指纹与 ArchiveGenocide 的验证页面 比对。ArchiveGenocide 下载面板 也会在 GitHub 之外单独发布特定版本的校验和。
2. 比对已发布的哈希。 每个发布版本都列出了 zero-breach.py 的 SHA-256。确认你的下载与之匹配:
# Windows PowerShell
Get-FileHash zero-breach.py -Algorithm SHA256
# macOS / Linux
shasum -a 256 zero-breach.py
3. 自行重建并比对。 单文件由本仓库确定性地生成——匹配的发布标签可重建出字节级一致的文件。因此你完全不必信任下载的文件;你可以自行复现:
git clone https://github.com/interplains/zero-breach.git
cd zero-breach
git checkout v0.1.4
python build/build.py # writes dist/zero-breach.py and prints its SHA-256
这些命令可复现 v0.1.4;其他发布版本请替换为对应的标签。在 macOS 或 Linux 上,构建命令请使用 python3。将哈希与该发布版本公布的哈希比对。开发分支可能包含后续更改,不保证能复现更早的发布版本。
杀毒软件说明。 zero-breach.py 是纯文本 Python——你可以在文本编辑器中阅读每一行。一些杀毒产品会标记任何读取浏览器数据库的脚本,因为这种行为类似信息窃取器。Zero Breach 通过其 SQL 查询只读取 cookie 的主机名和时间戳,从不读取 cookie 值,也不会解密凭据。被锁定的数据库快照必然会在查询该元数据之前复制数据库字节。如果你的杀毒软件提出异议,请阅读源码、核对哈希,自行判断。
解读结果
报告以一段通俗语言的摘要开头:发现了什么,严重程度如何
us it is, what to do, and what could not be checked. Findings are ranked strongest-first:
- on-disk — a file matches a published fingerprint. A spyware-sample match
identifies that sample; a
vuln-drivermatch identifies legitimate software known to be abused and is not proof of infection. - persistence — a name is registered to run automatically (serious)
- contacted — a connection record; its significance depends on the indicator’s role, such as advertising delivery versus command-and-control
- dns-record — a name or address appears in local resolver data; a lookup may have failed, and resolution alone does not prove contact with the server
- configured — a name is mapped to a real address in local configuration
- referenced — the name appeared in saved content, such as page text, an unvisited bookmark or browser storage; this does not establish contact
Next steps depend on both the evidence and the indicator’s role. Advertising traces and legitimate-driver matches start with checking the saved context; they do not automatically trigger a spyware-helpline referral. More concerning infrastructure warrants qualified interpretation. Known spyware-file matches and persistence findings call for prompt expert review and preservation of the evidence. A credible targeting concern warrants direct help regardless of the scan result. Multiple weak matches do not automatically become strong evidence.
Evidence locations are printed in full so they can be copied. Detailed findings follow the coverage information and, where applicable, DNS-history instructions.
Domain and IP matches are printed defanged (example[.]com) so that forwarding a
report to a help organisation cannot cause a mail gateway to contact the
indicator on the reader’s behalf.
DNS cache entries pointing at a blocking/sink address are described as protective configuration, not attempted contact: the hosts file can preload them without any lookup. For a more consistent SQLite snapshot, close browsers before scanning. Local-path checks are not an OS sandbox: POSIX network mounts and concurrent filesystem changes require an external isolation boundary for strict offline use.
Example: a “nothing found” result
The most common outcome, and the one where reading carefully matters most — note that it leads with the caveat and lists what it could not check:
========================================================================
Zero Breach 0.1.0 — AdFection / Candiru indicator check
Checks for TRACES of ad-delivered spyware. A clean result is NOT a
clean bill of health - see what could not be checked, below.
2026-10-18T14:30:00 Windows 11
========================================================================
SUMMARY — read this part
========================================================================
RESULT: no known indicator was found in anything that could be
checked.
This is NOT a clean bill of health. See the two sections below for
what was searched and, more importantly, what could not be.
WHAT COULD NOT BE CHECKED (2 gaps)
- hash/file-fingerprints: skipped by --quick. Re-run without --quick
to include it
- host/dns-log: DNS-Client/Operational log is disabled (the Windows
default) - there is no queryable DNS history, so past activity
cannot be checked retrospectively from this host
========================================================================
A real match is shown under a >> heading stating plainly what it is (a file on
disk, an auto-start entry, a proven connection), with the account and date, and a
numbered “what to do” that starts with do not delete the evidence.
Indicator data and interoperability
The current source dataset has 405 indicators: 292 domains, 111 IP addresses,
one spyware hash and one legitimate vulnerable-driver hash, in
iocs/adfection_iocs.txt, one per line with its tier,
confidence and source. Release v0.1.2 embeds all 405 indicators, including
67 additional domains/hostnames compared with v0.1.1. Earlier signed release
assets remain unchanged; later source/feed updates do not replace them.
Coverage combines Citizen Lab’s AdFection (2026), Hooking Candiru (2021) and
CatalanGate (2022) reports, Confiant ADINT (2026), Recorded Future (2025),
Microsoft DevilsTongue (2021), ESET (2021), Avast (2022), Google TAG (2021) and
Amnesty Security Lab’s Indonesia research (2024). Only their Candiru-related
indicators are included. Each export retains the indicator’s actual citation.
They are exported to dist/ in several formats:
- STIX 2.1 and MISP — for MISP, a SIEM, or Amnesty International’s Mobile
Verification Toolkit:
mvt-ios check-backup --iocs dist/adfection.stix.json <backup> - DNS/ad blocklists —
hosts, Adblock/uBlock/AdGuard, dnsmasq, and a plain domain list, for a phone’s or router’s DNS filter, Pi-hole or AdGuard Home. The current lists contain 291 reviewed domains/hostnames. Shared cloud IPs and hosting parents are excluded. Bareadtimizer.coremains scanner evidence but is excluded from blocking; its specifically documented operational hosts are included. Historical attribution does not establish current ownership or activity. Regenerate with--no-historicalto omit the historical tier; this still includes Recorded Future’s separately attributed 2025 infrastructure. Hosts files block exact names; Adblock and dnsmasq rules also cover subdomains.
Regenerate the exports with python build/emit_stix.py, build/emit_misp.py and
build/emit_denylist.py.
Correction for existing STIX users: the legitimate driver hash
6a4875ae86131a594019dec4abd46ac6ba47e57a88287b814d07d929858fe3e5
is excluded from active STIX indicators. If you imported an earlier feed, process
dist/adfection.withdrawals.stix.json in a consumer that supports STIX revocation,
or explicitly remove the old driver rule and its relationship:
indicator--80275ed1-64f2-58c7-97dc-9cdacac0ff5d and
relationship--66b188af-2489-5b41-a84f-b90c34f5fc73.
The withdrawal file is for removing earlier objects, not a detection/MVT feed.
Continue using dist/adfection.stix.json for scanning. The scanner and MISP retain
the driver as a clearly labelled investigation lead; its presence is not proof
of spyware.
Updating the indicators
The list goes stale — new infrastructure appears and old domains lapse. Refresh it from this repository with a separate, explicitly-run script (the scanner itself makes no intentional network requests):
python scan/update-iocs.py # fetch, verify, show what changed (dry run)
python scan/update-iocs.py --apply # also replace the local list
It downloads over HTTPS, checks the file against a published SHA-256, confirms it parses before replacing anything, and shows a diff first. The trust model and the updater limitations are documented at the top of the script. It does not verify GPG signatures automatically. The signed release manifest authenticates the IOC file shipped with the signed release, not later development-branch updates; see SIGNING.md.
Design principles
- Never contact an indicator. A Python socket guard blocks direct DNS and network calls. Local-path checks reject redirected paths and Windows remote drives, while POSIX network mounts may appear as local filesystem paths; Authenticode checks that could retrieve certificates are disabled. The socket guard is not an operating-system network sandbox; use OS isolation when a strict offline execution boundary is required.
- Measured, never inferred. A check that could not run is reported as a gap, never as clean. This is enforced structurally, not by convention.
- Precision over coverage. An unsigned binary in a user-writable path is not a finding; plenty of honest software looks like that. Alarms that mean nothing teach people to ignore the tool.
- Queries only required metadata. Cookie queries select host names and timestamps, not values. Temporary snapshots copy entire locked database files; the scanner does not decrypt browser credentials.
- Read-only, no administrator, no telemetry, no dependencies.
Tests
cd scan && python -m unittest discover -s tests
The suite covers the network guard, the evidence grading, the boundary matching (so a longer name or number that merely contains an indicator does not match), the loader’s failure modes, and behavioural checks that cookie queries exclude values and that the scanner does not read the browser’s master key. Snapshot copies still contain the database bytes, as described above.
Contact
Questions or feedback: the project’s Telegram — https://t.me/+t9gq13mSKcE4NGI0. To report a security problem, please see SECURITY.md.
Licence
The software is licensed under the Apache License 2.0 (LICENSE). The
indicator data in iocs/ and dist/ is released into the public domain under
CC0 1.0 (iocs/LICENSE.md), so it can be copied into blocklists, MISP, STIX
and other tools without restriction.
This project is not affiliated with, and not endorsed by, The Citizen Lab,
Confiant, Recorded Future, Amnesty International or Access Now. Their work is cited
as the source of the indicators and as the place to turn for expert help. See
NOTICE for details.