-
Notifications
You must be signed in to change notification settings - Fork 522
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
[New Rule] AWS GetCallerIdentity API Called for the First Time #3711
Merged
imays11
merged 6 commits into
main
from
new-rule-AWS-GetCallerIdentity-API-Called-By-User-for-the-First-Time
May 31, 2024
Merged
[New Rule] AWS GetCallerIdentity API Called for the First Time #3711
imays11
merged 6 commits into
main
from
new-rule-AWS-GetCallerIdentity-API-Called-By-User-for-the-First-Time
May 31, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aegrah
approved these changes
May 27, 2024
rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml
Outdated
Show resolved
Hide resolved
terrancedejesus
approved these changes
May 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions for this rule. Once fixed, LGTM!
…-User-for-the-First-Time
imays11
commented
May 30, 2024
rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml
Outdated
Show resolved
Hide resolved
name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
…-User-for-the-First-Time
imays11
commented
May 30, 2024
rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml
Outdated
Show resolved
Hide resolved
…ty.toml fixed missing closing quotes
…-User-for-the-First-Time
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
protectionsmachine
pushed a commit
that referenced
this pull request
May 31, 2024
* [New Rule] AWS GetCallerIdentity API Called for the First Time issue * Apply suggestions from code review name change, false positive additions, remove Setup, change new_terms window from 15d to 10d Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> * Update rules/integrations/aws/discovery_new_terms_sts_getcalleridentity.toml fixed missing closing quotes --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> (cherry picked from commit 23ce41d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
Summary
Identifies the use of
sts:GetCallerIdentity
API function. This is equivalent towhoami
in linux and provides the caller with the user identity information for the set of credentials being used. A legitimate user would likely not need to make this call as they know who they are, and this is especially suspicious behavior coming from a service like Lambda or an EC2 instance role.GetCallerIdentity
does not require any permissions as it returns the same information even when explicit deny policies are in place that deny access to the API. For this reason I've decided not to includeevent.outcome: success
as part of the query.This is a new_terms rule as some operations may need to call the GetCallerIdentity function as part of their authorization process. For example, an AWS EKS token, the authentication token used when communicating with the Kubernetes API server, includes a pre-signed AWS API request for
sts:GetCallerIdentity
which allows the aws-iam-authenticator to determine the AWS Identity and attached permissions for each request.Contributor checklist