Security Best Practices for On-Premise Environments

June 15, 2021 · View on GitHub

Table of contents

  1. Introduction
    1. Active Directory Administrative Tier Model
    2. Enterprise Access Model
  2. Categorization of Measures
  3. Measures
    1. Organizational Measures
    2. Configuriational Measures
    3. Account & Privilege Management Measures
    4. Password Management Measures
    5. Network Measures
  4. Tools

Introduction

This guide aims to help businesses to increase the security in an enterprise Windows Active Directory environment while focusing on the most important points. It is based on Microsoft best practices and learnings from dozens of penetration tests conducted by Compass Security in the past. Implementation guidelines for the different measures are kept to a minimum and references to more detailed guidelines are provided where necessary.

Active Directory Administrative Tier Model

Microsofts tiered administrative model was introduced many years ago with the goal to help customers secure their on-premise infrastructure from cyberattacks and malware. The purpose of this tier model is to protect identity systems (e.g. Active Directory Domain Controllers) using a set of buffer zones between full control of the environment (Tier 0) and the high-risk workstation assets that attackers frequently compromise.
Dividing the systems and user permissions in the environment into different tiers (Tier 0, Tier 1 and Tier 2) and preventing administrators to interactively login to other tiers reduces the impact of compromise of lower tier systems like workstations.

Three Tier Model Layout

Image adapted from Microsofts Legacy Tier Model

  • Tier 0 includes accounts, groups and systems that have administrative control of the AD forest. Tier 0 administrators can manage and control assets in all tiers but only log in interactively to Tier 0 assets. I.e. a domain administrator can never interactively log in to a Tier 2 asset.

  • Tier 1 contains domain member servers and applications with sensitive business data. Tier 1 administrators can access Tier 1 or Tier 0 assets (only network logon) but can only manage Tier 1 or Tier 2 assets. Tier 1 administrators can only log on interactively to Tier 1 assets.

  • Tier 2 is for end-user devices (e.g. notebooks and workstations). Tier 2 administrators can access all tier assets (network logon) as necessary but can only manage Tier 2 assets. Tier 2 admins can only log in interactively to Tier 2 assets.

This guide will help you to implement the important points of the administrative tier model.

Enterprise Access Model

Nowadays more and more companies are having a hybrid environment, whereas part of the infrastructure is in the cloud and part on-premise. Since the administrative tier model focuses on containing unauthorized escalation of privilege in an on-premises Windows Server Active Directory environment, Microsoft superseded it with the enterprise access model, which is adapted to the hybrid world.

In comparison to the old tier model, the enterprise access model introduces a higher degree of separation between controls over critical business and technical assets. In addition, it also addresses the requirements of a modern enterprise, that spans on-premises, multiple clouds, internal or external user access, and more. Enterprise Access Model Layout

Image adapted from Microsofts Enterprise Access Model

  • 1. Data / Workload Plane: Contains the business value of the organization (e.g. Business processes, intellectual property).
  • 2. Management Plane: Used to manage and support the workloads and the infrastructure they are hosted on.
  • 3. Control Plane: Provides consistent access control to all systems across the enterprise based on centralized enterprise identity systems (e.g. Active Directory, IAM/PAM), including networking where it is the only/best access control option, such as legacy OT options
  • 4. User and App Access: Providing the access to the internal users, partners and customers using their workstations or devices (often using remote access solutions) and to applications for process automation (APIs)
  • 5. Privileged Access: Providing the access to IT staff, developers or other highly privileged users which manage and maintain the systems. Because of the high level of control they provide over business critical assets in the organization, these pathways must be strictly protected against compromise.

The complete Microsoft documentation about the enterprise access model can be found here:
https://docs.microsoft.com/en-us/security/compass/privileged-access-access-model

While the measures in this guide primarily focus on the on-premises environment, they will also help you to implement some key points of the enterprise access model.

Categorization of Measures

The measures are categorized, based on how they need to be addressed.
The following categories of measures are defined:

  • Organizational Measures: Defining processes, training of employees etc.
  • Configurational Measures: Settings which have to be configured on workstations and servers.
  • Account & Privilege Management Measures: Creation of accounts and allocation of permissions.
  • Password Management Measures: Defining and enforcing of strong password policies.
  • Network Measures: Segregation of network, use of firewalls, etc.

Measures

Organizational Measures

RecommendationPurposePriority
Implement monitoringDetect security issues early and enable forensic readinessA
Perform regular off-site backupsData restoration after ransomware or similar attacksA
Implement patch management processMitigate exploits of known vulnerabilitesA
Maintain Hardware and Software InventoryBe able to distinguish between legitimate and malicious componentsA
Use group based access controlLimit access from compromised accountsA
Separate Tier-0 management servicesPrevent lateral movement to Tier-0A
Introduce privileged access workstationsLimit lateral movement from the workstation tier to the server and domain controller tierA
Do regular reviews & vulnerability assessmentsDetect misconfigurations, excessive privileges, unpatched or outdated systemsA
Define emergency processesPredefined plans and trained employees allow efficient response to a cyberattackA
Train employees on IT security best practicesHigher awareness from cyber attacksA
Use personalized accountsEnable accountability and traceabilityB
Implement four eyes principleMitigate internal fraud or mistakes in business tasksB
Use golden imagesAvoid configuration mistakes by providing an identical security baselineB

