All Products
Search
Document Center

Security Center:Create custom defense rules for malicious behavior defense

Last Updated:Mar 01, 2026

Security Center blocks processes and files that it identifies as threats. When legitimate activity triggers a false positive alert, create a custom defense rule to whitelist the activity and prevent future blocking.

Prerequisites

Open the custom defense rule panel

  1. Log on to the Security Center console. In the top navigation bar, select the region of the asset that you want to manage. The following regions are supported: China and Outside China.

  2. In the left-side navigation pane, choose Protection Configuration > Host Protection > Host-specific Rule Management.

  3. On the Malicious Behavior Defense tab, click the Custom Defense Rule tab, and then click Create Rule.

  4. In the Create Rule panel, configure the parameters in the Create Rule step and click Next.

Parameter syntax

Before configuring a rule, review the following syntax rules for parameter values:

  • String equations are supported. Example: 'a' = 'a'.

  • An asterisk (\*) matches any string, including an empty string. Recommended formats: *pattern*, *pattern, or pattern*.

  • Logical operators |, &, and ! are supported. A vertical bar (|) is the OR operator, an ampersand (&) is the AND operator, and an exclamation point (!) is the NOT operator. Example: &!*pattern*.

    The combination |!*pattern* is not supported.
  • The Parent Process Path and Parent Command Line parameters can be left blank.

Rule types

The following table provides a quick reference for all rule types. For detailed configuration of each type, see the corresponding subsection.

Rule typeTriggerKey parametersOS restriction
Process hashMD5 hash of a fileProcess MD5None
Command lineProcess startup or command executionProcess Path, Command LineSelect OS
Process NetworkNetwork communication by a processProcess Path, IP Address, PortSelect OS
File Read and WriteFile read or write operationProcess Path, File PathSelect OS
Operation on RegistryRegistry operationRegistry Key, Registry ValueWindows only
Dynamic-link Library LoadingDLL or shared library loadingProcess Path, File PathSelect OS
File RenamingFile rename operationFile Path, New File PathWindows only

For each rule type, find the matching false positive alert in the Security Center console, open the alert details panel, and use the field values to fill in the rule parameters.

Process hash

Use this rule type when a false positive alert is triggered by the MD5 hash of a file. The system blocks the file based on the value of the Malicious File MD5 field.

告警详情MD5
ParameterDescription
Rule nameEnter a descriptive name. Example: mining program.
Rule typeSelect Process hash.
Process MD5Enter the value of the Malicious File MD5 field from the alert details panel. Example: d2f295a89555579c39a0507e96XXXXXX.
ActionSelect Add to Whitelist.

Command line

Use this rule type when a false positive alert is triggered by a process startup or command line execution. The system blocks the process based on the value of the Process of executing command or Command in execution field.

进程启动命令行
ParameterDescription
Rule nameEnter a descriptive name. Example: process startup.
Rule typeSelect Command line.
OS TypeSelect the operating system. Example: linux.
Process PathEnter the value of the Process of executing command field from the alert details panel. Example: */pkill.
Command LineEnter the value of the Command in execution field from the alert details panel. Example: *AliYunDun*.
ActionSelect Add to Whitelist.

Process Network

Use this rule type when a false positive alert is triggered by a process performing network communication. The system blocks the network activity based on the value of the IP, Port, or Process Path Of Network Communication field.

进程网络
ParameterDescription
Rule nameEnter a descriptive name. Example: network process.
Rule typeSelect Process Network.
OS TypeSelect the operating system. Example: windows.
Process PathEnter the value of the Process Path Of Network Communication field from the alert details panel. Example: */powershell.exe.
Command LineEnter the value of the Process Commands For Network Communication field from the alert details panel. Example: *dAByAhADQAKAHsADQAkACXXXXXX*.
IP AddressEnter the value of the IP field from the alert details panel. Example: 45.117.XX.XX.
PortEnter the value of the Port field from the alert details panel. Example: 14XX.
ActionSelect Add to Whitelist.

File Read and Write

Use this rule type when a false positive alert is triggered by file read or write operations. The system blocks the file based on the value of the target document field.

文件读写
ParameterDescription
Rule nameEnter a descriptive name. Example: file read and write.
Rule typeSelect File Read and Write.
OS TypeSelect the operating system. Example: linux.
Process PathEnter the value of the Process of executing command field from the alert details panel. Example: */java.
Command LineEnter the value of the Command in execution field from the alert details panel. Example: *weaver*.
File PathEnter the value of the target document field from the alert details panel. Example: */console_login.jsp.
ActionSelect Add to Whitelist.

Operation on Registry

Use this rule type when a false positive alert is triggered by a registry operation. The system blocks the registry activity based on the value of the Registry Path or Registry Value field.

注册表防护
ParameterDescription
Rule nameEnter a descriptive name. Example: registry protection.
Rule typeSelect Operation on Registry.
OS TypeFixed to windows. This value cannot be changed.
Process PathEnter the value of the Process of executing command field from the alert details panel. Example: */iexplore.exe.
Command LineEnter the value of the Command in execution field from the alert details panel. Example: *iexplore.exe*.
Registry KeyEnter the value of the Registry Path field from the alert details panel. Example: *currentversion*.
Registry ValueEnter the value of the Registry Value field from the alert details panel. Example: *svch0st.exe*.
ActionSelect Add to Whitelist.

Dynamic-link Library Loading

Use this rule type when a false positive alert is triggered by a shared library or DLL loading event, such as DLL hijacking or malicious shared object injection. The system blocks the activity based on the value of the Hijacked process path or Malicious so file path field.

注册表防护
ParameterDescription
Rule nameEnter a descriptive name. Example: registry protection.
Rule typeSelect Dynamic-link Library Loading.
OS TypeSelect the operating system. Example: linux.
Process PathEnter the value of the Hijacked process path field from the alert details panel. Example: */python*.
Command LineEnter the value of the hijacked process command field from the alert details panel. Example: *python*.
File PathEnter the value of the Malicious so file path field from the alert details panel. Example: /usr/local/lib/kswapd0.so.
ActionSelect Add to Whitelist.

File Renaming

Use this rule type when a false positive alert is triggered by a file rename operation. The system blocks the file based on the value of the target document field.

重命名文件
ParameterDescription
Rule nameEnter a descriptive name. Example: file renaming.
Rule typeSelect File Renaming.
OS TypeFixed to windows. This value cannot be changed.
Process PathEnter the value of the Process of executing command field from the alert details panel. Example: */cdgregedit.exe.
Command LineEnter the value of the Command in execution field from the alert details panel. Example: *CDGRegedit.exe*.
File PathEnter the value of the target document field from the alert details panel. Example: c:/programdata/hipsdata/private/*.
New File PathEnter the value of the target document field from the alert details panel. Example: c:/programdata/hipsdata/private/*.
ActionSelect Add to Whitelist.

Select target assets

After configuring the rule parameters, the Select Asset step appears. Select the assets to which the rule applies, and then click Finish.

What happens next

A newly created custom defense rule is enabled by default. After creation, you can modify the rule and manage the servers to which it applies.