text code block:data_stream.dataset:azure.activitylogs and event.action:( "MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMANDS/WRITE" or "MICROSOFT.COMPUTE/VIRTUALMACHINESCALESETS/VIRTUALMACHINES/RUNCOMMANDS/WRITE" ) and event.outcome:(success or Success) and azure.activitylogs.identity.authorization.evidence.principal_id: *
Install detection rules in Elastic Security
Detect Azure VM Managed Run Command Created or Updated with Unusual Principal 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).