The Nen-Book
LinkedinTwitterMediumGithubHTB
  • Whoami
  • Walkthroughs & Writeups
    • My CTF Methodology
    • Hack The Box Machines
      • Administrator
      • Escape two
      • Cicada
      • HTB Permx Machine(CVE-2023–4220 Chamilo LMS)
    • Intigriti 1337Up 2024
      • Intigriti 1337Up 2024-CTF OSINT Challenges
      • Intigriti 1337Up Live 2024-CTF Web Challenges
    • CyCTF Quals 2024
      • OSINT Challenges CyCTF Quals 2024
      • Old Friend OSINT Challenge CyCTF 2024 Quals Writeup
    • PicoCTF
      • PicoCTF 2024 Web Exploitation Challenges
      • PicoCTF 2024 General Skills Challenges
      • PicoCTF 2021 Web Exploitation Challenges Walkthrough
      • PicoCTF 2019 Web Exploitation Challenges
  • Web_AppSec
    • Web_Recon
    • SQli
    • ATO
    • Backend_Technology_Tricks
    • XSS
    • SSRF
    • CSRF
    • XXE
    • SSTI
    • Insecure_Deserialization
    • Open_Redirects
    • Information_Disclosures
    • Rate_Limiting
    • Clickjacking
    • Broken Access Control & IDORS
    • Bash_Scripting
    • Authentication_Vulnerabilities
    • App_Logic_Errors
  • Network & AD Pentesting
    • Scanning & Enumeration
    • Active_Directory
      • AD_Overview_&_ Lab Build
      • AD_Initial_Attack_Vectors
      • AD_Post-Compromise_Enumeration
      • AD_Post-Compromise_Attacks
    • Buffer_Overflow_Attacks
    • Web_Applications
    • Privilege_Escalation
  • Cloud_Security
    • AWS Pentesting
  • APISec
    • API_Recon
    • Broken_Access_Control & Info_Leaks
  • Code_Review
    • Source_Code_Review_101
    • Code Review Tools
  • Bug_Hunting
    • Picking_A_BugBounty_Program
    • Writing_A_Good_Report
  • MITRE ATT&CK
    • Introducing the ATT&CK Framework
    • MITRE Engenuity
    • Threat-Informed Defense
Powered by GitBook
On this page
  • Active Directory Overview
  • Physical AD components :
  • Logical Active Directory Components :
  • Active Directory Lab Build

Was this helpful?

Edit on GitHub
  1. Network & AD Pentesting
  2. Active_Directory

AD_Overview_&_ Lab Build

Active Directory Overview

  • What is Active Directory ?

    • Directory service developed by Microsoft to manage windows domain networks.

    • Stores information related to objects, such as Computers, Users , Printers, etc.

    • Authenticates using Kerberos tickets : Non-Windows devices , such as linux machines , firewalls ,etc. and can also authenticate to Active Directory via RADIUS or LDAP.

    • Active Directory is the most commonly used identity management service in the world.

    • Can be exploited without ever attacking patchable exploit instead , we abuse features , trusts , components and more.

    • Very important in internal assessment and attacks ( for hackers).

Physical AD components :

  • Domain Controllers :

    • The domain controller (DC) is the box that holds the keys to the kingdom- Active Directory (AD) - is a server with AD DS server role installed that has specifically been promoted to domain controller.

    • Create user accounts or changes the main policy.

    • Host a copy of the AD DS directory store.

    • Provide authentication and authorization services.

    • Replicate updates to other domain controllers in the domain and forest.

    • Allow administrative access to manage user accounts and network resources.

    • Used a tool called “Active Directory users and Computers” used to manage users , computers and acts ass directory service for resources on the network.

    • DC - Group Policy Management :

      • Used to manage all domains user and computer settings remotely.

      • Uses Group Policy Objects (GPOs) to manage client settings.

      • Target specific users , computers , groups OUs.

      • Install software remotely.

      • Configure Desktop background and manage all website can visit - Manage and configure security settings.

  • AD DS Data stores :

    • The AD DS data store contains the database files and processes that store and manage directory information for users , services and applications.

    • Consist of the Ntds.dit file and this very sensitive file which you search for it to compromise.

    • Is stored by default in the %SystemRoot%\NTDS folder on all domain controllers.

    • Is accessible only through DC process and protocols.

    • If we have many DCs , one is the main and critical data is replicated between the DCs.

Logical Active Directory Components :

  • AD DS scheme (Rule Book) contains every definitions of every object that can be created in Active Directory.

  • Domains : are what used to group things together so we can group objects together in a single organization.

  • Forest : Collection of trees (Catnoso with his childs and other with his childs and they link togther)

  • OUs : containers for your users , computers and groups( are very useful in delegating administrative responsibility) .

  • Trusts : How we have access between resources that might exist in another domain.

    • Directional : One domain trust another domain.

    • Transitive : We have trusting domain and trusting domain but it also trust everything domain trusts (Forest Example).

  • Objects :

Active Directory Lab Build

  • Setting Up Users, Groups, and Policies :

    • Local Domain :

  • Domain Controller - Hydra :

  • Administrator Domain - If you are domain user that means that you can log in the domain :

  • Note : User inherits from each others when you creating them by copying.

  • Service (SQL Example) Account shouldn’t be domain administrator - Administrator shouldn’t put the password in the description.

  • Most Domain controllers have file share and if want to open up 139 and 445 so that we have SMB enable on this domain controller.

  • Create SPN (Service principle name) - Set our Active Directory for Attacks ( Setting up Kerberoasting Attack and this an attack that attacks services so we want to setup SQL service ) :

  • Create GPO for MARVEL.local (domain name) :

  • Our computers in network should have DNS server ( Domain controller).

  • Joining to our local domain :

  • In the end :

    • We have 2 machines with there username and password using our domain controller and using our administrator privilege we create local administrator on each of them ( One local administrator for 2 different machines).

  • 2 machines joining the domain :

PreviousActive_DirectoryNextAD_Initial_Attack_Vectors

Last updated 5 months ago

Was this helpful?

Trees : Group of domains ( Parent : , childs : , na.contosos.com).

contoso.com
emea.contoso.com
149.jpg
150.jpg
151.jpg
152.jpg
153.jpg
154jpg.jpg
155.jpg
157.jpg
158.jpg
159jpg.jpg
160.jpg
161.jpg
162.jpg
163.jpg