AWS STS GetCallerIdentity Bulk Account Enumeration

Last updated a day ago on 2026-11-02
Created a day ago on 2026-11-02

About

Identifies three or more distinct AWS principals calling STS "GetCallerIdentity" from the same source IP and autonomous system within a 10-minute window. "GetCallerIdentity" returns the account and identity behind a credential and requires no permissions, so a burst of different non-role identities from one external address is a common credential-validation and account-enumeration step. Assumed roles, Vault OIDC users, and calls from major cloud and carrier networks are excluded.
Tags
Domain: CloudData Source: AWSData Source: Amazon Web ServicesData Source: AWS CloudTrailPlatform: AWSService: AWS STSUse Case: Threat DetectionTactic: DiscoveryRule Type: ES|QLLanguage: esql
Severity
high
Risk Score
73
MITRE ATT&CK™

Discovery (TA0007)(external, opens in a new tab or window)

False Positive Examples
A corporate NAT, jump host, or CI runner that is not in the excluded ASN list can send `GetCallerIdentity` for several IAM users from one IP. Confirm the source IP, user agent, and user list against approved automation before treating the activity as malicious.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

aws(external, opens in a new tab or window)

Query
text code block:
from logs-aws.cloudtrail-* | where KQL("""data_stream.dataset: "aws.cloudtrail" and event.provider: "sts.amazonaws.com" and event.action: "GetCallerIdentity" and event.outcome: "success" and not aws.cloudtrail.user_identity.type: "AssumedRole" and source.as.organization.name: * and not user.name: vault-oidc-*""") and source.ip is not null and not source.as.organization.name in ( "Amazon.com, Inc.", "AMAZON-02", "AMAZON-AES", "Google LLC", "Microsoft Corporation", "Verizon Business", "AT&T Enterprises, LLC" ) | stats Esql.aws_cloudtrail_user_identity_arn_count_distinct = count_distinct(aws.cloudtrail.user_identity.arn), Esql.user_name_count_distinct = count_distinct(user.name), Esql.user_name_values = values(user.name), Esql.user_agent_original_values = values(user_agent.original), Esql.aws_cloudtrail_user_identity_arn_values = values(aws.cloudtrail.user_identity.arn) by source.ip, source.as.organization.name | where Esql.user_name_count_distinct >= 3 | keep Esql.user_name_count_distinct, Esql.aws_cloudtrail_user_identity_arn_count_distinct, source.ip, source.as.organization.name, Esql.user_name_values, Esql.user_agent_original_values, Esql.aws_cloudtrail_user_identity_arn_values

Install detection rules in Elastic Security

Detect AWS STS GetCallerIdentity Bulk Account Enumeration in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).