🐧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-GetUserSPNs with -target-domain flag

  • Requirements: 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.conf for each target domain

  • Alternative: Use host file entries for specific DC resolution

  • Restoration: Backup original DNS settings before modification

Cross-Domain Authentication

  • Credential format: Use user@domain.local for cross-domain auth

  • Trust 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