{"id":"18988e1b-9087-4f8a-82fe-0414dce49878","title":"Execute Code with Pester.bat as Parent","description":"Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)","author":"frack113, Nasreddine Bencherchali","status":"test","level":"medium","date":"2022-08-20","modified":"","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://twitter.com/_st0pp3r_/status/1560072680887525378"],"source_path":"rules/windows/process_creation/proc_creation_win_lolbin_pester.yml","source_sha256":"93f1cee82fd6e6cde3fd68887fa168940434f18d9ef10b522d9b01b9f3800e63","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_lolbin_pester.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 as Parent\nid: 18988e1b-9087-4f8a-82fe-0414dce49878\nrelated:\n    - id: 59e938ff-0d6d-4dc3-b13f-36cc28734d4e\n      type: similar\nstatus: test\ndescription: Detects code execution via Pester.bat (Pester - Powershell Modulte for testing)\nreferences:\n    - https://twitter.com/Oddvarmoe/status/993383596244258816\n    - https://twitter.com/_st0pp3r_/status/1560072680887525378\nauthor: frack113, Nasreddine Bencherchali\ndate: 2022-08-20\ntags:\n    - attack.execution\n    - attack.stealth\n    - attack.t1059.001\n    - attack.t1216\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_module:\n        ParentImage|endswith:\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n        ParentCommandLine|contains: '\\WindowsPowerShell\\Modules\\Pester\\'\n    selection_cli:\n        ParentCommandLine|contains:\n            - '{ Invoke-Pester -EnableExit ;'\n            - '{ Get-Help \"'\n    condition: all of selection_*\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/18988e1b-9087-4f8a-82fe-0414dce49878.json","kind":"sigma"}
