Entra ID Register Device with Phishing Kit or ROADtools User Agent
editEntra ID Register Device with Phishing Kit or ROADtools User Agent
editDetects a successful Microsoft Entra ID Register device audit event for an Azure AD join or Azure AD register whose user agent is a Dsreg client string hardcoded by device-registration tooling. "Dsreg/10.0 (Windows 10.0.19045.2006)" is the frozen user agent used by device code and adversary-in-the-middle (AiTM) phishing-as-a-service kits such as Tycoon2FA and Kali365 when they register a device after capturing a victim session. "Dsreg/10.0 (Windows 10.0.19041.928)" is the default user agent used by ROADtools (roadtx) for Windows device registration. Adversaries register these devices to obtain a Primary Refresh Token (PRT) and persist access that survives password resets and user-level session revocation.
Rule type: query
Rule indices:
- logs-azure.auditlogs-*
Severity: high
Risk score: 73
Runs every: 5m
Searches indices from: now-9m (Date Math format, see also Additional look-back time)
Maximum alerts per execution: 100
References:
- https://www.huntress.com/blog/kali365-device-code-phishing-kit
- https://arcticwolf.com/resources/blog/token-bingo-dont-let-your-code-be-the-winner/
- https://www.ic3.gov/PSA/2026/PSA260521
- https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/
- https://github.com/dirkjanm/ROADtools
- https://dirkjanm.io/introducing-roadtools-token-exchange-roadtx/
- https://unit42.paloaltonetworks.com/roadtools-cloud-attacks/
- https://learn.microsoft.com/en-us/entra/identity/devices/concept-directory-join
Tags:
- Domain: Cloud
- Domain: Identity
- Data Source: Azure
- Data Source: Microsoft Entra ID
- Data Source: Microsoft Entra ID Audit Logs
- Use Case: Identity and Access Audit
- Use Case: Threat Detection
- Threat: Tycoon2FA
- Threat: Kali365
- Threat: Device Code Phishing
- Threat: AiTM Phishing
- Tactic: Persistence
- Resources: Investigation Guide
- Rule Type: Custom Query (KQL)
- Platform: Entra ID
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Investigation guide
editTriage and analysis
Device code and AiTM phishing kits, including Tycoon2FA and Kali365, and dual-use tooling such as ROADtools (roadtx) register a device in Entra ID so they can obtain a device-bound Primary Refresh Token (PRT). The registration client spoofs the Windows device-registration user agent, but the OS build inside that string is a tool default rather than the build of a current, patched host:
-
Dsreg/10.0 (Windows 10.0.19045.2006): frozen default used by Tycoon2FA and Kali365. -
Dsreg/10.0 (Windows 10.0.19041.928): default used by ROADtools (roadtx) for Windows device registration.
This rule matches a successful Register device audit event where that user agent is recorded and
azure.auditlogs.properties.additional_details.value is Azure AD join or Azure AD register. A genuine Windows
enrollment uses the same Dsreg/10.0 (Windows <build>) format, but a patched host reports a much higher revision than
these two frozen values. Rogue device registration is typically a precursor to PRT acquisition, MFA and Conditional
Access bypass, and persistent token-based access. Device-bound PRTs survive revokeSignInSessions and password resets.
Possible investigation steps
-
Confirm the registering identity via
azure.auditlogs.properties.initiated_by.user.userPrincipalNameand determine whether that user is expected to join or register a new device. -
Confirm the user agent in
azure.auditlogs.properties.userAgentand the join type inazure.auditlogs.properties.additional_details.value(Azure AD joinversusAzure AD register). -
Inspect the device name in
azure.auditlogs.properties.target_resources.0.display_name. Kit-registered names are commonlyDESKTOP-followed by 6 alphanumeric (Tycoon2FA) or 6 hexadecimal (Kali365) characters. ROADtools defaults toDESKTOP-followed by 8 random characters. -
Use
azure.correlation_idto pivot across the full registration flow (Register device,Add device,Add registered users to device,Add registered owner to device). On the pairedAdd deviceevent, compareCloudDeviceOSVersionwith the build embedded in the user agent (10.0.19045.2006or10.0.19041.928). -
Review
azure.auditlogs.properties.initiated_by.user.ipAddressand geolocation for the registration source. Flag unexpected IPs, hosting or VPS ASNs, or impossible travel relative to the user’s normal activity. - Check whether the same user registered multiple devices in a short window. A single piece of kit infrastructure registering several devices is common for PRT persistence at scale.
-
Pivot to
azure.signinlogsfor the same user and timeframe. Look for a preceding device-code or AiTM sign-in, and for follow-on sign-ins where the incoming token type is aprimaryRefreshToken.
False positive analysis
- Unmanaged or never-patched Windows 10 20H1 or 22H2 hosts may legitimately present these exact Dsreg user agents during Azure AD join or register. Validate against device inventory, naming conventions, and known provisioning programs.
- Authorized security assessments that register devices with ROADtools or phishing-kit tooling will match. Document the engagement and add scoped exceptions.
Response and remediation
-
If confirmed malicious, remove the registered device from Entra ID and revoke the user’s refresh tokens and primary refresh tokens. Remove the device BEFORE revoking sessions, because device-bound PRTs survive
revokeSignInSessions. - Disable the account or reset credentials per policy and review for additional persistence (attacker-registered MFA methods, added owners, app registrations, or service principal credentials).
-
Conduct historical analysis using
azure.correlation_idand the registering user to determine the scope of access. - Tighten device registration and join controls via Conditional Access (restrict who can register or join devices and require MFA for registration).
Rule query
editdata_stream.dataset:"azure.auditlogs" and event.action:"Register device" and
event.outcome:(success or Success) and
azure.auditlogs.properties.userAgent:(
"Dsreg/10.0 (Windows 10.0.19041.928)" or
"Dsreg/10.0 (Windows 10.0.19045.2006)"
) and
azure.auditlogs.properties.additional_details.value:("Azure AD join" or "Azure AD register")
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Persistence
- ID: TA0003
- Reference URL: https://attack.mitre.org/tactics/TA0003/
-
Technique:
- Name: Account Manipulation
- ID: T1098
- Reference URL: https://attack.mitre.org/techniques/T1098/
-
Sub-technique:
- Name: Device Registration
- ID: T1098.005
- Reference URL: https://attack.mitre.org/techniques/T1098/005/