Sigma rule: AgentExecutor PowerShell Execution

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-dffdf75d3d00, updated 2024-08-07T00:00:00.000Z.

Rule

Title
AgentExecutor PowerShell Execution
Status
test
Level
medium
Author
Nasreddine Bencherchali (Nextron Systems), memory-shards
Date
2022-12-24
Modified
2024-08-07
File
rules/windows/process_creation/proc_creation_win_agentexecutor_potential_abuse.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

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

Log source

product
windows
category
process_creation

Detection

selection_img:
    - Image: '\AgentExecutor.exe'
    - OriginalFileName: 'AgentExecutor.exe'
selection_cli:
    # Example:
    #   AgentExecutor.exe -powershell [scriptPath] [outputFilePath] [errorFilePath] [timeoutFilePath] [timeoutSeconds] [powershellPath] [enforceSignatureCheck] [runAs32BitOn64]
    # Note:
    #   - If [timeoutSeconds] is NULL then it defaults to 60000
    #   - If [enforceSignatureCheck] is:
    #       - "NULL" or "1" then a PowerShell instance is spawned with the args: "-NoProfile -executionPolicy allsigned -file "
    #       - Else a PowerShell instance is spawned with the args: "-NoProfile -executionPolicy bypass -file "
    #   - [powershellPath] is always concatendated to "powershell.exe"
    CommandLine|contains:
        - ' -powershell' # Also covers the "-powershellDetection" flag
        - ' -remediationScript'
filter_main_intune:
    ParentImage|endswith: '\Microsoft.Management.Services.IntuneWindowsAgent.exe'
condition: all of selection_* and not 1 of filter_main_*

False positives (as the rule lists them)

  • Legitimate use via Intune management. You exclude script paths and names to reduce FP rate

Tags

  • attack.stealth
  • attack.t1218

MITRE ATT&CK ids this rule names

Related rules

References

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_agentexecutor_potential_abuse.yml

Sources and licences

  • SigmaHQ

    "AgentExecutor PowerShell Execution" by Nasreddine Bencherchali (Nextron Systems), memory-shards (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_agentexecutor_potential_abuse.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: AgentExecutor PowerShell Execution",
entity page, dataset version ref-dffdf75d3d00, updated 2024-08-07T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/7efd2c8d-8b18-45b7-947d-adfe9ed04f61 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 7efd2c8d-8b18-45b7-947d-adfe9ed04f61, 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.