ghtier

These write-ups are not threat intelligence and are not kept up to date as an incident develops. They are here to show how each attack worked, so you can find and fix the same techniques in your own setup. For the latest on an incident, read its sources.

← All incidents

CircleCI session-cookie theft

December 2022 – January 2023 · Contained

Malware on one engineer's laptop stole a logged-in session that reached CircleCI's production systems and the secrets customers kept there, including the GitHub OAuth tokens CircleCI held for them.

Access held
T0repoT1Deploy key with write access2FA-backed SSO sessionEnv vars, API and cloud keys
Full summary

Malware on a CircleCI engineer's laptop, missed by antivirus, stole a session cookie for the company's SSO. The session had already passed 2FA, so the attacker could act as that engineer from elsewhere. The engineer's normal job included generating production access tokens, and with those the attacker reached databases and stores holding customers' secrets: environment variables, API tokens, SSH and deploy keys, and the GitHub OAuth tokens CircleCI uses to read customers' repositories. The data was encrypted at rest, but the attacker took the encryption keys from a running process. A customer noticed suspicious use of their GitHub OAuth token a week later. CircleCI rotated every customer's GitHub OAuth token and told customers to rotate everything else they had stored in it, because it could not tell which secrets had been used.

How it unfolded

Pick a step to zoom into it. A dashed line is a step the sources do not state. Blue dots are the checklist items that break the step.

Whole path

Phished or hijacked accountway in2FA-backed SSO sessionA CircleCI engineerSteal a session and readsecrets from a CI vendortechniquerepoCircleCI's OAuth grantsDeploy key with write accessCustomers' projectsEnv vars, API and cloud keysCustomers' projectsClone private repos with astolen tokentechniqueRead or expose private code

The whole attack, one row per step. Pick a step on the left, or click a box in its row.

Frameworks

Part of

Contained. First seen December 2022, last seen January 2023. Mapping by ghtier, not yet reviewed. Threat landscape

Sources

Reported by: CircleCI incident report