Hacknetics
  • Hacknetics
  • Active Directory Management
    • How to Join a Windows 11 PC to a Domain
    • Allow RDP in the domain
  • Active Directory AD Attacks
    • Bloodhound
      • Bloodhound Cypher Queries
    • Impacket-install
    • Kerberos cheatsheet
    • Domain Controllers
    • Overpass The Hash/Pass The Key (PTK)
    • Bloodhound Python
    • Rubeus to Ccache
    • Silver Ticket
    • Golden Ticket
    • Abusing GPO Permissions
    • AppLocker Bypasses
    • SharpView Enumeration
    • DonPapi
    • AD Overview
    • Enumerating Forests
    • NOPAC Priv esc
  • buffer-overflows
    • Buffer Overflows
  • c2-frameworks
    • Sliver
    • Powershell Empire
      • IronPython Empire
    • Metasploit
      • Metasploit Basics
      • Custom MSF Resource Scripts
      • Meterpreter Device Survey
      • Paranoid Mode
    • Pwncat-cs
    • Cobalt Strike
    • Dcrat
      • Modules
      • Builder
      • Dcrat AV Evasion
      • C2 Comms
    • FFM Documentation
  • covering-tracks
    • Evading Logging and Monitoring
    • Linux Logging
    • Tor
    • Windows Log Clearing
    • Ghost Writing Binaries
    • Backdoor Linux Commands
  • Data Exfiltration
  • Exploit Development
    • ROP Finding the vulnerable function
    • Useful Tools for Exploit Dev
    • ropeme
    • Obtaining MSFT Patches for Analysis
    • Mutiny Fuzzer
    • GDB
  • file-transfers
    • Transfering Files
  • lateral-movement
    • Pivoting Enumeration
      • Proxychains and FoxyProxy
      • SSH Tunneling and Port Forwarding
      • Plink.exe
      • socat
      • Chisel
      • SShuttle
  • lin-priv-esc
    • Linux Privilege Escalation
    • Bash Jails
    • ssh agent
  • Things I have Pwn'd before
    • Tomcat
    • Jenkins
  • persistence
    • Linux Persistence
    • Windows Persistence
      • Assign Group Memberships
      • Guest Windows Account Persistence
      • WMI Persist With Event Filters
      • SAM SYSTEM Exfil / Pass The Hash
      • Backdoor Executable
      • Special Privileges and Security Descriptors
      • RID Hijacking
      • Task Scheduler
      • Hijacking File Associations
      • Abusing Services
      • Logon Triggered Persistence
      • MSSQL Enabling xp cmdshell
      • Sticky Keys
      • Using Web Shells
  • recon-enumeration
    • Exploit Research
    • Pentesting DNS
    • Pentesting Kerberos
    • Pentesting FTP
    • Pentesting Email
    • Pentesting SMB
    • Pentesting Redis
    • Banner Grabbing
    • Pentesting Rsync
    • Pentesting MsSql
    • Scanning
    • Pentesting SNMP
    • Pentesting NFS
    • Pentesting LDAP
    • Pentesting Finger
    • User Recon
  • resources
    • resources
    • Youtube / Book List
    • CS/Software Engineer Resources
  • shells
    • Shells
    • web-shells
      • PHP Reverse Shell
      • wwwolf's PHP web shell
  • tool-guides
    • Asymmetric File Encrypt and Decrypt
    • Aws Buckets
    • cewl-crunch
    • Creating a Custom Wordlist
    • evil-winrm
    • Git
    • gobuster
    • Hashcat
    • Hydra User Guide
    • John
    • Linux Basics
    • Mimikatz
    • netcat
    • Nmap
    • nuclei
    • PowerView
    • r2
    • Resources
    • tcpdump
    • T-Shark User Guide
    • tmux
    • ssh
    • Vim
    • Wireshark
    • kwp
    • LAPS
    • KeePass KeeThief
    • FileCryptography.psm1
    • Impacket Pastable Commands
    • crackmapexec Pastable Commands
    • feroxbuster
    • NetExec
    • Ligolo-ng
    • gs-netcat
    • Scarecrow
  • Web Path
    • Testing for LFI
    • Testing for RFI
    • Testing for SQL
    • Testing for XSS
    • Authentication Bypass
    • Cmd Injection
    • Javascript Vulnerabilities
    • SSTI
    • Web Servers
    • JWT Tokens
    • Adobe Coldfusion
    • NoSQL Injection
    • vhost Enumeration
  • Wifi/Bluetooth/ZigBee/SDR/SmartCards
    • Wifi Capture Filters
    • Bluetooth Basics
    • Wifi Overview
    • Bettercap Bluetooth / Wifi
    • Aircrack-ng
    • Airdecap-ng
    • Aireplay-ng
    • RTL-SDR Radio
    • Bluetooth Low Energy
    • Smart Cards
    • Airodump-ng Airgraph-ng
    • gqrx
  • Windows
    • powershell-cheatsheet
    • Windows Privlage Escalation
    • Anti-Virus Evasion
    • Windows Registry
    • exploits
      • printspoofer
    • Windows Kernel Vulnerabilities
    • Windows Defender
    • AMSI Bypasses
    • pktmon Packet Capture Windows
    • Powershell Constrained Language Mode
    • Windows Survey
    • Windows Persistence
    • Windows World Writeable Dirs
  • firewalls
    • iptables
    • ufw
    • netsh advfirewall
  • Malware Analysis
    • Malware Analysis Fundamentals
    • Packer Identification by File section names
    • Analyzing Malicious Documents
    • In Depth Malware Analysis
    • Reversing Malicious Code
  • Infrastructure Development
    • SSL Cert Generation
    • Pfsense
      • OpenVPN Server on Pfsense
    • Proxmox OVA Import
  • Python3 Reference
    • Python3 Cheatsheet
    • Regex Python3
  • EDR
    • Velociraptor EDR
  • Host Forensics
    • Windows Host Forensics
    • Windows NT Versions
    • Windows Logs
  • Cloud
    • AWS
  • OSINT
    • Spiderfoot
    • Shodan Dorks
  • Phishing
  • Random
  • Linux
    • awk
    • cut
    • grep
    • sort
    • Cups CVE2024
  • Windows Malware Development
    • Win32 API
    • Processes Threads Handles
      • Message Box Example (Basic)
      • CreateProcess Example (Basic)
  • Golang
  • Mikrotik
    • Implementing a Password Reset Function for Persistent Access in MikroTik RouterOS
    • Cleaner Wrasse
  • Firmware Reversing
