EPM - Domain Controller/DFSR Issues
Symptom
The Distributed File System Replication (DFSR) service is a new multi-master replication engine that is used to keep folders synchronized on multiple servers. Replicating data to multiple servers increases data availability and gives users in remote sites fast, reliable access to files.
EPM can interfere with this activity, and the result of this can be seen in the following DFS log record:
------
Log Name: DFS Replication Source: DFSR Date: 09/10/2021 5:55:18 PM Event ID: 4412 Task Category: None Level: Information Keywords: Classic User: N/A Computer: DC.Domain.local Description: The DFS Replication service detected that a file was changed on multiple servers. A conflict resolution algorithm was used to determine the winning file. The losing file was moved to the Conflict and Deleted folder.
---------------
Environment
EPM Agent Issue
Cause
EPM is meant to track/record changes made to monitored files. When this happens to files in the DC's DFSR location, the extended attributes are changed accordingly by EPM.
In this case, the DC then recognizes this as a change and replicates around to other machines, EPM sees this 'modify' and changes the extended attributes, DC recognizes this as a change and replicates... and it cycles.
Resolution
The solution is to exclude from EPM inspection %SYSTEMDRIVE%\System Volume Information or specifically \DFSR subfolder.
This can be done in the EPM console:
Advanced-> Agent Configuration-> File to be ignored always (Windows).
Alternatively, consider turn off the “Store File Info in Extended Attribute” parameter (However, please note that this could impact Trust policies)
Addition information:
By having EPM agent installed on the DC, customers could get these security values:
- They can allow only approved application to run on the DC - whitelisting (default deny)
- They can Restrict allowed applications e.g.
- block internet connection
- e.g. deny powershell.exe shell from accessing the internet
- block access to corporate network share
- block internet connection
- enabling 2FA (secure token) on critical applications
- Protect the DC windows credential stores:
- database file ntds.dit
- LSASS
- LSA
- Domain Credential Theft From Local Cache
- Crypto RSA Machine Keys
- Service Accounts
- Protect against creating local backdoor account
- Protect the netlogon folder to prevent unauthorized files (malware) distribution
- How Attackers Pull the Active Directory Database (NTDS.dit) from a Domain Controller - https://adsecurity.org/?p=451
- Grabbing the ntds.dit file locally on the DC using NTDSUtil’s Create IFM
- Pulling the ntds.dit remotely using VSS shadow copy
- Etc.
- Remote Hash Extraction On Demand Via Host Security Descriptor Modification | LSA Secrets - https://www.harmj0y.net/blog/activedirectory/remote-hash-extraction-on-demand-via-host-security-descriptor-modification/
- RSA machine keys – many customers install the ADFS service on the DC. Stolen private keys can be used for a variety of post exploitation attacks such as stealing authentication tokens from any identity management solution that stores its key in the windows private key store. For more information, see Golden SAML attack - https://www.cyberark.com/threat-research-blog/golden-saml-newly-discovered-attack-technique-forges-authentication-cloud-apps/