AWS IAM Password Policy Recon by Rare User

edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

AWS IAM Password Policy Recon by Rare User

edit

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.

Rule type: new_terms

Rule indices:

  • logs-aws.cloudtrail-*

Severity: low

Risk score: 21

Runs every: 5m

Searches indices from: now-6m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

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

Version: 1

Rule authors:

  • Elastic

Rule license: Elastic License v2

Investigation guide

edit

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

Rule query

edit
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")

Framework: MITRE ATT&CKTM