Closed adanalvarez closed 9 months ago
Thanks for the contribution! Will review it later today
Added a few tweaks in 861e1ed, but looks great overall! Will get it merged and trigger a new release
Now released as part of v2.13.0, thanks for the great contribution!
What does this PR do?
Motivation
I saw that this was an open issue: https://github.com/DataDog/stratus-red-team/issues/59
From the 2023 Global Cloud Threat Report from Sysdig: "The attacker leveraged an API called SendSSHPublicKey to gain access to EC2 instances as seen in the image below. Using this API, the attacker pushed an attacker‑supplied Secure Shell (SSH) public key to the specified EC2 instances, which then allowed anyone with the corresponding private key to connect directly to the systems via SSH. Once in, an attacker could take control of the machines and move on to the next step of their operation."
This attack technique creates 3 EC2 instances (this can be changed easily as there is a variable instance_count) and its VPC in the warmup. In the attack phase, it adds a public SSH key to each instance (it lasts for 60s).
Checklist