Skip to content

Commit a08b69f

Browse files
committed
f
1 parent 8c1b114 commit a08b69f

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ec2-privesc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ aws ec2 modify-launch-template \
198198

199199
**Potential Impact:** Direct privesc to a different EC2 role.
200200

201-
### `autoscaling:CreateLaunchConfiguration`, `autoscaling:CreateAutoScalingGroup`, `iam:PassRole`
201+
### (`autoscaling:CreateLaunchConfiguration` | `ec2:CreateLaunchTemplate`), `iam:PassRole`, (`autoscaling:CreateAutoScalingGroup` | `autoscaling:UpdateAutoScalingGroup`)
202202

203203
An attacker with the permissions **`autoscaling:CreateLaunchConfiguration`,`autoscaling:CreateAutoScalingGroup`,`iam:PassRole`** can **create a Launch Configuration** with an **IAM Role** and a **rev shell** inside the **user data**, then **create an autoscaling group** from that config and wait for the rev shell to **steal the IAM Role**.
204204

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecs-privesc.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ Check in the **ec2 privesc page** how you can abuse these permissions to **prive
247247
aws-ec2-privesc.md
248248
{{#endref}}
249249

250-
### `?ecs:RegisterContainerInstance`
250+
### `ecs:RegisterContainerInstance`, `ecs:DeregisterContainerInstance`, `ecs:StartTask`, `iam:PassRole`
251+
252+
An attacker with these permissions could potentially register an EC2 instance in an ECS cluster and run tasks on it. This could allow the attacker to execute arbitrary code within the context of the ECS tasks.
253+
254+
- TODO: Is it possible to register an instance from a different AWS account so tasks are run under machines controlled by the attacker??
251255

252-
TODO: Is it possible to register an instance from a different AWS account so tasks are run under machines controlled by the attacker??
253256

254257
### `ecs:CreateTaskSet`, `ecs:UpdateServicePrimaryTaskSet`, `ecs:DescribeTaskSets`
255258

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-iam-privesc.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ aws iam get-open-id-connect-provider --open-id-connect-provider-arn <ARN>
266266
aws iam update-open-id-connect-provider-thumbprint --open-id-connect-provider-arn <ARN> --thumbprint-list 359755EXAMPLEabc3060bce3EXAMPLEec4542a3
267267
```
268268

269+
### `iam:PutUserPermissionsBoundary`
270+
271+
This permissions allows an attacker to update the permissions boundary of a user, potentially escalating their privileges by allowing them to perform actions that are normally restricted by their existing permissions.
272+
269273
## References
270274

271275
- [https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/](https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/)

0 commit comments

Comments
 (0)