π§Cross-Forest Trust Abuse - from Linux
π― HTB Academy: Active Directory Enumeration & Attacks
π Overview
Cross-Forest Trust Abuse from Linux leverages Impacket toolkit and bloodhound-python to exploit forest trust relationships from Linux attack hosts. This approach provides cross-platform capability for cross-forest Kerberoasting, foreign group membership discovery, and multi-domain compromise using Python-based tools.
π« Cross-Forest Kerberoasting
Attack Methodology
Tool:
impacket-GetUserSPNswith-target-domainflagRequirements: Valid credentials in source domain, bidirectional trust
Target: Service accounts with SPNs in trusted forest
Goal: Obtain TGS tickets for offline cracking
Execution Workflow
SPN Enumeration
# Enumerate SPNs in trusted domain
impacket-GetUserSPNs -target-domain FREIGHTLOGISTICS.LOCAL INLANEFREIGHT.LOCAL/wley
# Expected output:
ServicePrincipalName Name MemberOf PasswordLastSet LastLogon Delegation
----------------------------------- -------- ------------------------------------------------------ -------------------------- --------- ----------
MSSQLsvc/sql01.freightlogstics:1433 mssqlsvc CN=Domain Admins,CN=Users,DC=FREIGHTLOGISTICS,DC=LOCAL 2022-03-24 15:47:52.488917 <never>TGS Ticket Extraction
Hash Cracking
π Foreign Group Membership Discovery
bloodhound-python Multi-Domain Collection
DNS Configuration Requirements
Data Collection Process
Primary Domain Collection
Trusted Domain Collection
Data Packaging
π― HTB Academy Lab Solutions
Lab Environment Setup
π Question 1: "Kerberoast across the forest trust from the Linux attack host. Submit the name of another account with an SPN aside from MSSQLsvc."
Solution:
π― Answer: [Additional SPN account name from enumeration]
π« Question 2: "Crack the TGS and submit the cleartext password as your answer."
Solution:
π― Answer: [Cleartext password from successful hash crack]
ποΈ Question 3: "Log in to the ACADEMY-EA-DC03.FREIGHTLOGISTICS.LOCAL Domain Controller using the Domain Admin account password submitted for question #2 and submit the contents of the flag.txt file on the Administrator desktop."
Solution:
π― Answer: [Contents of flag.txt file]
β οΈ Attack Considerations
DNS Configuration Management
Requirement: bloodhound-python needs FQDN resolution
Solution: Edit
/etc/resolv.conffor each target domainAlternative: Use host file entries for specific DC resolution
Restoration: Backup original DNS settings before modification
Cross-Domain Authentication
Credential format: Use
user@domain.localfor cross-domain authTrust direction: Verify bidirectional trust allows authentication
Tool compatibility: Ensure Impacket tools support target domain format
Session management: Consider authentication session timeouts
Password Reuse Assessment
Similar accounts: Check for matching account names across domains
Password spraying: Test cracked passwords against multiple domains
Administrative overlap: Identify shared administrative accounts
Risk documentation: Document password reuse findings for client reporting
π Key Takeaways
Cross-Platform Forest Attack Capability
Critical Success Factors
DNS configuration: Proper name resolution for target domains
Tool proficiency: Impacket suite and bloodhound-python mastery
Multi-domain thinking: Understanding cross-forest attack implications
Credential validation: Testing obtained credentials across multiple domains
Professional Impact
Assessment scope: Multi-forest security evaluation capability
Tool flexibility: Linux-based AD attack proficiency
Client value: Comprehensive cross-organizational security assessment
Risk identification: Foreign group membership and trust misconfiguration discovery
π§ Linux-based Cross-Forest Trust Abuse provides comprehensive multi-domain attack capability - demonstrating that sophisticated forest boundary exploitation can be executed effectively from any platform using powerful Python-based tools!
Last updated