T1098.005 Elastic Security · Elastic

Detect Device Registration in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
// T1098.005 — Bulk Device Registration (primary signal)
// Fires when the same user registers 3+ devices within 1 hour
sequence by azure.auditlogs.initiated_by.user.user_principal_name with maxspan=1h
  [any where
    event.dataset == "azure.auditlogs" and
    azure.auditlogs.operation_name in (
      "Add device",
      "Register device",
      "Add registered owner to device",
      "Add registered users to device",
      "Update device",
      "Enroll device"
    ) and
    event.outcome == "success"
  ] with runs=3

// ── Secondary (run as a separate saved query) ──────────────────────────────
// Fires on ANY single device registration initiated by an unexpected app
// any where
//   event.dataset == "azure.auditlogs" and
//   azure.auditlogs.operation_name in (
//     "Add device", "Register device", "Add registered owner to device",
//     "Add registered users to device", "Update device", "Enroll device"
//   ) and
//   event.outcome == "success" and
//   not azure.auditlogs.initiated_by.app.display_name in (
//     "Microsoft Intune",
//     "Microsoft Azure Active Directory Connect",
//     "Microsoft Intune Enrollment",
//     "Azure Active Directory",
//     "Microsoft Authentication Broker"
//   )
high severity medium confidence

Detects T1098.005 device registration abuse in Entra ID / Azure AD using Elastic EQL against the azure.auditlogs dataset. The primary query triggers a sequence-with-runs alert when the same user principal name registers 3 or more devices within a 1-hour window — consistent with AADInternals-style bulk enrollment. The commented secondary query alerts on any single registration initiated by an application outside the known MDM allowlist (Intune, Azure AD Connect, Authentication Broker).

Data Sources

Azure Active Directory Audit Logs ingested via Elastic Azure integration (logs-azure.auditlogs-*)

Required Tables

logs-azure.auditlogs-*

False Positives & Tuning

  • IT administrators performing bulk device enrollment during corporate onboarding or hardware refresh campaigns using approved service accounts
  • Automated MDM provisioning pipelines (Intune Autopilot, JAMF) that trigger multiple sequential registration audit events mapped to a single service identity
  • Azure AD hybrid join initial synchronisation where Azure AD Connect registers all existing domain-joined machines in a single pass
  • Employees participating in a sanctioned BYOD rollout who self-enroll several personal devices within a short window
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