Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not necessarily a security vulnerability per se, but I was able to fill up the AWS account with CloudWatch log groups by doing the following:

1. "env | grep AWS" 2. Export those creds locally where you have the CLI installed. They'll work for at least 15-30 minutes depending on the IAM config. 3. Run "aws sts get-caller-identity" to see the role info.

This prints:

123260633446 arn:aws:sts::123260633446:assumed-role/lambda_basic_execution/exec

Which seems to imply it has the default Lambda basic execution policy. That policy has the permission "logs:CreateLogGroup" which means you can then run:

aws logs create-log-group --log-group-name <random name>

Repeat x5000 and hit the AWS limit for log groups in an account. This isn't necessarily a security risk in and of itself, but it could cause issues if anything else were running in the account that needs logs, or could prevent new services from spinning up.



Using STS GetSessionToken with this method you can log into the console with the Lambda basic execution role: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_pr...

https://imgur.com/a/psajfhw

It's mostly useless of course.


Yeah, my train of thought was that the OP had tied some additional privileges to the role, but unfortunately it seems to just be the bare minimum.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: