--- title: "Sample Expert Rule to prevent Illegal API Use" slug: "sample-expert-rule-to-prevent-illegal-api-use" tags: ["Product Usage", "ENS 10.7.x", "Endpoint Security"] updated: 2026-09-14T20:39:14Z published: 2026-09-14T20:39:14Z canonical: "docs.trellix.com/sample-expert-rule-to-prevent-illegal-api-use" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Sample Expert Rule to prevent Illegal API Use To write an expert rule to prevent illegal API use, you need to ensure that it follows the correct syntax. This rule type is built based on the legacy Trellix Host IPS. > [!NOTE] > Note > > Exploit Prevention is not supported in the ARM architecture. Here is a sample Expert rule for illegal API use rule type: > [!WARNING] > Caution > > Expert Rule commands are case-sensitive. ``` Rule { time {Include "*"} if { $EAGENT_64Bit_Process } {  application {Include "[iEnv SystemRoot]\\system32\\WindowsPowerShell\\*\\powershell.exe" \ "[iEnv SystemRoot]\\syswow64\\WindowsPowerShell\\*\\powershell.exe" } } else { application {Include "[iEnv SystemRoot]\\system32\\WindowsPowerShell\\*\\powershell.exe" } } user_name {Include "*"} Vulnerability_Name {Include "Powershell Command Restriction - NoLogo"} directives "-d" "-c" "illegal_api_use:bad_parameter" "illegal_api_use:invalid_call" attributes -not_auditable } ``` To know more about Expert rules commands, see [Learn Expert Rules commands for Buffer overflow, Illegal API use and Services](/v1/docs/legacy-mcafee-host-ips-rule-structure).