Detect Device Registration in Google Chronicle
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/
YARA-L Detection Query
// Rule 1 — Single registration by unexpected application
rule t1098_005_device_registration_unexpected_app {
meta:
author = "Argus Detection Engineering"
description = "Detects Azure AD / Entra ID device registration initiated by an application outside the known MDM allowlist — consistent with adversary-controlled enrollment via AADInternals or similar tooling (T1098.005)"
mitre_tactic = "Persistence, Privilege Escalation"
mitre_technique = "T1098.005"
severity = "HIGH"
priority = "HIGH"
reference = "https://attack.mitre.org/techniques/T1098/005/"
events:
$e.metadata.vendor_name = "Microsoft"
$e.metadata.product_name = "Azure Active Directory"
$e.metadata.event_status = "SUCCESS"
(
$e.metadata.product_event_type = "Add device" or
$e.metadata.product_event_type = "Register device" or
$e.metadata.product_event_type = "Add registered owner to device" or
$e.metadata.product_event_type = "Add registered users to device" or
$e.metadata.product_event_type = "Update device" or
$e.metadata.product_event_type = "Enroll device"
)
not $e.principal.application = /(?i)microsoft intune|intune enrollment|azure active directory connect|microsoft authentication broker|^azure active directory$/
$e.principal.user.email_addresses[0] != ""
$user = $e.principal.user.email_addresses[0]
condition:
$e
}
// Rule 2 — Bulk device registration (3+ devices from same user within 1 hour)
rule t1098_005_bulk_device_registration {
meta:
author = "Argus Detection Engineering"
description = "Detects bulk Entra ID device enrollment — 3 or more successful device registrations from the same user within 1 hour — consistent with AADInternals Register-AADIntJoinedDevice automation and APT29 lateral-movement tradecraft (T1098.005)"
mitre_tactic = "Persistence, Privilege Escalation"
mitre_technique = "T1098.005"
severity = "HIGH"
priority = "HIGH"
reference = "https://attack.mitre.org/techniques/T1098/005/"
events:
$e.metadata.vendor_name = "Microsoft"
$e.metadata.product_name = "Azure Active Directory"
$e.metadata.event_status = "SUCCESS"
(
$e.metadata.product_event_type = "Add device" or
$e.metadata.product_event_type = "Register device" or
$e.metadata.product_event_type = "Enroll device"
)
$e.principal.user.email_addresses[0] != ""
$user = $e.principal.user.email_addresses[0]
match:
$user over 1h
condition:
#e >= 3
} Two Chronicle YARA-L 2.0 rules for T1098.005 device registration detection. Rule 1 fires on any single successful Entra ID device registration where the initiating application is outside the known MDM allowlist (Intune, Azure AD Connect, Authentication Broker), covering the AADInternals and custom-script attack vectors. Rule 2 uses the match/condition aggregation window to fire when the same user triggers 3 or more device registration events within a 1-hour window, covering bulk enrollment abuse consistent with APT29 tradecraft.
Data Sources
Required Tables
False Positives & Tuning
- IT provisioning teams performing mass device enrollment during a hardware refresh using tooling that does not match the Microsoft MDM application name allowlist
- Azure AD B2B guest device registrations during cross-tenant collaboration scenarios where the initiating app identity differs from tenant-native Intune
- First-time Azure AD hybrid join synchronisation where Azure AD Connect registers all domain-joined machines in a single scheduled sync pass
- Third-party identity governance solutions (SailPoint, Saviynt) performing device lifecycle operations as part of a joiner/mover/leaver workflow
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.
- 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.
- 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.
- 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.
- 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.
References (14)
- https://attack.mitre.org/techniques/T1098/005/
- https://www.mandiant.com/resources/blog/apt29-continues-targeting-microsoft
- https://www.cisa.gov/uscert/ncas/alerts/aa22-074a
- https://o365blog.com/post/devices/
- https://o365blog.com/post/mdm
- https://o365blog.com/post/bprt/
- https://www.microsoft.com/security/blog/2022/01/26/evolved-phishing-device-registration-trick-adds-to-phishers-toolbox-for-victims-without-mfa
- https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
- https://learn.microsoft.com/en-us/entra/identity/devices/overview
- https://learn.microsoft.com/en-us/entra/identity/monitoring-health/reference-audit-activities
- https://expel.com/blog/observing-atlas-lion-part-one/
- https://www.darkreading.com/threat-intelligence/fireeye-s-mandia-severity-zero-alert-led-to-discovery-of-solarwinds-attack
- https://github.com/dirkjanm/ROADtools
- https://learn.microsoft.com/en-us/graph/api/device-post-devices
Unlock Pro Content
Get the full detection package for T1098.005 including response playbook, investigation guide, and atomic red team tests.