-
Notifications
You must be signed in to change notification settings - Fork 609
[Rule Tuning] AWS IAM Brute Force of Assume Role Policy #5282
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
base: main
Are you sure you want to change the base?
Conversation
Description and primary tactic for this rule is misleading. The rule captures an IAM principal enumeration technique used by tools like PACU, it does not capture AssumeRole brute-force attempts. I've changed the primary tactic to Discover, changed the rule name and updated the rule description and Investigation Guide to more clearly reflect what behavior is being captured. The query itself remains the same and the threshold values. I changed the execution window to the standard 5 min + 1 min lookback and was still able to capture the behavior.
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
| reference = "https://attack.mitre.org/tactics/TA0006/" | ||
|
|
||
| [rule.threshold] | ||
| field = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug here in <= 8.19.6 when using group by with no field specified.
Ref: elastic/kibana#241022
Can set the min stack version to 8.19.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm maybe I should actually add a group by field, like user.name or user.id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this one be moved to deprecated instead of being deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not deleted, the file name has just been changed
rules/integrations/aws/discovery_iam_principal_enumeration_via_update_assume_role_policy.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/discovery_iam_principal_enumeration_via_update_assume_role_policy.toml
Outdated
Show resolved
Hide resolved
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Pull Request
Issue link(s):
Summary - What I changed
Description and primary tactic for this rule is a bit misleading. The rule captures an IAM principal enumeration technique used by tools like PACU, it does not capture AssumeRole brute-force attempts. I've changed the primary tactic to Discover, changed the rule name and updated the rule description and Investigation Guide to more clearly reflect what behavior is being captured.
The query itself remains the same and the threshold values. I changed the execution window to the standard 5 min + 1 min lookback and was still able to capture the behavior.
The TARGET BEHAVIOR
That’s what this rule is seeing: lots of failed
UpdateAssumeRolePolicycalls with bad principals. Stemming from within your account. This activity could be targeting an external account as a form of role enumeration.Reference: PACU iam_enum_roles Module
How To Test
Test data in the stack to run the query against
The existing rule has been updated with the execution window change
Script for triggering the rule: trigger_discovery_iam_principal_enumeration_via_update_assume_role_policy.py
Screenshot of Alerting Rule and Triggering Events