Persistence (TA0003)(external, opens in a new tab or window)
text code block:sequence by azure.correlation_id with maxspan=1m [any where event.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/*" 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]" ) and `azure.auditlogs.properties.target_resources.0.modified_properties.3.new_value` like "*10.0.19041.928*"] [any where event.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 event.dataset == "azure.auditlogs" and azure.auditlogs.operation_name == "Add registered owner to device"]
Install detection rules in Elastic Security
Detect Entra ID Device Registration Detected (ROADtools) 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).