-
Notifications
You must be signed in to change notification settings - Fork 517
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 S3 Unauthenticated Object Retrieval by Rare Source
#4315
base: main
Are you sure you want to change the base?
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
|
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.
I reviewed three rules, and the only difference between the three seems to be the event.action, for get, list and put objects. Wouldn't it make more sense to create one rule that is called something along the lines of "AWS S3 Unauthenticated Object Activity by Rare Source", that contains event.action:(GetObject or ListObjects or PutObject)
?
new terms rule type is relatively expensive, so minimizing the number of rules would make sense here I think. Rule logics:
event.dataset: "aws.cloudtrail"
and event.provider: "s3.amazonaws.com"
and event.action: "GetObject"
and event.outcome: "success"
and aws.cloudtrail.user_identity.type: ("AWSAccount" or "Unknown")
and cloud.account.id: "anonymous"
event.dataset: "aws.cloudtrail"
and event.provider: "s3.amazonaws.com"
and event.action: "ListObjects"
and event.outcome: "success"
and aws.cloudtrail.user_identity.type: ("AWSAccount" or "Unknown")
and cloud.account.id: "anonymous"
event.dataset: "aws.cloudtrail"
and event.provider: "s3.amazonaws.com"
and event.action: "PutObject"
and event.outcome: "success"
and aws.cloudtrail.user_identity.type: ("AWSAccount" or "Unknown")
and cloud.account.id: "anonymous"
This is a good point, I need to reconsider if we add 1 rule with the different API actions or keep them separated. The goal is to identify anonymous collection or discovery in general. Initially I kept them separate for tuning or exception purposes. However, They often co-exist in workflows just based on how S3 bucket/object works. Going to put these back in draft until I do some further testing. |
Pull Request
Issue link(s):
Summary - What I changed
Adding detection coverage for
AWS S3 Unauthenticated Object Retrieval by Rare Source
.This rule detects attempts to retrieve objects from an AWS S3 bucket by an unauthenticated source, which could indicate a misconfigured bucket policy allowing public access. Adversaries can exploit this misconfiguration by using tools or AWS CLI options like
--no-sign-request
to access bucket contents.The rule triggers when an unauthenticated IP address retrieves an object, and that IP has not been seen in the last 7 days.
How To Test
Checklist
bug
,enhancement
,schema
,maintenance
,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