Detectionlowtest

PowerShell Module File Created

Detects the creation of a new PowerShell module ".psm1", ".psd1", ".dll", ".ps1", etc.

Open in Detection LabConvert ruleBuild Package
Nasreddine BencherchaliCreated 2023-05-09e36941d0-c0f0-443f-bc6f-cb2952eb69eawindows
Log Source
WindowsFile Event
ProductWindows← raw: windows
CategoryFile Event← raw: file_event

Events for file system activity including creation, modification, and deletion.

Detection Logic
Detection Logic1 selector
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        TargetFilename|contains:
            - '\WindowsPowerShell\Modules\'
            - '\PowerShell\7\Modules\'
    condition: selection
False Positives

Likely

References
1
Resolving title…
Internal Research
2
Resolving title…
learn.microsoft.com
MITRE ATT&CK
Rule Metadata
Rule ID
e36941d0-c0f0-443f-bc6f-cb2952eb69ea
Status
test
Level
low
Type
Detection
Created
2023-05-09
Path
rules/windows/file/file_event/file_event_win_powershell_module_creation.yml
Raw Tags
attack.persistence
View on GitHub