wfx: CI Secret Stealer Pushed to Over 8,900 Repositories via Stolen GitHub Credentials, Aiming for Cloud Persistence
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
1. Basic Information
Article Title: Hijacked GitHub Accounts Push ‘wfx’ CI Secret Stealer to Thousands of Repositories Publisher: Endor Labs Publication Date: 2026-11-12 Source: Endor Labs Updated Date: 2026-11-12 Response Priority (Author’s Assessment): Critical. This is the author’s response priority assessment, not a vendor severity rating or a CVSS score. Rationale for Response Priority: Aikido’s aggregation, cited by Endor Labs, reported probes against 61,764 repositories and credential exfiltration from over 1,806 repositories. The campaign aims to steal all CI secrets, escalate cloud privileges, and establish AWS and Azure persistence that can survive credential rotation; successful persistence creation in individual environments remains unconfirmed. Related Materials: Aikido (Original Investigation)
1. 基本信息
文章标题: 被劫持的 GitHub 账户将“wfx”CI 密钥窃取程序推送到数千个存储库 发布者: Endor Labs 发布日期: 2026-11-12 来源: Endor Labs 更新日期: 2026-11-12 响应优先级(作者评估): 严重。这是作者的响应优先级评估,而非供应商严重性评级或 CVSS 分数。 响应优先级理由: Endor Labs 引用的 Aikido 聚合数据报告称,针对 61,764 个存储库进行了探测,并从超过 1,806 个存储库中窃取了凭据。该活动旨在窃取所有 CI 密钥、提升云权限,并建立能够抵御凭据轮换的 AWS 和 Azure 持久性;目前尚未确认在各个环境中是否成功创建了持久性。 相关资料: Aikido(原始调查)
2. Key Points
Endor Labs reported an ongoing campaign where attackers use stolen GitHub credentials to probe repositories with harmless-looking PRs, quickly deploy about 1,500 lines of the wfx stealer, steal CI secrets, cloud credentials, and AI API keys, and cover their tracks by reverting changes and deleting workflow logs. Starting November 10, 2026, wfx was pushed to over 8,900 repositories using stolen GitHub credentials, and postinstall hooks were added to package.json in over 829 repositories. Aikido’s original aggregation (cited by Endor Labs) reported probing 61,764 repositories and exfiltrating credentials from over 1,806 repositories. Probe counts, payload deployment counts, and exfiltration counts are distinct metrics. Probe PRs verified write access, and payloads were deployed via workflow injection, postinstall hooks (both modifying the default branch), and by adding new workflows to ephemeral chore/* branches. Endor Labs’ version analysis also confirmed appends to existing shell scripts as a deployment path. Actions secrets and variables, GITHUB_TOKEN, OIDC, cloud, registry, and AI provider credentials, as well as runner process memory, were collected. The campaign included persistence capabilities to rewrite AWS role trust policies to Principal AWS ” and create long-lived IAM keys, as well as wfx-ci- federated identity credentials in Azure. Payload commits were reverted within seconds, and workflow runs and logs were deleted. Missing run numbers serve as a key artifact.
2. 关键点
Endor Labs 报告了一项正在进行的攻击活动,攻击者利用被盗的 GitHub 凭据,通过看似无害的 PR 探测存储库,快速部署约 1,500 行 wfx 窃取程序,窃取 CI 密钥、云凭据和 AI API 密钥,并通过撤销更改和删除工作流日志来掩盖踪迹。自 2026 年 11 月 10 日起,wfx 通过被盗的 GitHub 凭据被推送到超过 8,900 个存储库,并在超过 829 个存储库的 package.json 中添加了 postinstall 钩子。Aikido 的原始聚合数据(由 Endor Labs 引用)报告称,探测了 61,764 个存储库,并从超过 1,806 个存储库中窃取了凭据。探测次数、有效载荷部署次数和窃取次数是不同的指标。探测 PR 用于验证写权限,有效载荷通过工作流注入、postinstall 钩子(两者均修改默认分支)以及向临时 chore/* 分支添加新工作流的方式进行部署。Endor Labs 的版本分析还证实,向现有 shell 脚本追加内容也是一种部署路径。Actions 密钥和变量、GITHUB_TOKEN、OIDC、云、注册表和 AI 提供商凭据以及运行器进程内存均被收集。该活动包含持久性功能,可将 AWS 角色信任策略重写为 Principal AWS ” 并创建长效 IAM 密钥,以及在 Azure 中创建 wfx-ci- 联合身份凭据。有效载荷提交在几秒钟内被撤销,工作流运行和日志被删除。缺失的运行编号是关键的取证痕迹。
3. Attack Flow
From Probing to CI Secret Theft: Open a dependency audit-style probe PR using stolen GitHub credentials to verify write access. Push changes to the default branch via workflow injection, postinstall hooks, or appends to existing shell scripts, or add a new workflow to an ephemeral chore/* branch. Execute wfx via GitHub Actions workflows or package postinstall hooks (on CI runners or developer machines that fetch and install the code) to collect secrets, tokens, cloud credentials, and AI keys. Obtain a cloud session using OIDC or already collected cloud keys, client secrets, or refresh tokens to attempt creating additional keys and federated credentials (successful creation in individual environments remains unconfirmed). Exfiltrate collected data as a gzip bundle via a POST request to port 8080 (some versions used Telegram for transmission, according to Endor Labs’ version analysis of v5), revert the commit, and delete the workflow run and logs.
3. 攻击流程
从探测到 CI 密钥窃取:使用被盗的 GitHub 凭据打开依赖审计风格的探测 PR 以验证写权限。通过工作流注入、postinstall 钩子或向现有 shell 脚本追加内容将更改推送到默认分支,或者向临时 chore/* 分支添加新工作流。通过 GitHub Actions 工作流或包 postinstall 钩子(在 CI 运行器或获取并安装代码的开发人员机器上)执行 wfx,以收集密钥、令牌、云凭据和 AI 密钥。使用 OIDC 或已收集的云密钥、客户端密钥或刷新令牌获取云会话,以尝试创建额外的密钥和联合凭据(在各个环境中是否成功创建尚待确认)。将收集到的数据作为 gzip 包通过 POST 请求发送到 8080 端口(根据 Endor Labs 对 v5 版本的分析,某些版本使用 Telegram 进行传输),撤销提交,并删除工作流运行和日志。
4. Attacker Position and Prerequisites
Attacker Position: A remote attacker holding GitHub credentials for developer or bot accounts with write access to target repositories. Success Conditions: The compromised account has write access to the repository. The workflow runs on a CI runner, or the postinstall hook runs on CI or a developer machine that installs the target code. The execution environment must have access to secrets. Requirements for gaining cloud access vary by path: the OIDC path requires token issuance permission (id-token: write) and satisfaction of the target service’s trust conditions, while paths using collected keys, client secrets, or refresh tokens require valid credentials with the necessary permissions. Persistence requires permissions to add keys or modify trust policies on the cloud side. Prevention and Failure Conditions: Use phishing-resistant MFA, token least privilege, branch protection, and trusted publishing (although these alone may not prevent pushes using stolen tokens or tampering with trusted workflows). Prohibit workflows from dumping all secrets and tighten OIDC trust conditions. Distinguish detection and alerting from controls that block execution. Require approval for adding cloud credentials and modifying trust policies (alerts alone will not stop the modifications themselves).
4. 攻击者位置与先决条件
攻击者位置: 持有对目标存储库具有写权限的开发人员或机器人账户 GitHub 凭据的远程攻击者。 成功条件: 被入侵的账户对存储库具有写权限。工作流在 CI 运行器上运行,或者 postinstall 钩子在 CI 或安装目标代码的开发人员机器上运行。执行环境必须能够访问密钥。获取云访问权限的要求因路径而异:OIDC 路径需要令牌颁发权限 (id-token: write) 并满足目标服务的信任条件,而使用已收集密钥、客户端密钥或刷新令牌的路径则需要具有必要权限的有效凭据。持久性需要云端添加密钥或修改信任策略的权限。 预防与失败条件: 使用防钓鱼 MFA、令牌最小权限原则、分支保护和可信发布(尽管这些措施本身可能无法阻止使用被盗令牌进行的推送或对受信任工作流的篡改)。禁止工作流转储所有密钥,并收紧 OIDC 信任条件。将检测和警报与阻止执行的控制措施区分开来。要求对添加云凭据和修改信任策略进行审批(仅靠警报无法阻止修改本身)。
5. Victim and Administrator Perspective
Victims: The activity looks like a normal dependency audit PR or maintenance commit, and payloads disappear quickly. Administrators: Visible indicators include probe PRs, default branch sandwich commits, missing workflow run numbers, JSON serialization of all secrets, and cloud trust modifications.
5. 受害者与管理员视角
受害者: 该活动看起来像正常的依赖审计 PR 或维护提交,且有效载荷会迅速消失。 管理员: 可见的指标包括探测 PR、默认分支“三明治”提交、缺失的工作流运行编号、所有密钥的 JSON 序列化以及云信任修改。
6. Confirmed Impact and Success Assessment
Initial Execution Confirmed: Default branch payloads, Actions execution, reverts, and run deletions were confirmed in public victim instances. (Scope: Campaign tracked by Endor Labs.) Information Theft or Session Compromise Confirmed: Credential exfiltration was reported from over 1,806 repositories. (Scope: Aikido’s survey aggregation cited by Endor Labs, not independently verified for all victims.) Attack Attempts Observed (Success Unconfirmed): Payload analysis identified AWS and Azure persistence logic. Whether persistence creation was executed in victim environments has not been confirmed, and individual success counts have not been disclosed. (Scope: Payload analysis.) Impact: Theft of repository and organization secrets and runtime tokens. Access to AWS, Azure, GCP, Vault, and Kubernetes using compromised credentials or tokens. Abuse of package registry and AI provider keys. Attempted creation of cloud persistence (individual success in creation unconfirmed).
6. 已确认的影响与成功评估
已确认的初始执行: 在公共受害者实例中确认了默认分支有效载荷、Actions 执行、撤销和运行删除。(范围:Endor Labs 追踪的活动。) 已确认的信息窃取或会话入侵: 据报告,从超过 1,806 个存储库中窃取了凭据。(范围:Endor Labs 引用的 Aikido 调查聚合数据,未对所有受害者进行独立验证。) 观察到的攻击尝试(成功与否未确认): 有效载荷分析识别出了 AWS 和 Azure 持久性逻辑。是否在受害者环境中执行了持久性创建尚未确认,且未披露具体的成功次数。(范围:有效载荷分析。) 影响: 存储库和组织密钥及运行时令牌被窃。使用被入侵的凭据或令牌访问 AWS、Azure、GCP、Vault 和 Kubernetes。滥用包注册表和 AI 提供商密钥。尝试创建云持久性(创建的个人成功情况未确认)。