text code block:data_stream.dataset:azure.activitylogs and azure.activitylogs.operation_name:( "MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMAND/ACTION" or "MICROSOFT.COMPUTE/VIRTUALMACHINESCALESETS/VIRTUALMACHINES/RUNCOMMAND/ACTION" ) and event.outcome:(Success or success) and azure.activitylogs.identity.authorization.evidence.principal_id: * and source.as.number: * and azure.resource.name: *
Install detection rules in Elastic Security
Detect Azure Compute VM Command Executed in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).