Network Trust Dependencies
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.
let TrustEnumProcesses = dynamic(["nltest.exe", "netdom.exe"]);
let TrustEnumPSPatterns = dynamic([
"Get-ADTrust", "Get-ADForest", "Get-ADDomain",
"domain_trusts", "/domain_trusts", "/all_trusts", "/trusted_domains",
"TRUST_QUERY_INFO", "LSA_TRUSTED_DOMAIN_INFO",
"NetEnumerateTrustedDomains", "DsEnumerateDomainTrusts",
"trustedDomain", "trustDirection", "trustAttributes"
]);
let NltestTrustArgs = dynamic([
"/domain_trusts", "/all_trusts", "/trusted_domains",
"/dclist", "/dsgetsite", "/parentdomain"
]);
// Branch 1: Direct trust enumeration tools
let ProcessBranch = DeviceProcessEvents
| where Timestamp > ago(24h)
| where (FileName =~ "nltest.exe" and ProcessCommandLine has_any (NltestTrustArgs))
or (FileName =~ "netdom.exe" and ProcessCommandLine has_any ("trust", "query", "/enumerate_principals"))
or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any (TrustEnumPSPatterns))
or (FileName =~ "net.exe" and ProcessCommandLine has "/domain")
or (FileName =~ "dsquery.exe" and ProcessCommandLine has_any ("trustedDomain", "trust"))
| extend DetectionType = case(
FileName =~ "nltest.exe", "NltestTrustEnum",
FileName =~ "netdom.exe", "NetdomTrustEnum",
FileName in~ ("powershell.exe", "pwsh.exe"), "PowerShellADTrustEnum",
FileName =~ "net.exe", "NetViewDomainEnum",
"DsqueryTrustEnum"
)
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionType;
// Branch 2: Security Event 4662 — LDAP access to trustedDomain objects
let LDAPBranch = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4662
| where ObjectType has_any ("trustedDomain", "domainDNS")
| where AccessMask in ("0x100", "0x20000", "0x1") // READ_PROPERTY, CONTROL_ACCESS, READ_GENERAL
| extend DetectionType = "LDAPTrustedDomainAccess"
| project Timestamp=TimeGenerated, DeviceName=Computer, AccountName=SubjectUserName,
FileName=tostring(""), ProcessCommandLine=ObjectName,
InitiatingProcessFileName=tostring(""), InitiatingProcessCommandLine=tostring(""),
DetectionType;
union ProcessBranch, LDAPBranch
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Domain administrators legitimately running nltest.exe /domain_trusts during infrastructure audits or troubleshooting inter-domain authentication issues
- Automated monitoring scripts using Get-ADTrust or Get-ADForest to verify trust health and alert on unexpected trust additions
- Identity governance tools (SailPoint, Saviynt, CyberArk) that enumerate domain trusts during discovery scans
- Microsoft Entra Connect (Azure AD Connect) synchronization service regularly querying forest/domain trust topology
- IT helpdesk staff troubleshooting cross-domain resource access using netdom.exe or nltest.exe
- Security posture assessment tools (Bloodhound Enterprise, Purple Knight) authorized to enumerate AD trust relationships
References (10)
- https://attack.mitre.org/techniques/T1590/003/
- https://attack.mitre.org/techniques/T1482/
- https://www.slideshare.net/rootedcon/carlos-garca-pentesting-active-directory-forests-rooted2019
- https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/forest-design-models
- https://learn.microsoft.com/en-us/defender-for-identity/lateral-movement-alerts
- https://github.com/BloodHoundAD/BloodHound
- https://learn.microsoft.com/en-us/sysinternals/downloads/adexplorer
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc731320(v=ws.11)
- https://specterops.io/wp-content/uploads/sites/3/2022/06/an_ace_up_the_sleeve.pdf
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4662
Unlock Pro Content
Get the full detection package for T1590.003 including response playbook, investigation guide, and atomic red team tests.