Sigma rule: Execute Code with Pester.bat
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-0d340f54ce00, updated 2023-11-09T00:00:00.000Z.
Rule
- Title
- Execute Code with Pester.bat
- Status
- test
- Level
- medium
- Author
- Julia Fomina, oscd.community
- Date
- 2020-10-08
- Modified
- 2023-11-09
- File
- rules/windows/process_creation/proc_creation_win_lolbin_pester_1.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)
Log source
- product
- windows
- category
- process_creation
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)False positives (as the rule lists them)
- Legitimate use of Pester for writing tests for Powershell scripts and modules
Tags
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1216
MITRE ATT&CK ids this rule names
References
- https://twitter.com/Oddvarmoe/status/993383596244258816
- https://github.com/api0cradle/LOLBAS/blob/d148d278f5f205ce67cfaf49afdfb68071c7252a/OSScripts/pester.md
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_lolbin_pester_1.yml
Sources and licences
SigmaHQ
"Execute Code with Pester.bat" by Julia Fomina, oscd.community (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_lolbin_pester_1.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Execute Code with Pester.bat",
entity page, dataset version ref-0d340f54ce00, updated 2023-11-09T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/59e938ff-0d6d-4dc3-b13f-36cc28734d4e (accessed 2026-11-03).
Underlying source: SigmaHQ rule 59e938ff-0d6d-4dc3-b13f-36cc28734d4e, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.