EPM Performance problems when "Anti-Tampering Protection" conflicts with another security product
Symptom
After installing the EPM Agent on an endpoint, the endpoint user may experience one or more of these symptoms:
- Explorer.exe takes a long time to open (30-60 seconds or perhaps longer)
- Chrome or Edge web browsers may show a file download progress as incomplete when the file appears in the user's downloads folder. When going into the properties of the file you downloaded, the EPM tab may be unresponsive. The web browser progress indicator may eventually show the file download has been completed but this could take a more extended time (15 minutes or much longer)
- Cmd.exe may take a long time to open
This is an example of what the EPM vf_agent_srv.trace.x log entry will look like:
2023.04.10 12:17:00 PID:4568 TID:4572 CvfCustCmdClientValidator::Validate: ERROR: Unknown module. contentId=35, clientPid=12424 clientPath=[C:\Windows\explorer.exe], clientUser Name=[DOMAIN\USER] SID=[S-1-12-1-1234567890-1234567890-1234567890-1234567890].
2023.04.10 12:19:54 PID:4568 TID:4572 CvfCustCmdClientValidator::Validate: ERROR: Stack frames count 8
00 00007FF861BE4CF4 00007FF861B40000 C:\Windows\SYSTEM32
tdll.dll
01 00007FF8619E2DB2 00007FF8619C0000 C:\Windows\System32\RPCRT4.dll
02 00007FF8619DFE4B 00007FF8619C0000 C:\Windows\System32\RPCRT4.dll
03 00007FF861A12816 00007FF8619C0000 C:\Windows\System32\RPCRT4.dll
04 00007FF8619C188C 00007FF8619C0000 C:\Windows\System32\RPCRT4.dll
05 00007FF8619C1D3F 00007FF8619C0000 C:\Windows\System32\RPCRT4.dll
06 00007FF86144A874 00007FF861430000 C:\Windows\System32\sechost.dll
IF YOU DON'T SEE CvfCustCmdClientValidator ERROR IN VF_AGENT_SRV.TRACE LOGS, THIS ARTICLE DOESN'T APPLY TO YOU
Environment
24.2;24.3;24.4;24.5;24.6;24.7;24.8;24.9 EPM EPM Agent
- EPM Windows Agent Installed with Anti-Tampering Protection set to "Strong" or in some cases "Moderate"
- Another security product is installed such as "Digital Guardian", "Bit Defender", or "Microsoft Defender" (with Anti-Malware protection enabled)
Cause
This is caused because the other security product is attempting to inject their dll files into a process stack like explorer.exe, and EPM's "Anti-Tampering Protection" setting is having a problem with this.
EPM's Anti-Tampering Protection settings are as follows:
- Strong: A process call stack may only contain Windows dlls. EPM does not allow third party dlls to be injected. This is the default setting.
- Moderate: A process call stack may contain a dll signed by any publisher.
- Off: Disables anti-tampering protection.
Reference:
Notes in Digital Guardian and Bitdefender:
- The way Digital Guardian and Bit Defender injects their dlls into explorer.exe use dynamically generated code, and EPM is not able to identify Digital Guardian DLL or Bit Defender as a “trusted” origin. Therefore the "Strong" or "Moderate" Anti-Tampering Protection settings will not work in this situation.
Notes on Microsoft Defender:
- Issue has been found to occur if Microsoft Defender's Anti Malware Protection (real time scan) is enabled
IF YOU DON'T SEE CvfCustCmdClientValidator ERROR IN VF_AGENT_SRV.TRACE LOGS, THIS ARTICLE DOESN'T APPLY TO YOU
Resolution
Only take these steps if you saw the CvfCustCmdClientValidator error in the vf_agent_srv.trace logs
- Upgrade to the latest EPM Windows Agent
- In the EPM Console, go to the "Configuration" menu. Ensure the drop down at the top says "Agent configuration"
- To apply the fix for all computers, edit the "General configuration". To test a fix for just one computer, choose "Create custom configuration" and specify one endpoint
- Find the parameter for Anti-tampering protection and set to "Minimal" and save the setting
- For Digital Guardian, add an exclusion.
Find the parameter for Exclude files from policies (Windows) and add a definition for thDGAPI64.dll