Detect Domain Properties in Elastic Security
Adversaries may gather information about the victim's network domain(s) that can be used during targeting. Information about domains and their properties may include a variety of details, including what domain(s) the victim owns as well as administrative data (name, registrar, etc.) and more directly actionable information such as contacts, business addresses, and name servers. Adversaries gather this information via direct collection (WHOIS queries, DNS enumeration), passive data sets, or by querying publicly accessible API endpoints such as Microsoft's GetUserRealm and autodiscover APIs in Office 365/Azure environments. Tools such as AADInternals leverage these public APIs to enumerate tenant domain details, federation configuration, and company metadata — all without authenticating to the target environment.
MITRE ATT&CK
- Tactic
- Reconnaissance
- Technique
- T1590 Gather Victim Network Information
- Sub-technique
- T1590.001 Domain Properties
- Canonical reference
- https://attack.mitre.org/techniques/T1590/001/
Elastic Detection Query
any where
(
event.category == "process" and event.type == "start" and
(
process.command_line regex~ "(Get-AADIntTenantDomains|Get-AADIntLoginInformation|Get-AADIntTenantDetails|Invoke-AADIntReconAsOutsider|Get-AADIntCompanyInformation|AADInternals|Get-AADIntTenantID|Get-AADIntOpenIDConfiguration|Get-AADIntTenantDomainNames)" or
process.command_line regex~ "GetUserRealm" or
(process.command_line regex~ "autodiscover" and process.command_line regex~ "microsoft") or
process.command_line regex~ "(whois\.exe|Get-Whois|Invoke-Whois)"
)
) or
(
event.category == "network" and event.type == "connection" and
(
destination.port == 43 or
destination.domain regex~ "(whois\.iana\.org|who\.is|whois\.domaintools\.com|whois\.verisign-grs\.com|rdap\.org|rdap\.arin\.net|rdap\.verisign\.com)"
) and
not process.name in~ ("svchost.exe", "lsass.exe", "services.exe", "MsMpEng.exe", "SearchProtocolHost.exe")
) Detects T1590.001 domain property reconnaissance in Elastic Security by matching process start events containing AADInternals cmdlet patterns, O365 GetUserRealm and autodiscover API invocations, and WHOIS tool execution, plus network connection events targeting TCP port 43 (WHOIS protocol) or known WHOIS/RDAP web service hostnames. Covers both Sysmon-enriched Windows telemetry and Elastic Endpoint agent data via ECS normalization. Uses regex~ for case-insensitive matching and excludes known system processes from network matches.
Data Sources
Required Tables
False Positives & Tuning
- IT administrators running authorized WHOIS lookups from administrative workstations for domain asset management, DNS troubleshooting, or IP ownership verification during incident response
- Security teams using AADInternals for authorized Azure AD tenant audits, identity posture assessments, or conditional access policy reviews under change management approval
- Domain registrar integrations, certificate lifecycle management tools, or DNS management platforms that programmatically query RDAP or WHOIS endpoints as part of automated domain renewal workflows
Other platforms for T1590.001
Testing Methodology
Validate this detection against 5 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 1AADInternals Tenant Domain Reconnaissance
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Get-AADIntLoginInformation' and 'AADInternals'. PowerShell ScriptBlock Log Event ID 4104 with the full module import and command. Sysmon Event ID 3: Network connection from powershell.exe to login.microsoftonline.com (port 443). Azure AD Audit Logs may show GetUserRealm API access from the source IP.
- Test 2WHOIS Protocol Query via PowerShell
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'TcpClient' and 'whois.iana.org' and port 43. Sysmon Event ID 3: Network Connection from powershell.exe to whois.iana.org on DestinationPort 43. Security Event ID 4688 (if command line auditing enabled).
- Test 3Azure AD Domain List Enumeration via Graph API
Expected signal: Sysmon Event ID 1: Process Create for az.cmd or python.exe (Azure CLI) with CommandLine containing 'graph.microsoft.com' and 'domains'. Sysmon Event ID 3: Network connection from the Azure CLI process to graph.microsoft.com on port 443. Azure AD Audit Logs: OperationName='List domains' with the initiating user, IP address, and application 'Microsoft Azure CLI'.
- Test 4AADInternals External Tenant Reconnaissance (Outsider Mode)
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Invoke-AADIntReconAsOutsider' and 'AADInternals'. PowerShell ScriptBlock Log Event ID 4104 with the full function invocation. Multiple Sysmon Event ID 3 records: outbound HTTPS connections to login.microsoftonline.com, autodiscover.microsoft.com, and related Microsoft identity endpoints. Azure AD Audit Logs may record the GetUserRealm API calls with source IP.
- Test 5Bulk DNS Record Enumeration for Domain Mapping
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Resolve-DnsName' and multiple DNS record types. Sysmon Event ID 22 (DNS Query): multiple DNS queries for the target domain with QueryType values MX, NS, TXT, SOA. Windows DNS Client Event Log (Microsoft-Windows-DNS-Client/Operational): corresponding DNS resolution events.
References (11)
- https://attack.mitre.org/techniques/T1590/001/
- https://o365blog.com/post/just-looking/
- https://github.com/Gerenios/AADInternals
- https://who.is/
- https://dnsdumpster.com/
- https://www.circl.lu/services/passive-dns/
- https://docs.microsoft.com/en-us/archive/blogs/tip_of_the_day/cloud-tip-of-the-day-advanced-way-to-check-domain-availability-for-office-365-and-azure
- https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/concept-audit-logs
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkevents-table
- https://unit42.paloaltonetworks.com/threat-assessment-sandworm-team/
- https://www.microsoft.com/en-us/security/blog/2021/03/02/new-nation-state-cyberattacks/
Unlock Pro Content
Get the full detection package for T1590.001 including response playbook, investigation guide, and atomic red team tests.