elastic / detection-rules

https://www.elastic.co/guide/en/security/current/detection-engine-overview.html
Other
1.92k stars 492 forks source link

[Rule Tuning] M365/Azure Brute-Forcing New Rule and Tuning; Deprecate Similar Rule #4057

Closed terrancedejesus closed 4 weeks ago

terrancedejesus commented 1 month ago

Pull Request

Issue link(s):

Summary - What I changed

The following changes have been made as a result of community slack thread.

Note: For the Azure rule, we should update the telemetry filterlist and monitor azure.signinlogs.properties.status.error_code for tuning. This will be the most concrete way to remove false-positives and focus solely on brute force related error codes that would generate, however, at this time there are too many plausible error codes to scope for this PR.

How To Test

Screenshot 2024-09-06 at 12 00 52 PM (2) Screenshot 2024-09-06 at 12 00 57 PM

Checklist

Contributor checklist

protectionsmachine commented 1 month ago

Rule: Tuning - Guidelines

These guidelines serve as a reminder set of considerations when tuning an existing rule.

Documentation and Context

Rule Metadata Checks

Testing and Validation

terrancedejesus commented 4 weeks ago

lgtm. any thought on a setup guide?

@Mikaayenson great question and thanks for taking a look. Both rules link to the Azure integration, which has it's own setup and configuration documentation. Ref - https://www.elastic.co/docs/current/integrations/azure

There are no special configurations that we did to gain visibility into these actions as they are the default Entra ID logs that stream to the Azure event hub. If we want to replicate steps from the integration into rules, my questions would be:

  1. Should we only add these if the rule required a more custom setup or maybe specific integration advanced settings that are not enabled by default?
  2. If we replicate instructions from integration docs, they may become outdated and desync from integration docs, thus should we rely on security docs?

Happy to do either, but for these specifically I am in favor of leaning on the Azure integration docs as we do no special configuration setup outside of that.

Mikaayenson commented 4 weeks ago

e want to replicate steps from the integration into rules, my questions would be:

1.

Makes sense. I agree. We can leave as-is then. Im also wondering if we should add the link to the references or something, but maybe its already assumed that you should have followed those steps before using the rule.

terrancedejesus commented 4 weeks ago

Makes sense. I agree. We can leave as-is then. Im also wondering if we should add the link to the references or something, but maybe its already assumed that you should have followed those steps before using the rule.

I believe that is the purpose of related_integrations being shipped with the rules, so that it is a bit more autonomous.

Screenshot 2024-09-10 at 11 25 12 AM