Skip to content

Commit 966b9d7

Browse files
authored
Merge pull request #174 from TheToddLuci0/add_lambda_credential_theft
Add section on lambda credential theft
2 parents 0b61708 + 786640b commit 966b9d7

File tree

1 file changed

+6
-0
lines changed
  • src/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation

1 file changed

+6
-0
lines changed

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ For more information check:
1010
../../aws-services/aws-lambda-enum.md
1111
{{#endref}}
1212

13+
### Exfilrtate Lambda Credentials
14+
15+
Lambda uses environment variables to inject credentials at runtime. If you can get access to them (by reading `/proc/self/environ` or using the vulnerable function itself), you can use them yourself. They live in the default variable names `AWS_SESSION_TOKEN`, `AWS_SECRET_ACCESS_KEY`, and `AWS_ACCESS_KEY_ID`.
16+
17+
By default, these will have access to write to a cloudwatch log group (the name of which is stored in `AWS_LAMBDA_LOG_GROUP_NAME`), as well as to create arbitrary log groups, however lambda functions frequently have more permissions assigned based on their intended use.
18+
1319
### Steal Others Lambda URL Requests
1420

1521
If an attacker somehow manage to get RCE inside a Lambda he will be able to steal other users HTTP requests to the lambda. If the requests contain sensitive information (cookies, credentials...) he will be able to steal them.

0 commit comments

Comments
 (0)