T1651 Google Chronicle · YARA-L

Detect Cloud Administration Command in Google Chronicle

This detection identifies adversaries abusing cloud-native management services — such as AWS Systems Manager (SSM) Run Command, Azure RunCommand, and Azure Automation Runbooks — to remotely execute commands inside virtual machines. Because these mechanisms use legitimate, pre-installed VM agents (SSM Agent, Azure VM Agent), execution is indistinguishable from authorized administrative activity at the OS level. The detection focuses on the cloud control plane: auditing who invoked the run-command API, from what identity/IP, against which VMs, and whether the invocation pattern deviates from baseline administrative behavior. High-severity APT29/Nobelium tradecraft has leveraged Azure Run Command and Admin-on-Behalf-of (AOBO) post-compromise to execute code on tenant VMs without touching traditional lateral movement paths.

MITRE ATT&CK

Tactic
Execution
Technique
T1651 Cloud Administration Command
Canonical reference
https://attack.mitre.org/techniques/T1651/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule detection_t1651 {
  meta:
    author = "Argus Detection Platform"
    description = "Detects Cloud Administration Command - T1651"
    severity = "HIGH"
    mitre_attack = "T1651"
    reference = "https://attack.mitre.org/techniques/T1651/"

  events:
    $e.metadata.event_type = "PROCESS_LAUNCH"
    $e.principal.hostname = $hostname
    $e.target.process.file.full_path = $process_path
    $e.target.process.command_line = $cmdline
    re.regex($e.target.process.file.full_path, `(?i)(powershell|cmd|wscript|cscript)\.exe$`) and
    re.regex($e.target.process.command_line, `(?i)(-enc|-bypass|invoke-expression)`)
    not re.regex($e.principal.process.file.full_path, `(?i)(trustedinstaller|msiexec)`)

  condition:
    $e
}
high severity medium confidence

Google Chronicle YARA-L 2.0 rule for detecting Cloud Administration Command (T1651). Uses Chronicle UDM event model to identify cloud administration command behaviors across endpoint and cloud telemetry.

Data Sources

EDR Platform

Required Tables

PROCESS_LAUNCH

False Positives & Tuning

  • Legitimate IT operations teams using Azure RunCommand for patching, configuration management, or troubleshooting via approved change tickets
  • Azure Automation Runbooks configured for scheduled maintenance tasks such as VM shutdowns, certificate rotation, or log collection
  • Cloud management platforms (Ansible Tower, HashiCorp Terraform, Azure Arc) that use RunCommand as part of infrastructure-as-code pipelines
Download portable Sigma rule (.yml)

Other platforms for T1651


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Azure RunCommand - Execute PowerShell via Azure CLI

    Expected signal: AzureActivity log entry with OperationName 'Microsoft.Compute/virtualMachines/runCommand/action', ActivityStatus 'Succeeded', and Caller set to the authenticated user's UPN or service principal object ID. On the VM: SecurityEvent 4688 showing powershell.exe spawned by WindowsAzureGuestAgent.exe.

  2. Test 2AWS SSM Run Command - Execute Shell Script on EC2 Instance

    Expected signal: AWS CloudTrail event with eventName 'SendCommand', eventSource 'ssm.amazonaws.com', requestParameters containing documentName 'AWS-RunShellScript' and target instanceId. On the EC2 instance: /var/log/amazon/ssm/amazon-ssm-agent.log entries showing command receipt and execution.

  3. Test 3Azure Automation Runbook - Execute Commands via Automation Account

    Expected signal: AzureActivity log entries with OperationName 'Microsoft.Automation/automationAccounts/runbooks/write', 'Microsoft.Automation/automationAccounts/jobs/write', and 'Microsoft.Automation/automationAccounts/jobs/read'. Azure Automation job logs in the portal showing execution output.

Unlock Pro Content

Get the full detection package for T1651 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections