You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to pathfinding.cloud! This project aims to be the definitive source of truth for AWS IAM privilege escalation paths.
3
+
Thank you for your interest in contributing to pathfinding.cloud! This project aims to be a comprehensive source of AWS IAM privilege escalation paths.
4
4
5
5
## How to Contribute
6
6
@@ -9,7 +9,7 @@ Thank you for your interest in contributing to pathfinding.cloud! This project a
- Supports conditional branching for different outcomes
159
+
- See `data/example-001.yaml` for a complete example
212
160
213
-
### Example 1: Simple Self-Escalation
214
-
215
-
```yaml
216
-
id: "iam-001"
217
-
name: "iam:CreatePolicyVersion"
218
-
category: "self-escalation"
219
-
services:
220
-
- iam
221
-
222
-
permissions:
223
-
required:
224
-
- permission: "iam:CreatePolicyVersion"
225
-
resourceConstraints: "Policy must be attached to the actor"
226
-
additional:
227
-
- permission: "iam:ListPolicies"
228
-
resourceConstraints: "Helpful for discovering attached policies"
229
-
230
-
description: A principal with `iam:CreatePolicyVersion` can create a new version of an IAM policy that is already attached to them, granting themselves administrative privileges by setting the new version as default.
231
-
232
-
prerequisites:
233
-
- "Policy must already be attached to the actor's user, role, or group"
234
-
235
-
exploitationSteps:
236
-
awscli:
237
-
- step: 1
238
-
command: |
239
-
aws iam create-policy-version --policy-arn <policy-arn> --policy-document file://admin.json --set-as-default
240
-
description: "Create new policy version with admin permissions and set as default"
241
-
242
-
recommendation: |
243
-
Restrict iam:CreatePolicyVersion to only necessary principals.
244
-
Monitor usage with CloudTrail and CloudSIEM detections.
resourceConstraints: "Must be able to pass a privileged role to Lambda service"
275
-
- permission: "lambda:CreateFunction"
276
-
resourceConstraints: "Must be able to create Lambda functions"
277
-
- permission: "lambda:InvokeFunction"
278
-
resourceConstraints: "Must be able to invoke the created function"
279
-
additional:
280
-
- permission: "iam:ListRoles"
281
-
resourceConstraints: "Helpful for discovering available privileged roles"
282
-
- permission: "iam:GetRole"
283
-
resourceConstraints: "Useful for viewing role permissions and trust policies"
284
-
285
-
description: A principal with `iam:PassRole`, `lambda:CreateFunction`, and `lambda:InvokeFunction` can create a Lambda function with a privileged role and invoke it to execute code with elevated permissions.
286
-
287
-
prerequisites:
288
-
admin:
289
-
- "A role must exist that trusts lambda.amazonaws.com to assume it"
290
-
- "The role must have administrative permissions (e.g., AdministratorAccess or an equivalent custom policy)"
291
-
lateral:
292
-
- "A role must exist that trusts lambda.amazonaws.com to assume it"
293
-
- "The role can have any level of permissions for lateral movement"
294
-
295
-
exploitationSteps:
296
-
awscli:
297
-
- step: 1
298
-
command: |
299
-
aws lambda create-function \
300
-
--function-name exploit \
301
-
--runtime python3.9 \
302
-
--role arn:aws:iam::123456789012:role/PrivRole \
303
-
--handler index.handler \
304
-
--zip-file fileb://code.zip
305
-
description: "Create Lambda function with privileged role"
0 commit comments