AZT508 - Azure Policy

Tomáš Hrabkovský 0 Reputation points
2025-01-13T15:12:22.7433333+00:00

Hello all :)

I have designed the following simple KQL query to monitor for potential misuse of the DeployIfNotExists effect by detecting policy definition updates:


AzureActivity
| where OperationNameValue == 'MICROSOFT.AUTHORIZATION/POLICYDEFINITIONS/WRITE'
| where ActivityStatusValue == "Success"
| extend CallerList = split(Caller, '@')
| project
    TimeGenerated,
    SubscriptionId,
    Caller,
    CallerIpAddress,
    _ResourceId,
    Name = CallerList[0],
    UPNSUffix = CallerList[1]

My goal is to detect attempts to exploit the automated deployment mechanism by monitoring successful updates to policy definitions. Could you confirm if this query is sufficient for monitoring such activities, or would you recommend additional logic or enhancements?

For example, is it necessary to correlate these updates with subsequent deployments or include additional filtering criteria to improve detection? Thank you in advance for your guidance!

Source: https://microsoft.github.io/Azure-Threat-Research-Matrix/Persistence/AZT508/AZT508/

Thank you :)

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
944 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.