AWS IAM Password Policy Recon by Rare User


Description

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.

Query · kuery

data_stream.dataset: "aws.cloudtrail"
    and event.provider: "iam.amazonaws.com"
    and event.action: "GetAccountPasswordPolicy"
    and event.outcome: "success"
    and source.ip: *
    and cloud.account.id: *
    and user.name: *
    and source.as.organization.name: (
        * and not (
            "Google LLC" or "Amazon.com, Inc." or "Microsoft Corporation" or "GOOGLE-CLOUD-PLATFORM"
            or "MICROSOFT-CORP-MSN-AS-BLOCK" or "AMAZON-AES" or "AMAZON-02"
        )
    )
    and not aws.cloudtrail.user_identity.invoked_by: ("config.amazonaws.com" or "trustedadvisor.amazonaws.com")

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • user.name
  • user_agent.original
  • source.ip
  • source.as.organization.name
  • aws.cloudtrail.user_identity.arn
  • aws.cloudtrail.user_identity.type
  • aws.cloudtrail.user_identity.access_key_id
  • event.action
  • event.outcome
  • event.provider
  • cloud.account.id
  • cloud.region

Known false positives

  • IAM, security, and compliance administrators, CSPM tooling, and landing-zone automation may read the account password policy legitimately. Interactive or one-off use from unusual principals, networks, or tooling warrants review.

Analyst notes

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

Raw source AWS IAM Password Policy Recon by Rare User · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/11/11"
integration = ["aws"]
maturity = "production"
updated_date = "2026/11/11"

[rule]
author = ["Elastic"]
description = """
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.
"""
false_positives = [
    """
    IAM, security, and compliance administrators, CSPM tooling, and landing-zone automation may read the account
    password policy legitimately. Interactive or one-off use from unusual principals, networks, or tooling warrants
    review.
    """,
]
from = "now-6m"
index = ["logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS IAM Password Policy Recon by Rare User"
note = """## 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](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.

### 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

- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks)**
"""
references = [
    "https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html",
    "https://www.atomicredteam.io/docs/atomics/T1201",
]
risk_score = 21
rule_id = "5b597628-d71c-43a4-8ad8-406d56014c73"
severity = "low"
tags = [
    "Domain: Cloud",
    "Data Source: AWS",
    "Data Source: Amazon Web Services",
    "Domain: Identity",
    "Platform: AWS",
    "Data Source: AWS CloudTrail",
    "Service: AWS IAM",
    "Tactic: Discovery",
    "Rule Type: New Terms",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "new_terms"

query = '''
data_stream.dataset: "aws.cloudtrail"
    and event.provider: "iam.amazonaws.com"
    and event.action: "GetAccountPasswordPolicy"
    and event.outcome: "success"
    and source.ip: *
    and cloud.account.id: *
    and user.name: *
    and source.as.organization.name: (
        * and not (
            "Google LLC" or "Amazon.com, Inc." or "Microsoft Corporation" or "GOOGLE-CLOUD-PLATFORM"
            or "MICROSOFT-CORP-MSN-AS-BLOCK" or "AMAZON-AES" or "AMAZON-02"
        )
    )
    and not aws.cloudtrail.user_identity.invoked_by: ("config.amazonaws.com" or "trustedadvisor.amazonaws.com")
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1201"
name = "Password Policy Discovery"
reference = "https://attack.mitre.org/techniques/T1201/"


[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user_agent.original",
    "source.ip",
    "source.as.organization.name",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "aws.cloudtrail.user_identity.access_key_id",
    "event.action",
    "event.outcome",
    "event.provider",
    "cloud.account.id",
    "cloud.region",
]

[rule.new_terms]
field = "new_terms_fields"
value = ["cloud.account.id", "user.name", "source.as.organization.name"]
[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-7d"


Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.