PenTest Playbook
  • Welcome!
  • Web App Pentesting
    • SQL Injection
    • NoSQL Injection
    • XSS
    • CSRF
    • SSRF
    • XXE
    • IDOR
    • SSTI
    • Broken Access Control/Privilege Escalation
    • Open Redirect
    • File Inclusion
    • File Upload
    • Insecure Deserialization
      • XMLDecoder
    • LDAP Injection
    • XPath Injection
    • JWT
    • Parameter Pollution
    • Prototype Pollution
    • Race Conditions
    • CRLF Injection
    • LaTeX Injection
    • CORS Misconfiguration
    • Handy Commands & Payloads
  • Active Directory Pentest
    • Domain Enumeration
      • User Enumeration
      • Group Enumeration
      • GPO & OU Enumeration
      • ACLs
      • Trusts
      • User Hunting
    • Domain Privilege Escalation
      • Kerberoast
        • AS-REP Roast (Kerberoasting)
        • CRTP Lab 14
      • Targeted Kerberoasting
        • AS-REP Roast
        • Set SPN
      • Kerberos Delegation
        • Unconstrained Delegation
          • CRTP Lab 15
        • Constrained Delegation
          • CRTP Lab 16
        • Resource Based Constrained Delegation (RBCD)
          • CRTP Lab 17
      • Across Trusts
        • Child to Parent (Cross Domain)
          • Using Trust Tickets
            • CRTP Lab 18
          • Using KRBTGT Hash
            • CRTP Lab 19
        • Cross Forest
          • Lab 20
        • AD CS (Across Domain Trusts)
          • ESC1
            • CRTP Lab 21
        • Trust Abuse - MSSQL Servers
          • CRTP Lab 22
    • Lateral Movement
      • PowerShell Remoting
      • Extracting Creds, Hashes, Tickets
      • Over-PassTheHash
      • DCSync
    • Evasion
      • Evasion Cheetsheet
    • Persistence
      • Golden Ticket
        • CRTP Lab 8
      • Silver Ticket
        • CRTP Lab 9
      • Diamond Ticket
        • CRTP Lab 10
      • Skeleton Key
      • DSRM
        • CRTP Lab 11
      • Custom SSP
      • Using ACLs
        • AdminSDHolder
        • Rights Abuse
          • CRTP Lab 12
        • Security Descriptors
          • CRTP Lab 13
    • Tools
    • PowerShell
  • AI Security
    • LLM Security Checklist
    • GenAI Vision Security Checklist
    • Questionnaire for AI/ML/GenAI Engineering Teams
  • Network Pentesting
    • Information Gathering
    • Scanning
    • Port/Service Enumeration
      • 21 FTP
      • 22 SSH
      • 25, 465, 587 SMTP
      • 53 DNS
      • 80, 443 HTTP/s
      • 88 Kerberos
      • 135, 593 MSRPC
      • 137, 138, 139 NetBios
      • 139, 445 SMB
      • 161, 162, 10161, 10162/udp SNMP
      • 389, 636, 3268, 3269 LDAP
      • Untitled
      • Page 14
      • Page 15
      • Page 16
      • Page 17
      • Page 18
      • Page 19
      • Page 20
    • Nessus
    • Checklist
  • Mobile Pentesting
    • Android
      • Android PenTest Setup
      • Tools
    • iOS
  • DevSecOps
    • Building CI Pipeline
    • Threat Modeling
    • Secure Coding
      • Code Review Examples
        • Broken Access Control
        • Broken Authentication
        • Command Injection
        • SQLi
        • XSS
        • XXE
        • SSRF
        • SSTI
        • CSRF
        • Insecure Deserialization
        • XPath Injection
        • LDAP Injection
        • Insecure File Uploads
        • Path Traversal
        • LFI
        • RFI
        • Prototype Pollution
        • Connection String Injection
        • Sensitive Data Exposure
        • Security Misconfigurations
        • Buffer Overflow
        • Integer Overflow
        • Symlink Attack
        • Use After Free
        • Out of Bounds
      • C/C++ Secure Coding
      • Java/JS Secure Coding
      • Python Secure Coding
  • Malware Dev
    • Basics - Get detected!
    • Not so easy to stage!
    • Base64 Encode Shellcode
    • Caesar Cipher (ROT 13) Encrypt Shellcode
    • XOR Encrypt Shellcode
    • AES Encrypt Shellcode
  • Handy
    • Reverse Shells
    • Pivoting
    • File Transfers
    • Tmux
  • Wifi Pentesting
    • Monitoring
    • Cracking
  • Buffer Overflows
  • Cloud Security
    • AWS
    • GCP
    • Azure
  • Container Security
  • Todo
