elastic / detection-rules

https://www.elastic.co/guide/en/security/current/detection-engine-overview.html
Other
1.92k stars 492 forks source link

[New Rule] AWS IAM CompromisedKeyQuarantine Policy Attached to User #3910

Closed imays11 closed 2 months ago

imays11 commented 2 months ago

Issue link(s): Related : https://github.com/elastic/infosec/issues/18053 Tracked : https://github.com/elastic/ia-trade-team/issues/346

Summary - What I changed

This rule looks for use of the IAM AttachUserPolicy API operation to attach the CompromisedKeyQuarantine or CompromisedKeyQuarantineV2 AWS managed policies to an existing IAM user. This policy denies access to certain actions and is applied by the AWS team in the event that an IAM user's credentials have been compromised or exposed publicly.

-- Although a support case is opened on behalf of the account and additional information is sent to the contact information provided to AWS for the account, this rule is created as an additional alert to help increase response time for exposed credentials.

How To Test

I've used production results provided by our Infosec team to test this rule and included the event in the screenshot below, ask if you need to see the full event as it contains PII.

Screenshot 2024-07-19 at 11 45 21 PM

Checklist

protectionsmachine commented 2 months ago

Rule: New - Guidelines

These guidelines serve as a reminder set of considerations when proposing a new rule.

Documentation and Context

Rule Metadata Checks

New BBR Rules

Testing and Validation