Poisoned Pipeline / Incidents / AS388

AS388 · 2023-08

Moq 4.20 added SponsorLink, which read git emails and phoned home

NuGet

Moq, a .NET mocking library with more than 475 million downloads, shipped
4.20.0 and 4.20.1 on 8 August 2023 with a new sub-dependency:
Devlooped.SponsorLink. It arrived as a closed-source compiled DLL with
obfuscated code that ran during the build, read the local git configuration,
hashed the developer's email address and sent it to a cloud service. The
library also fetched settings from cdn.devlooped.com and behaved differently
when it detected Travis, TeamCity, AppVeyor or Jenkins environment variables.
There was no way for a consumer to disable it, and the maintainer removed it
after the backlash.

Mapped techniques

supply-chain Moq 4.20 added SponsorLink, which read git emails and phoned

T0193 · Collection · Sensitive information in environment variables

CI environment variables were checked to decide whether to stay quiet.

T0184 · Credential Access · Harvesting sensitive information from files

The git config was read for the developer email.

T0156 · Exfiltration · Exfiltration over webhooks

Hashed identifiers were posted to the vendor's cloud endpoint.

Sources