Powered by GitBook
On this page
  • Prerequisite Required
  • Step 1: Install Active Directory Domain Services (ADDS)
  • Step 2: Promote the server into a Domain Controller

Was this helpful?

Edit on GitHub

Active Directory Management

PreviousHackneticsNextHow to Join a Windows 11 PC to a Domain

Last updated 1 year ago

Was this helpful?

Prerequisite Required

  • VM or Physical Server with Windows Server 2019 installed (we are using Server with Desktop Experience installation option)

  • Assign a static IP address to the server that we promote as Domain Controller.

  • As we'll configure Active Directory-integrated DNS, therefore change the DNS settings in the network interface and set the same server IP address as the primary DNS server.

Step 1: Install Active Directory Domain Services (ADDS)

  • Log into your Windows Server 2019 with administrative credentials. Open Server Manager → click on Dashboard → click on Add roles and features.

  • The "Before you begin" tab contains some important information. Please go through it and click "Next".

  • In the "Installation Type" tab choose Role-based or Feature-based installation and click on the Next button.

  • In the Server Selection tab, please select the destination server on which the role will be installed. Please verify the hostname and the IP address points of the selected server. Click Next to continue.

  • In the Server Roles tab, put a tickmark for "Active Directory Domain Services" (you can select the DNS Server role as well, as we will configure AD integrated DNS server. If not selected, during installation it will automatically select and install the DNS Role).

  • Then, it will prompt to show you the associated features for the role. Click on Add Features to add those. Then click Next to continue.

  • In the Features tab, the basic features for this required role are already selected by default. Click Next to install continue.

  • In the next window, it gives brief information about the "Active Directory Domain Services" service. Click next to proceed.

  • In the Confirmation tab, verify the selections and click on the Install button. You may or may not select the option "Restart the destination server automatically if required". It is always a best practice to restart the server post-installation.

  • Once done, it will start the installation process and you can check the same in the Results tab.

Step 2: Promote the server into a Domain Controller

  • Once the ADDS role installation completes, click on the option "Promote this server to a Domain Controller" (highlighted in the below image). Alternately, you will see a notification flag next to the Manage menu. From there also you can select "Promote this server into a domain controller", this will start the configuration process.

  • It will open the "Active Directory Configuration Wizard". Now, from the Deployment Configuration tab, select "Add a new forest" (as I am configuring a new Forest and it is my first domain controller). Provide a Root Domain name, mine is "VirtualGyanis.Com" (you have to put your domain name here). Then, click on Next to continue.

  • Note: If you are adding this domain controller into an existing domain/forest you can choose the relevant option accordingly.

  • In the Domain Controller Option tab, select a Forest functional level and a Domain functional level as per your environment. Since this is the first domain controller in the forest, please select the DNS Server (as we are configuring AD integrated DNS) and the Global Catalog (GC) checkboxes. Then, enter the Active Directory Restore Mode (DSRM) password, this is used to retrieve/restore Active Directory data. Then, click Next to continue

  • Since we have configured an AD-integrated DNS server, you can ignore the DNS Delegation warning as shown in the below screen. Then, click Next to continue.

  • In the Additional Options tab, enter a NetBIOS name for your domain. It is suggested to keep the NetBIOS name the same as the root domain name (by default, it will fetch the domain name only). Then, click Next to continue.

  • In the Path tab, you have to mention the Database (NTDS Database), LOG files and SYSVOL folders path. You can change the default path as per your organization security policies. I have kept them default. Now, click Next to continue.

  • In the Review Options tab, you will review the configuration. If everything is as per your need, you can click Next to proceed or otherwise you can go back and change the required setting as per your need and then proceed further.

  • You can also view the powershell script for future deployment. The below-mentioned script is from my environment.

  • Note: Always test your PowerShell scripts in a test environment, before running in a production environment.

Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "WinThreshold" `
-DomainName "VirtualGyanis.Com" `
-DomainNetbiosName "VIRTUALGYANIS" `
-ForestMode "WinThreshold" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

In the Prerequisites Check tab, it will do prerequisite check.

  • Once prerequisite checks completed successfully, it will enable/highlight the Install option. Then, click on Install button to start the installation process.

  • Once installation completed successfully, you will get the below confirmation message. Close this window and restart the Server.

  • Once server rebooted, you have to login with your domain Admin credentials. By default, the local admin account will promoted as a Domain Admin account. Login and verify the health of the Domain controller. You can run DCDIAG command to check the health.

  • You can also verify the settings/configurations from the Active Directory tools like Active Directory Users and Computers or Active Directory Domains and Trusts etc. You will get all the Active Directory tools in the folder named Administrative Tools on the Start menu. Go and explore the tools.

Credit:

https://www.virtualgyanis.com/post/step-by-step-how-to-install-and-configure-domain-controller-on-windows-server-2019