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

Dependabot impersonation

July 2023 · Contained

With developers' stolen personal access tokens, an automated script pushed commits made to look like Dependabot's to hundreds of repositories, adding a workflow that sent the repository's secrets out and a password stealer to every JavaScript file.

Access held
T0repoT1workflowRepository Actions secrets
Full summary

Between 8 and 11 July 2023 hundreds of public and private GitHub repositories received commits that looked like Dependabot's. They were not: the attacker had developers' personal access tokens and wrote the author name themselves, which git allows. Each commit added a workflow, hook.yml, that ran on push and sent the repository's secrets to an outside server, and appended code to every .js file that captured passwords typed into web forms. Checkmarx confirmed with victims that their tokens had been stolen, and believes they were taken by a malicious package on the developer's machine, but says it cannot know. A token does not need 2FA, and at the time only enterprise accounts could see in the audit log what a personal access token had done.

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

Leaked tokenway inrepoDevelopers' PATsworkflowThe same tokensPush directly, withoutreviewtechniqueChange a workflow, get itssecretsescalationRepository Actions secretsEach repo's workflows

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 July 2023. Mapping by ghtier, not yet reviewed. Threat landscape

Sources

Reported by: Checkmarx noted that PAT activity logging was only visible to enterprise accounts at the time