-
Notifications
You must be signed in to change notification settings - Fork 671
[New Rule] AWS IAM Account Password Policy Deleted #6302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bddc9cc
[New Rule] AWS IAM Account Password Policy Deleted
bryans3c a313668
Update defense_evasion_iam_account_password_policy_deleted.toml
bryans3c d67bb45
Potential fix for pull request finding
bryans3c 3d3f77e
Potential fix for pull request finding
bryans3c 2d5d721
Apply suggestions from code review
bryans3c e1e7f11
Update defense_evasion_iam_account_password_policy_deleted.toml
bryans3c 88cecec
Merge branch 'main' into rule/aws-iam-password-policy-deleted
bryans3c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
113 changes: 113 additions & 0 deletions
113
rules/integrations/aws/defense_evasion_iam_account_password_policy_deleted.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| [metadata] | ||
| creation_date = "2026/06/18" | ||
| integration = ["aws"] | ||
| maturity = "production" | ||
| updated_date = "2026/06/18" | ||
|
|
||
| [rule] | ||
| author = ["Elastic"] | ||
| description = """ | ||
| Identifies deletion of the AWS account password policy via DeleteAccountPasswordPolicy. The account password policy | ||
| enforces minimum password requirements (length, complexity, rotation, and reuse) for all IAM users in the account. | ||
| Deleting it removes those requirements account-wide, weakening authentication and easing follow-on credential-based | ||
| attacks. This is an account-level change that legitimately occurs only during deliberate administration, so its deletion | ||
| by an unexpected principal warrants review. | ||
| """ | ||
| false_positives = [ | ||
| """ | ||
| Identity and platform teams or infrastructure-as-code may delete or replace the account password policy during | ||
| governance changes. Verify the principal in `aws.cloudtrail.user_identity.arn` against approved change records, and | ||
| confirm whether a replacement policy was applied shortly after. Known administration roles and automation can be | ||
| excluded after validation. | ||
| """, | ||
| ] | ||
| from = "now-6m" | ||
| index = ["logs-aws.cloudtrail-*"] | ||
| language = "kuery" | ||
| license = "Elastic License v2" | ||
| name = "AWS IAM Account Password Policy Deleted" | ||
| note = """## Triage and analysis | ||
|
|
||
| ### Investigating AWS IAM Account Password Policy Deleted | ||
|
|
||
| The account password policy is an account-wide control that sets minimum password length, character complexity, maximum age, and reuse-prevention for all IAM users. `DeleteAccountPasswordPolicy` removes it entirely, reverting the account to no enforced password requirements — which weakens authentication and can facilitate credential attacks or mask weak credentials created later. Because this is a single, account-level, high-impact change, it should be deliberate and rare. | ||
|
|
||
| ### Possible investigation steps | ||
|
|
||
| - Identify the actor in `aws.cloudtrail.user_identity.arn`, `aws.cloudtrail.user_identity.type`, and `aws.cloudtrail.user_identity.session_context.session_issuer.arn`, and review `source.ip` / `user_agent.original`. | ||
| - Determine whether a replacement policy was set shortly after (`UpdateAccountPasswordPolicy`) or whether the account was left with no policy. | ||
| - Confirm whether the change aligns with an approved governance change. | ||
| - Correlate with recent activity by the same principal, such as creation of IAM users or login profiles, or other defense-evasion actions (CloudTrail/logging changes) that may indicate a broader effort to weaken controls. | ||
|
|
||
| ### False positive analysis | ||
|
|
||
| - Approved governance or infrastructure-as-code may delete/replace the policy. Confirm the change is expected and exclude known administration roles or automation on `aws.cloudtrail.user_identity.arn` after validation. | ||
| - Note: AWS GuardDuty also surfaces account password policy changes via `Stealth:IAMUser/PasswordPolicyChange`; correlate if GuardDuty is enabled. | ||
|
|
||
| ### Response and remediation | ||
|
|
||
| - If the deletion is unauthorized, restore an appropriate account password policy (`UpdateAccountPasswordPolicy`) that meets your organization's standards, and review any IAM users or login profiles created while no policy was enforced. | ||
| - Rotate or restrict credentials for the principal if compromise is suspected, and constrain `iam:DeleteAccountPasswordPolicy` and `iam:UpdateAccountPasswordPolicy` to a small set of trusted administrators. | ||
|
|
||
| """ | ||
| references = [ | ||
| "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html", | ||
| "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteAccountPasswordPolicy.html", | ||
| ] | ||
| risk_score = 47 | ||
| rule_id = "283f6c2a-9811-4239-9a40-52b066c67f99" | ||
| severity = "medium" | ||
| tags = [ | ||
| "Domain: Cloud", | ||
| "Domain: Identity", | ||
| "Data Source: AWS", | ||
| "Data Source: Amazon Web Services", | ||
| "Data Source: AWS IAM", | ||
| "Use Case: Threat Detection", | ||
| "Tactic: Defense Evasion", | ||
| "Resources: Investigation Guide", | ||
| ] | ||
| timestamp_override = "event.ingested" | ||
| type = "query" | ||
|
|
||
| query = ''' | ||
| data_stream.dataset: "aws.cloudtrail" | ||
| and event.provider: "iam.amazonaws.com" | ||
| and event.action: "DeleteAccountPasswordPolicy" | ||
| and event.outcome: "success" | ||
| and not aws.cloudtrail.user_identity.type: "AWSService" | ||
| and not user_agent.original: (*terraform* or *pulumi* or *ansible*) | ||
| and not aws.cloudtrail.user_identity.arn: (*terraform* or *pulumi* or *ansible*) | ||
| and not source.address: ("cloudformation.amazonaws.com" or "servicecatalog.amazonaws.com") | ||
| ''' | ||
|
|
||
|
|
||
| [[rule.threat]] | ||
| framework = "MITRE ATT&CK" | ||
| [[rule.threat.technique]] | ||
| id = "T1556" | ||
| name = "Modify Authentication Process" | ||
| reference = "https://attack.mitre.org/techniques/T1556/" | ||
|
|
||
| [rule.threat.tactic] | ||
| id = "TA0005" | ||
| name = "Defense Evasion" | ||
| reference = "https://attack.mitre.org/tactics/TA0005/" | ||
|
|
||
| [rule.investigation_fields] | ||
| field_names = [ | ||
| "@timestamp", | ||
| "user.name", | ||
| "user_agent.original", | ||
| "source.ip", | ||
| "aws.cloudtrail.user_identity.arn", | ||
| "aws.cloudtrail.user_identity.type", | ||
| "aws.cloudtrail.user_identity.access_key_id", | ||
| "aws.cloudtrail.user_identity.session_context.session_issuer.arn", | ||
| "aws.cloudtrail.request_parameters", | ||
| "event.action", | ||
| "event.outcome", | ||
| "cloud.account.id", | ||
| "cloud.region", | ||
| ] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.