AWS IAM Password Policy Recon by Rare User

Identifies the first time, within a lookback window, an identity retrieves the AWS account password policy via the IAM "GetAccountPasswordPolicy" API. Adversaries with compromised credentials enumerate the password policy to understand credential requirements and plan password spraying, brute force, or new-access-key persistence. This is a New Terms rule detecting a rare occurrence of the "cloud.account.id", "user.name", and "source.as.organization.name" tuple for this action.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2026/11/11"
  3integration = ["aws"]
  4maturity = "production"
  5updated_date = "2026/11/11"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies the first time, within a lookback window, an identity retrieves the AWS account password policy via the IAM
 11"GetAccountPasswordPolicy" API. Adversaries with compromised credentials enumerate the password policy to understand
 12credential requirements and plan password spraying, brute force, or new-access-key persistence. This is a New Terms rule
 13detecting a rare occurrence of the "cloud.account.id", "user.name", and "source.as.organization.name" tuple for this
 14action.
 15"""
 16false_positives = [
 17    """
 18    IAM, security, and compliance administrators, CSPM tooling, and landing-zone automation may read the account
 19    password policy legitimately. Interactive or one-off use from unusual principals, networks, or tooling warrants
 20    review.
 21    """,
 22]
 23from = "now-6m"
 24index = ["logs-aws.cloudtrail-*"]
 25language = "kuery"
 26license = "Elastic License v2"
 27name = "AWS IAM Password Policy Recon by Rare User"
 28note = """## Triage and analysis
 29
 30> **Disclaimer**:
 31> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
 32
 33### Investigating AWS IAM Password Policy Recon by Rare User
 34
 35The IAM `GetAccountPasswordPolicy` API returns the account-wide password policy (minimum length, complexity, rotation, reuse). Threat actors and tools such as Pacu read this policy after credential access to tailor password spraying and brute force against IAM users, or to validate that newly created credentials will persist.
 36
 37This rule uses [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) to detect when an identity reads the password policy from an account, principal, and network-origin combination not seen in the configured history window.
 38
 39### Possible investigation steps
 40
 41- Confirm who `user.name` and `aws.cloudtrail.user_identity.arn` represent (human, workload role, automation) and whether policy reads are expected for that principal.
 42- Review `source.ip`, `source.as.organization.name`, and geolocation, and whether the call aligns with normal egress for that principal.
 43- Inspect `user_agent.original` for AWS CLI, Boto3/Botocore, consoles, or unfamiliar offensive tooling.
 44- Correlate with STS (`GetCallerIdentity`, `AssumeRole`), IAM enumeration, and follow-on `CreateAccessKey`, `CreateLoginProfile`, or `ConsoleLogin` activity in the same session.
 45
 46### False positive analysis
 47
 48- Documented IAM/security admin or compliance roles reading the policy on a schedule; add exceptions by ARN if needed.
 49- CSPM or posture-management platforms that enumerate the password policy during assessments.
 50
 51### Response and remediation
 52
 53- If unexpected, rotate credentials for the implicated principal, review CloudTrail for follow-on IAM and authentication activity, and tighten least privilege on IAM read APIs where appropriate.
 54
 55### Additional information
 56
 57- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks)**
 58"""
 59references = [
 60    "https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html",
 61    "https://www.atomicredteam.io/docs/atomics/T1201",
 62]
 63risk_score = 21
 64rule_id = "5b597628-d71c-43a4-8ad8-406d56014c73"
 65severity = "low"
 66tags = [
 67    "Domain: Cloud",
 68    "Data Source: AWS",
 69    "Data Source: Amazon Web Services",
 70    "Domain: Identity",
 71    "Platform: AWS",
 72    "Data Source: AWS CloudTrail",
 73    "Service: AWS IAM",
 74    "Tactic: Discovery",
 75    "Rule Type: New Terms",
 76    "Resources: Investigation Guide",
 77]
 78timestamp_override = "event.ingested"
 79type = "new_terms"
 80
 81query = '''
 82data_stream.dataset: "aws.cloudtrail"
 83    and event.provider: "iam.amazonaws.com"
 84    and event.action: "GetAccountPasswordPolicy"
 85    and event.outcome: "success"
 86    and source.ip: *
 87    and cloud.account.id: *
 88    and user.name: *
 89    and source.as.organization.name: (
 90        * and not (
 91            "Google LLC" or "Amazon.com, Inc." or "Microsoft Corporation" or "GOOGLE-CLOUD-PLATFORM"
 92            or "MICROSOFT-CORP-MSN-AS-BLOCK" or "AMAZON-AES" or "AMAZON-02"
 93        )
 94    )
 95    and not aws.cloudtrail.user_identity.invoked_by: ("config.amazonaws.com" or "trustedadvisor.amazonaws.com")
 96'''
 97
 98
 99[[rule.threat]]
100framework = "MITRE ATT&CK"
101[[rule.threat.technique]]
102id = "T1201"
103name = "Password Policy Discovery"
104reference = "https://attack.mitre.org/techniques/T1201/"
105
106
107[rule.threat.tactic]
108id = "TA0007"
109name = "Discovery"
110reference = "https://attack.mitre.org/tactics/TA0007/"
111
112[rule.investigation_fields]
113field_names = [
114    "@timestamp",
115    "user.name",
116    "user_agent.original",
117    "source.ip",
118    "source.as.organization.name",
119    "aws.cloudtrail.user_identity.arn",
120    "aws.cloudtrail.user_identity.type",
121    "aws.cloudtrail.user_identity.access_key_id",
122    "event.action",
123    "event.outcome",
124    "event.provider",
125    "cloud.account.id",
126    "cloud.region",
127]
128
129[rule.new_terms]
130field = "new_terms_fields"
131value = ["cloud.account.id", "user.name", "source.as.organization.name"]
132[[rule.new_terms.history_window_start]]
133field = "history_window_start"
134value = "now-7d"

Triage and analysis

Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

Investigating AWS IAM Password Policy Recon by Rare User

The IAM GetAccountPasswordPolicy API returns the account-wide password policy (minimum length, complexity, rotation, reuse). Threat actors and tools such as Pacu read this policy after credential access to tailor password spraying and brute force against IAM users, or to validate that newly created credentials will persist.

This rule uses New Terms to detect when an identity reads the password policy from an account, principal, and network-origin combination not seen in the configured history window.

Possible investigation steps

  • Confirm who user.name and aws.cloudtrail.user_identity.arn represent (human, workload role, automation) and whether policy reads are expected for that principal.
  • Review source.ip, source.as.organization.name, and geolocation, and whether the call aligns with normal egress for that principal.
  • Inspect user_agent.original for AWS CLI, Boto3/Botocore, consoles, or unfamiliar offensive tooling.
  • Correlate with STS (GetCallerIdentity, AssumeRole), IAM enumeration, and follow-on CreateAccessKey, CreateLoginProfile, or ConsoleLogin activity in the same session.

False positive analysis

  • Documented IAM/security admin or compliance roles reading the policy on a schedule; add exceptions by ARN if needed.
  • CSPM or posture-management platforms that enumerate the password policy during assessments.

Response and remediation

  • If unexpected, rotate credentials for the implicated principal, review CloudTrail for follow-on IAM and authentication activity, and tighten least privilege on IAM read APIs where appropriate.

Additional information

References

Related rules

to-top