Help - XQL Query for Unprotected assets

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help - XQL Query for Unprotected assets

L0 Member

Hi, everyone.

 

I have a use case of creating a Correlation rule to track the asset where the operational status of the agent changed from "Protected" to "Unprotected". I am having a hard time building the actual query. Any ideas?

 

Im currently only tracking asset under "Unprotected" but that generates a lot of noise as any new deployment the initial status of the agent will be "Unprotected" therefore the alert will trigger. So this is not accurate at all.

 

Current query:

 

dataset = endpoints | filter endpoint_status = ENUM.CONNECTED and operational_status = "UNPROTECTED"
| dedup endpoint_id
| fields endpoint_id , endpoint_name , endpoint_type, endpoint_status, operational_status, operational_status_description, operating_system, ip_address, tags

1 accepted solution

Accepted Solutions

L3 Networker

Hi

You could probably just filter out newly installed agents.

| alter install_date_difference = timestamp_diff(current_time(), install_date, "DAY") // calculate the amount of days since the XDR agent was installed.
| filter install_date_difference > 1 // Set/filter the amount of days when the correlation rule should trigger. In this example the agent needs to be installed for 2 days and more

 

timestamp_diff would also support the difference in hours.

 

Hope this helps

View solution in original post

2 REPLIES 2

L3 Networker

Hi

You could probably just filter out newly installed agents.

| alter install_date_difference = timestamp_diff(current_time(), install_date, "DAY") // calculate the amount of days since the XDR agent was installed.
| filter install_date_difference > 1 // Set/filter the amount of days when the correlation rule should trigger. In this example the agent needs to be installed for 2 days and more

 

timestamp_diff would also support the difference in hours.

 

Hope this helps

Amazing! Thanks! That works like a charm. 

  • 1 accepted solution
  • 489 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!