AD Security Prereqsadsassessment
AD Security Prereqsadsassessment
! Important: There are configuration and setup tasks to be completed prior to executing the assessment setup tasks in this document.
For all prework, follow the Assessment Setup Guide from the Services Hub Resource Center.
Table of Contents
System Requirements and Configuration at Glance ..................................................................................................... 2
Supported Target Operating System Versions............................................................................................................................................. 2
Environment Permissions..................................................................................................................................................................................... 2
Appendix ......................................................................................................................................................................... 11
Environment Permissions
• Assessment account rights:
o A domain account (can be a user or a Managed Service Account) with the following rights:
▪ Enterprise Administrator.
▪ Administrative access to all Microsoft Domain Name System (DNS) servers that the domain
controllers participate with.
• Data collection machine hardware: Minimum 16 gigabytes (GB) of RAM, 2 gigahertz (GHz dual-core processor,
minimum 10 GB of free disk space.
o Depending on the size and complexity of your environment, you will need to increase the total amount
of RAM to ensure that the data collection is successful and completes in a timely manner.
• The data collection machine is used to connect to all domain controllers in the forest and retrieve information
from it. The machine is communicating over Remote Procedure Call (RPC), Server Message Block (SMB), WMI,
remote registry, Lightweight Directory Access Protocol (LDAP) and Distributed Component Object Model (DCOM).
• Antivirus and any other type of Security software need to be configured to exclude Assessment related files, file
types, working directory folders and process (Omsassessment.exe) to avoid process termination, blockage and
alerts. Add an exclusion to Windows Security
PowerShell Remoting
To complete the assessment with the accurate results, you will need to configure all in-scope target machines for
PowerShell remoting.
PowerShell on the tools machine is used to scan the servers for installed security patches as well as audit policy
configuration.
• Windows Update Agent must be running on all domain controllers for the security update scan
• PowerShell version 2 or greater is required on target domain controllers and comes installed by default starting
with Windows Server 2008 R2. If PowerShell version 2 is not installed, it is available for download here
https://aka.ms/wmf3download
Additional requirements for Windows Server 2012-2012 R2 (or later if defaults modified) Target Machines:
The following three items must be configured on target domain controllers to support data collection: PowerShell
Remoting, WinRM service and Listener, and Inbound Allow Firewall Rules.
Note1: Windows Server 2012 R2 and Windows Server 2016 have WinRM and PowerShell remoting enabled by default. The
following configuration steps detailed below will only need to be implemented if the default configuration for target
machines has been altered.
Note 2: Windows Server 2012 has WinRM disabled by default. The following settings will need to be configured to support
PowerShell Remoting:
• Execute Enable-PSRemoting Powershell cmdlet on each target machine within the scope of the assessment. This
one command will configure PS-Remoting, WinRM service and listener, and enable required Inbound FW rules. A
detailed description of everything Enable-PSRemoting does is documented here.
OR
• Configure WinRM service for automatic start via Group Policy (Computer Configuration\Policies\Windows
Settings\Security Settings\SystemServices) o Define Windows Remote Management (WS-Management)
Two steps are involved to configure a group policy to enable both WinRM listener and the required inbound allow firewall
rules:
A) Identify the IP address of the source computer where data collection will occur from.
B) Create a new GPO linked to the domain controller organizational unit, and define an inbound rule for the tools
machine
A.) Log into the chosen data collection machine to identify its current IP address using IPConfig.exe from the command prompt.
An example output is as follows
C:\>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::X:X:X:X%13
IPv4 Address. . . . . . . . . . . : X.X.X.X
Subnet Mask . . . . . . . . . . . : X.X.X.X
Default Gateway . . . . . . . . . : X.X.X.X
Make a note of the IPv4 address of your machine. The final step in the configuration will use this address to ensure only the data collection
machine can communicate with the Windows Update Agent on the domain controllers.
3. Create an advanced Inbound Firewall Rule to allow all network traffic between the data collection machine and the Domain
Controllers. This can be the applied to the same GPO that was used in step 1 above. (Computer
Configuration\Policies\Windows Settings\Security Settings\Windows Firewall with Advanced Security\Windows Firewall with
Advanced Security –LDAP:/xxx\Inbound Rules)
9. On the Action page, choose to “Allow the connection” and click “Next”.
10. On the Profile page, choose to select network profile “Domain” and click “Next”.
11. Choose a name for the rule (Example: ADSecurityAssessmentToolsMachine) and complete the wizard.
2) Authorize the account with the necessary environmental access per the Environment Permissions section in this
document.
4. The script will continue with the necessary configuration. It will create a scheduled task that will trigger the data
collection.
Note: Managed Service Accounts are not officially supported by Microsoft customer service for some environmental
configurations. While they work in most scenarios, it may be necessary to use a domain account when environmental
configurations prevent Managed Service Account usage.
6. Run the Add-ADSecurityAssessmentTask command where <Directory> is the path to an existing directory used to
store the files created while collecting and analyzing the data from the environment.
7. Provide the required user account credentials. These credentials are used to run the Active Directory Security
Assessment.
NOTE: This domain account must have all the following rights:
• An Enterprise Administrator account with admin access to every domain controller in the forest.
o By default, the Enterprise Admins group is member of the built-in Administrators group in every
domain. Ensure that this membership has not been changed. If the Enterprise Admins group is not
member of the built-in Administrators group of a domain, add the account under which the Active
Directory Security Assessment runs to the built-in Administrators group of that domain.
• Unrestricted network access to every domain controller in the forest.
The Active Directory Security Assessment in the log analytics workspace and Microsoft Unified Support Solution
Pack uses multiple data collection methods to collect information from your environment. This section describes the
methods used to collect data from an Active Directory environment. The collectors are:
1. Registry Collectors
2. LDAP Collectors
3. .NET Framework
4. Windows PowerShell
5. FileDataCollector
7. Custom C# Code
1. Registry Collectors
Registry keys and values are read from the data collection machine and all Domain Controllers. They include items such
as:
2. LDAP Collectors
LDAP queries are used to collect data for the Domain, DCs, Partitions, group memberships, account names and their
properties, object permissions, and other components from
The assessment leverages the System.DirectoryServices.ActiveDirectory .NET Framework Namespace and uses several
methods to determine and collect architectural information about the directory service.
4. Windows PowerShell
• Scheduled Tasks
5. FileDataCollector
Enumerates files in a folder on a remote machine, and optionally retrieves those files. Examples include:
• Scripts in SYSVOL
• WIN32_Volume
WMI collects information on Volume Settings for each DC in the forest. The information is used for instance to
determine the system volume and drive letter which allows the client to collect information on files located on the
system drive.
• Win32_Process
Collect information on the processes running on each DC in the forest. The information provides insight in processes
that consume a large amount of threads, memory or have a large page file usage.
• Win32_LogicalDisk
Used to collect information on the logical disks. We use the information to determine the amount of free space on the
disk where the database or log files are located.
7. Custom C# Code
Collects information not captured using other collectors. The primary example here is the collection of effective user
rights on the domain controllers.