Suspicious Execute Code with Pester.bat as Parent (via process_creation)

This rule detects code execution via Pester.bat (Pester - Powershell Modulte for testing)

SigmamediumWindowsv1
sigma
title: Suspicious Execute Code with Pester.bat as Parent (via process_creation)
id: 56cf1436-4925-5586-97cd-24eb435835c6
status: stable
description: This rule detects code execution via Pester.bat (Pester - Powershell Modulte for testing)
references:
    - https://attack.mitre.org/techniques/T1216/
    - https://attack.mitre.org/techniques/T1059/001/
    - https://twitter.com/Oddvarmoe/status/993383596244258816
    - https://twitter.com/_st0pp3r_/status/1560072680887525378
author: Huntrule Team
date: 2026-07-09
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059.001
    - attack.t1216
logsource:
    category: process_creation
    product: windows
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_*
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

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