-
Notifications
You must be signed in to change notification settings - Fork 522
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] AWS S3 Bucket Enumeration or Brute Force #3635
[New Rule] AWS S3 Bucket Enumeration or Brute Force #3635
Conversation
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Outdated
Show resolved
Hide resolved
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.
Nice complete rule with IG. Just curious about the type of alert it generates, as the ES|QL rule type is rather new. Any chance you have a json document for that?
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Outdated
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
rules/integrations/aws/impact_aws_s3_bucket_enumeration_or_brute_force.toml
Show resolved
Hide resolved
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.
LGTM!
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.
Thank you for answering my questions. I think this is good to ship!
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
* [New Rule] AWS S3 Bucket Enumeration or Brute Force Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> --------- Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com> Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com> (cherry picked from commit 54ff270)
Summary
It was recently shared that S3 buckets are vulnerable to exhaustive
PUT
requests for the sake of causing financial impact to an organization, only needing to know the bucket name. (AWS did respond quickly that they were addressing the billing of such operations).What makes this slightly more impactful is the fact that bucket names themselves are trivially discoverable via enumeration, allowing for randomized or targeted brute forcing in a simple manner.
Details
AWS S3 buckets can be be brute forced to cause financial impact against the resource owner. What makes this even riskier is that even private, locked down buckets can still trigger a potential cost, even with an "Access Denied", while also being accessible from unauthenticated, anonymous accounts. This also appears to work on several or all operations (GET, PUT, list-objects, etc.), with charges resulting from all of them (.004 or .0005)!
Attackers may attempt to enumerate names until a valid bucket is discovered and then pivot to cause financial impact, enumerate for more information, or brute force in other ways to attempt to exfil data.
UPDATE:
In this case, the
aws.s3.bucket.name
was where (bucket) the logs were going to vs the targeted bucket, which has been corrected withtls.client.server_name
Developer notes
This is an
ES|QL
rule, which is still in technical preview, but was tested E2E multiple ways. It did require a small bypass for parsingrequired_fields
since we do not yet parse the AST forES|QL
. The query validation was performed on an active stack with relevant data.Technically this is also achievable with a
threshold
rule, so if any blockers arise, we can consider converting it.Testing