Need help - BIOC / Script / XQL?

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

Need help - BIOC / Script / XQL?

L3 Networker

Hey everyone. I need some assistance in looking at this logically.

 

We have an identified PuP in our environment that is persistent. It creates a scheduled task and if you don't remove that, your PuP that you deleted will be back in no time.

 

Is there a methodical and easy way to find that scheduled task (with the information we have, e.g., keywords, etc.) and disable or remove that scheduled task? A bonus would be to remove that and every other "tentacle" this PuP has on the system, but I'll settle with starting on the scheduled task. Not sure if I'm explaining it properly but I know XDR Pro can do it, somehow and someway, I just have the foggiest idea on where to start.

 

Thanks all!

1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @CraigV123, thanks for reaching us using the Live Community.

 

You can try a XQL Query to retrieve the scheduled tasks created with any command:

 

dataset = xdr_data
| filter action_process_image_command_line contains "schtasks"

 

With some tuning, this XQL query can be also used as a BIOC rule.

 

You can also try using the Windows Event Logs:

 

dataset = xdr_data
| filter event_type = ENUM.EVENT_LOG
| filter action_evtlog_event_id = 4698
| fields action_evtlog_provider_name, action_evtlog_event_id, event_type, action_evtlog_message

 

Having the task names, you can create a script to run in the affected endpoints to remove the tasks. You can even also use scripts to get the scheduled tasks in the endpoints and if the name matches, remove it.

 

If this post answers your question, please mark it as the solution.

JM

View solution in original post

2 REPLIES 2

L5 Sessionator

Hi @CraigV123, thanks for reaching us using the Live Community.

 

You can try a XQL Query to retrieve the scheduled tasks created with any command:

 

dataset = xdr_data
| filter action_process_image_command_line contains "schtasks"

 

With some tuning, this XQL query can be also used as a BIOC rule.

 

You can also try using the Windows Event Logs:

 

dataset = xdr_data
| filter event_type = ENUM.EVENT_LOG
| filter action_evtlog_event_id = 4698
| fields action_evtlog_provider_name, action_evtlog_event_id, event_type, action_evtlog_message

 

Having the task names, you can create a script to run in the affected endpoints to remove the tasks. You can even also use scripts to get the scheduled tasks in the endpoints and if the name matches, remove it.

 

If this post answers your question, please mark it as the solution.

JM

I needed a logical way to break that down and you explained it how I needed. I appreciate it. Thanks again.

  • 1 accepted solution
  • 450 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!