- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
08-21-2025 12:55 AM
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.
08-22-2025 06:04 AM
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
08-29-2025 12:38 AM
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.
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!