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

[sync] Add detection of iam.serviceAccountKeys.create event (#53) #1074

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

egibs
Copy link
Contributor

@egibs egibs commented Jan 30, 2024

Goal

Detect iam.serviceAccountKeys.create method for privilege escalation in GCP.

Categorization
TA0004:T1548

Strategy Abstract

The Identity and Access Management (IAM) service manages authorization and authentication for a GCP environment. This means that there are very likely multiple privilege escalation methods that use the IAM service and/or its permissions.

Technical Context

If your user is assigned a custom IAM role, then iam.roles.update will allow you to update the “includedPermissons” on that role. Because it is assigned to you, you will gain the additional privileges, which could be anything you desire.

Blind Spots and Assumptions

Assumes proper GCP logging and audit policies.

False Positives

Legitimate administrative activity that is authorized and expected.

Validation

The exploit script for this method can be found here.

Priority

High or Critical

Response

Again, these are not vulnerabilities in GCP, they are vulnerabilities in how you have configured your GCP environment, so it is your responsibility to be aware of these attack vectors and to defend against them. Make sure to follow the principle of least-privilege in your environments to help mitigate these security risks.

Additional Resources

https://rhinosecuritylabs.com/gcp/privilege-escalation-google-cloud-platform-part-1/

@egibs egibs requested review from a team January 30, 2024 18:53
@egibs egibs merged commit bbb3b2b into main Jan 30, 2024
5 checks passed
@egibs egibs deleted the egibs-sync-53 branch January 30, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants