T1098.005 Splunk · SPL

Detect Device Registration in Splunk

Adversaries may register a device to an adversary-controlled account to establish persistence or escalate privileges. Devices may be registered in an MFA system (Duo, Okta) to bypass multi-factor authentication requirements, or registered in a device management system (Entra ID, Intune) to access sensitive data while bypassing conditional access policies. APT29 has enrolled attacker-controlled devices into compromised Azure AD tenants. Tools like AADInternals can automate device registration to Entra ID. Adversaries may also exploit self-enrollment workflows that require only a username and password for dormant or first-device scenarios.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1098 Account Manipulation
Sub-technique
T1098.005 Device Registration
Canonical reference
https://attack.mitre.org/techniques/T1098/005/

SPL Detection Query

Splunk (SPL)
spl
index=azure_audit sourcetype="azure:audit"
  (operationName="Add device" OR operationName="Register device" OR operationName="Add registered owner to device" OR operationName="Add registered users to device" OR operationName="Update device" OR operationName="Enroll device")
  result="success"
| eval initiatedByUPN=coalesce('initiatedBy.user.userPrincipalName', "unknown")
| eval initiatedByIP=coalesce('initiatedBy.user.ipAddress', "unknown")
| eval initiatedByApp=coalesce('initiatedBy.app.displayName', "unknown")
| eval deviceName=coalesce('targetResources{}.displayName', "unknown")
| eval deviceId=coalesce('targetResources{}.id', "unknown")
| eval isKnownEnrollmentApp=if(initiatedByApp IN ("Microsoft Intune", "Microsoft Azure Active Directory Connect", "Microsoft Intune Enrollment", "Azure Active Directory", "Microsoft Authentication Broker"), 1, 0)
| eval suspicionScore=0
| eval suspicionScore=suspicionScore + if(isKnownEnrollmentApp=0, 2, 0)
| eval suspicionScore=suspicionScore + if(match(initiatedByIP, "^(tor|vpn|proxy)"), 1, 0)
| stats
    count as registrationCount,
    values(deviceName) as deviceNames,
    values(operationName) as operations,
    values(initiatedByIP) as sourceIPs,
    values(initiatedByApp) as apps,
    sum(suspicionScore) as totalSuspicionScore,
    earliest(_time) as firstRegistration,
    latest(_time) as lastRegistration
  by initiatedByUPN
| eval bulkRegistration=if(registrationCount >= 3, 1, 0)
| eval totalSuspicionScore=totalSuspicionScore + if(bulkRegistration=1, 2, 0)
| where totalSuspicionScore > 0 OR bulkRegistration=1
| eval alertReason=case(
    bulkRegistration=1 AND totalSuspicionScore > 2, "Bulk registration by unexpected app",
    bulkRegistration=1, "Bulk device registration (3+ devices)",
    totalSuspicionScore > 2, "Device registered by unexpected application",
    true(), "Suspicious device registration"
  )
| table firstRegistration, lastRegistration, initiatedByUPN, sourceIPs, apps, deviceNames, registrationCount, totalSuspicionScore, alertReason
| sort - totalSuspicionScore
high severity medium confidence

Detects suspicious Entra ID / Azure AD device registrations using Azure Audit logs. Assigns a suspicion score based on whether the registration was initiated by a known Microsoft enrollment application, whether bulk registrations occurred (3 or more from the same user), and other indicators. Groups registrations by initiating user to surface anomalous patterns. Requires Azure AD audit logs to be forwarded to Splunk.

Data Sources

Azure AD Audit LogsIdentity: User Account

Required Sourcetypes

azure:audit

False Positives & Tuning

  • IT administrators bulk-enrolling corporate devices during device refresh cycles or new employee onboarding
  • Automated device enrollment workflows via Microsoft Intune Autopilot or SCCM co-management
  • Users registering personal devices under a BYOD policy, especially after password resets
  • Third-party MDM solutions that register devices using their own application identity rather than standard Microsoft apps
Download portable Sigma rule (.yml)

Other platforms for T1098.005


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Register Device to Entra ID using AADInternals PowerShell Module

    Expected signal: Azure AD AuditLogs: OperationName='Add device' with actor UPN, source IP, and DeviceName='TestDevice-AtomicTest'. Result='success'. The initiating app will appear as an unexpected application ID (not standard Intune). SigninLogs will show token acquisition event from the same session.

  2. Test 2MFA Device Enrollment on Dormant Account Using Only Password

    Expected signal: Azure AD AuditLogs: OperationName='User registered security info' or 'User started security info registration' and 'Update user' with modified properties showing phoneAuthenticationMethod added. SigninLogs: ROPC flow authentication (non-interactive) from the test IP. Identity Protection may flag the ROPC sign-in as risky.

  3. Test 3Bulk Device Registration to Entra ID via Graph API

    Expected signal: Azure AD AuditLogs: 5 separate 'Add device' events within ~10 seconds from the same actor UPN and IP address. Each event will have Result='success' and DeviceName='AtomicTestDevice-Bulk-{1-5}'. The rapid succession of registrations will be visible in the timestamp sequence.

  4. Test 4Register Device to Entra ID Using Existing PRT (Primary Refresh Token) via dsregcmd

    Expected signal: Azure AD AuditLogs: OperationName='Add device' or 'Register device' with DeviceName matching the machine's hostname. Initiated by the currently logged-on user. Windows Event Log (System): Event ID 4648 or Events from Microsoft-Windows-User Device Registration source. Certificate created in CERT:\LocalMachine\My for the device.

Unlock Pro Content

Get the full detection package for T1098.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections