Windows: New PowerShell Module Files Created by Non-PowerShell Processes

Detects new PowerShell module files written into Modules directories by processes other than expected PowerShell hosts.

FreeReviewedSigma · Medium · v2
Product
windows
Category
file_event
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-05-09
Updated
2026-07-31

What it detects

This rule identifies the creation of PowerShell module-related files (such as .psm1, .psd1, .ps1, .dll) under WindowsPowerShell\Modules or PowerShell 7\Modules by processes other than common PowerShell or installer binaries. Attackers may abuse module loading to persist code that can later be executed within PowerShell contexts. It relies on Windows file creation event telemetry, specifically the target file path and the creating process image.

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.