Detect Domain Properties in Google Chronicle
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/
YARA-L Detection Query
rule t1590_001_domain_properties_recon {
meta:
author = "Argus Detection Engineering"
description = "Detects T1590.001 domain property reconnaissance via AADInternals, WHOIS tools, O365 public API abuse, and connections to WHOIS/RDAP services"
mitre_attack_tactic = "Reconnaissance"
mitre_attack_technique = "T1590.001"
severity = "MEDIUM"
confidence = "HIGH"
rule_version = "1.0"
events:
(
$e.metadata.event_type = "PROCESS_LAUNCH" and
(
re.regex($e.target.process.command_line, `(?i)(Get-AADIntTenantDomains|Get-AADIntLoginInformation|Get-AADIntTenantDetails|Invoke-AADIntReconAsOutsider|Get-AADIntCompanyInformation|AADInternals|Get-AADIntTenantID|Get-AADIntOpenIDConfiguration|Get-AADIntTenantDomainNames)`) or
re.regex($e.target.process.command_line, `(?i)GetUserRealm`) or
(
re.regex($e.target.process.command_line, `(?i)autodiscover`) and
re.regex($e.target.process.command_line, `(?i)microsoft`)
) or
re.regex($e.target.process.command_line, `(?i)(whois\.exe|Get-Whois|Invoke-Whois)`)
)
) or
(
$e.metadata.event_type = "NETWORK_CONNECTION" and
(
$e.target.port = 43 or
re.regex($e.target.hostname, `(?i)(whois\.iana\.org|who\.is|whois\.domaintools\.com|whois\.verisign-grs\.com|rdap\.org|rdap\.arin\.net|rdap\.verisign\.com)`)
) and
not re.regex($e.principal.process.file.full_path, `(?i)(svchost\.exe$|lsass\.exe$|services\.exe$|MsMpEng\.exe$|SearchProtocolHost\.exe$)`)
)
condition:
$e
} Google Chronicle YARA-L 2.0 rule detecting domain property reconnaissance (T1590.001) using UDM normalized telemetry. Matches PROCESS_LAUNCH events with AADInternals PowerShell cmdlet patterns, O365 GetUserRealm and autodiscover recon strings, and WHOIS tool execution strings in the process command line. Also matches NETWORK_CONNECTION events targeting TCP port 43 (WHOIS protocol) or known WHOIS and RDAP hostnames. Known system process image name suffixes are excluded from network matches to reduce noise. Requires endpoint telemetry forwarded and normalized to UDM.
Data Sources
Required Tables
False Positives & Tuning
- Authorized Azure AD tenant administrators or identity governance platforms using AADInternals functions for legitimate tenant configuration auditing, license assignment review, or conditional access health checks under approved change tickets
- Corporate internet proxies or DNS resolvers that contact WHOIS or RDAP endpoints as part of domain reputation lookups and URL categorization decisions, generating NETWORK_CONNECTION events from proxy process image paths
- Purple team or red team exercises using AADInternals or O365 public API reconnaissance against the organization's own environment within a formally authorized and time-boxed scope of work
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.