Skip to content

Commit 786640b

Browse files
committed
Add a dedicated post-exploitation section on stealing creds from lambda
1 parent 933055c commit 786640b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • src/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation

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)