Malicious Process Execution Queries

As part of their attack cycle, attackers will attempt to run malicious process activities.

The example queries in this section are meant to be a starting point for your investigations. You may need to update the Features (filters) in each query to use indicators specific to your environment or situation.

Each of these examples is formatted with the individual Element in the query on its own separate line, in bold text. Features (filters) applied to the Element follow the Element name in regular weight text. Each example also contains a description of the goal of the hunt and the explanatory statement of what you want to find.

Command line process execution

Goal: Find processes running malicious commands.

Explanatory statement: I want to find an example of <<command>> running in my environment.

Construct this query:

Process Element -> filter for Command line contains _______

View an example of a query to find the MITRE ATT&CK technique Execution: Command Line Interface.

Renamed processes

Goal: Find renamed processes.

Explanatory statement: I want to find examples of processes that were renamed or had their image file/binary file renamed

Construct one of the following queries:

Query 1:

Process Element

Loaded modules Element

File Element

File Event Element -> filter for Event type is Rename file

View an example to find processes that have been renamed

Query 2:

Process Element

Image File Element

File Event Element -> filter for Event type is Rename file

View an example to find processes that have renamed artifacts

Query 3:

File Element -> filter for File name contains ______ Internal name contains ______

View an example to find processes that have renamed artifacts.

Legitimate applications repurposed for malicious use

Goal: Find when a legitimate application (such an operating system process or application) is used in a malicious manner.

Explanatory statement: I want to find instances where processes that are considered legitimate are used in an unusual and malicious way

Construct one of the following queries:

Query 1:

Process Element -> filter for Use of legitimate OS process for persistence is True

View an example to find examples of legitimate OS processes being used for persistence.

Query 2:

Process Element -> filter for Process integrity is Protected or System AND (select Feature filter for malicious behavior)

View an example to find legitimate processes being used for malicious behavior.

Script execution

Goal: Find malicious script execution.

Explanatory statement: I want to find instances where a process ran a script marked as malicious or ran a script that was not expected.

Construct one of the following queries:

Query 1:

Process Element -> filter for Malicious script execution is True

View an example of a process running a malicious script

Query 2:

Unexpected script execution is True

View an example of a process running an unexpected script

Process has a listening port

Goal: Find applications that have opened listening ports

Explanatory statement: I want to find instances and details when a process opens a listening connection.

Construct this query:

Process Element -> filter for Has opened socket is True

View an example of a process opening a listening connection.

Malicious services for a process

Goal: Find malicious services.

Explanatory statement: I want to find instances of malicious services due to their rare nature or changes in the service characteristics.

Construct one of the following queries:

Query 1:

Process Element

Service Element -> filter for Rare service is True

View an example to find a rare service.

Query 2:

Process Element

Service Element -> filter for Rare active service is True

View an example to find a rare active service.

Query 3:

Process Element

Service Element -> filter for Rare start type is True

View an example to find a rare service start type.

Query 4:

Process Element

Service Element -> filter for Binary file was changed is True

View an example to where a service binary file was changed.

Query 5:

Process Element

Service Element -> filter for Service start name was changed is True

View an example to find a rare service.