Pentesting Notes
  • Home
  • 🌐Web pentesting
    • Content Discovery
    • Subdomain Enumeration
    • Authentication bypass
    • IDOR (Insecure Direct Object Reference)
    • Git repository
    • XSS
    • SSRF
    • CSRF
    • Injection
      • SQL Injection
      • Cypher injection
      • Command injection
      • Server Side Template Injection
      • NoSQL injection
      • XXE
    • FI (File Inclusion)
    • File upload
    • OAuth
    • JWT
    • CORS
    • Prototype pollution
    • Request Smuggling
  • Windows Pentesting
    • Enumerating users (No credentials)
    • Privilege Escalation
    • Post-Exploitation
    • Cross-domain enumeration
    • LDAP port (389, 636, 3268, 3269)
    • SMB port (139,445)
    • MSSQL port (1433)
    • Certificate Authority (CA)
    • Delegation attacks
    • Attacking Kerberos
    • Relay attacks
    • Bypassing Security
    • File Transfer
    • GPO (Group Policy Object)
    • Tools
      • Mimikatz
      • NetExec
      • Crackmapexec (CME)
      • Powerview
      • Bloodhound
      • Impacket
      • BloodyAD
      • Sliver C2
  • 🐧Linux Pentesting
    • Linux Privilege Esclation
    • Escape docker
    • Ansible
  • 🕊️Cross platform pivoting
    • Pivoting
  • ☁️Cloud
    • Kubernetes
    • Azure
      • Architecture
        • RBAC & ABAC roles
        • Entra ID roles
        • Entra ID - Authentication with OAuth and API's
        • Consent and Permissions
      • Service Discovery, Recon, Enumeration and Initial Access Attacks
        • Unauthenticated Recon
        • Password Spraying
        • Azure App Service
        • Azure Blob Storage
        • Phishing with Evilginx
        • Conditional Access
      • Authenticated Enumeration
        • ROADTools
        • BloodHound & AzureHound
        • Storage Accounts (database)
      • Privilege Escalation
        • Illicit Consent Grant
        • Macro enabled Word-files (Revshell)
        • Add secrets to app
        • Automation Accounts & Function Apps
        • Virtual Machines
        • Key Vault
        • ARM Deployment History
        • Enterprise Application / Service Principal
      • Lateral Movement
        • Entra ID Devices & Primary Refresh Tokens
        • Dynamic Groups
        • Application Proxy
        • Hybrid Identity
  • 🔁Reversing
    • Windows executables and DLL's
    • Linux binaries
    • Java applications
    • Android APK
  • 🛜Wireless networks
    • WPA/WPA2
    • WPS
    • WEP
    • Capative portal bypass
    • Setting up a Rogue Access Point
    • WPA Enterpise (WPA-MGT)
  • ⭐Tips and tricks
    • Tips and tricks
Powered by GitBook
On this page
  • Domain trusts explained
  • Enumerating domain trust
  • Enumerate from one to another domain
  • Get all domain users
  • Get all writable objects
  • More Bloody-AD examples:
  1. Windows Pentesting

Cross-domain enumeration

PreviousPost-ExploitationNextLDAP port (389, 636, 3268, 3269)

Last updated 5 months ago

Domain trusts explained

Active Directory Domain Services (AD DS) provides security across multiple domains or forests through domain and forest trust relationships. Before authentication can occur across trusts, Windows must first check if the domain being requested by a user, computer, or service has a trust relationship with the domain of the requesting account.

Enumerating domain trust

Get-NetForest [-Forest megacorp.local]
Get-Forest [-Forest megacorp.local]

Need PowerView.ps1 for this:

Get-NetForestDomain [-Forest megacorp.local]
Get-ForestDomain [-Forest megacorp.local]

Enumerate from one to another domain

If you have a valid account for the child/parent domain and there is a trust between the domains, you can enumerate the other domain using the authentication of the compromised domain.

A great tool can me powershell empire, but you will need to do all enumeration from the compromised DC and run powershell empire. This can trigger AV. A better way is to use BloodyAD. BloodyAD is a remote tool that uses LDAP to enumerate the domain.

Get all domain users

bloodyAD -d compromised-domain.local -u Administrator -p :<nt-hash-or-password> --host ip-of-target-domain get children 'DC=bloody,DC=local' --type user

Get all writable objects

bloodyAD -d compromised-domain.local -u Administrator -p :<nt-hash-or-password> --host ip-of-target-domain get writable

More Bloody-AD examples:

BloodyADPentesting Notes
How trusts work for Microsoft Entra Domain ServicesMicrosoftLearn
Logo
Logo