
Summary
This detection rule monitors the creation of new PowerShell modules, specifically focusing on file extensions associated with PowerShell such as .psm1 (module), .psd1 (data), .dll (dynamic link library), and .ps1 (script). The rule is triggered by file event logs related to the execution of PowerShell commands that result in the creation of these types of files. In particular, it looks for instances where the 'Image' ends with either '\powershell.exe' or '\pwsh.exe', indicating the use of PowerShell, and simultaneously checks if the 'TargetFilename' pertains to specific PowerShell module directories: either '\WindowsPowerShell\Modules\' or '\PowerShell\7\Modules\'. This rule can help identify potential unauthorized or malicious attempts to create or deploy PowerShell modules, which can be indicative of persistence techniques used by attackers.
Categories
- Windows
- Endpoint
Data Sources
- File
Created: 2023-05-09