monitor command line on powershell or cmd with XQL

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

monitor command line on powershell or cmd with XQL

L1 Bithead

Hi,

 

Please I want monitor any command line excute on powershell or cmd with XQL for example quser or systeminfo cli.

 

Thank you.

Redouane Bouzeghoub
1 accepted solution

Accepted Solutions

L5 Sessionator

Hi @Bouzeghoub 

 

Let me give you a couple of examples that you can fine tune accordingly to your needs

Example 1:

 

dataset = xdr_data
| filter event_type = ENUM.PROCESS
| filter actor_process_image_name = "powershell.exe" and action_process_image_command_line contains "systeminfo"
| fields action_process_image_path, action_process_image_name, actor_process_image_md5, actor_process_image_name, actor_process_image_sha256, event_type, actor_process_command_line, action_process_image_command_line, causality_actor_process_image_md5, causality_actor_process_image_sha256, actor_process_signature_product, event_sub_type, actor_process_execution_time

 

 

Example 2:

 

dataset = xdr_data
| filter event_type = ENUM.PROCESS
| filter actor_process_image_name = "powershell.exe" and action_process_image_command_line contains "systeminfo"
| fields action_process_image_path, action_process_image_name, actor_process_image_md5, actor_process_image_name, actor_process_image_sha256, event_type, actor_process_command_line, action_process_image_command_line, causality_actor_process_image_md5, causality_actor_process_image_sha256, actor_process_signature_product, event_sub_type, actor_process_execution_time

 

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

View solution in original post

2 REPLIES 2

L5 Sessionator

Hi @Bouzeghoub 

 

Let me give you a couple of examples that you can fine tune accordingly to your needs

Example 1:

 

dataset = xdr_data
| filter event_type = ENUM.PROCESS
| filter actor_process_image_name = "powershell.exe" and action_process_image_command_line contains "systeminfo"
| fields action_process_image_path, action_process_image_name, actor_process_image_md5, actor_process_image_name, actor_process_image_sha256, event_type, actor_process_command_line, action_process_image_command_line, causality_actor_process_image_md5, causality_actor_process_image_sha256, actor_process_signature_product, event_sub_type, actor_process_execution_time

 

 

Example 2:

 

dataset = xdr_data
| filter event_type = ENUM.PROCESS
| filter actor_process_image_name = "powershell.exe" and action_process_image_command_line contains "systeminfo"
| fields action_process_image_path, action_process_image_name, actor_process_image_md5, actor_process_image_name, actor_process_image_sha256, event_type, actor_process_command_line, action_process_image_command_line, causality_actor_process_image_md5, causality_actor_process_image_sha256, actor_process_signature_product, event_sub_type, actor_process_execution_time

 

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

L1 Bithead

Hi @eluis 

Thank you for your help,

I see juste old logs with one day.

 

Bouzeghoub_0-1758698004949.png

 

Please do you have any idea and which GPO we need to enable?

 

Best regards.

 

Redouane Bouzeghoub
  • 1 accepted solution
  • 333 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!