{"id":"59e938ff-0d6d-4dc3-b13f-36cc28734d4e","title":"Execute Code with Pester.bat","description":"Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)","author":"Julia Fomina, oscd.community","status":"test","level":"medium","date":"2020-10-08","modified":"2023-11-09","tags":["attack.execution","attack.stealth","attack.t1059.001","attack.t1216"],"technique_ids":["T1059.001","T1216"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate use of Pester for writing tests for Powershell scripts and modules"],"references":["https://twitter.com/Oddvarmoe/status/993383596244258816","https://github.com/api0cradle/LOLBAS/blob/d148d278f5f205ce67cfaf49afdfb68071c7252a/OSScripts/pester.md"],"source_path":"rules/windows/process_creation/proc_creation_win_lolbin_pester_1.yml","source_sha256":"56c15f95a6beb203afacd3b4b5f140095c7a437cf851fdd910102a7c54d81fe7","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_lolbin_pester_1.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Execute Code with Pester.bat\nid: 59e938ff-0d6d-4dc3-b13f-36cc28734d4e\nstatus: test\ndescription: Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)\nreferences:\n    - https://twitter.com/Oddvarmoe/status/993383596244258816\n    - https://github.com/api0cradle/LOLBAS/blob/d148d278f5f205ce67cfaf49afdfb68071c7252a/OSScripts/pester.md\nauthor: Julia Fomina, oscd.community\ndate: 2020-10-08\nmodified: 2023-11-09\ntags:\n    - attack.execution\n    - attack.stealth\n    - attack.t1059.001\n    - attack.t1216\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    powershell_module:\n        Image|endswith:\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n        CommandLine|contains|all:\n            - 'Pester'\n            - 'Get-Help'\n    cmd_execution:\n        Image|endswith: '\\cmd.exe'\n        CommandLine|contains|all:\n            - 'pester'\n            - ';'\n    get_help:\n        CommandLine|contains:\n            - 'help'\n            - '\\?'\n    condition: powershell_module or (cmd_execution and get_help)\nfalsepositives:\n    - Legitimate use of Pester for writing tests for Powershell scripts and modules\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059.001","id":"T1059.001","name":"PowerShell","page":"techniques/enterprise/T1059.001/"},{"key":"enterprise/T1216","id":"T1216","name":"System Script Proxy Execution","page":"techniques/enterprise/T1216/"}],"data_path":"data/detection-rules/59e938ff-0d6d-4dc3-b13f-36cc28734d4e.json","kind":"sigma"}