Configurational Measures

RecommendationPurposePriority
Install AntivirusBlock malware and common attacksA
Enforce SMB & LDAP signingLimit privilege escalation within the internal networkA
Disable or restrict macrosBlock malware which is spread via office documentsA
Enforce Multi-Factor AuthenticationLimit malicious access to systems and servicesA
Enforce BitLocker on clientsProtect data on harddisks from malicious accessA
Implement hardening of domain controllersLimit attack surface on domain controllersA
Implement hardening of other systemsLimit attack surface on all systemsA
Deploy strictly configured host-based firewallsLimit lateral movement within the internal networkA
Disable Spooler serviceLimit privilege escalation within the internal networkA
Enable detailed audit logsTraceability of events and evidence for forensic analysisA
Raise Active Directory function levelEnable new security mechanisms introduced with newer Windows versionsB
Enable Credential GuardProtect stored credentials on systems from certain attacksB
Enable AppLockerLimit execution of software and toolsB
Limit cached credentialsReduce the exposure of password hashes to password cracking attacksC

Account & Privilege Management Measures

RecommendationPurposePriority
Remove local administrator rightsReduce the attack surface and limit impact of malwareA
Assign permissions according to the Least Privilege PrincipleLimit permission abuse & privilege escalation attacksA
Minimize high privileged administrator accountsLimit privilege escalation attacks within the internal networkA
Implement least-privilege administrative modelLimit privilege escalation attacks within the internal networkA
Deny logon to other tiersLimit privilege escalation attacks within the internal networkA
Add sensitive accounts to protected users groupProtect highly privileged accounts from credential theftA
Disable high privileged account delegationProtect highly privileged accounts from credential theftA
Configure Exchange split permissionsLimit privilege escalation attacks within the internal networkB
Review unconstrained delegation systemsReduce risk of credential theftB
Limit users who can add systems to domainLimit privilege escalation attacks within the internal networkB
Use group managed service accountsReduce the possibility of password crackingC

Password Management Measures

RecommendationPurposePriority
Enforce strong password policyReduce the possibility of password guessing or password crackingA
Use unique local administrator credentialsLimit lateral movement within the internal networkA
Require password for every accountLimit compromise of accounts and systemsA
Change default credentialsLimit compromise of accounts and systemsA
Force change of initial passwordsReduce the possibility of password guessingA
Store credentials securelyLimit compromise of accounts and systemsA
Configure account lockoutLimit compromise of accounts and systemsA
Configure strong password on service accounts with SPNReduce the possibility of offline password crackingA
Review accounts with never expiring passwordLimit compromise of accountsB
Enable Kerberos Pre-AuthenticationReduce the possibility of offline password crackingB
Change krbtgt password regularlyLimit Golden Ticket attacksB

Network Measures

Recommendation                                                              Purpose                                                                        Priority
Implement network segmentation & segregationLimit lateral movement within the internal networkA
Use mail gateway with malware detectionPrevent delivery of malware via email to the end userA
Secure WiFi networksLimit attacks on the internal networkA
Exclusively use encrypted protocolsLimit eavesdropping on the internal networkA
Restrict outbound traffic and deploy filtering proxyDetect and block malicious connectionsA
Deploy Network Access Control (NAC)Limit network access of malicious devicesB
Deploy DNS sinkholeLimit malicious DNS queriesC

Tools

The following tools can be helpful for identifying issues in a network.

Bloodhound
Collects information about accounts, relationships and permissions in an Active Directory. The following blog article can help you to get started with the tool: https://blog.compass-security.com/2019/12/finding-active-directory-attack-paths-using-bloodhound/
URL: https://github.com/BloodHoundAD/BloodHound

Snaffler
This tool can be used to search shares and local drives for sensitive data (specific file types and keywords or patterns within files).
URL: https://github.com/SnaffCon/Snaffler

PingCastle
Generates a report about different configurations and policies (e.g. password policies) in the Active Directory.
URL: https://www.pingcastle.com

Nmap
Nmap is a tool to scan networks for hosts and services by sending packets and analyzing the response.
URL: https://nmap.org/

CIS Benchmarks
The Center for Internet Security (CIS) provides benchmarks and tools to verify security best practices for different operating systems and services.
URL: https://www.cisecurity.org/cis-benchmarks/

More tools can be found on our Security Resources link collection on GitHub:
https://git.io/secres