Domain Trust Discovery

Adversaries may attempt to gather information on domain trust relationships that may be used to identify lateral movement opportunities in Windows multi-domain/forest environments. Domain trusts provide a mechanism for a domain to allow access to resources based on the authentication procedures of another domain.[1] Domain trusts allow the users of the trusted domain to access resources in the trusting domain. The information discovered may help the adversary conduct SID-History Injection, Pass the Ticket, and Kerberoasting.[2][3] Domain trusts can be enumerated using the DSEnumerateDomainTrusts() Win32 API call, .NET methods, and LDAP.[3] The Windows utility Nltest is known to be used by adversaries to enumerate domain trusts.[4]

ID: T1482
Sub-techniques:  No sub-techniques
Tactic: Discovery
Platforms: Windows
Permissions Required: User
Data Sources: Command: Command Execution, Process: OS API Execution, Process: Process Creation, Script: Script Execution
Contributors: Dave Westgard; Elia Florio, Microsoft; Mnemonic; RedHuntLabs, @redhuntlabs
Version: 1.1
Created: 14 February 2019
Last Modified: 17 September 2020

Procedure Examples

ID Name Description
S0552 AdFind

AdFind can gather information about organizational units (OUs) and domain trusts from Active Directory.[5][6][7]

G0016 APT29

APT29 used the Get-AcceptedDomain PowerShell cmdlet to enumerate accepted domains through an Exchange Management Shell.[8] They also used AdFind to enumerate domains and to discover trust between federated domains.[9]

S0534 Bazar

Bazar can use Nltest tools to obtain information about the domain.[10][11]

S0521 BloodHound

BloodHound has the ability to map domain trusts and identify misconfigurations for potential abuse.[12]

G0114 Chimera

Chimera has nltest /domain_trusts to identify domain trust relationships.[13]

S0105 dsquery

dsquery can be used to gather information on domain trusts with dsquery * -filter "(objectClass=trustedDomain)" -attr *.[3]

S0363 Empire

Empire has modules for enumerating domain trusts.[14]

S0359 Nltest

Nltest may be used to enumerate trusted domains by using commands such as nltest /domain_trusts.[15][16]

S0378 PoshC2

PoshC2 has modules for enumerating domain trusts.[17]

S0194 PowerSploit

PowerSploit has modules such as Get-NetDomainTrust and Get-NetForestTrust to enumerate domain and forest trusts.[18][19]

S0266 TrickBot

TrickBot can gather information about domain trusts by utilizing Nltest.[16][20]

Mitigations

ID Mitigation Description
M1047 Audit

Map the trusts within existing domains/forests and keep trust relationships to a minimum.

M1030 Network Segmentation

Employ network segmentation for sensitive domains.[3].

Detection

System and network discovery techniques normally occur throughout an operation as an adversary learns the environment. Data and events should not be viewed in isolation but as part of a chain of behavior that could lead to other activities based on the information obtained.

Monitor processes and command-line arguments for actions that could be taken to gather system and network information, such as nltest /domain_trusts. Remote access tools with built-in features may interact directly with the Windows API to gather information. Look for the DSEnumerateDomainTrusts() Win32 API call to spot activity associated with Domain Trust Discovery.[3] Information may also be acquired through Windows system management tools such as PowerShell. The .NET method GetAllTrustRelationships() can be an indicator of Domain Trust Discovery.[21]

References

  1. Microsoft. (2009, October 7). Trust Technologies. Retrieved February 14, 2019.
  2. Metcalf, S. (2015, July 15). It’s All About Trust – Forging Kerberos Trust Tickets to Spoof Access across Active Directory Trusts. Retrieved February 14, 2019.
  3. Schroeder, W. (2017, October 30). A Guide to Attacking Domain Trusts. Retrieved February 14, 2019.
  4. Florio, E.. (2017, May 4). Windows Defender ATP thwarts Operation WilySupply software supply chain cyberattack. Retrieved February 14, 2019.
  5. Brian Donohue, Katie Nickels, Paul Michaud, Adina Bodkins, Taylor Chapman, Tony Lambert, Jeff Felling, Kyle Rainey, Mike Haag, Matt Graeber, Aaron Didier.. (2020, October 29). A Bazar start: How one hospital thwarted a Ryuk ransomware outbreak. Retrieved October 30, 2020.
  6. McKeague, B. et al. (2019, April 5). Pick-Six: Intercepting a FIN6 Intrusion, an Actor Recently Tied to Ryuk and LockerGoga Ransomware. Retrieved April 17, 2019.
  7. Goody, K., et al (2019, January 11). A Nasty Trick: From Credential Theft Malware to Business Disruption. Retrieved May 12, 2020.
  8. Cash, D. et al. (2020, December 14). Dark Halo Leverages SolarWinds Compromise to Breach Organizations. Retrieved December 29, 2020.
  9. MSTIC, CDOC, 365 Defender Research Team. (2021, January 20). Deep dive into the Solorigate second-stage activation: From SUNBURST to TEARDROP and Raindrop . Retrieved January 22, 2021.
  10. Cybereason Nocturnus. (2020, July 16). A BAZAR OF TRICKS: FOLLOWING TEAM9’S DEVELOPMENT CYCLES. Retrieved November 18, 2020.
  11. Pantazopoulos, N. (2020, June 2). In-depth analysis of the new Team9 malware family. Retrieved December 1, 2020.