SID Abuse
Cross-domain attacks involving forest root and SID (Security Identifier) abuse exploit vulnerabilities in trust relationships between different Active Directory forest domains.
These attacks manipulate the trust keys and SIDs to forge authentication tokens, allowing unauthorized access to resources across domains.
By abusing SID and trust relationships, attackers can potentially gain access to sensitive information, escalate privileges, and compromise the security of interconnected systems.
This technique underscores the importance of robust security measures and vigilant monitoring of inter-forest trust relationships to protect against such sophisticated threats.
Cross-Domain Attacks: Forest Root and SID Abuse
Cross-domain attacks targeting the forest root and SID (Security Identifier) exploit vulnerabilities present in the trust relationships between different Active Directory forest domains. These vulnerabilities are manipulated by attackers to forge authentication tokens, granting unauthorized access across domains.
Key Steps in the Attack
Dump Trust Keys: Extract the trust keys of inter-forest trusts to identify the SID of the current domain, SID of the target domain, and the
rc4_hmac_nt
(Trust Key) of the target domain (e.g.,ecorp$
).Forge TGT: Utilize the extracted information to forge an inter-forest Ticket Granting Ticket (TGT) with the correct target and RC4 parameters.
Request TGS: With the forged TGT, request a Ticket Granting Service (TGS) ticket using
asktgs.exe
.Inject TGS into Memory: Inject the obtained TGS into memory to bypass authentication mechanisms.
Access Resources: Gain access to all shared files and admin domain controllers (DCs) within the target domain.
Risks and Implications
Access to sensitive information
Privilege escalation
Compromised security of interconnected systems
Mitigation Strategies
Implement robust security measures
Monitor inter-forest trust relationships vigilantly
Regularly review and update trust keys and SIDs
Understanding and protecting against such sophisticated threats is crucial for the security of interconnected systems and to prevent unauthorized access to sensitive information.
Practice
Invoke-Mimikatz
1. We require the trust key of inter-forest trust
2. Forge the inter-forest TGT
3. Request a TGS
Get a TGS for a service (CIFS below) in the target domain by using the forged trust ticket with Kekeo
4. Inject and use the TGS
Use the TGS to access the targeted service (may need to use it twice)
Rubeus
1. Create ticket and add it into the memory using asktgs
PowerShell
1. Access the euvendor-net machine using PSRemoting
Extras
To use the DCSync feature for getting krbtg hash execute the below command with DC privileges
Get the ForeignSecurityPrincipal
Last updated
Was this helpful?