Hardening Active Directory
top of page

Hardening Active Directory

Active Directory (AD) is a critical component of many organizations' infrastructure, serving as the backbone for authentication, authorization, and access control. As a result, ensuring the security of the AD environment is of utmost importance. In this article, we will discuss various steps and tools that can be used to harden and secure an AD environment.




Steps to Hardening Active Directory:

  1. Check for object changes around initial access/event timescales: Regular monitoring of the AD environment is essential to identify any changes that may have occurred. This can include changes to group memberships, permissions, and other critical configurations.

  2. Validate group memberships against known baselines: Regularly validate the memberships of critical security groups against known baselines, such as replication metadata, backup, AD reporting tools/reports, etc. to ensure that no unauthorized changes have been made.

  3. Harden Active Directory: Utilize tools such as Pingcastle and MITRE to identify and remediate vulnerabilities and misconfigurations in the AD environment.

  4. Review logon scripts in GPOs and SYSVOL: Regularly review logon scripts in GPOs and SYSVOL to ensure that they do not contain any malicious code or backdoors.

  5. Rotate Group Managed Service Accounts (GMSA): Regularly rotate GMSA credentials to reduce the risk of unauthorized access.

  6. Rotate LAPS credentials: Regularly rotate LAPS credentials to reduce the risk of unauthorized access.

  7. Review Azure AD/AD Connect: Regularly review the configuration of Azure AD/AD Connect to ensure that it is properly secured and configured.

  8. Harden Endpoints: Ensure that endpoints are properly secured and up-to-date with the latest security patches and updates.

  9. Update Anti-Virus (AV) software: Regularly update AV software to ensure that it is able to detect and remediate the latest threats.

  10. Deploy Endpoint Detection and Response (EDR): Deploy EDR to detect and respond to threats in real-time.

  11. Deploy SYSMON: Deploy SYSMON to monitor the system and detect any malicious activity.

  12. DNS Zone Integrity: Regularly review the integrity of both public and private DNS zones to ensure that they are properly configured and free of malicious entries.

  13. Rotate Domain Trust Keys: Regularly rotate domain trust keys to reduce the risk of unauthorized access.

  14. Review potential RBCD Backdoors: Regularly review the configuration of RBCD backdoors to ensure that they are properly secured.

  15. Review msDsConsistencyGuid attribute of compromised accounts: Regularly review the msDsConsistencyGuid attribute of compromised accounts to ensure that they have not been taken over by an attacker.

  16. Check Exchange: Regularly check Exchange to ensure that it is properly configured and secured.

  17. Review accounts for "Key Trust Account Mapping" takeover: Regularly review accounts for "Key Trust Account Mapping" takeover and reset if required.

  18. Review Active Directory Domains and Trusts: Regularly review the configuration of Active Directory Domains and Trusts to ensure that they are properly secured.

  19. Deploy new Domain Controllers: Regularly deploy new domain controllers to keep the forest/domain metadata up-to-date.

  20. Clear VSS/Backups/Snapshots that are likely to be classed as unsafe: Regularly clear VSS/backups/snapshots that may contain sensitive information and are likely to be classified as unsafe.

Tools for Hardening Active Directory:

  1. PingCastle: This is a tool that helps in evaluating the security level of an Active Directory infrastructure. It provides a risk score and detailed information on potential security issues, making it easy to identify and address any security concerns.

  2. Bloodhound: This is a graph-based tool that provides a visual representation of the relationships between objects in Active Directory, making it easier to identify potential security threats and attack paths.

  3. Adalanche: This is a tool for auditing Active Directory security that provides a detailed report on the security settings of an Active Directory environment, including information on users, groups, and permissions.

  4. ADACLScanner: This is a tool for scanning Active Directory security, which identifies potential security threats such as weak passwords, unnecessary permissions, and missing security patches.

  5. SysInternals: This is a suite of tools developed by Microsoft that can be used to monitor, troubleshoot, and diagnose Windows-based systems. Some of these tools can be used to monitor and manage Active Directory security, including Process Explorer and PsExec.

  • PingCastle: https://github.com/Pingcastle/PingCastle

  • Bloodhound: https://github.com/BloodHoundAD/BloodHound

  • Adalanche: https://github.com/lkarlslund/adalanche

  • ADACLScanner: https://github.com/canix1/ADACLScanner

  • SysInternals: https://docs.microsoft.com/en-us/sysinternals/downloads (Sysinternals is not hosted on github)

Simpler steps to harden the Active Directory:


HardeningKitty is an open-source tool developed to automate various security hardening tasks in Active Directory. It includes several features that help harden Active Directory security, such as updating group policies, setting security permissions, and modifying user and computer settings.



  1. Install HardeningKitty: You can download HardeningKitty from its GitHub repository and install it on a machine that is part of your Active Directory environment.

  2. Run HardeningKitty: Once installed, you can run HardeningKitty by executing the script from the command line. The tool will prompt you for the credentials of a domain administrator, which it will use to make changes to the Active Directory environment.

  3. Choose hardening tasks: HardeningKitty provides several options for hardening your Active Directory environment. For example, you can choose to update group policies, modify user and computer settings, and set security permissions.

  4. Review and apply changes: After you've selected the tasks you want to perform, HardeningKitty will display a summary of the changes it intends to make. You can review these changes and decide whether to apply them or not.

  5. Monitor changes: Once you've applied the changes, you can monitor the effects of HardeningKitty using the event logs on your Active Directory environment.


Raccine is a tool for auditing and securing Active Directory environments. It provides a comprehensive report on the security of an Active Directory environment, including information on users, groups, permissions, and other security-related settings. It can be used to detect security vulnerabilities and help implement best practices for AD security.

Both HardeningKitty and Raccine can be found on Github, and can be useful for administrators who are looking to harden the security of their Active Directory environments.



Raccine is a tool designed to secure and harden Active Directory environments. Here's an example of how you might use Raccine to harden your Active Directory:

  1. Install Raccine: You can download Raccine from its GitHub repository and install it on a machine that is part of your Active Directory environment.

  2. Run Raccine: Once installed, you can run Raccine by executing the following command from the command line:


./raccine.ps1
  1. Choose hardening tasks: Raccine provides several options for hardening your Active Directory environment. For example, you can choose to enforce password policies, disable unneeded accounts, and restrict permissions.

  2. Review and apply changes: After you've selected the tasks you want to perform, Raccine will display a summary of the changes it intends to make. You can review these changes and decide whether to apply them or not.

  3. Monitor changes: Once you've applied the changes, you can monitor the effects of Raccine using the event logs on your Active Directory environment.

In case of more doubts, please comment below for help.


238 views0 comments

Recent Posts

See All
bottom of page