Persistence (TA0003)(external, opens in a new tab or window)
Privilege Escalation (TA0004)(external, opens in a new tab or window)
text code block:sequence by azure.correlation_id with maxspan=5m [any where data_stream.dataset == "azure.auditlogs" and azure.auditlogs.identity == "Device Registration Service" and azure.auditlogs.operation_name == "Add device" and ( azure.auditlogs.properties.additional_details.value like "Microsoft.OData.Client/*" or azure.auditlogs.properties.additional_details.value like "Dsreg/*" or azure.auditlogs.properties.additional_details.value == "DeviceRegistrationClient" ) and `azure.auditlogs.properties.target_resources.0.modified_properties.1.display_name` == "CloudAccountEnabled" and `azure.auditlogs.properties.target_resources.0.modified_properties.1.new_value` == "[true]"] [any where data_stream.dataset == "azure.auditlogs" and azure.auditlogs.operation_name == "Add registered users to device" and `azure.auditlogs.properties.target_resources.0.modified_properties.2.new_value` like "*urn:ms-drs:enterpriseregistration.windows.net*"] [any where data_stream.dataset == "azure.auditlogs" and azure.auditlogs.operation_name == "Add registered owner to device"]
Install detection rules in Elastic Security
Detect Entra ID Unusual Cloud Device Registration 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).