Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS_IAM_003 false negative #77

Open
piaverous opened this issue Feb 27, 2023 · 0 comments
Open

AWS_IAM_003 false negative #77

piaverous opened this issue Feb 27, 2023 · 0 comments

Comments

@piaverous
Copy link
Contributor

The plugin says users can elevate rights, because it assumes that the permission iam:CreateAccessKey is enough to elevate rights.

However, this permission only allows for privilege escalation if its scope is not restricted to the users' access keys. For example, the following IAM policy does not allow for privilege escalation :

{
    "Statement": [
        {
            "Action": [
                "iam:GetAccountPasswordPolicy",
                "iam:GetAccountSummary"
            ],
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Action": [
                "iam:CreateAccessKey",
                "iam:DeleteAccessKey",
                "iam:ListAccessKeys",
                "iam:UpdateAccessKey"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:iam::*:user/${aws:username}"
        }
    ],
    "Version": "2012-10-17"
}

Should we improve this check to be more precise ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant