- Notifications
You must be signed in to change notification settings - Fork 603
[New Rule] Adding Coverage for AWS IAM Customer-Managed Policy Attached to Role by Rare User
#4245
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
terrancedejesus merged 14 commits into main from new-rule-aws-attach-or-put-role-policies Nov 6, 2024
Merged
[New Rule] Adding Coverage for AWS IAM Customer-Managed Policy Attached to Role by Rare User
#4245
terrancedejesus merged 14 commits into main from new-rule-aws-attach-or-put-role-policies Nov 6, 2024
Conversation
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
Enhancement - GuidelinesThese guidelines serve as a reminder set of considerations when addressing adding a new schema feature to the code. Documentation and Context
Code Standards and Practices
Testing
Additional Schema Related Checks
|
Samirbous approved these changes Nov 5, 2024
Aegrah approved these changes Nov 5, 2024
shashank-elastic approved these changes Nov 5, 2024
imays11 approved these changes Nov 6, 2024
Mikaayenson approved these changes Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto Domain: Cloud Workloads Hunt: New Hunting Integration: AWS AWS related rules patch Rule: New Proposal for new rule schema threat hunting Related to hunting/ library.
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.
Pull Request
Issue link(s):
Summary - What I changed
Adding detection coverage for
AWS IAM Customer-Managed Policy Attached to Role by Rare User
.Adds an ES|QL hunting query for similar activity -->
AWS IAM Customer-Managed Policy Attachment to Existing Roles
.Detects when an AWS Identity and Access Management (IAM) customer-managed policy is attached to a role by an unusual or unauthorized user. Customer-managed policies are policies created and controlled within an AWS account, granting specific permissions to roles or users when attached. This rule identifies potential privilege escalation by flagging
cases where a customer-managed policy is attached to a role by an unexpected actor, which could signal unauthorized
access or misuse. Attackers may attach policies to roles to expand permissions and elevate their privileges within the AWS environment.
This is a New Terms rule that uses the
aws.cloudtrail.user_identity.arn
andaws.cloudtrail.flattened.request_parameters.roleName
fields to check if the combination of the actor ARN and target role name has not been seen in the last 14 days.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