-
Notifications
You must be signed in to change notification settings - Fork 362
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
Defender alerts #3185
Defender alerts #3185
Conversation
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.
FYI, I know that both of these detections are marked “manual test” but if I remove that, they fail unit testing for the same reason.
The justification that “they will fail integration testing since Risk Score is dynamically calculated” mean they SHOULD pass Unit testing.
I will look into these more closely tomorrow and hopefully we can get them approved+merged.
The failure currently is as follows during unit testing: exception: The observable field(s) {'user'} are missing in the detection results
Based on the sample in data_sources and the way the search is constructed, when flowing through a normal ES search, the risk_score field should be populated. If that is what the unit testing is looking for, this should pass. While there is a risk_score defined as part of the detection, it will be overridden based on the eval in the search. The user field may be null, but the src field should always have a value as that is the risk_object we are going after. |
The user field is currently configured as a risk object- below, I've translated the tags.observable for one of the detections to our new
becomes
Our current validation mechanisms can be summarized as follows:
|
In this case the user field, as a risk_object can be null, but in some cases will be populated. Since we know the src field will always be populated, do you just have that as victim observable? Essentially if user is populated, we want to map it to the user risk object field. But the user field may not always be populated. So how do we make it optional, but still map to a risk_object if populated? Is this a testing vs config issue? |
We don't. There's no mechanism currently to do this on our side, and its for a very specific reason: null values in risk objects create unpredictable failure states in ES itself where the risk action fails silently- while we can't constrain customer environments to only run a magically working config based on their data that we can't see, we do enforce that the sample datasets avoid null values for risk objects to prevent the possible failures in our testing pipelines. |
@bpluta-splunk : the way our testing is setup, we would like all risk related fields to be populated. While the dataset contains user field for several of the events, it doesnt for some of them. I will updating the two test datasets by trimming them down to a single event that has all the fields present for the detection to fire! Will keep you posted! |
since we know some of the defender alerts will not have the user field populated, seems like the best action is to remove the user from the observable. |
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.
After discussion with the team and manual testing review, this looks good. Approved!
Details
2 new detections to leverage Microsoft defender alerts