XQL help to detect when a process is stop or killed and by whom

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

XQL help to detect when a process is stop or killed and by whom

L0 Member

Hello community,

 

I'm trying to create a XQL Query to detect whenever a user is stopping a particular service (via services.msc, cmd, powershell, WMI or any other way), but I can not do it.

 

I need to detect the user that send the stop service command, or the user that is killing the process.

 

Is it any way to make this query?

 

This is the closest query that I get:

dataset = xdr_data | filter agent_hostname ="TEST_COMPUTER" and event_sub_type = ENUM.PROCESS_STOP and actor_process_image_name="PanGPS.exe"

 

But in this query, we only get the user that stopped the process (the service user), but not the user that sent the service stop or process kill command, so we cannot determine whether the service is being stopped regularly (system shutdown) or is being stopped by the user.

 

Could you help, please?

 

Thank you very much,
kind regards.

bip bip biip bip bibip bip
2 REPLIES 2

L4 Transporter

Hi @jrlambea 

 

Please try with the following and let me know if this works

ataset = xdr_data | filter actor_effective_username != "nt_authority/system" and agent_hostname ="YOUR_HOSTNAME_HERE" and event_sub_type = ENUM.PROCESS_STOP and actor_process_image_name="YOUR_PROCESS_HERE" 

 

If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution". Thank you.

 

KR,

Luis

Hi @eluis!

 

Thank you very much for your response. The current query doesn't meet our needs because when the process is stopped via the services.msc console, the user that appears in the actor_effective_username field is always nt_authority/system (the user configured for the service).

 

Could we check if a user opened the service.msc console on the same machine a few minutes beforehand? I'm not sure if this is feasible in XQL, as I'm quite neophyte to it.

 

Kind regards.

bip bip biip bip bibip bip
  • 329 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!