Powered by GitBook
On this page
  • Active Directory
  • Key Features of Active Directory:
  • AD Terminology
  • AD Deployment Scenarios
  • AD Roles and Permissions
  • AD Security Best Practices

Active Directory Pentest

Active Directory

Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. It provides a centralized and hierarchical database that stores information about network resources such as users, computers, groups, and services. AD is a critical component in many organizations as it simplifies the management of users and resources by providing a single sign-on (SSO) experience and implementing security policies across the network.

Key Features of Active Directory:

  • Domain Services: AD is organized into one or more domains, each representing a logical group of objects within a network. Domains can have hierarchical relationships to form a tree-like structure called a forest.

  • Domain Controller (DC): A domain controller is a server that authenticates users, stores AD databases, and enforces security policies within a domain.

  • LDAP Protocol: AD uses the Lightweight Directory Access Protocol (LDAP) to manage and query directory data.

  • Kerberos Authentication: AD employs the Kerberos protocol for secure authentication.

  • Global Catalog (GC): The Global Catalog is a distributed data repository that contains a partial replica of all objects in the forest, facilitating searches across domains. It is stored in the DC.

    • Note: The replication service is responsible for maintaining the GC if there are two DC in a domain.

  • Schema: The AD schema defines the object classes and attributes that can be stored in the directory.

AD Terminology

Before diving deeper into Active Directory, let's familiarize ourselves with some essential terms used in this context:

  • Domain: A domain is a logical grouping of computers and users in an AD network. It is identified by a DNS name, such as "example.com."

  • Forest: A forest is a collection of one or more domains that share a common schema and trust relationship. It represents the highest level of organization in AD.

    • Forest is the security boundary. Once a component in the Forest is compromised, there is always a trust path from one domain to another to compromise it.

  • Domain Controller (DC): A domain controller is a Windows server responsible for authenticating users and managing AD databases for a domain.

  • Organizational Unit (OU): An OU is a container within a domain used to organize objects (users, computers, groups) for easier management and delegation of administrative tasks.

  • Group Policy: Group Policy allows administrators to apply specific configurations to users and computers in an organized manner.

  • Trust Relationship: Trust relationships define how domains and forests trust each other for authentication and resource access.

AD Deployment Scenarios

Active Directory can be deployed in various configurations based on an organization's needs and scale:

  • Single-Domain Model: Suitable for small to medium-sized organizations where a single domain is sufficient to manage all users and resources.

  • Multi-Domain Model: Designed for larger organizations with multiple departments or locations, each having its own domain. Trust relationships connect these domains.

  • Forest Model: In complex enterprise environments, multiple domains are organized into a forest. A forest represents the highest level of security and administrative boundaries.

AD Roles and Permissions

AD objects, such as users, groups, and computers, have specific roles and permissions within the directory. Some crucial roles include:

  • Domain Administrator: Full control over the entire domain and all objects within it.

  • Enterprise Administrator: Full control over the entire forest and all objects within all domains.

  • Domain User: Standard user account with limited privileges.

  • Domain Controller: Holds the AD database and performs authentication for users and computers.

AD Security Best Practices

Securing Active Directory is of paramount importance to prevent unauthorized access and potential breaches. Some best practices include:

  • Regular Patching: Keep all domain controllers and systems up-to-date with security patches to mitigate known vulnerabilities.

  • Privilege Minimization: Assign permissions and roles only when necessary to limit potential attack surfaces.

  • Strong Password Policies: Enforce strong password policies, multi-factor authentication (MFA), and account lockout policies.

  • Monitoring and Logging: Implement robust monitoring and logging solutions to detect and respond to suspicious activities.

  • Backup and Recovery: Regularly back up AD data to ensure recoverability in case of data loss or ransomware attacks.

PreviousHandy Commands & PayloadsNextDomain Enumeration

Last updated 11 months ago