Detectionmediumtest

Execute Code with Pester.bat as Parent

Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)

Open in Detection LabConvert ruleBuild Package
François Hubaut, Nasreddine BencherchaliCreated 2022-08-2018988e1b-9087-4f8a-82fe-0414dce49878windows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic2 selectors
detection:
    selection_module:
        ParentImage|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        ParentCommandLine|contains: '\WindowsPowerShell\Modules\Pester\'
    selection_cli:
        ParentCommandLine|contains:
            - '{ Invoke-Pester -EnableExit ;'
            - '{ Get-Help "'
    condition: all of selection_*
False Positives

Legitimate use of Pester for writing tests for Powershell scripts and modules

Rule Metadata
Rule ID
18988e1b-9087-4f8a-82fe-0414dce49878
Status
test
Level
medium
Type
Detection
Created
2022-08-20
Path
rules/windows/process_creation/proc_creation_win_lolbin_pester.yml
Raw Tags
attack.executionattack.stealthattack.t1059.001attack.t1216
View on GitHub