Detection rules › Panther

AWS Password Policy Password Reuse

Severity
medium
Compliance
CIS 1.1; PCI 8.2.5
Tags
AWS, Identity & Access Management, Credential Access:Brute Force
Reference
https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
Source
github.com/panther-labs/panther-analysis

This policy validates that the account password policy prevents users from re-using previous passwords, and prevents password reuse for 24 or more prior passwords.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1110 Brute Force

Rule body yaml

AnalysisType: policy
Filename: aws_password_policy_password_reuse.py
PolicyID: "AWS.PasswordPolicy.PasswordReuse"
DisplayName: "AWS Password Policy Password Reuse"
Enabled: true
ResourceTypes:
  - AWS.PasswordPolicy
Tags:
  - AWS
  - Identity & Access Management
  - Credential Access:Brute Force
Reports:
  CIS:
    - 1.10
  PCI:
    - 8.2.5
  MITRE ATT&CK:
    - TA0006:T1110
Severity: Medium
Description: >
  This policy validates that the account password policy prevents users from re-using previous
  passwords, and prevents password reuse for 24 or more prior passwords.
Runbook: >
  https://docs.runpanther.io/alert-runbooks/built-in-policies/aws-account-password-policy-prevents-password-reuse
Reference: >
  https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
Tests:
  - Name: Insufficient Password Reuse Prevention Enabled
    ExpectedResult: false
    Resource:
      {
        "AllowUsersToChangePassword": false,
        "AnyExist": true,
        "ExpirePasswords": true,
        "HardExpiry": false,
        "MaxPasswordAge": 90,
        "MinimumPasswordLength": 14,
        "PasswordReusePrevention": 3,
        "RequireLowercaseCharacters": true,
        "RequireNumbers": true,
        "RequireSymbols": true,
        "RequireUppercaseCharacters": true,
      }
  - Name: No Password Reuse Prevention Enabled
    ExpectedResult: false
    Resource:
      {
        "AllowUsersToChangePassword": false,
        "AnyExist": true,
        "ExpirePasswords": true,
        "HardExpiry": false,
        "MaxPasswordAge": 90,
        "MinimumPasswordLength": 14,
        "PasswordReusePrevention": null,
        "RequireLowercaseCharacters": true,
        "RequireNumbers": true,
        "RequireSymbols": true,
        "RequireUppercaseCharacters": true,
      }
  - Name: Sufficient Password Reuse Prevention Enabled
    ExpectedResult: true
    Resource:
      {
        "AllowUsersToChangePassword": false,
        "AnyExist": true,
        "ExpirePasswords": true,
        "HardExpiry": false,
        "MaxPasswordAge": 90,
        "MinimumPasswordLength": 14,
        "PasswordReusePrevention": 24,
        "RequireLowercaseCharacters": true,
        "RequireNumbers": true,
        "RequireSymbols": true,
        "RequireUppercaseCharacters": true,
      }

Detection logic

Condition

not (PasswordReusePrevention is_not_null and PasswordReusePrevention ge "24")

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
PasswordReusePreventionge24
PasswordReusePreventionis_not_null(no value, null check)