-
Notifications
You must be signed in to change notification settings - Fork 606
[New Rule] Azure Compute Snapshot Deletion(s) #5211
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
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
|
|
|
||
| [rule.new_terms] | ||
| field = "new_terms_fields" | ||
| value = ["azure.activitylogs.identity.claims_initiated_by_user.name", "azure.resource.group"] |
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.
so is azure.resource.group something that is created for a group of snapshots in this case? I'm wondering why you need both fields here instead of just the azure.activitylogs.identity.claims_initiated_by_user.name field? Are you intending to capture the first time a user deletes any snapshot inside of a particular group of snapshots?
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.
@imays11 Resource groups in Azure act as containers that organize and manage related resources for various operations. They’re typically at the root level of most activities. For instance, when creating a virtual network with associated instances, firewalls, and applications, all of these resources are usually placed within a single resource group.
We include the resource group in this context to ensure the alert only triggers when a user deletes snapshots in a resource group where they don’t typically perform such actions. This helps reduce noise and focus on anomalous behavior. False positives are expected for developers, engineers, or others who regularly manage and modify resources within their own groups.
It's very similar to some of the AWS tunings to be tenant focused, but at the next layer.
| event.dataset: azure.activitylogs and | ||
| azure.activitylogs.operation_name: "MICROSOFT.COMPUTE/SNAPSHOTS/DELETE" and | ||
| azure.activitylogs.properties.status_code: "Accepted" and | ||
| azure.activitylogs.identity.claims_initiated_by_user.name: * |
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.
- Is there ever an instance where
azure.activitylogs.identity.claims_initiated_by_user.namefield isn't populated? - Is
azure.activitylogs.result_type: Acceptorazure.activitylogs.result_signature: Accepted.Acceptedequivalent toazure.activitylogs.properties.status_code: Accepted? If so should you use one of these in the query in place of the flattened field?
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.
@imays11 - yes, there are instances where azure.activitylogs.identity.claims_initiated_by_user.name is not populated. Regarding the second question, there are several values I've seen in the telemetry here such as Accepted.Accepted or Accepted or Accepted.Created. result_type: Accept is consistent as a response from the API when the request occurs and is accepted.
| query = ''' | ||
| event.dataset: azure.activitylogs and | ||
| azure.activitylogs.operation_name: "MICROSOFT.COMPUTE/SNAPSHOTS/DELETE" and | ||
| azure.activitylogs.properties.status_code: "Accepted" and |
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.
same comment here about the use of a flattened field
Fixes #5210
Pull Request
Issue link(s):
Summary - What I changed
Adds detection coverage for unusual Azure Compute snapshot deletions. A threshold rule and a New Terms rule. Please see related issue for more details.
How To Test
Query can be used to test on data in TRADE stack.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist