What happened
The GitLab and AWS cryptomining intrusion / Permiso published its investigation in June 2022.
- 1
A GitLab flaw exposes an AWS key
Before AWS accessThe GitLab compromise exposed an AWS key with administrator-level permissions.
- 2
The original key lists buckets
First AWS requestPermiso saw the exposed key list S3 buckets from a public address in Indonesia.
- 3
IAM issues a second key
After the first listingThe intruder created a second IAM user with its own key. Both keys were used to enumerate S3 buckets, and the new user accessed the AWS console.
- 4
EC2 launches span five regions
Launches began about 31 minutes laterResource limits stopped some attempts. The intruder launched 13 EC2 instances for cryptomining in five regions.
Impact
The intruder launched 13 Amazon EC2 instances across five regions for cryptomining.
Could this have been prevented?
Block the second key and revoke the first
If your users and workloads can use temporary credentials, an AWS Organizations service control policy can block new IAM user keys in covered member accounts. It would refuse the second key there. The exposed key still needed to be deactivated.
Incident control assessments
- 1
- Prevented
- 2
- Contained
- 1
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
The GitLab and AWS cryptomining intrusion / Permiso published its investigation in June 2022.
1 · A GitLab flaw exposes an AWS key
1 Not covered2 · The original key lists buckets
1 Contained3 · IAM issues a second key
1 Prevented4 · EC2 launches span five regions
1 ContainedKey facts
- The first recorded AWS request listed S3 buckets from a public address in Indonesia.
- The intruder used both the original key and a newly issued key to enumerate S3 buckets.
- Resource limits stopped some EC2 launches. Thirteen instances launched across five regions.
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Anatomy of an Attack: Exposed keys to Crypto MiningPermiso · Jun 20, 2022 · ResearchGitLab compromise, bucket listing, new identity, regional compute use and elapsed time
- 2.Action needed by self-managed customers in response to CVE-2021-22205GitLab · Nov 4, 2021 · AdvisoryGitLab security updates and advice to self-managed operators
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.