LoFP LoFP / administrators may legitimately create azure automation runbooks. filter as needed.

Techniques

Sample rules

Azure Automation Runbook Created

Description

The following analytic identifies the creation of a new Azure Automation Runbook within an Azure tenant. Azure Automation is a cloud-based automation platform that allows administrators to automate Azure management tasks and orchestrate actions across external systems within Azure. Azure Automation script files called Runbooks that can be written in PowerShell or Python. Adversaries or red teams who have obtained privileged access to an Azure tenant may create an Azure Automation Runbook that runs with elevated privileges to maintain persistence in the Azure tenant. A malicious Automation Runbook can be created to create Global Administrators in Azure AD, execute code on VMs, etc.

Detection logic

 `azure_audit` operationName.localizedValue="Create or Update an Azure Automation Runbook" object!=AzureAutomationTutorial* status.value=Succeeded 
| dedup object 
| rename claims.ipaddr as src_ip 
| rename caller as user 
| stats count min(_time) as firstTime max(_time) as lastTime by object user, src_ip, resourceGroupName, object_path 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `azure_automation_runbook_created_filter`