To write an expert rule to protect the Windows processes, you need to ensure that it follows the correct syntax. Expert rules consist of process, one or more targets, and the matching conditions that rules must examine before allowing the source to access the processes.
Note
Exploit Prevention is not supported in the ARM architecture.
Here is a sample Expert rule for registry rule type and their respective definitions:
Caution
Expert Rule commands are case-sensitive.
Rule {
Process {
Include OBJECT_NAME {
-v "**"
}
}
Target {
Match PROCESS {
Include OBJECT_NAME {..}
Include -access "DELETE TERMINATING" ; # Define access types
Exclude -access "CREATE"
}
}
}To add more commands in Expert rules, see Learn Expert Rules commands for Files, Processes, and Registry.
Sections of Expert Rule syntax in detail
The above Expert rule syntax is described here:
Rule | Formulates the execution of commands defined within | ||||||||||||
Process | Executes the set of actions defined within the | ||||||||||||
Include OBJECT_NAME {
-v "**"
}
Exclude .. {..} | In this section,
For more information, see Object name guidelines and Match types values. | ||||||||||||
Target | Defines the target matches for the rule. This command takes no arguments and can contain only | ||||||||||||
Match PROCESS | Defines an object, that an Expert rule is intended to protect and to match an event. This command requires at lease one match object type value. Based on the object that needs protection, you use can one of these match object type values:
| ||||||||||||
Include OBJECT_NAME {
-v notepad.exe
| This section defines the target object name, that is, Windows program to be secured. | ||||||||||||
Include -access "DELETE TERMINATING" Exclude -access "CREATE" | During processing, the
The processes rule type supports these access types:
To know more about the access flags, refer ACCESS_MASK flags. |
For more Expert Rules examples, visit the Trellix Github repository.