字号·· | 护眼
theregister

LiteLLM供应链攻击始于一个泄露的主密钥LiteLLM supply chain attack started with an exposed master key

点「原文对照」整页切到原文,或双击某段只看那段的原文。

LiteLLM 将上周的供应链攻击追溯至其在五月误将一把主密钥提交到公开 GitHub 仓库。云端和 AI 模型密钥窃取部分事件始于上周三,有人将广受欢迎的开源 AI 网关的一个被污染版本(1.107.0)上传到 PyPI 及其容器镜像仓库。这个被攻破的版本包含一个信息窃取程序和一个远程访问木马,能够在受感染机器上执行任意代码。

LiteLLM has traced last week’s supply chain attack to a master key it accidentally committed to a public GitHub repository in May. The cloud and AI model secret-stealing part of the incident began when someone uploaded a poisoned version (1.107.0) of the popular open source AI gateway to PyPI and its container registries last Wednesday. This compromised version contained an infostealer and a remote access trojan capable of executing arbitrary code on infected machines.

据 Wiz 报道,虽然被植入木马的软件包在 PyPI 上仅存在不到两小时便被隔离,但在此期间获得了约 49,000 次下载。周五,LiteLLM 详细披露了被攻破版本背后的攻击链,并将其追溯至 5 月 27 日,当时一份包含主密钥的配置文件被提交到公开的 LiteLLM-Labs/lite-harness 仓库。该密钥属于 LiteLLM 内部用于编排 AI 代理的一个开源工具。

While the trojanized package was available on PyPI for less than two hours before being quarantined, it received about 49,000 downloads during that time, according to Wiz. On Friday, LiteLLM detailed the attack chain behind the compromised release and traced it back to May 27, when a configuration file containing a master key was committed to the public LiteLLM-Labs/lite-harness repository. The key belonged to an open source tool used internally by LiteLLM to orchestrate AI agents.

该项目的开发者很快发现了错误并移除了暴露的提交,但未撤销该主密钥。据周五的事后分析报告称:“10 月 10 日,威胁行为者使用该密钥进入了我们的 LiteLLM Agent 平台,并提取了这个 GitHub CLI OAuth 令牌。”“从这一点开始,威胁行为者拥有我们 GitHub 上所有仓库的所有者级访问权限。”这尤其严重,因为 GitHub CLI 令牌是“二次验证后”的,意味着它们不会触发执行高影响仓库操作通常所需的 GitHub sudo 模式身份验证流程。

The project's developers quickly spotted the error and removed the exposed commit, but failed to revoke the master key. “On October 10th, the threat actor used this key to gain access to our LiteLLM Agent Platform and extracted this GitHub CLI OAuth token,” according to Friday’s postmortem. “From this point onwards, the threat actor had owner-level access to all repositories in our GitHub.”This is especially serious because GitHub CLI tokens are “post-2fa,” meaning that they don’t trigger GitHub's sudo mode authentication flows typically required to perform high-impact repository actions.

该令牌允许攻击者在其他内部仓库的分支上提交恶意提交,包括旨在窃取持续集成开发过程中配置为可用的任何令牌和密钥的工作流程。这使他们能够窃取与拥有维护者权限的两名工程师关联的其他 GitHub CLI OAuth 令牌。此外,据称他们还获取了几个其他内部系统的令牌。

The token allowed the attacker to author malicious commits into branches on other internal repos - including workflows designed to steal any tokens and secrets configured to be available during the continuous integration development process. And this allowed them to steal other GitHub CLI OAuth tokens linked to two engineers with maintainer privileges. Plus, they acquired tokens for several other internal systems, we’re told.

LiteLLM指出:“审查该行为者在这些其他系统上的活动可以发现,其试图识别并窃取更多密钥和令牌,主要目标是上游推理API令牌。”在窃取了多个特权身份后,该恶意行为者可以在不引起任何怀疑的情况下对GitHub仓库进行更改,因为这些操作和审批看起来都来自合法的、持有凭证的工程师。作为回应,LiteLLM的开发者正在撤销与每个内部系统和供应商平台相关的所有令牌。

“Reviewing the actor's activity on these other systems shows attempts to identify and exfiltrate additional keys and tokens, with a primary focus on upstream inference API tokens,” LiteLLM noted. Having now stolen several privileged identities, the miscreant could make changes to GitHub repositories without raising any suspicion because the actions and approvals all appeared to come from legitimate, credentialed engineers. In response, LiteLLM’s developers are revoking every token associated with every internal system and vendor platform.

他们写道:“这起事件有力地说明了未能轮换可能已泄露密钥所带来的风险。”隐藏在受感染软件包中的信息窃取程序旨在大量收集敏感信息,包括来自Chrome、Firefox、Edge和Safari的浏览器凭据和Cookie,以及AWS凭据、Google Cloud Platform服务账户密钥和应用默认凭据,还有Microsoft Azure令牌。它还窃取了OpenAI、Anthropic、Cohere及其他LLM提供商的API密钥。

“This incident has provided a strong illustration of the risks associated with failing to rotate a potentially exposed key,” they wrote. The infostealers hidden inside the compromised package were designed to hoover up a ton of sensitive information, including browser credentials and cookies from Chrome, Firefox, Edge, and Safari, along with AWS credentials, Google Cloud Platform service account keys and application default credentials, and Microsoft Azure tokens. It also swiped API keys for OpenAI, Anthropic, Cohere, and other LLM providers.

因此,如果你安装并运行了1.107.0版本,请假定受影响系统可访问的任何凭据都可能已被窃取。调查受影响的系统,更改密码,并轮换已泄露的密钥。向供应链的守护圣人快速祈祷一下也无妨。®

So if you installed and ran version 1.107.0, assume any credentials accessible to the affected system may have been stolen. Investigate affected systems, change passwords, and rotate exposed keys. A quick prayer to the patron saint of supply chains wouldn't hurt, either. ®

阅读媒体原文 ↗