{"id":"c0b40568-b1e9-4b03-8d6c-b096da6da9ab","title":"Suspicious AgentExecutor PowerShell Execution","description":"Detects execution of the AgentExecutor.exe binary. Which can be abused as a LOLBIN to execute powershell scripts with the ExecutionPolicy \"Bypass\" or any binary named \"powershell.exe\" located in the path provided by 6th positional argument","author":"Nasreddine Bencherchali (Nextron Systems), memory-shards","status":"test","level":"high","date":"2022-12-24","modified":"2024-08-07","tags":["attack.stealth","attack.t1218"],"technique_ids":["T1218"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unknown"],"references":["https://twitter.com/lefterispan/status/1286259016436514816","https://lolbas-project.github.io/lolbas/OtherMSBinaries/Agentexecutor/","https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension","https://twitter.com/jseerden/status/1247985304667066373/photo/1"],"source_path":"rules/windows/process_creation/proc_creation_win_agentexecutor_susp_usage.yml","source_sha256":"964657f42295f37dd8c662cb1e341ab479f592dea3775cc90d6610ad5c563d18","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_agentexecutor_susp_usage.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Suspicious AgentExecutor PowerShell Execution\nid: c0b40568-b1e9-4b03-8d6c-b096da6da9ab\nrelated:\n    - id: 7efd2c8d-8b18-45b7-947d-adfe9ed04f61\n      type: similar\nstatus: test\ndescription: Detects execution of the AgentExecutor.exe binary. Which can be abused as a LOLBIN to execute powershell scripts with the ExecutionPolicy \"Bypass\" or any binary named \"powershell.exe\" located in the path provided by 6th positional argument\nauthor: Nasreddine Bencherchali (Nextron Systems), memory-shards\nreferences:\n    - https://twitter.com/lefterispan/status/1286259016436514816\n    - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Agentexecutor/\n    - https://learn.microsoft.com/en-us/mem/intune/apps/intune-management-extension\n    - https://twitter.com/jseerden/status/1247985304667066373/photo/1\ndate: 2022-12-24\nmodified: 2024-08-07\ntags:\n    - attack.stealth\n    - attack.t1218\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\AgentExecutor.exe'\n        - OriginalFileName: 'AgentExecutor.exe'\n    selection_cli:\n        # Example:\n        #   AgentExecutor.exe -powershell [scriptPath] [outputFilePath] [errorFilePath] [timeoutFilePath] [timeoutSeconds] [powershellPath] [enforceSignatureCheck] [runAs32BitOn64]\n        # Note:\n        #   - If [timeoutSeconds] is NULL then it defaults to 60000\n        #   - If [enforceSignatureCheck] is:\n        #       - \"NULL\" or \"1\" then a PowerShell instance is spawned with the args: \"-NoProfile -executionPolicy allsigned -file \"\n        #       - Else a PowerShell instance is spawned with the args: \"-NoProfile -executionPolicy bypass -file \"\n        #   - [powershellPath] is always concatendated to \"powershell.exe\"\n        CommandLine|contains:\n            - ' -powershell' # Also covers the \"-powershellDetection\" flag\n            - ' -remediationScript'\n    filter_main_pwsh:\n        CommandLine|contains:\n            - 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\'\n            - 'C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\'\n    filter_main_intune:\n        ParentImage|endswith: '\\Microsoft.Management.Services.IntuneWindowsAgent.exe'\n    condition: all of selection_* and not 1 of filter_main_*\nfalsepositives:\n    - Unknown\nlevel: high\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1218","id":"T1218","name":"System Binary Proxy Execution","page":"techniques/enterprise/T1218/"}],"data_path":"data/detection-rules/c0b40568-b1e9-4b03-8d6c-b096da6da9ab.json","kind":"sigma"}
