-
Notifications
You must be signed in to change notification settings - Fork 511
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
[New Rule] Adding Coverage for AWS IAM Create User via Assumed Role on EC2 Instance
#4244
[New Rule] Adding Coverage for AWS IAM Create User via Assumed Role on EC2 Instance
#4244
Conversation
Rule: New - GuidelinesThese 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
|
This existing rule covers this behavior but is very noisy. Perhaps instead of creating a new rule here we can tune the existing one to either exclude the more noisy iam event.actions like |
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.
The rule looks good to me, however, might be good to address @imays11 comment, as tuning a rule to add additional coverage might be a better approach than adding a new rule!
@imays11 thank you for taking the time to discuss this morning. Our solution moving forward is to adjust the existing rule you mentioned to be a BBR and modify the filters to focus on IAM changes via event action. The purpose is to be able to at least document anytime an assumed role from an EC2 instance makes changes to IAM resources. We will then move forward with creating this rule as a specific threat-centric scenario. |
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.
Looks good!
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
…on EC2 Instance` (#4244) * adding new rule 'AWS IAM Create User via Assumed Role on EC2 Instance' * adding false-positive note * changed file name * added event.provider * tuned 'AWS EC2 Instance Interaction with IAM Service' to be BBR * updated query * added BBR tag * moved rule to BBR * fixed BBR query * moved rule to BBR (cherry picked from commit 1c9177e)
Pull Request
Issue link(s):
Summary - What I changed
Adding detection coverage for
AWS IAM Create User via Assumed Role on EC2 Instance
.Detects the creation of an AWS Identity and Access Management (IAM) user initiated by an assumed role on an EC2 instance. Assumed roles allow users or services to temporarily adopt different AWS permissions, but the creation of IAM users through these roles—particularly from within EC2 instances—may indicate a compromised instance. Adversaries might exploit such permissions to establish persistence by creating new IAM users under unauthorized conditions.
Additional information:
AssumedRole
identity in AWS typically have pre-determined permissions via policies attached by IAM admins. These can be custom permission policies or default via AWS. If PLoP is not practiced, for example,iam:*
, adversaries whom land on that EC2 instance can use native AWS-CLI to create users and even attach policies. It is more common and best practices to create users via IAM console in AWS or remotely by an admin.i-
inaws.cloudtrail.user_identity.arn
helps distinguish where the user was created from, specifically an EC2 instance.Note
This rule is a New Terms rule to reduce potential false-positives where it may be common for users to be added by an admin or programmatically on an EC2 instance. However, this is still rather unusual and should be investigated.
How To Test
Checklist
bug
,enhancement
,schema
,Rule: New
,Rule: Deprecation
,Rule: Tuning
,Hunt: New
, orHunt: Tuning
so guidelines can be generatedmeta:rapid-merge
label if planning to merge within 24 hoursContributor checklist