Suspicious Execute Code with Pester.bat (via process_creation)
This rule detects code execution via Pester.bat (Pester - Powershell Modulte for testing)
SigmamediumWindowsv1
sigma
suspicious-execute-code-with-pester-bat-via-process-creation
title: Suspicious Execute Code with Pester.bat (via process_creation)
id: 6a471662-bb70-50d2-92db-383a93079461
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://github.com/api0cradle/LOLBAS/blob/d148d278f5f205ce67cfaf49afdfb68071c7252a/OSScripts/pester.md
author: Huntrule Team
date: 2026-01-30
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1216
logsource:
category: process_creation
product: windows
detection:
powershell_module:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
CommandLine|contains|all:
- 'Pester'
- 'Get-Help'
cmd_execution:
Image|endswith: '\cmd.exe'
CommandLine|contains|all:
- 'pester'
- ';'
get_help:
CommandLine|contains:
- 'help'
- '\?'
condition: powershell_module or (cmd_execution and get_help)
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.