T1590.003 Elastic Security · Elastic

Detect Network Trust Dependencies in Elastic Security

Adversaries may gather information about the victim's network trust dependencies that can be used during targeting. This includes identifying second or third-party organizations such as managed service providers (MSPs), contractors, and partner organizations that have privileged or elevated network access to the target environment. Adversaries gather this information through direct elicitation (spear phishing for information), public sources (LinkedIn, company websites, job postings revealing MSP/vendor relationships), WHOIS/DNS records, and Active Directory trust enumeration once they have initial internal access. Internally, this manifests as enumeration of Active Directory domain and forest trusts using built-in tools (nltest.exe, netdom.exe), PowerShell AD cmdlets (Get-ADTrust, Get-ADForest), or LDAP queries targeting trustedDomain objects. Externally, adversaries may discover trust relationships from public BGP routing data, certificate transparency logs, or OSINT tools targeting organizational infrastructure. The intelligence gathered enables attacks via trusted third-party relationships (T1199), supply chain compromise (T1195), or credential abuse against MSP-managed accounts.

MITRE ATT&CK

Tactic
Reconnaissance
Technique
T1590 Gather Victim Network Information
Sub-technique
T1590.003 Network Trust Dependencies
Canonical reference
https://attack.mitre.org/techniques/T1590/003/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [process where event.type == "start" and
    (
      (process.name : "nltest.exe" and process.args : ("/domain_trusts", "/all_trusts", "/trusted_domains", "/dclist", "/dsgetsite", "/parentdomain"))
      or (process.name : "netdom.exe" and process.args : ("trust", "query", "/enumerate_principals"))
      or (process.name : ("powershell.exe", "pwsh.exe") and process.args : ("Get-ADTrust", "Get-ADForest", "Get-ADDomain", "domain_trusts", "trustedDomain", "trustDirection", "trustAttributes", "DsEnumerateDomainTrusts", "NetEnumerateTrustedDomains"))
      or (process.name : "net.exe" and process.args : "/domain")
      or (process.name : "dsquery.exe" and process.args : ("trustedDomain", "trust"))
    )
  ] by process.entity_id

any where event.category == "iam" and event.action == "Directory Service Access"
  and winlog.event_data.ObjectType : ("trustedDomain", "domainDNS")
  and winlog.event_id == "4662"
medium severity high confidence

Detects Active Directory trust enumeration via nltest.exe, netdom.exe, PowerShell AD cmdlets, dsquery.exe, or LDAP access to trustedDomain objects (Event ID 4662). Covers both process execution and directory service access patterns for T1590.003.

Data Sources

Windows Sysmon (Event ID 1)Windows Security Event Log (Event ID 4662)Elastic Endpoint

Required Tables

logs-endpoint.events.process-*logs-windows.sysmon_operational-*winlogbeat-*

False Positives & Tuning

  • Domain administrators running nltest.exe or netdom.exe for legitimate trust management and troubleshooting tasks
  • IT automation scripts using PowerShell AD cmdlets (Get-ADTrust, Get-ADForest) as part of scheduled domain health checks or CMDB synchronization
  • Active Directory migration tools (ADMT, Quest) performing trust enumeration during domain consolidation projects
Download portable Sigma rule (.yml)

Other platforms for T1590.003


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.

  1. Test 1Enumerate Domain Trusts via nltest.exe

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\nltest.exe, CommandLine='/domain_trusts /all_trusts'. Security Event ID 4688 (with command line auditing): same command line data. Parent process will be cmd.exe or powershell.exe depending on execution context.

  2. Test 2Enumerate Active Directory Trusts via PowerShell Get-ADTrust

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ADTrust'. PowerShell ScriptBlock Log Event ID 4104 with full script content including trust properties being queried. LDAP query to Domain Controller on port 389 for trustedDomain objects (visible in Sysmon Event ID 3 if DC is remote).

  3. Test 3Query AD Forest Trust Information via PowerShell Get-ADForest

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ADForest'. PowerShell ScriptBlock Log Event ID 4104 with the full script. Directory access Event ID 4662 on Domain Controllers for crossRefContainer and crossRef object reads. Sysmon Event ID 3 for LDAP connection to DC on port 389.

  4. Test 4Enumerate Domain Trusts via netdom.exe

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\netdom.exe, CommandLine containing 'query' and 'trust'. Security Event ID 4688 (with command line auditing) recording the full command line. The tool will contact the nearest Domain Controller to resolve trust information.

  5. Test 5LDAP Query for trustedDomain Objects via dsquery

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\dsquery.exe, CommandLine containing 'trustedDomain'. On the Domain Controller: Security Event ID 4662 with ObjectType=trustedDomain for each trust object read. Multiple 4662 events will fire — one per trusted domain object in the directory.

Unlock Pro Content

Get the full detection package for T1590.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections