Rules for T1078.004
How the 92 rules tagged with T1078.004 are built: the tables they read, what they filter, how they join, and when they run. The most used of each; every rule is listed below.
Tables and parsers
AuditLogs 45IdentityInfo 16SigninLogs 16AzureActivity 9_Im_Authentication 9AADServicePrincipalSignInLogs 8BehaviorAnalytics 6AWSCloudTrail 5AADNonInteractiveUserSignInLogs 4_Im_AuditEvent 4DataverseActivity 3DeviceInfo 3OktaSSO 3_Im_ProcessEvent 3CloudAuditEvents 2
Filtered columns
AuditLogs.OperationNameAdd app role assignment to service principal4Update a partner cross-tenant access setting4Add member to role3Delete user3Update user3AuditLogs.CategoryRoleManagement12ApplicationManagement9UserManagement2AuditLogs.ActivityDisplayNameAdd eligible member to role6Add member to role6Add member to role request denied (PIM activation)3add app role assignment1add eligible member to role1AuditLogs.Resultsuccess11SigninLogs.ResultType085001211501251501401700431_Im_Authentication.EventResultSuccess9Partial5AuditLogs.AADOperationTypeAssign7AssignEligibleRole5CreateRequestGrantedRole2CreateRequestPermanentEligibleRole2CreateRequestPermanentGrantedRole2AADServicePrincipalSignInLogs.ResultType05Success4AzureActivity.OperationNameValue/get3/read3/secrets/3microsoft.keyvault/vaults/3/list1AWSCloudTrail.EventNameCreateAccessKey2CreateRole2CreateUser2DeleteGroup2DeleteUser2AuditLogs.LoggedByServiceCore Directory5AzureActivity.ActivitySubstatusValueok4OK1BehaviorAnalytics.ActivityTypeLogOn5FailedLogOn4IdentityInfo.AssignedRolesadmin4Admin1_Im_Authentication.EventProductMicrosoft Entra ID4
Joins
AuditLogs ⋈ AuditLogsAADServicePrincipalSignInLogs ⋈ AADServicePrincipalSignInLogsIdentityInfo ⋈ _Im_AuthenticationAADServicePrincipalSignInLogs ⋈ AzureActivityAuditLogs ⋈ SigninLogsBehaviorAnalytics ⋈ IdentityInfoSigninLogs ⋈ SigninLogs_Im_AuditEvent ⋈ _Im_Authentication_Im_Authentication ⋈ _Im_AuthenticationAADNonInteractiveUserSignInLogs ⋈ AADNonInteractiveUserSignInLogsAADNonInteractiveUserSignInLogs ⋈ AzureActivityAADNonInteractiveUserSignInLogs ⋈ SigninLogsAzureActivity ⋈ AzureActivityAzureActivity ⋈ SigninLogsBehaviorAnalytics ⋈ SigninLogs
Idioms
make_set 28mv-expand (unpack arrays) 27leftanti join (A without B) 16arg_max (latest or earliest row per key) 14dcount 11join with no kind= (innerunique: duplicate left keys collapse) 4arg_min (latest or earliest row per key) 3make-series (time series, anomaly) 2make_list 2
Severity
Medium 32High 23Low 5
Schedules (analytic rules)
every 1d over 1d 12every 2h over 2h 10every 1d over 14d 6every 2d over 2d 6every 1h over 1h 5every 1h over 14d 4every 1d over 7d 3every 1h over 1d 2every 1h over 2h 2every 1d over 2d 1every 1h over 1455m 1every 1h over 7d 1every 3h over 3h 1
Look-back windows in ago()
1d 714d 67d 22d 130d 13h 1
Every rule tagged with it
- Addition of a Temporary Access Pass to a Privileged Account
- Application ID URI Changed
- Application Redirect URL Update
- Changes to Application Logout URL
- Changes to Application Ownership
- Changes to PIM Settings
- Conditional Access Policy Modified by New User
- Guest Users Invited to Tenant by New Inviters
- Suspicious linking of existing user to external User
- URL Added to Application from Unknown Domain
- Suspicious Sign In by Entra ID Connect Sync Account
- Suspicious Login from deleted guest account
- Suspicious modification of Global Administrator user properties
- Anomalous Single Factor Signin
- Authentications of Privileged Accounts Outside of Expected Controls
- Privileged User Logon from new ASN
- Service Principal Authentication Attempt from New Country
- AWSCloudTrail - IAM user and group object changes
- AWSCloudTrail - Root User New Access Key Created
- AWSCloudTrail - IAM Risky Role Name Created
- AWSCloudTrail - IAM suspicious STS AssumeRole from unseen identity
- Anomalous Azure Operation Hunting Model
- Azure VM Run Command executed from Azure IP address
- New PA, PCA, or PCAS added to Azure DevOps
- Account Elevated to New Role
- Privileged Account Permissions Changed
- User Added to Admin Role
- Successful Signin From Non-Compliant Device
- Risky Sign-in with new MFA method
- Application Granted EWS Permissions
- GCP Audit Logs - Data Access Logging Exemption Added for Principal
- GCP Audit Logs - Storage Bucket Made Public
- Identify GCP Service Account with Overly Permissive Roles
- K8s token audit then novel cloud control plane operations
- Key Vault harvest to SPN sign-in then out-of-scope resource access
- Key Vault secret harvest followed by novel SPN sign-in from non-1P IP
- Novel SPN sign-in followed by Azure RBAC write
- Pod token tooling then cloud RBAC write
- Suspicious sign-in followed by cloud network exposure writes
- Novel sign-in context followed by IAM reconnaissance burst
- Suspicious OAuth App Consent Granting Sensitive Permissions
- Novel identity then Key Vault secret burst
- Entra App credential change followed by service principal sign-in burst
- Rare service principal sign-in followed by RBAC write
- AAD Connect host remote admin followed by Entra privilege operation
- Entra hybrid user sign-in followed by on-prem lateral movement
- Kerberoast burst followed by cloud sign-in
- RDP to hybrid joined device followed by Entra access
- WMI or remote admin execution on hybrid device followed by cloud sign-in
- App credential change followed by SP sign-in burst
- Appliance management session followed by RBAC write
- Rare service principal authentication tuple
- Service principal Conditional Access anomaly
- Service principal credential change followed by novel SP sign-in
- Suspicious sign-in followed by auth method or role change
- Dataverse - Activity after failed logons
- Dataverse - Identity management activity outside of privileged directory role membership
- Dataverse - Identity management changes without MFA
- Account created or deleted by non-approved user
- Account Created and Deleted in Short Timeframe
- Admin promotion after Role Management Application Permission Grant
- Microsoft Entra ID Role Management Permission Grant
- Bulk Changes to Privileged Account Permissions
- Cross-tenant Access Settings Organization Added
- Cross-tenant Access Settings Organization Deleted
- Cross-tenant Access Settings Organization Inbound Collaboration Settings Changed
- Cross-tenant Access Settings Organization Inbound Direct Settings Changed
- Cross-tenant Access Settings Organization Outbound Collaboration Settings Changed
- Cross-tenant Access Settings Organization Outbound Direct Settings Changed
- Guest accounts added in Entra ID Groups other than the ones specified
- MFA Rejected by User
- NRT PIM Elevation Request Rejected
- NRT Privileged Role Assigned Outside PIM
- PIM Elevation Request Rejected
- Privileged Accounts - Sign in Failure Spikes
- Privileged Role Assigned Outside PIM
- Suspicious Sign In Followed by MFA Modification
- External guest invitation followed by Microsoft Entra ID PowerShell signin
- User Accounts - Sign in Failure due to CA Spikes
- User Assigned New Privileged Role
- New User Assigned to Privileged Role
- High-Risk Cross-Cloud User Impersonation
- High-Risk Admin Activity
- User Login from Different Countries within 3 hours
- Initiate impersonation session (Okta)
- Threat Essentials - User Assigned Privileged Role
- SlackAudit - User login after deactivated.
- Secret Exposure with Anomalous SPN Sign-In
- [Entra ID] Application Assigned Administrator Permissions Immediately After Obtaining Role Management Permissions
- [Entra ID] Privilege Elevation Request Denied
- [Entra ID] Privileged Role Assigned to User
- [Entra ID] Privileged Role Assigned to a New User
Rules are from Azure/Azure-Sentinel (MIT licence) at commit 9ea9f7c. VeriKQL stores facts its parser read from each rule and links the rule; it does not copy rule text. Counts are what the rules do: practice, not guidance, and not Microsoft's recommendation.