IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

App Control: __psscriptpolicytest Powershell Script Blocks

App Control: __psscriptpolicytest Powershell Script Blocks

Environment

  • App Control Agent: All Supported Versions
  • App Control Console: All Supported Versions
  • Microsoft Windows: All Supported Versions

Symptoms

  • Blocks are seen on powershell files with a __psscriptpolicytest suffix.
  • Block events each time powershell.exe is launched.

Cause

These files are related to routine checks Microsoft implemented to determine which Language Mode to use for PowerShell. Blocking their execution reduces the attack surface of PowerShell by enabling Constrained Language Mode.

Resolution

Create a Custom Rule that enforces the Block event, but does not display a Notifier to the user.
  1. Log in to the Console and navigate to Rules > Software Rules > Custom > Add Custom Rule.
  2. Use the following details:
    • Rule Name: Block PS Script Policy Test (or something memorable)
    • Platform: Windows
    • Rule Type: Execution Control
    • Execute Action: Block
    • Notifier: Uncheck and select <none>
    • Path or File:
      • *\__psscriptpolicytest*.ps1
      • *\????????.???.ps1
    • Process: Any process
    • User: Any user
  3. Save
  4. Create the AB Exclusion referenced here to further suppress Event & File Information from being sent to Server for processing.

Additional Notes

  • In many customer environments that use PowerShell heavily, the amount of new files created by this change cause significant overhead to the server - processing these new files, cataloging the new files, etc. 
  • Some customers are seeing as much as 50-60% of all file events in their environment generated due to these scripts.
  • These files are generated with a new hash each time PowerShell is launched (the file contains a timestamp that makes each creation unique).

Related Content


Labels (1)
Was this article helpful? Yes No
100% helpful (1/1)
Article Information
Author:
Creation Date:
‎09-02-2020
Views:
24283
Contributors