Potential Mitigation:
• Contiunally monitor for and prevent accounts from not requiring Kerberos pre-authentication
• Edit the property of the identified accounts by unchecking "Do not require Kerberos preauthentication"
Technique: Steal or Forge Kerberos Tickets
Sub-technique: AS-REP Roasting
Technique ID: T1558.004
Potential Mitigation:
• Regularly review and audit accounts with permissions to set Server Trust Accounts.
• Monitor and alert on suspicious activities related to trust relationships and server configurations.
• Revoke unnecessary permissions from accounts to set Server Trust Accounts.
Technique: Domain Controller Authentication
Technique ID: T1207
Potential Mitigation:
• Regularly review and identify potential stale computers
• Create a decomissioning process to remove stale objects from your environment
Technique: User Account Management
Technique ID: M1018
Duplicate accounts being present often means there are process failures, and they should be identified and removed.
Potential Mitigation:
• Remove any accounts identified as duplicates and are not in use
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Remove the "Everyone" and "Anonymous" from the PreWin2000 group while making sure that the group "Authenticated Users" is present, then reboot each DC. Note: removing the group "Authenticated Users" (and not keep it like advised here) is an advanced recommendation quoted in the rule A-PreWin2000AuthenticatedUsers
https://msdn.microsoft.com/en-us/library/cc223672.aspx [US]STIG V-8547 - The Anonymous Logon and Everyone groups must not be members of the Pre-Windows 2000 Compatible Access group.
Technique: Brute Force
Sub-technique: Password Spraying
Technique ID: T1110.003
Potential Mitigation:
• Locate the IP address which was found as not being part of declared subnet, then add this subnet to the "Active Directory Sites" tool. If you have found IPv6 addresses and it was not expected, you should disable the IPv6 protocol on the network card.
Technique: Active Directory Configuration
Technique ID: M1015
Remediation:
1. Regularly audit user and computer accounts to identify those with non-default PrimaryGroupIDs.
2. Investigate any accounts with non-default PrimaryGroupIDs to determine if the change was authorized and necessary.
3. If the change was unauthorized, reset the PrimaryGroupID to the default value (513 for users, 515 for computers) and monitor for any suspicious activities.
4. Implement strict access controls and monitoring for group management, especially for sensitive groups like Domain Admins.
5. Educate administrators about the risks associated with modifying PrimaryGroupIDs and enforce policies to prevent unauthorized changes.
Technique: Account Manipulation
Technique ID: T1098
In order to reduce this risk, organizations should
1. Regularly review and remove disabled privileged accounts that are no longer needed.
2. Implement a process to promptly revoke all permissions and group memberships from privileged accounts upon disabling them.
3. Monitor and alert on any activity from disabled accounts, as this could indicate a potential attack.
4. Implement strong password policies and multi-factor authentication (MFA) for all privileged accounts to reduce the risk of unauthorized access.
5. Conduct periodic access reviews to ensure that only authorized users have access to privileged accounts and that their permissions align with their current roles and responsibilities.
If an attacker compromises the password hash of an account with an SPN, they can use Kerberoasting techniques to request Kerberos service tickets for that account. They can then crack the password offline, potentially gaining access to the user's credentials. The potential damage and lateral movement capabilities would be more contained for non-privileged users than for privileged users, like Domain Admins, but it is still important to manage and secure non-privileged accounts.
Remediation:
1. Regularly audit your accounts to ensure they don't have unnecessary SPNs defined.
2. Remove any SPNs from accounts that don't specifically require them for their intended service.
3. Implement Managed Service Accounts (MSAs) or Group Managed Service Accounts (gMSAs) for services.
Technique: Steal or Forge Kerberos Tickets: Kerberoasting
Technique ID: T1558.003
Remediation:
1. Regularly review AD user accounts to identify those that have been inactive for an extended period (e.g., 30-90 days).
2. Disable or delete stale user accounts that are no longer needed.
3. Implement an automated process to detect and remove stale accounts on an ongoing basis.
Remediation:
• Regularly review krbtgt accounts to identify those that have not had their password changed for an extended period (e.g., 180 days).
• Apply strict controls for enforcing regular password updates for krbtgt accounts
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
An attacker could use brute-force attacks to guess the computer account password and gain access. The attacker could then use the compromised computer account to perform malicious activities, such as spreading malware or moving laterally through the network, escalating privilege, to gain access to network resources or take control of the entire domain.
Remediation:
1. Ensure that computer account passwords are changed at least every 90 days, in line with your organization's security policy.
2. Configure Group Policy to enforce regular password changes for computer accounts.
3. Set up monitoring and alerting systems to identify computer accounts with passwords older than the defined threshold.
4. Regularly audit and remove inactive or stale computer accounts from Active Directory to minimize the attack surface.
Technique: Account Manipulation
Technique ID: T1098
Remediation:
1. Ensure that the guest account is disabled in Active Directory. This can be done through Group Policy or by directly modifying the account settings.
2.Regularly review your Active Directory configuration to ensure that the guest account remains disabled and no other unnecessary accounts are enabled.
3.Enable logging and monitoring of account activities to detect and investigate any suspicious behavior or unauthorized access attempts.
Technique: Valid Accounts: Local Accounts
Technique ID: T1078.003
• Gaining unauthorized access to resources
• Escalating privileges
• Conducting reconnaissance
• Establishing persistence within the network
Mitigation:
1. Regularly review and monitor newly created AD objects using tools like PowerShell or third-party security solutions.
2. Implement strict access controls and approval processes for creating new AD objects.
3. Enforce strong password policies and enable multi-factor authentication (MFA) for all user accounts.
7. Regularly audit and remove unused or stale AD objects to maintain a clean and secure AD environment.
Technique: Create Account
Sub-Technique: T1136.002 Domain Account
Technique ID: T1136
Mitigation:
• Set a maximum password age policy for AD accounts, forcing regular password changes.
• Require users to use complex passwords that meet minimum length and complexity requirements.
• Implement MFA for all administrator accounts to provide an additional layer of security beyond passwords.
Technique: Brute Force, Credential Dumping
Technique ID: T1110, T1003
Potential Mitigation:
• Regularly review the ACL of the AdminSDHolder container to ensure only the required ACEs exist to be propogated to privileged objects
• Monitor changes to the AdminSDHolder ACL to ensure only required and intended changes occur to the permissions
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Regularly review and audit accounts with replication permissions to ensure they are limited to only necessary users or groups.
• Implement the principle of least privilege, granting replication permissions only to accounts that absolutely require them.
• Monitor and alert on suspicious replication activities, such as replication requests from unauthorized sources or during unusual hours.
Technique: OS Credentials Dumping
Sub-technique: DCSync
Technique ID: T1003.006
The Protected Users group is automatically created when the PDC (primary DC) emulator role is transferred to Windows Server 2012 R2 or newer domain controller. The group is then automatically replicated to all other domain controllers.
Technique: Privileged Account Management
Technique ID: M1026
This rule is considered "informative" because the default configuration where Authenticated Users can create DNS records is considered safe. The reason for this classification is that no exploitation of that vulnerability has been reported. The proposed enhancement is to replace the identity who has been granted the right to create DNS Records (permission CreateChild) from Authenticated Users to Domain Computers. To perform this change, you have to edit the permission of the DNSZone whose object is located in the container CN=MicrosoftDNS,DC=DomainDnsZones. It should be noticed that if there is a privilege escalation on a computer, an attacker can impersonate the computer account and bypass this mitigation.
Potential Mitigation:
Create the DNS records manually as part as the domain join process and to revoke the permission granted to Authenticated Users.
Technique: Adversary-in-the-Middle
Technique ID: T1557
Locate the GPO specified in Details and turn off the setting "Recovery console: Allow automatic administrative logon" The setting is located in : Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> Security Options. As an alternative, the file GptTmpl.inf can be manually edited.
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/recovery-console-allow-automatic-administrative-logon
Technique: Boot or Logon Autostart Execution
Technique ID: T1547
Potential Mitigation:
• Edit the root domain security descriptor.
• Identify the ACE giving the right ModifyDACL to the principal Exchange Windows Permissions.
• Go to the advanced settings and set the inheritance to Inherit Only.
Technique: Valid Accounts
Technique ID: T1078
When Open Access groups like "Authenticated Users," or "Everyone," or similar broadly-defined security principals have permissions to modify login scripts, it introduces a significant security risk. Specifically, these permissions allow any user who falls within these groups to alter the login script. Since login scripts are executed during the login process, any malicious modifications can result in the execution of arbitrary code with the privileges of the user logging in. If a privileged user, such as an administrator, logs in, the malicious code can run with elevated permissions, leading to a complete system compromise.
Potential Mitigation:
• Ensure that only trusted administrators have permissions to modify login scripts. Remove or severely limit access for groups like "Authenticated Users" or "Everyone" to prevent unauthorized modifications.
• Regularly audit the permissions on login scripts and other critical configuration files to ensure that only authorized users have access. Use tools that can automatically detect and report on insecure permissions.
• Implement monitoring and alerting mechanisms to detect when login scripts are modified. This can include file integrity monitoring (FIM) solutions that alert administrators whenever a script is altered.
• If possible, use code-signing to ensure that only verified and trusted scripts are executed. This adds an additional layer of security, making it more difficult for attackers to insert unauthorized scripts.
Technique: Boot or Logon Autostart Execution
Technique ID: T1547
To solve the issue, limit the number of extra computers that can be registered by a basic user. It can be reduced by modifying the value of ms-DS-MachineAccountQuota to zero (0). Another solution can be to remove the "Authenticated Users" group in the domain controllers policy altogether. Do note, that if you need to set delegation to an account, so it can add computers to the domain, it can be done through 2 methods: Delegation in the OU or by assigning the SeMachineAccountPrivilege to a special group
Technique: Valid Accounts
Technique ID: T1078
When default members, such as highly privileged accounts (e.g., Domain Admins, Enterprise Admins), are removed from the Denied RODC Password Replication Group, their passwords can be cached on the RODC. An attacker who gains access to an RODC can exploit cached credentials in several ways:
• Credential Dumping: Tools like Mimikatz can be used to dump cached credentials from the RODC, including passwords of highly privileged accounts if they were removed from the denied group.
• Lateral Movement: With the credentials of a high-privilege account, an attacker can move laterally within the network, gaining access to other resources and potentially compromising the entire domain.
• Domain Compromise: By exploiting these cached credentials, especially of domain or enterprise admins, an attacker can escalate privileges and take control of the domain.
Potential Mitigation:
• Review and Restore Default Settings: Regularly review the membership of the Denied RODC Password Replication Group and ensure that all default members are included. This includes high-privilege groups like Domain Admins, Enterprise Admins, and the krbtgt account.
• Audit Password Replication Policies: Use tools and scripts to audit and enforce proper password replication policies on all RODCs. Ensure that only accounts that need to authenticate locally are allowed to have their credentials cached.
• Monitor RODC Access: Implement monitoring and alerting for any unusual access or changes to RODC configurations. This helps in detecting potential unauthorized changes to replication policies or cached credentials.
• Regularly Rotate Credentials: Periodically change the passwords of highly privileged accounts and the krbtgt account, especially if there is any suspicion of compromise.
Technique: Credential Dumping
Sub-Technique: T115.002 Pass the Hash
Technique ID: T1003
If an RODC is compromised, an attacker can extract the password hashes of these accounts, potentially allowing offline password-cracking attacks. This is particularly concerning for privileged accounts.
If the compromised account is a privileged account, such as a member of the Domain Admins group, the attacker could leverage the cracked password to escalate their privileges within the domain. This could lead to a full domain compromise.
Mitigation Strategies:
• Limit Membership in the Allowed RODC Password Replication Group: Restrict membership to only the accounts that absolutely need their passwords replicated to the RODC. Ideally, this group should not include any privileged accounts (e.g., Domain Admins).
• Implement Strong Password Policies: Ensure that strong, complex passwords are enforced, making it more difficult for attackers to crack password hashes. Implement multi-factor authentication (MFA) wherever possible.
• Regularly Rotate Credentials: Regularly change passwords, especially for accounts with privileged access. This limits the window of opportunity for an attacker if credentials are compromised.
• Monitor and Audit RODC Access: Continuously monitor RODCs for any signs of compromise or unusual activity. Implement robust logging and alerting for any suspicious actions involving RODCs.
• Patch and Update Systems: Ensure that all systems, including RODCs, are regularly patched and updated to protect against known vulnerabilities.
• Disable Cached Credentials on RODCs: If possible, disable the caching of credentials on RODCs, or at least limit the scope of accounts whose credentials are cached.
Technique: Valid Accounts
Sub-Technique: T1003.001 - OS Credential Dumping: LSASS Memory, T1078.002 - Valid Accounts: Domain Accounts
Technique ID: T1078
If the msDS-NeverRevealGroup attribute is not properly configured, or expected groups (like Administrators, Server Operators, Account Operators, Backup Operators, and Denied RODC Password Replication Group) are missing, the password hashes for these highly privileged accounts could be replicated to RODCs. This poses a significant security risk if an RODC is compromised, as attackers could extract these password hashes and attempt to crack them.
An attacker who gains access to an RODC could use tools to dump all cached password hashes. If privileged accounts' hashes are stored on the RODC due to misconfiguration, these can be targeted for cracking. If the attacker successfully cracks the password of a privileged account, they could escalate their privileges, gaining broader access to the network.
Potential Mitigation:
• Ensure Proper Configuration of msDS-NeverRevealGroup: Verify that all critical groups, such as Administrators, Server Operators, Account Operators, Backup Operators, and the Denied RODC Password Replication Group, are included in the msDS-NeverRevealGroup attribute.
• Regularly audit the configuration of msDS-NeverRevealGroup to ensure that it includes all necessary groups and that no unauthorized changes have been made.
• Implement monitoring and alerting mechanisms to detect any unusual activities on RODCs, especially related to password replication and account access.
• Limit physical and network access to RODCs, especially in less secure locations, to reduce the risk of compromise.
Technique: Technique: Valid Accounts
Sub-Technique: T1003.001 - OS Credential Dumping: LSASS Memory, T1078.002 - Valid Accounts: Domain Accounts
Technique ID: T1078
Potential Mitigation:
• Ensure that RIGHT_DS_LIST_OBJECT is correctly configured to enforce proper isolation between OUs. Regularly review and audit ACL settings to prevent unauthorized visibility.
• If isolation is not necessary, consider reverting the DoListObject behavior to its default by adjusting the dsHeuristics setting to "0". This can reduce the complexity and potential misconfigurations.
• Monitoring and Auditing: Regularly monitor and audit access logs to detect any unauthorized attempts to view or access objects in different OUs.
Technique: Permission Groups Discovery
Sub-Technique: T1069.002 - Permission Groups Discovery: Domain Groups
Technique ID: T1069
Potential Mitigation:
• Implement regular audits of the "primaryGroupID" attribute across all accounts to ensure it aligns with expected group memberships.
• Ensure that the "primaryGroupID" is set to its default value unless there is a strong, justified reason for an exception. Use scripts to regularly check for deviations from this standard.
• Enable monitoring and alerts for changes to the "primaryGroupID" attribute to detect potential unauthorized modifications.
• Limit who can modify the "primaryGroupID" to only a few trusted administrators.
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
• Ensure the "primaryGroupID" is set to default values unless absolutely necessary. Regularly audit this attribute.
• Verify that all domain controllers reside in the "Domain Controllers" container to ensure proper policy application.
• Implement monitoring for changes to the "primaryGroupID" and the location of domain controllers to detect potential malicious activities.
• Limit permissions to modify the "primaryGroupID" to a select group of administrators to prevent unauthorized changes.
Technique: Account Manipulation
Technique ID: T1098
Exploitation by Attackers
• Undelete Objects (REANIMATE_TOMBSTONE): Attackers can restore deleted objects, such as user accounts, and use them to regain access to the environment.
• Undo Password Expiration (UNEXPIRE_PASSWORD): Attackers could prevent a compromised account's password from expiring, maintaining access for an extended period.
• Create Alternate Identities (SID_HISTORY): Attackers could use this right to impersonate other users by manipulating their SIDs, allowing them to escalate privileges or access sensitive resources.
Potential Mitigation:
• Restrict Privileges: Limit the assignment of REANIMATE_TOMBSTONE, UNEXPIRE_PASSWORD, and SID_HISTORY rights to only essential, highly trusted administrators.
• Audit and Review: Regularly audit and review the use of these rights to ensure they are not being misused. Investigate any suspicious delegations immediately.
• Remove Unnecessary Delegations: Unless there is a strong justification, remove these rights from accounts and groups that do not need them.
• Monitor for Abuse: Implement monitoring to detect the use of these rights, particularly in non-routine contexts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Remove Unnecessary Delegations: If a delegation cannot be traced to a valid account, remove it to eliminate potential risks.
• Audit and Monitor: Regularly audit delegations and monitor for any delegations linked to accounts that cannot be translated, indicating possible risks.
• Cross-Domain Review: Review cross-domain trust relationships and delegations to ensure they are necessary and secure.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Review and Restrict Delegations: Regularly review delegated permissions and remove overly broad access rights. Assign permissions only to specific groups that require them.
• Apply the principle of least privilege by ensuring that users have only the minimum permissions necessary to perform their tasks.
• Continuously audit and monitor changes to OU delegations to detect and respond to any misconfigurations promptly.
Technique: Account Manipulation, Exploitation for Privilege Escalation
Technique ID: T1098, T1068
Potential Mitigation:
• Analyze and restrict write permissions on key objects and servers to minimize risk.
• Ensure helpdesk personnel have the least privilege necessary to perform their duties, and segregate duties to limit their ability to access critical systems.
• Use tools like Netwrix Access Analyzer to identify shadow access and eliminate unnecessary permissions.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Review and restrict write permissions granted to groups like Everyone, Authenticated Users, and other broad groups to minimize the risk of exploitation.
• Ensure permissions are assigned only to specific, necessary groups, avoiding the inclusion of broad groups like Everyone or Domain Users in critical control paths.
• Use tools like Netwrix Enterprise Auditor to identify shadow access involving these broad groups and correct any overly permissive configurations.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
To mitigate this risk:
1. Regularly review and audit user accounts to identify stale or inactive accounts.
2. Implement a process to promptly disable or remove stale accounts, revoking their group memberships and permissions including permissions on AD Objects.
3. Use automated tools or scripts to detect and alert on stale accounts with sensitive group memberships and permissions.
4. Implement a least privilege model, ensuring that users only have the permissions necessary for their roles.
By proactively managing stale user accounts and their group memberships and permissions, organizations can reduce the risk of unauthorized access and limit the potential impact of a compromised account.
Technique: Permission Groups Discovery
Sub-Technique: Domain Groups
Technique ID: T1069.002
Potential Mitigation:
• Routinely audit AdminSDHolder permissions for unauthorized or unnecessary permissions.
• Do not allow users to possess administrative privileges across security boundaries. For example, an adversary who initially compromises a workstation should not be able to escalate privileges to move from the workstation to a server or domain controller. Eliminating these pathways to privilege escalation is essential.
• Aggressively enforce the principle of least privilege.
To learn more about this vulnerability, visit the attack catalog page: https://www.netwrix.com/adminsdholder_modification_ad_persistence.html and this blog post: https://blog.netwrix.com/2023/06/16/adminsdholder/
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
• Regularly review and limit the number of users with password reset privileges. Assign this permission only to trusted individuals who require it for their roles.
• Implement Multi-Factor Authentication (MFA) for all accounts, especially those with password reset capabilities, to prevent unauthorized access even if passwords are compromised.
• Enable auditing and monitoring of password reset activities to detect and alert on suspicious password changes.
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
1. Regularly audit and review the permissions assigned to domain users.
2. Apply the principle of least privilege. Remove unnecessary direct permissions from domain users. Ensure that only authorized administrators have the required permissions to manage critical objects.
3. Use role-based access control (RBAC): Implement RBAC to assign permissions based on job roles and responsibilities.
4. Use PAM solutions to control and monitor privileged access to sensitive objects. Require approval workflows and logging for privileged actions.
5. Regularly review and update permissions. Conduct periodic reviews of permissions to ensure they remain aligned with job roles and responsibilities. Remove permissions promptly when users change roles or leave the organization.
By following these steps, organizations can mitigate the risks associated with domain users having direct permissions and maintain a more secure Active Directory environment.
Technique: Valid Accounts
Technique ID: T1078
Remediation:
• Regularly review user permissions and ensure that only necessary users have permission to add computer accounts, following the principle of least privilege.
• Enable monitoring of changes in Active Directory and set up alerts for unusual activity, such as creation of a large number of new computer accounts or computer accounts being added by users who typicallly don't perform such actions.
• Use Role Based Access control (RBAC) to ensure only authorized administrative roles have ability to add computer accounts
Technique: Valid Accounts, Domain Trust Manipulation
Technique ID: T1078, T1075
Remediation:
• Locate the dsHeuristics attribute in the configuration partition on the object Configuration/Services/Windows NT/Directory Service
• Edit the attribute and set the 16th character to zero (0)
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/e5899be4-862e-496f-9a38-33950617d2c5
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/50097362-ede5-40fa-973e-8d65e782e384
Technique: Privileged Account Management
Technique ID: M1026
If an attacker or a compromised account with delegated access to GPOs linked onthe domain level, they can create and link malicious GPOs to the entire domain. Using these newly created GPOs, they can be used to distribute malware, change security settings, or grant unauthorized access to sensitive resources.
Mitigation:
• Regularly review and audit the delegated access to GPO linked at the domain level.
• Ensure that only trusted and authorized users or groups have the "Link GPOs" permission.
• Implement the principle of least privilege, granting permissions only when necessary.
• Monitor and alert on any suspicious GPO linking activities.
• Regularly review and update GPOs to ensure they align with the organization's security policies.
Technique: Impair Defenses, Valid Accounts, Exploitation for Privilege Escalation, Pass the Hash
Sub-Technique: T1562.001 Disable or Modify Tools, T1562.003 Histories and Logs, T1078.001 Domain Accounts
Technique ID: T1562, T1078, T1068, T1075
Mitigation:
• Audit accounts with the delegated access to GPOs linked on the Domain Controllers OU.
• Remove the "Link GPOs" permission from any unnecessary accounts or groups.
• Implement the principle of least privilege, ensuring that only the most essential and trusted accounts have the ability to link GPOs to the domain controller OU.
• Monitor and alert on changes to the domain controller OU's GPO linking permissions.
Technique: Command and Scripting Interpreter,
Valid Accounts
Sub-Technique: T1078.003 Local Accounts
Technique ID: T1059, T1078
Mitigation
• Limiting delegation to control access to link GPOs at the AD site level.
• Regularly audit GPO links and review the GPOs linked at the AD site level to ensure that no unauthorized or malicious GPOs are present.
• Follow best practices for GPO management, such as using GPO modeling, backing up GPOs before making changes, and using role-based access control for GPO management.
• Use monitoring tools to detect and alert on suspicious GPO changes or unusual activity related to GPOs.
5. Apply the principle of least privilege, granting only the necessary permissions to users and administrators.
Technique: Scheduled Task/Job, Software Deployment Tools, Command and Scripting Interpreter, Valid Accounts, Pass the Hash, Exploitation for Privilege Escalation, Create Account
Sub-Technique: T1053.005 Scheduled Task, T1059.001 PowerShell, T1059.003 Window Command Shell, 1078.001 Domain Accounts, T1136.001 Local Account, T1136.002 Domain Account
Technique ID: T1053, T1072, T1059, T1078, T1075, T1068, T1136
• SeLoadDriverPrivilege can be used to take control of the system by loading a specifically designed driver. This procedure can be performed by low privileged users as the driver can be defined in HKCU.
• SeTcbPrivilege is the privilege used to "Act on behalf the operating system". This is the privilege reserved to the SYSTEM user. This procedure allows any user to act as SYSTEM.
• SeDebugPrivilege is the privilege used to debug program and to access any program's memory. It can be used to create a new process and set the parent process to a privileged one.
• SeRestorePrivilege grants write access for all system files and can be used to modify services and perform DLL hijacking to escalate privileges.
• SeBackupPrivilege can be used to backup the Windows registry and use third party tools for extracting local NTLM hashes.
• SeTakeOwnershipPrivilege can be used to take ownership of any object in the system including a service registry key. Then to change its ACL to define its own service running as LocalSystem.
• SeCreateTokenPrivilege can be used to create a custom token with all privileges and thus be abused like SeTcbPrivilege SeImpersonatePrivilege and SeAssignPrimaryTokenPrivilege can be abused to impersonate privileged tokens. These tokens can be retrieved by establishing security context such as Local DCOM DCE/RPC reflection.
• SeSecurityPrivilege can be used to clear the Windows Security Event Log and shrink the size so events are quickly overwritten. Also read security log and view events where the user inverted the login and its password.
• SeManageVolumePrivilege can be used to reset the security descriptor on the system volume and thus, change the inherited permissions to critical files
Advised Remediation:
• Locate the group policy object name in the details section of this finding.
• Remove the privileges assigned by editing the group policy object with the Group Policy Management console, finding the settings in Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> User Rights Assignment and removing the dangerous group.
Documentation:
https://www.romhack.io/slides/RomHack%202018%20-%20Andrea%20Pierini%20-%20whoami%20priv%20-%20show%20me%20your%20Windows%20privileges%20and%20I%20will%20lead%20you%20to%20SYSTEM.pdf
https://www.tarlogic.com/en/blog/abusing-seloaddriverprivilege-for-privilege-escalation/ https://github.com/decoder-it/psgetsystem https://twitter.com/0gtweet/status/1303427935647531018?s=20
https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Check if the Hardened Path section in the GPO, located in Computer Configuration/Policies/Administrative Templates/Network/Network Provider is set to 1. Check each value reported here and make sure that entries containing SYSVOL or NETLOGON have RequireIntegrity and RequireMutualAuthentication set to 1. In addition to that, check entries having the pattern \\DCName\* and apply the same solution.
Technique: Adversary-in-the-Middle
Sub-Technique: LLMNR/NBT-NS Poisoning and SMB Relay
Technique ID: T1557.001
Potential Mitigation:
• Locate the GPO specified and remove the privilege "Allow log on locally" or "Allow log on through Remote Desktop Services" to "Everyone", "Authenticated Users", "Domain Users" or "Domain Computers". The settings are located in : Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> User Rights Assignment.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Edit the Access Control List (ACL) of the GPO object or the directory where the items is located. Then remove any write permission given to the group.
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Locate the file mentioned by the GPO specified in Details and change its permissions.
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Identify scripts leveraged by DisplaySpecifiers and properly secure them in SYSVOL
Technique: System Services
Technique ID: T1569
Potential Mitigation:
• You should add a GPO to prohibit the logon of specific groups Domain Admins and Administrators. The setting is located in Computer Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment. Then "Deny" logon locally and "Deny" logon through Remote Desktop Services.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Migrate from NTFRS to DFS replication. To know if the setting is enabled, the following LDAP entry should be analyzed: CN=Domain System Volume (SYSVOL share),CN=File Replication Service,CN=System If there is any entry found, NTFRS is in use for SYSVOL replication.
Technique: Remote Service Session Hijacking
Technique ID: T1563
Potential Mitigation:
Edit the GPO and change the local group assignment or change the principle being added from the Everyone group
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Identify the setting modified in the GPO and fix it. All security settings should be modified in the Domain GPO Editor and are located in Computer Configuration / Policies / Windows Settings / Security Settings / Local Policies / Security Options For NoLMHash the setting is located in: Network security: Do not store LAN Manager hash value on next password change For LmCompatibilityLevel the setting is located in: Network security: LAN Manager authentication level
Technique: Brute Force
Sub-Technique: Password Cracking
Technique ID: T1110.002
Potential Mitigation:
• Locate the policy having the setting "Limit local account use of blank passwords to console logon only" disabled and enabled the setting.
Technique: Brute Force
Sub-Technique: Password Spraying
Technique ID: T1110.003
Attacks of this nature vary in mitigation. Some examples include:
• Applying a patch (PetitPotam)
• Disablling Services (Spooler)
• Changing configuration (RPC Filters via EDR or firewall)
• Ensuring integrity mechanisms (SMB Integrity)
This check is completed using a malformed RPC packet and if the error RPC_X_BAD_STUB_DATA (1783) is returned the interface is considered available and vulnerable even though full exploitation is not tested.
Potential Mitigation:
1. Apply Group Policy Object (GPO) - "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers":
Apply this GPO specifically to the Organizational Unit (OU) "Domain Controllers".
Caution: Enabling this GPO might impact services dependent on NTLM such as files copy Backups.
Consider setting the GPO in "Audit mode" initially to identify and assess the impact on affected services.
2. Enable RPC Filters in Windows Firewall:
Configure Windows Firewall to block specific Interface IDs associated with vulnerable RPC interfaces.
This is done using the netsh command. See the documentation links for more information.
Exercise caution: This method filters the entire interface, not specific Operation Numbers (OpNum).
Adjust exceptions for necessary services to ensure critical functionality.
3. Implement External Filters (e.g., EDR, Firewalls):
Leverage third-party solutions, such as Endpoint Detection and Response (EDR) tools or firewalls.
Notable project: rpcfirewall https://github.com/zeronetworks/rpcfirewall, offering logical filtering at the OpNum level.
Be cautious of potential impact and ensure compatibility with existing infrastructure.
Technique: Forced Authentication
Technique ID: T1187
This check uses MS-SAMR with a NULL connection and MS-LSAT with a well known SID to test whether access is possible. It is also possible to verify this using rpcclient -U '' target_ip_address from a kali distribution.
Technique: Technique: Brute Force
Sub-Technique: Password Spraying
Technique ID: T1110.003
To enable Kerberos armoring for domain controllers, edit the GPO and go to Computer Configuration > Administrative Templates > System > KDC
then enable the policy "KDC support for claims, compound authentication and Kerberos armoring".
The policy should be set to at least "Supported".
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Technique: Data Backup
Technique ID: M1053
Enabling the Active Directory recycle bin is an irreversible change.
To enable the Active Directory Recycle Bin first ensure the forest functional level is Windows Server 2008 R2 or above. This can be completed using the Active Directory PowerShell command Get-ADForest. Once confirmed the recycle bin can be enabled using the following command and replacing my.domain with your own domain name.
Enable-ADOptionalFeature -Identity 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target 'my.domain'
Technique: Audit
Technique ID: M1047
After having carefully studied the possible impact of the following change, apply the script made by MSRC and referenced in the documentation below to alter the permission.
https://itpro-tips.com/wp-content/uploads/files/TechnetGallery/Enterprise-Key-Admins-720eb270.zip
https://secureidentity.se/adprep-bug-in-windows-server-2016/
Technique: Active Directory Configuration
While these Java attributes can have legitimate uses, it's recommended to ensure they are not actively used or to set com.sun.jndi.ldap.object.trustURLCodebase to "false" in all Java code. To disable the Java extension, you can mark these attributes as defunct by following this guide: https://docs.microsoft.com/en-us/windows/win32/ad/disabling-existing-classes-and-attributes.
Technique: Active Directory Configuration
Technique ID: M1015
Classes that contain the user or computer class in the possSuperiors attribute can be used as containers and subvert security restrictions such as allowing creation of new user and computers.
Remediation:
This vulnerability can be remediated by editing the schema for the affected class and removing computer/user class from the possSuperiors attribute. In the below documentation there are scripts that can be used to fix the active directory schema.
It should be noted that that the class msExchStorageGroup is known to have this vulnerability and documented under CVE-2021-34470. This can be exploited even if Microsoft Exchanged has been uninstalled.
https://bugs.chromium.org/p/project-zero/issues/detail?id=2186
https://gist.github.com/IISResetMe/399a75cfccabc1a17d0cc3b5ae29f3aa#file-update-msexchstoragegroupschema-ps1
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34470
Technique: User Account Management
Technique ID: M1018
Certificates contained in the WindowsServerUpdateServices certificate store are enforced by default to mitigate HTTPS intercepting attacks, but this can be disabled via Group Policy.
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/scan-changes-and-certificates-add-security-for-windows-devices/ba-p/2053668
Technique: Update Software
Technique ID: M1051
The HTTP protocol can be intercepted on the network with tools such as wsuxploit or WSuspicious (see below for links) and malicious updates can be delivered.
The attacker can then take control of many assets.
https://github.com/pimps/wsuxploit
https://github.com/GoSecure/WSuspicious
Technique: Update Software
Technique ID: M1051
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/scan-changes-and-certificates-add-security-for-windows-devices/ba-p/2053668
Technique: Update Software
Technique ID: M1051
If LDAP signing is set to "None" (no negotiation), attackers may exploit this vulnerability.
Remediation:
• Ensure the "Network security: LDAP client signing requirements" setting is set to either "Negotiate signing" or "Require signing". Policy Location: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Security Options
References:
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-security-ldap-client-signing-requirements.
Technique: Man-in-the-Middle
Technique ID: T1557
Microsoft strongly recommends disabling SMB v1 on both client and server systems whenever possible. However, if you're still using deprecated operating systems (e.g., Windows 2000, 2003, XP, CE), network printers with SMBv1 scan-to-share features, or software with custom implementations that rely on SMB v1, address these dependencies first. Otherwise, disabling SMB v1 may cause additional errors.
https://blogs.technet.microsoft.com/josebda/2015/04/21/the-deprecation-of-smb1-you-should-be-planning-to-get-rid-of-this-old-smb-dialect
https://github.com/lgandx/Responder-Windows
Technique: Adversary-in-the-Middle
Sub-Technique: LLMNR/NBT-NS Poisoning and SMB Relay
Technique ID: T1557.001
Remediation:
• Apply windows updates to the domain controller.
• Disable SMB version 1
References:
https://blogs.technet.microsoft.com/msrc/2017/04/14/protecting-customers-and-evaluating-risk/
https://github.com/misterch0c/shadowbroker/tree/master/windows/exploits
Technique: Update Software
Technique ID: M1051
Remediation:
• Apply windows updates to all affected domain controllers.
https://learn.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-068
Technique: Update Software
Technique ID: M1051
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Potential Mitigation:
• Periodically review certificate templates for risky EKUs and broad enrollment permissions
Potential Mitigations:
• Revoke enrollment permissions for broad security groups and assign enrollment access to required services
• If the Certificate Agent EKU is not required on the template remove the Certificate Agent enhanced key usage from the template
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Some tools may not reliably detect weak SSL protocols due to security enhancements in the .NET Framework, starting with version 4.7. To accurately test for these protocols, consider using tools like OpenSSL with deprecated protocols enabled (e.g., from Kali Linux).
Remediation:
• Apply Windows updates
• Implement registry changes to disable SSLv2 and SSLv3. IISCrypto tool can help simplify this.
References:
https://social.technet.microsoft.com/wiki/contents/articles/2249.windows-server-20082008r2-how-to-disable-sslv2-on-domain-controller-dsforum2wiki.aspx
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://adsecurity.org/?p=376
Technique: Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Audit settings can be configured in two locations:
Simple audit configuration: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Audit Policies.
Advanced audit configuration: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Advanced Audit Policy Configuration.
Ensure the audit GPO is applied to all domain controllers, especially in OUs where it may not be enforced.
References:
https://adsecurity.org/?p=3377
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
Technique: Audit
Technique ID: M1047
Potential Mitigations:
• Verify if the DoNotVerifyUPNAndOrSPNUniqueness parameter is enabled by checking the 21st caharacter of the DsHeuristics attribute for a non-zero value.
Potential Mitigations:
• Correct the issue by modifying the 21st character of the DsHeuristics attribute from whatever is set to 0.
References:
https://support.microsoft.com/en-us/topic/kb5008382-verification-of-uniqueness-for-user-principal-name-service-principal-name-and-the-service-principal-name-alias-cve-2021-42282-4651b175-290c-4e59-8fcb-e4e5cd0cdb29
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/spn-and-upn-uniqueness
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Follow the procedure outlined in KB5008383 to apply these changes.
- Be cautious of control characters at the 10th and 20th positions to avoid unintended changes.
- If DsHeuristics is empty, the updated value should be: 00000000010000000002000000011.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/e5899be4-862e-496f-9a38-33950617d2c5
https://support.microsoft.com/en-au/topic/kb5008383-active-directory-permissions-updates-cve-2021-42291-536d5555-ffba-4248-a60e-d6cbc849cde1
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Configure Group Policy to enable "Digitally sign communications (always)". This option is located in "Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options"
• Reivew Group Policy Objects for instances of "Digitally sign communications (always)" being disabled.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/36172e53-ac81-48fb-b2e3-caa3761b9157
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/microsoft-network-client-digitally-sign-communications-always
https://www.cert.ssi.gouv.fr/actualite/CERTFR-2015-ACT-021/#SECTION00010000000000000000
Technique: Adversary-in-the-Middle
Technique ID: T1557
Remediation:
• Configure Group Policy to enable " Digitally sign communications (if client agrees)". This option is located in “Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options”
• Reivew Group Policy Objects for instances of "Digitally sign communications (if client agrees)” being disabled.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/36172e53-ac81-48fb-b2e3-caa3761b9157
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/microsoft-network-client-digitally-sign-communications-always
https://www.cert.ssi.gouv.fr/actualite/CERTFR-2015-ACT-021/#SECTION00010000000000000000
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Audit by enabling LDAP interface event logging on each domain controller:
• Monitor Windows Event IDs 3039 and 3040 to identify non-compliant clients.
• Once compatibility is verified, enforce Channel Binding by setting the LdapEnforceChannelBinding registry key
References:
https://support.microsoft.com/en-us/topic/use-the-ldapenforcechannelbinding-registry-entry-to-make-ldap-authentication-over-ssl-tls-more-secure-e9ecfa27-5e57-8519-6ba3-d2c06b21812e
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/ldap-channel-binding-and-ldap-signing-requirements-march-2020/ba-p/921536/page/4
https://oxfordcomputergroup.com/resources/ldap-channel-binding-signing-requirements/
https://github.com/zyn3rgy/LdapRelayScan
https://access.redhat.com/articles/4661861
http://gary-nebbett.blogspot.com/2020/01/ldap-channel-binding.html
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Review security descriptors across the domain to replace old SIDs with the new account SID. This process can be lengthly as requires every applied permission to a previous group is replaced with the updated group. Active Directory Migration projects should take this into account.
• Regularly audit SID History for unexpected values and remove when the original domain is decommissioned.
Technique: Access Token Manipulation
Sub-Technique: SID-History Injection
Technique ID: T1134.005
Potential Mitigations:
• Ensure all LDAP clients support LDAP signing.
• Audit clients that may not be compatible with LDAP signing.
Potential Mitigations:
• Follow Microsoft's guidelines to enable LDAP signing.
• Verify that all LDAP clients, including Unix systems, support signing.
• Enforce LDAP signing policy by configuring the relevant security policies.
References:
https://docs.microsoft.com/en-US/troubleshoot/windows-server/identity/enable-ldap-signing-in-windows-server
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/ldap-channel-binding-and-ldap-signing-requirements-march-2020/ba-p/921536/page/4
https://github.com/zyn3rgy/LdapRelayScan
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Ensure RODCs have read-only access to SYSVOL.
• Regularly audit RODC permissions on SYSVOL.
Potential Mitigations:
• Set msDFSR-ReadOnly to TRUE on Read Only Domain Controllers. This can be completed by using ADSI Edit, navigating to the RODC, expanding CN=DFSR-LocalSetting and CN=Domain System Volume and editing the attribute on CN=SYSVOL Subscription
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-frs2/3588b343-4076-4776-b5c0-78e2b3d91ed3
Technique: Rougue Domain Controller
Technique ID: T1207
Potential Mitigations:
• Regularly audit the msDS-RevealedUsers attribute for privileged accounts.
• Avoid allowing privileged accounts to be cached on RODCs.
Potential Mitigations:
• Change the password for any privileged account cached on the RODC.
• Update the Password Replication Policy to prevent privileged accounts from being revealed to the RODC.
References:
https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-revealedusers
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigations:
• Regularly audit and ensure protection is enabled for critical OUs and containers.
Potential Mitigations:
• Enable the "Protect object from accidental deletion" option for OUs through the Active Directory Users and Computers console:
- Open the Properties of the OU or container.
- Under the Object tab, check Protect object from accidental deletion.
- Apply changes.
• Use PowerShell to list and protect unprotected OUs:
Get-ADOrganizationalUnit -filter {name -like "*"} -Properties ProtectedFromAccidentalDeletion | format-table Name,ProtectedFromAccidentalDeletion
• Use PowerShell to protect all organizational units from accidental deletion:
Get-ADOrganizationalUnit -filter {name -like "*"} -Properties ProtectedFromAccidentalDeletion | where-object {$_.ProtectedFromAccidentalDeletion -eq $false} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
References:
https://dirteam.com/sander/2011/07/13/preventing-ous-and-containers-from-accidental-deletion/
Technique: Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigations:
• Implement group policy to restrict network session enumeration.
• Use tools like NetCease to automate this process.
References:
https://github.com/p0w3rsh3ll/NetCease
https://blog.netwrix.com/2022/11/18/making-internal-reconnaissance-harder-using-netcease-and-samri1o/
https://adsecurity.org/?p=3299
Technique: Account Discovery
Sub-Technique: Local Account
Technique ID: T1087.001
Remediation:
• Copy the login script to a share located inside the domain
Technique: Technique: Exploitation of Remote Services
Technique ID: T1210
LDAPS is automatically exposed once a certificate is available and the NTDS services are restarted.
Remediation:
• Apply necessary Windows updates and registry changes to enforce TLS 1.2+ usage. The DSInternals blog below shows how this can be completed via GPO
References:
https://support.microsoft.com/en-us/topic/kb5017811-manage-transport-layer-security-tls-1-0-and-1-1-after-default-behavior-change-on-september-20-2022-e95b1b47-9c7c-4d64-9baf-610604a64c3e
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://www.dsinternals.com/en/active-directory-domain-controller-tls-ldaps/
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Remediation:
• Apply Windows updates and registry settings to fully disable SSLv2 and SSLv3.
• Follow Microsoft's guidance on disabling weak SSL protocols in the SChannel component.
References:
https://social.technet.microsoft.com/wiki/contents/articles/2249.windows-server-20082008r2-how-to-disable-sslv2-on-domain-controller-dsforum2wiki.aspx
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://adsecurity.org/?p=376
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Disabling TGT Delegation can be completed using the Netdom utility.
netdom.exe trust fabrikam.com /domain:contoso.com /EnableTGTDelegation:No
Mitigations:
• Disable TGT delegation on forest trusts except during migrations.
Remediation:
• Review and apply Microsoft's updates on TGT delegation.
• Identify and reconfigure services that rely on unconstrained delegation; resource-based delegation will not be affected.
References:
http://www.harmj0y.net/blog/redteaming/not-a-security-boundary-breaking-forest-trusts/
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/changes-to-ticket-granting-ticket-tgt-delegation-across-trusts/ba-p/440261
https://support.microsoft.com/en-us/help/4490425/updates-to-tgt-delegation-across-incoming-trusts-in-windows-server
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Migrate deployment files to a trusted location in the domain
Technique: Exploitation of Remote Services
Technique ID: T1210
Mitigation:
• Enable Extended Protection for Authentication (EPA) on ADCS servers.
• Restrict authentication methods to Kerberos only to prevent NTLM relay attacks.
Remediation:
• Open the IIS console on the enrollment server.
• In the Authentication settings, go to Advanced Settings for Windows Authentication.
• Set Extended Protection to Required for both WebEnrollment and CES services.
References:
https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429
https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf
https://dirkjanm.io/ntlm-relaying-to-ad-certificate-services/
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigation:
• Disable Zone Transfers entirely unless required.
• Restrict Zone Transfers to authorized servers only.
• Regularly audit DNS server configurations to prevent unintended settings.
Remediation:
• Use the DNS console to access the "Forward Lookup Zones" and disable "Allow zone transfers" to "Any server".
• Alternatively, run the command:
dnscmd /zoneresetsecondaries <zone> /noxfr
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/f97756c9-3783-428b-9451-b376f877319a
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
Technique: Remote System Discovery
Technique ID: T1018
Mitigation:
• Enable only secure dynamic updates for DNS records.
• Regularly audit DNS zones for insecure update settings.
Remediation:
• Go to the DNS console, navigate to the "Forward Lookup Zones", and ensure the "Dynamic updates" setting is changed from "Nonsecure and secure" to "Secure only" in the "General" tab.
• Alternatively, use the command:
dnscmd <servername> /Config <zone> /AllowUpdate 2
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/f97756c9-3783-428b-9451-b376f877319a
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
Technique: Adversary-in-the-Middle
Technique ID: T1557
Mitigations:
• Avoid modifying default OUs unless necessary.
• Regularly audit changes to the wellKnownObjects attribute.
• Ensure programs dependent on default OUs are updated to handle any changes.
Remediation:
• Use the redircmp tool to revert the default OU settings to their original values.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/5a00c890-6be5-4575-93c4-8bf8be0ca8d8
https://rickardnobel.se/verify-redirected-computers-container-in-active-directory/
Technique: User Account Management
Technique ID: M1018
Potential Mitigations:
• Limit write permissions on certificate templates to trusted administrators.
• Regularly audit permissions on certificate templates.
Remediation:
• Review and adjust security permissions on certificate templates, removing write access from groups like Domain Users, Domain Computers, Everyone, and Authenticated Users.
• Ensure the ms-DS-MachineAccountQuota value is appropriately configured to limit unintended account creation.
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Potential Mitigation:
• Enforce HTTPS-only communication on IIS for ADCS-related services.
Remediation:
• Open IIS on the enrollment server and remove HTTP bindings from WebEnrollment (certsrv) or CES (CES_Kerberos).
• Ensure only HTTPS is allowed by keeping the HTTPS binding intact while removing the HTTP binding.
• Refer to KB5005413 for detailed steps to mitigate NTLM relay attacks in ADCS.
References:
https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429
https://dirkjanm.io/ntlm-relaying-to-ad-certificate-services/
https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf
Technique: Adversary-in-the-Middle
Technique ID: T1557
The patch for this introduced a new OID, szOID_NTDS_CA_SECURITY_EXT (1.3.6.1.4.1.311.25.2), that embeds the requesting user’s security identifier and is enabled by default. To disable this functionality a new flag was introduced to the msPKI-Enrollment-Flag attribute for certificate templates called CT_FLAG_NO_SECURITY_EXTENSION.
Potential Mitigations:
• Edit the certificate template object and adjust the msPKI-Enrollment-Flag attribute so the CT_FLAG_NO_SECURITY_EXTENSION is no longer set. This can be completed by subtracting 524288 (0x80000) from the current value
References:
https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-26931
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
• Manager approval disabled
• No issuance requirements
• Low Privilege Users can enroll
• Enrollee supplies their own subject.
Mitigation:
• Limit certificate template usage to specific, trusted groups of users to minimize the attack surface.
Potential Mitigation:
• Review certificate templates to ensure the "Supply in the request" option is disabled where not required.
• If the “Supply in the request” option is required, then ensure CA Manager approval is enabled so all certificates are reviewed before being issued.
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
• For a Read/Write Domain Controller (RW DC): SERVER_TRUST_ACCOUNT (0x00002000) | TRUSTED_FOR_DELEGATION (0x00080000) = 0x00082000
• For a Read-Only Domain Controller (RODC): PARTIAL_SECRETS_ACCOUNT (0x04000000) | TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (0x01000000) | WORKSTATION_TRUST_ACCOUNT (0x00001000) = 0x05001000
This rule can indicate manual or software misconfiguration or even signs of a compromise.
Potential Mitigations:
• For InvalidUserAccount: Verify that the userAccountControl value for RW DCs is 0x00082000 and for RODCs is 0x05001000. Correct any discrepancies found.
• For NoConfiguration: If the domain controller is not registered in the configuration partition, demote it immediately, as it should not be active.
• For NoNTDS: If the NTDS settings are missing, likely replication issues are present. Demote the domain controller to prevent further problems.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/9164e4e8-f892-4ca2-8067-059f6f9387a4
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/8ebf2419-1169-4413-88e2-12a5ad499cf5
Technique: Rougue Domain Controller
Technique ID: T1207
Mitigation:
• Ensure AES support is enabled in the trust configuration to prevent fallback to RC4 or NTLM.
Remediation:
• Enable both RC4 and AES encryption for a smoother transition by running the command:
ksetup /setenctypeattr mytrust.com RC4-HMAC-MD5 AES128-CTS-HMAC-SHA1-96 AES256-CTS-HMAC-SHA1-96
• Verify the msDS-SupportedEncryptionTypes attribute on the trust is configured to support both RC4 and AES.
References:
https://techcommunity.microsoft.com/t5/itops-talk-blog/tough-questions-answered-can-i-disable-rc4-etype-for-kerberos-on/ba-p/382718
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/6cfc7b50-11ed-4b4d-846d-6f08f0812919
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/decrypting-the-selection-of-supported-kerberos-encryption-types/ba-p/1628797
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Audit which accounts and groups are allowed to be cached by the RODC.
• Regularly review and update the msDS-RevealOnDemandGroup attribute.
Potential Mitigation:
• Edit the msDS-RevealOnDemandGroup attribute to remove privileged users or groups.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/8dfc81be-7461-48f2-8caf-07402bccb0ea
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Regularly review domain audit groups to ensure no unnecessary groups like DOMAIN-$$$ exist.
• Use LDAP queries (e.g., sAMAccountName=*$$$) to detect and monitor these groups.
Potential Mitigation:
• Remove the DOMAIN-$$$ auditing group after completing the migration.
• Ensure only authorized accounts have access to create or modify the SID History attribute.
• Monitor for unauthorized SID History modifications using security tools.
References:
https://cyber.gouv.fr/sites/default/files/IMG/pdf/NP-ActiveDirectory-NoteTech.pdf#paragraph.3.3.1.5
Technique: Privileged Account Management
Technique ID: M1026
Mitigations:
• Avoid disabling SID Filtering on forest trusts unless absolutely necessary.
Remediation:
• For domain trusts, use the command netdom trust <TrustingDomain> /domain:<TrustedDomain> /quarantine:yes to enable SID Filtering.
- Do not apply the /quarantine flag to forest trusts, as this will disrupt trust transitivity.
• For forest trusts, verify the SID Filtering status using PowerShell and disable SID History with netdom trust <TrustingForest> /forest:<TrustedForest> /enablesidhistory:no.
References:
https://msdn.microsoft.com/en-us/library/cc237940.aspx
https://activedirectoryfaq.com/2015/10/active-directory-sid-filtering/
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1134.005
Unless the remote party in the trust is an NT4 domain, this type of trust should not be used and should be recreated with a more modern trust type.
Mitigation:
• Avoid creating new Downlevel trusts unless absolutely necessary for NT4 domain compatibility.
Remediation:
• If a Downlevel trust is found and the remote party is not an NT4 domain, delete and recreate the trust using a more secure, modern trust type.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/36565693-b5e4-4f37-b0a8-c1b12138e18e
Technique: Privileged Account Management
Technique ID: M1026
Remediation:
• Revoke and reissue any certificates generated with the vulnerable library if they are still valid.
• Revoke and replace any dependent certificates if they rely on compromised keys.
• Remove expired certificates affected by the ROCA vulnerability from systems and stores.
References:
https://crocs.fi.muni.cz/public/papers/rsa_ccs17
https://github.com/crocs-muni/roca
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV190026
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV170012
https://keychest.net/roca
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Potential Mitigation:
• Plan and perform Active Directory backups according to Microsoft standards, using tools like wbadmin (e.g., wbadmin start systemstatebackup -backuptarget:d:).
• Follow specific backup schedules based on the system's Risk Management Framework (RMF) categorization:
- Moderate/High Availability: Back up Active Directory data daily.
- Low Availability: Back up Active Directory data weekly.
References:
https://technet.microsoft.com/en-us/library/jj130668(v=ws.10).aspx
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigations:
• Avoid using SHA-1 for cryptographic purposes.
Remediation:
• Remove SHA-1-based certificates from the Group Policy Object (GPO).
• Reissue any certificates that rely on SHA-1, using a more secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-0 for any cryptographic applications.
Remediation:
• Remove any certificates that use SHA-0 from the Group Policy Object (GPO).
• Reissue certificates that rely on SHA-0 with a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD5 for any cryptographic purposes.
Remediation:
• Remove certificates that use MD5 from the Group Policy Object (GPO).
• Reissue any certificates that depend on MD5 using a secure hashing algorithm.
References:
https://www.kb.cert.org/vuls/id/836068
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD4 for cryptographic applications.
Remediation:
• Remove any certificates that rely on MD4 from the Group Policy Object (GPO).
• Reissue certificates dependent on MD4 using a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6150
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD2 for any cryptographic operations.
Remediation:
• Remove certificates that use MD2 from the Group Policy Object (GPO).
• Reissue any certificates dependent on MD2 using a more secure hashing algorithm.
References:
https://www.ssi.gouv.fr/archive/fr/sciences/fichiers/lcr/mu04c.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-1 for cryptographic purposes.
Remediation:
• Remove SHA-1-based certificates from the Group Policy Object (GPO).
• Reissue any certificates that rely on SHA-1, using a more secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-0 for any cryptographic applications.
Remediation:
• Remove any certificates that use SHA-0 from the Group Policy Object (GPO).
• Reissue certificates that rely on SHA-0 with a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD5 for any cryptographic purposes.
Remediation:
• Remove certificates that use MD5 from the Group Policy Object (GPO).
• Reissue any certificates that depend on MD5 using a secure hashing algorithm.
References:
https://www.kb.cert.org/vuls/id/836068
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD4 for cryptographic applications.
Remediation:
• Remove any certificates that rely on MD4 from the Group Policy Object (GPO).
• Reissue certificates dependent on MD4 using a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6150
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD2 for any cryptographic operations.
Remediation:
• Remove certificates that use MD2 from the Group Policy Object (GPO).
• Reissue any certificates dependent on MD2 using a more secure hashing algorithm.
References:
https://www.ssi.gouv.fr/archive/fr/sciences/fichiers/lcr/mu04c.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
If the whenChanged attribute remains unchanged, it suggests a potential problem with the remote domain, such as network connectivity issues or the domain no longer existing. If the remote domain is inaccessible or has been decommissioned, the trust should be removed. Failure to address this could allow the stale secret to be exploited to issue fake Kerberos tickets, potentially creating a backdoor into the system.
Potential Mitigations:
• Confirm whether the remote domain still exists.
• If the remote domain no longer exists, remove the trust.
• If the domain exists, force a password change to refresh the shared secret.
References:
https://msdn.microsoft.com/fr-fr/library/ms680921(v=vs.85).aspx
Technique: Adversary-in-the-Middle
Technique ID: T1557
Due to the deprecation of DSA for digital signature generation, it is crucial to phase out its use in systems. Continuing to use DSA after its deprecation could pose security risks and result in non-compliance with updated standards.
Potential Mitigations:
• Avoid using DSA for any new digital signature generation.
Potential Mitigations:
• Remove certificates utilizing DSA from the Group Policy Object (GPO).
• Reissue certificates that depend on DSA using a more secure and approved algorithm.
References:
https://csrc.nist.gov/publications/detail/fips/186/5/draft
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigations:
• Locate and remove the weak certificate from the GPO.
Remediation:
• Reissue certificates: If other certificates rely on the weak one, reissue them using a key size of 2048 bits or greater (consider 3072 bits for future-proofing).
References:
https://media.defense.gov/2022/Sep/07/2003-071834/-1/-1/0/CSA-CNSA-2.0-ALGORITHMS.PDF
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Potential Mitigation:
• Avoid generating certificates with a weak RSA exponent
Remediation:
• If other certificates rely on the weak ones, reissue them using the standard exponent of 65537.
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using RSA with certificates that have extremely long lifetimes
• Avoid using RSA with less than 2048 bits
Remediation:
• Reissue certificates: If other certificates rely on the weak ones, reissue them using a key size of 2048 bits or greater (consider 3072 bits for future-proofing).
References:
https://media.defense.gov/2022/Sep/07/2003-071834/1/1/0/CSA-CNSA-2.0-ALGORITHMS.PDF
https://cyber.gouv.fr/sites/default/files/2022-10/RGS-v-2-0-B1.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Implement and enforce strict policies for creating and managing trust relationships between domains. Avoid adding FSPs from untrusted domains to privileged groups unless absolutely necessary and after thorough vetting.
• Conduct regular audits of privileged groups to ensure all members are necessary. Monitor FSP activities closely for any unusual or suspicious behavior.
• Apply the principle of least privilege to ensure that FSPs have only the minimum access required for their roles. Avoid granting excessive privileges that could be exploited.
Technique: Valid Accounts, Hide Artifacts, Create Account, Valid Accounts, Domain Policy Modification
Sub-Technique: T1078.003 - Local Accounts, T1078.001 - Domain Accounts, T1564.002 - Hidden Users, T1136.002 - Domain Account, T1484.001 - Group Policy Modification
Technique ID: T1078, T1564, T1136, T1078, T1484
Mitigation:
• Implement security monitoring tools that can detect and alert on DCShadow attacks.
• Analyze replication traffic for unusual or unexpected changes originating from unknown sources.
• Monitor for suspicious domain controller registrations or unrecognized DCs in the environment.
• Ensure that only authorized domain controllers are allowed to replicate changes in the AD environment.
• Implement strict access controls and least privilege principles for AD administration accounts.
• Keep systems up to date with the latest security patches.
• Regularly monitor and audit AD objects and their changes for any suspicious activities.
Technique: Remote System Discovery, Account Discovery,
Remote Services, Valid Accounts, Exploitation for Privilege Escalation, OS Credential Dumping
Sub-Technique: T1087.002 Domain Account, T1078.001 Domain Accounts, T1003.001 LSASS Memory, T1003.002 Security Account Manager (SAM), T1003.003 NTDS.dit.
Technique ID: T1018, T1087, T1021, T1078, T1068, T1003
Remediation:
• Regularly audit your domain to determine whether Anonymous Bind is enabled
• Disable Anonymous Bind in every domain unless it is required
3. If Anonymous Bind cannot be disabled, ensure AD settings are adjusted to restrict the types of information that can be accessed anonymously to only information that is necessary for legitimate purposes.
Technique: Brute Force: Password Spraying
Technique ID: T1110.003
Remediation:
• Regularly audit your domain to find where AllowAnonNSPI is enabled
2.Ensure AllowAnonNSPI is disabled (replace the 8th character of the DsHeuristics attribute with a value of 0).
Technique: Account Discovery
Technique ID: T1087
Remediation:
• Regularly audit your environment to determine whether PowerShell logging is enabled on any machines
2. Ensure PowerShell logging is enabled via a group policy (even if these security settings may be part of the workstation or server images).
Technique: Credential Dumping, Malicious Script Execution
Technique ID: T1003, T1059
Remediation:
• Ensure all computers are upgraded to supported Windows OS versions
• Ensure all computers are upgraded regularly to apply security updates, patches, and fixes that are issued by Microsoft.
Technique: Elevation of Privilege, Subvert Trust Controls
Technique ID: T1068, T1553
Remediation:
• Ensure all DCs are monitored and login activity is audited and reviewed regularly
• Implement strict policies for disabling inactive DCs
Technique: Valid Accounts
Technique ID: T1078.003
If SID History is enabled on the outbound forest trust, it means that when a user from Forest A accesses resources in Forest B, their previous SIDs (from Forest A) are also considered for authorization. An attacker who compromises a user account in Forest A can potentially gain unauthorized access to resources in Forest B that the user had access to before the migration, exploiting the SID History information. By carefully managing forest trusts and SID History, you can minimize the potential for unauthorized access across forests in your Active Directory environment.
Mitigation:
• Evaluate the necessity of the outbound forest trust and remove it if not required.
• If the trust is necessary, disable SID History on the trust unless it's absolutely needed for resource access.
• Regularly monitor and audit access attempts using SID History across the trusted forests.
Technique: Remote Services, Use Alternate Authentication Material
Sub-Technique: T1021.001 Remote Desktop Protocol (RDP), T1021.002 SMB/Windows Admin Shares, T1021.003 Distributed Component Object Model (DCOM), T1021.004 SSH, T1021.005 VNC, T1550.001 Application Access Token, T1550.002 Pass the Hash, T1550.003 Pass the Ticket, T1550.004 Web Session Cookie.
Technique ID: T1021, T1550
Mitigation:
• Audit all domain trusts and remove the "TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION" attribute where not absolutely needed.
• Enforce the principle of least privilege and limit domain admin accounts.
• Monitor for suspicious trust creation and modification activities.
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.002 - Pass the Ticket
Technique ID: T1550
Remediation:
• Disable the Print Spooler service, unless needed, on all Domain Controllers
• Perform regular audits of Active Directory to uncover any unusual activity related to this service
• Monitor for unauthorized access attempts or changes to the configuration of this service and set up alerts for attempts to exploit known vulnerabilities
Technique: Exploitation for Privilege Escalation, Exploitation for Client Execution
Technique ID: T1203, T1068
Remediation:
• Ensure the ownership of Domain Controllers matches the "Domain Administrators" or "Enterprise Administrators" group
Technique: Account Manipulation
Technique ID: T1098
Remediation:
• Ensure that Domain Controller passwords are changed at least every 30-60 days, in line with your organization's security policy.
• Configure Group Policy to enforce regular password changes for Domain Controllers
• Set up monitoring and alerting systems to identify Domain Controllers with passwords older than the defined threshold.
• Regularly audit and remove inactive or stale Domain Controller accounts from Active Directory to minimize the attack surface.
Technique: Valid Accounts: Local Accounts, Steal or Forge Kerberos Tickets, Brute Force
Technique ID: T1078.003, T1558, T1110
Remeditation:
• Upgrade domains to the highest functional level the domain controllers support (ideally Windows Server 2016 or later)
• Ensure all domain controllers are running the appropriate Windows Server version
• Upgrade or decommission any obsolete domain controllers
Technique: Valid Accounts, Exploitation for Privilege Escalation, Exploitation of Remote Services
Technique ID: T1078.003, T1068, T1212
To mitigate this finding
• Ensure strict access control on the krbtgt account. Only trusted administrators should have write access to this account.
• Regularly monitor and audit the permissions on sensitive accounts like krbtgt to detect any unauthorized changes.
• Ensure that sensitive accounts that should not be delegated are marked as such.
To learn more about how Resource Baseed Constrained Delegation can be abused, visit this blog post: https://blog.netwrix.com/2022/09/29/resource-based-constrained-delegation-abuse/f
Technique: Account Manipulation
Technique ID: T1098
Remediation:
• Regularly audit your Active Directory environment to determine whether RBCD is enabled on Domain Controllers
• Ensure RBCD is not enabled on domain controllers unless absolutely necessary
• Limit RBCD to only servers that absolutely require it.
• Monitor and alert on any changes to RBCD configurations, especially on Domain Controllers.
Technique: Resource-Based Constrained Delegation (RBCD)
Technique ID: T1550.004
Remediation:
• Regularly audit your domain to determine Non-Domain Controllers have Unconstrained Delegation in place
• Replace Unconstrained Delegation with Constrained Delegation (e.g: replace "trust this computer for delegation to any service" with "trust this computer for delegation to specified services only" on the Delegation tab of the account object).
• Ensure that servers with Constrained Delegation are monitored for signs of compromise.
Technique: Unconstrained Delegation
Technique ID: T1550.001
Remediation:
• Regularly audit your domain to determine if users have Unconstrained Delegation in place
• Replace Unconstrained Delegation with Constrained Delegation (e.g: replace "trust this computer for delegation to any service" with "trust this computer for delegation to specified services only" on the Delegation tab of the account object).
Technique: Unconstrained Delegation
Technique ID: T1550.001
Attack Process:
1. Compromise Initial Machine: The attacker gains control over a machine where RBCD is enabled.
2. Configure Delegation: The attacker modifies the resource's permissions to allow their controlled machine to impersonate users.
3. Impersonate a User: Using extensions like S4U2Self, the attacker requests a service ticket on behalf of another user.
4. Access Target Resources: The attacker uses this service ticket to access other resources or services as the impersonated user.
Mitigation:
• Limit write access to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on computer accounts to only trusted and necessary accounts.
• Regularly audit and monitor the permissions on the msDS-AllowedToActOnBehalfOfOtherIdentity attribute using tools like PowerShell or AD security scanners.
• Implement the principle of least privilege and ensure that no unnecessary accounts have write access to this attribute.
• Enable auditing of RBCD configuration changes and monitor for any suspicious modifications.
• Keep DCs and AD permissions tightly controlled and regularly updated to prevent potential misconfigurations or unauthorized access.
To learn more about abusing RBCD, read this blog post: https://blog.netwrix.com/2022/09/29/resource-based-constrained-delegation-abuse/
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1550
Remediation:
• Immediately disable RBCD on the krbtgt account.
• Rotate the krbtgt account password twice to invalidate any Kerberos tickets that may have been issued with the misconfigured delegation.
• Investigate the scope of the breach and identify any compromised servers or accounts.
• Implement strict controls and approval processes for enabling RBCD on any account, especially sensitive accounts like krbtgt.
• Regularly audit Active Directory for misconfigurations and adherence to security best practices.
Technique: Account Manipulation
Technique ID: T1098
Mitigation:
• Limit write access to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on DC computer accounts to only trusted and necessary accounts.
• Regularly audit and monitor the permissions on the msDS-AllowedToActOnBehalfOfOtherIdentity attribute using tools like PowerShell or AD security scanners.
• Implement the principle of least privilege and ensure that no unnecessary accounts have write access to this attribute.
• Enable auditing of RBCD configuration changes and monitor for any suspicious modifications.
• Keep DCs and AD permissions tightly controlled and regularly updated to prevent potential misconfigurations or unauthorized access.
Technique: Account Manipulation
Technique ID: T1098
To mitigate this risk:
• Limit constrained delegation to only necessary services.
• Ensure servers with constrained delegation are well-protected and monitored for signs of compromise.
• Educate users about phishing tactics and the risks of clicking on suspicious links.
• Implement strong authentication methods (e.g., multi-factor authentication) to make impersonation harder.
• Regularly review and audit constrained delegation configurations to ensure they adhere to the principle of least privilege.
Read this blog post to learn more on attacking constrained delgation to elevate access https://blog.netwrix.com/2023/04/21/attacking-constrained-delegation-to-elevate-access/
Technique: Account Manipulation, Credential Dumping
Sub-Technique: T1078.003 Domain Account Permissions
Technique ID: T1098, T1003
If an attacker compromises a non-DC server that has the "Trusted for Delegation" setting enabled, the attacker can then impersonate any user accessing the compromised server and perform actions on their behalf, potentially gaining unauthorized access to other resources in the domain.
Mitigation:
• Regularly review and audit the "Trusted for Delegation" setting on all servers in the domain.
• Ensure that only DCs and necessary service accounts have this setting enabled.
• If a non-DC server is found with this setting enabled, investigate the reason and remove the setting if it's not required.
• Implement strong security measures, such as keeping systems updated, using strong passwords, and enabling multi-factor authentication, to prevent attackers from compromising servers in the first place.
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1550
Mitigation:
• Limit the use of unconstrained delegation and only assign it to service accounts that absolutely require it.
• Implement "Kerberos Constrained Delegation" instead, which allows you to specify which services the account can delegate to, reducing the attack surface.
• Regularly monitor and audit service accounts with delegation privileges to detect any suspicious activities.
• Ensure service accounts have strong, unique passwords and are protected from compromise.
Technique: OS Credential Dumping
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1003
Potential Mitigation:
• You should edit the msDS-AllowedToDelegateTo attribute of the accounts to remove the SPN of the domain controllers involved
Technique: Forced Authentication
Technique ID: T1187
Potential Mitigation:
• You should edit the msDS-AllowedToDelegateTo attribute of the accounts to remove the SPN of the domain controllers involved.
Technique: Forced Authentication
Technique ID: T1187
Potential Mitigation:
• Implement and enforce strong password policies across the organization, including minimum length, complexity, and regular password changes.
• Educate users on creating strong, unique passwords and the importance of password security.
• Enable multi-factor authentication (MFA) for all user accounts to provide an additional layer of security beyond passwords.
• Use a password filter to prevent users from setting weak, easily guessable, or previously compromised passwords.
• Regularly audit and monitor user accounts for suspicious login attempts or password changes.
• Consider implementing a password manager to help users generate and securely store strong, unique passwords for each account.
By enforcing strong password policies and educating users on password security best practices, organizations can significantly reduce the risk of attackers compromising user accounts through weak passwords.
Technique: Brute Force
Sub-Technique: Credential Stuffing
Technique ID: T1110.004
Potential Mitigations:
• Manually change the password to a new one. If this password is shared on many systems, each system should have a different password. If the GPO was used to define the native local administrator account, it is recommended to install a password solution manager such as LAPS.
Technique: Unsecured Credentials
Sub-Technique: Group Policy Preferences
Technique ID: T1552.006
Potential Mitigation:
• Ensure that the registry keys controlling password changes (DisablePasswordChange and MaximumPasswordAge) are configured correctly, with regular audits to verify compliance.
• Regularly monitor and audit computer accounts for password changes and flag accounts that exceed the 30-day threshold.
• Limit the number of computer accounts that can be created by default and apply strict monitoring to detect and address potential backdoor accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Remove the "Store password using reversible encryption" flag from all accounts to prevent storing plaintext passwords.
• Require a password change for any account that previously had reversible encryption enabled to ensure that plaintext passwords are removed from the directory.
• Run regular audits using PowerShell commands to identify any accounts that still have reversible encryption enabled and correct them promptly.
Technique: Credential Dumping
Sub-Technique: T1003.006 - OS Credential Dumping: DCSync
Technique ID: T1003
Potential Mitigation:
• Disable NTLMv1: Configure the LAN Manager Authentication Level to "Send NTLMv2 response only. Refuse LM & NTLM" to prevent the use of NTLMv1.
• Regularly audit network traffic and authentication logs to identify and address any instances of NTLMv1 usage.
• Ensure all systems and software in the environment are compatible with NTLMv2 or Kerberos, and update or replace systems that rely on NTLMv1.
Technique: Adversary-in-the-Middle, OS Credential Dumping, Remote Services
Technique ID: T1557, T1003, T1021
Potential Mitigation:
• Ensure the GPO setting "Domain controller: Refuse machine account password changes" is set to "Disabled" or not configured, allowing automatic password changes.
• Conduct regular audits to ensure that machine account passwords are being updated as expected.
• Implement monitoring for unusual authentication attempts or access patterns that could indicate exploitation of stale credentials.
Technique: Valid Accounts, Adversary-in-the-Middle
Technique ID: T1078, T1557
Potential Mitigation:
• Implement a Strong Password Policy: Enforce a Password Setting Object (PSO) or Group Policy Object (GPO) requiring service accounts to use passwords of at least 20 characters.
• Leverage a PAM solution like Netwrix Privilege Secure to significantly enhance the security of service accounts by automating and controlling access to these critical credentials, thereby reducing the risk of compromise and ensuring compliance with security best practices.
• Perform regular audits to ensure service accounts comply with the enforced password policies and are using strong, updated passwords.
Technique: Brute Forece, Valid Accounts
Technique ID: T110, T1078
Potential Mitigation:
• Ensure that SeTrustedCredManAccessPrivilege is not assigned to any user or group by editing the GPO under User Rights Assignment.
• Regularly audit user rights assignments to ensure no unnecessary privileges are granted, particularly those related to sensitive areas like Credential Manager.
• Implement monitoring to detect and alert on any unauthorized attempts to access or exploit Credential Manager.
Technique: Valid Accounts, Credentials from Password Stores
Technique ID: T1078, T1555
Potential Mitigation:
• Implement LAPS to automatically manage and randomize local administrator passwords, ensuring each password is unique and regularly updated.
• Conduct regular audits of local administrators and ensure proper password hygiene across these accounts
• Implement monitoring to detect and respond to any unauthorized use of local administrator accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Use the PowerShell script provided by Microsoft to immediately roll over the AZUREADSSOACC password. This script ensures that the account's Kerberos decryption key is updated and securely stored. https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sso-faq#how-can-i-roll-over-the-kerberos-decryption-key-of-the-azureadssoacc-computer-account
• Schedule regular executions of the password roll-over script to ensure that the AZUREADSSOACC password is periodically updated. This mitigates the risk of stale credentials being exploited.
• Implement advanced monitoring to detect abnormal behavior associated with the AZUREADSSOACC account, such as unexpected authentication attempts or Kerberos ticket requests. Utilize Azure AD Conditional Access policies to monitor and restrict high-risk sign-ins that originate from compromised tokens.
• Enhance Azure AD Conditional Access policies to add an additional layer of protection. Require multi-factor authentication (MFA) even for users authenticated via Kerberos or SAML, especially for privileged actions or access to sensitive resources.
Technique: OS Credential Dumping, Valid Accounts
Sub-Technique: T1003.006 - OS Credential Dumping: DCSync, T1078.003 - Valid Accounts: Cloud Accounts
Technique ID: T1003, T1078
Potential Mitigation:
• Implement a Group Policy Object (GPO) to disable LLMNR by enabling the "Turn off multicast name resolution" setting. This prevents LLMNR from being used in the environment, reducing the risk of MitM attacks.
• Regularly audit your environment to ensure that the GPO is correctly applied and that no other GPOs override this setting.
• Implement network monitoring solutions to detect any unauthorized LLMNR traffic, which could indicate potential exploitation attempts.
Technique: Valid Accounts, Adversary-in-the-Middle
Technique ID: T1078, T1557
Potential Mitigation:
• Ensure that the Group Policy setting "Network security: Do not store LAN Manager hash value on next password change" is enabled. This will prevent the storage of LM hashes when passwords are changed.
• Set the "Network security: LAN Manager authentication level" to "Send NTLMv2 response only. Refuse LM & NTLM," ensuring that only the more secure NTLMv2 protocol is used for authentication.
• Regularly audit your environment to ensure that LM hashes are not being stored and that legacy protocols like LM and NTLM are not in use.
• After enabling these settings, prompt users to change their passwords to ensure that any existing LM hashes are replaced with more secure NTLMv2 hashes.
Technique: OS Credential Dumping, Valid Accounts
Technique ID: T1003, T1078
Potential Mitigation:
• Remove the unixUserPassword and userPassword attributes from user accounts unless they are securely encrypted and necessary for legacy system support.
• Ensure that all passwords stored in AD attributes are protected with strong cryptographic protocols if their storage is unavoidable.
• Conduct regular audits of AD to identify and remove insecure attributes, ensuring that passwords are not exposed or stored insecurely.
• Transition to using secure password management solutions and enforce policies that prevent storing passwords in clear text or using weak encryption within AD attributes.
Technique: Unsecured Credentials
Sub-Technique: T1552.003 - Unsecured Credentials: Credentials in Files
Technique ID: T1552
Potential Mitigation:
• Ensure that the registry keys controlling password changes (DisablePasswordChange and MaximumPasswordAge) are configured correctly, with regular audits to verify compliance.
• Regularly monitor and audit computer accounts for password changes and flag accounts that exceed the 30-day threshold.
• Limit the number of computer accounts that can be created by default and apply strict monitoring to detect and address potential backdoor accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Regularly update the password for accounts with the "Smart Card required" flag to ensure the NT hash is refreshed.
• If using Windows Server 2016 or later, ensure the msDS-ExpirePasswordsOnSmartCardOnlyAccounts attribute is configured to handle periodic hash changes automatically.
• Verify that the GPO "Enable rolling of expiring NTLM secrets during sign-on" is not disabled, ensuring periodic password hash updates during sign-in for smart card users.
• As an alternative, disable and then re-enable the "Smart Card required" flag to force a password hash update, or use a script like Invoke-SmartcardHashRefresh to manually refresh the NT hash.
Technique: Valid Accounts, Use Alternate Authentication Material
Sub-Technique: T1550.003 - Pass-the-Hash
Technique ID: T1078, T1550
Remediation:
• Regularly audit your Active Directory environment to identify any accounts with "PASSWD_NOTREQUD" set to True in the UserAccountControl attribute
• Set this flag to False for all accounts that have it
Technique: Valid Accounts
Technique ID: T1078
Attackers can use the breached passwords to attempt login on multiple services and accounts, including the AD environment. Since users often reuse passwords, a breached password can be used to gain unauthorized access to the AD account. Knowing historical passwords can help attackers reduce the time and effort needed to crack current passwords, especially if the user has a pattern in creating passwords (e.g., incremental changes like "Password1" to "Password2"). Lastly, historical passwords can provide attackers with personal information or patterns that can be leveraged in phishing attacks or other social engineering tactics.
Mitigation:
• Implement and enforce strong password policies across the organization, including minimum length, complexity, and regular password changes.
• Educate users on creating strong, unique passwords and the importance of password security.
• Enable multi-factor authentication (MFA) for all user accounts to provide an additional layer of security beyond passwords.
• Use a password policy to prevent users from setting weak, easily guessable, or previously compromised passwords.
• Regularly audit and monitor user accounts for suspicious login attempts or password changes.
• Consider implementing a password manager to help users generate and securely store strong, unique passwords for each account.
Technique: Brute Force
Sub-Technique: T1110.002 - Password Cracking, T1110.004 - Credential Stuffing
Technique ID: T1110
Mitigation:
• Implement and enforce a strong password policy that requires unique passwords for each account.
• Educate users about the risks of password reuse and the importance of using unique, strong passwords.
• Enable multi-factor authentication (MFA) to add an extra layer of security, even if a password is compromised.
Technique: Brute Force, Valid Accounts
Sub-Technique: T1110.003 - Password Spraying, T1078.001 - Domain Accounts
Technique ID: T1110, T1078
If an account is removed from these privileged groups, the adminCount attribute may remain set to 1, but the account will no longer have the same safeguards. This makes the account vulnerable to attacks.
Remediation:
• Regularly audit accounts with adminCount=1 to ensure they are still members of the appropriate privileged groups.
• If an account is removed from a privileged group, manually reset the adminCount attribute to 0.
• Implement strict access controls and monitoring for all privileged accounts.
4. Use dedicated admin workstations and accounts for administrative tasks to minimize the risk of compromise.
Technique: Abuse Elevation Control Mechanism: Domain account
Technique ID: T1548.002
Remediation:
• Regularly audit admin accounts to ensure "Account is sensitive and cannot be delegated" is set
• Limit delegation to only services and computers that absolutely require it
• Use Least Privilege, only delegating minimal needed rights to admin accounts
• Monitor for and alert on suspicious admin account activity and usage
• Ensure administrator accounts are members of the built-in "Protected Users" group
Technique: Abuse Elevation Control Mechanism: Domain account
Technique ID: T1548.002
Remediation:
• Avoid using DES Encryption Only and switch to modern, secure encryption algorithms like AES (Advanced Encryption Standard) with at least 128-bit keys.
• Use encryption in combination with other security measures, such as message authentication codes (MAC) or digital signatures, to ensure data integrity and authenticity.
• Keep encryption libraries and software up to date to protect against newly discovered vulnerabilities.
Technique: Unsecured Credentials
Technique ID: T1552
Remediation:
• Ensure your systems are using the more secure NTLMv2 authentication instead of LM.
• Disable LM Hash storage entirely by editing the Windows Registry or using Group Policy.
• Enforce strong, complex passwords that are harder to crack even if the hashes are compromised.
4. Keep your systems updated with the latest security patches.
Technique: OS Credential Dumping: NTDS / Security account manager
Technique ID: T1003.003, T1003.002
Remediation:
• Identify accounts with reversible encryption enabled using AD tools or PowerShell scripts.
• Change the "Store password using reversible encryption" setting to "Disabled" for each affected user account.
• Force users to change their passwords at next logon to replace the decryptable password.
• Educate administrators not to enable reversible encryption unless absolutely necessary for specific applications.
• Regularly audit AD for any accounts with this setting enabled and remediate them promptly.
Technique: Unsecured Credentials: Credentils in Files
Technique ID: T1552.001
Remediation:
• Ensure that all domain controllers are updated with Microsoft's security patch MS14-025, released in May 2014, which prevents the storage of plaintext passwords in GPP files.
• Remove any existing GPP files containing plaintext passwords from the SYSVOL folder on all domain controllers.
• Change all passwords that were previously set using GPP to ensure they are no longer compromised.
• Educate administrators to avoid using GPP for distributing passwords and instead use more secure methods, such as Microsoft LAPS (Local Administrator Password Solution).
Technique: Brute Force: Password Cracking
Technique ID: T1110.002
Remediation:
• Regularly review accounts with non-expiring passwords and limit this feature to only necessary accounts.
• Enforce strong password policies for all users, including those with non-expiring passwords.
• Monitor for suspicious activity on accounts with non-expiring passwords and respond promptly to any potential breaches.
Technique: Valid Accounts: Local Accounts
Technique ID: T1078.003
Mitigation:
• Audit Active Directory to identify users with expired passwords to ensure either the password is updated or the account disabled/deleted.
• Ensure that expired passwords are no longer usable and that users are required to change them.
• Set up monitoring to detect and respond to any attempts to use expired passwords, which could indicate an attack.
Technique: Valid Accounts
Technique ID: T1078
Potential Mitigation
• Enforce a strong password policy that requires users to change their passwords regularly, such as every 90 days.
• Implement multi-factor authentication (MFA) to add an extra layer of security, making it harder for attackers to access accounts even if they have the password.
• Monitor for and block known compromised passwords
• Educate users about creating strong, unique passwords and the risks of password reuse.
Technique: Valid Accounts
Technique ID: T1078
Mitigation:
• Implement and enforce a strong password policy that requires unique, complex passwords for each account.
• Educate users about the risks of password reuse and the importance of using unique passwords for different accounts.
• Enable multi-factor authentication (MFA) for all user accounts, to add an extra layer of security beyond passwords.
• Use a password manager to help users generate and store unique, strong passwords for each account.
Technique: Brute Force, Valid Accounts
Sub-Technique: T1078.001 - Domain Accounts
Technique ID: T1110, T1078
Mitigation:
• Regularly monitor gMSA objects to ensure their passwords are being rotated as expected.
• Set up alerts to notify administrators if a gMSA password rotation fails.
• Investigate and resolve any issues causing password rotation failures promptly.
• Limiting gMSA access to specific resources and regularly auditing gMSA usage.
Technique: OS Credential Dumping
Technique ID: T1003
Remediation:
• Identify services that are using regular service accounts and migrate them to gMSA.
• Configure gMSA for each service, ensuring that it has the necessary permissions to function properly.
• Regularly review and audit service account usage to ensure gMSA is being utilized where appropriate.
• Implement strong password policies and regularly rotate passwords for any remaining service accounts that cannot be migrated to gMSA.
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Periodically audit all computers and devices to ensure that no default passwords are in use and that all passwords meet the organization's security standards.
• Remove or disable any unnecessary default accounts that come with the computer or device.
Technique: OS Credential Dumping
Technique ID: T1003
Remediation:
• Regularly audit the permissions on the "ms-Mcs-AdmPwd" attribute using tools like PowerShell or AD Security Explorer.
• Ensure that only authorized groups, such as "Domain Admins" or a dedicated LAPS admin group, have read access to this attribute.
• Implement change monitoring to detect and alert on unauthorized modifications to the attribute's ACL.
Technique: OS Credential Dumping: LAPS
Technique ID: T1003.006
Mitigation:
• Use secure, one-way hashing for storing passwords rather than reversible encryption.
• Identify and address instances where reversible encryption is used for passwords.
Technique: OS Credential Dumping
Technique ID: T1003
Pass-the-Ticket (PTT) Attacks: Attackers can capture Kerberos tickets and reuse them to impersonate users without needing their passwords. Older encryption types make it easier for attackers to decrypt and reuse these tickets. See our Attack Catalog for more information at https://www.netwrix.com/pass_the_ticket.html
Kerberoasting: This attack involves requesting service tickets for service accounts and attempting to crack their passwords offline. Service tickets encrypted with weaker encryption types are easier to crack, enabling attackers to gain access to service accounts and potentially escalate their privileges. See our Attack Catalog for more information at https://www.netwrix.com/cracking_kerberos_tgs_tickets_using_kerberoasting.html
Mitigation:
• Enforce a strong password policy that requires users to change their passwords regularly, such as every 90 days.
• Implement multi-factor authentication (MFA) to add an extra layer of security, making it harder for attackers to access accounts even if they have the password.
• Monitor for and block known compromised passwords.
• Educate users about creating strong, unique passwords and the risks of password reuse.
https://www.netwrix.com/pass_the_ticket.html
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Regularly audit Active Directory for accounts with empty passwords.
• Enforce a strong password policy that requires all user accounts to have a password meeting complexity requirements.
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Remove computer accounts from admin groups unless absolutely necessary.
• Use separate admin workstations for administrative tasks.
• Implement strong password policies and regular password rotation for computer accounts.
• Monitor and audit computer account activities for suspicious behavior.
• Implement least privilege access controls for computer accounts.
Technique: Valid Accounts
Technique ID: T1078
Attack Process:
1. The attacker compromises a regular user account that owns an administrative group.
2. The attacker adds their controlled account or another compromised account to the group.
3. The attacker can now perform privileged actions, such as creating new accounts, accessing sensitive data, or disabling security controls.
Mitigations:
• Review and Audit Group Ownership: Regularly audit the ownership of all administrative groups to ensure that only highly privileged accounts (e.g., Domain Admins) are set as owners.
• Implement Strict Access Controls: Limit who can change the ownership of groups by restricting these permissions to a small number of trusted administrators.
• Monitor Changes: Enable logging and monitoring for any changes to group memberships or ownership, using tools like SIEM to detect and respond to suspicious activities.
• Use Least Privilege: Ensure that users only have the minimum necessary privileges, and avoid assigning excessive permissions to non-administrative users.
Technique: Valid Accounts
Technique ID: T1078
This level of access can be exploited by attackers to gather intelligence on the domain's structure, identify high-value targets like Domain Admins, and potentially escalate privileges. For instance, by having read access to attributes such as userAccountControl, an attacker can identify accounts that might have weak security configurations, like those with the "PasswordNotRequired" flag, making it easier to compromise those accounts.
Mitigation:
• It is recommended to remove Authenticated Users from the Pre-Windows 2000 Compatible Access group. This action significantly reduces the exposure of sensitive information. However, organizations should first test this change in a controlled environment to ensure it does not disrupt any legacy applications or systems that might still rely on these permissions.
• Conducting regular reviews of the members of this group and removing any that do not require these permissions is crucial for maintaining security.
• Whenever possible, upgrade or migrate systems that still require these backward-compatible settings to modern, supported versions of Windows, which do not require membership in this group.
Technique: Valid Accounts
Technique ID: T1078
Mitigation:
• Investigate the recent activity of the built-in domain Administrator account to determine if the usage was legitimate or suspicious.
• Suspicious activity should be immediately followed-up with reseting the password for the account and enable multi-factor authentication (MFA) to prevent unauthorized access.
• Limit the use of the built-in domain Administrator account and consider creating separate, dedicated administrator accounts for daily administrative tasks.
• Consider implementing a Privileged Access Management (PAM) solution to secure, monitor, and control privileged access to critical resources.
Technique: Valid Accounts
Sub-Technique: T1078.003 Local Accounts
Technique ID: T1078
Mitigation:
• Set a maximum password age policy for administrator accounts, forcing regular password changes.
• Require users to use complex passwords that meet minimum length and complexity requirements.
• Implement MFA for all administrator accounts to provide an additional layer of security beyond passwords.
Technique: Brute Force, OS Credential Dumping
Technique ID: T1110, T1003
Mitigation:
• Regularly review the membership of the DNS Admins group and ensure that only authorized and necessary accounts are included.
• Implement strict access controls and approval processes for modifying group memberships, especially for privileged groups like DNS Admins
Technique: Valid Accounts Exploitation for Privilege Escalation
Technique ID: T1078, T1068
Mitigation:
• Avoid deleting and recreating accounts with the same username whenever possible.
• If an account must be recreated, carefully review and update ACLs and group memberships to ensure the new account has appropriate permissions.
• Regularly audit and clean up historical SIDs to maintain a secure Active Directory environment.
Technique: Access Token Manipulation
Sub-Technique: T1134.005 SID-History Injection
Technique ID: 1134
Mitigation:
• Remove the Administrator SID from any regular user accounts that have it assigned.
• Review and correct any processes that may be improperly assigning the Administrator SID to regular accounts.
Technique: Indicator Removal on Host,
Valid Accounts, Exploitation for Privilege Escalation
Technique ID: T1070, T1078, T1068
Mitigation:
• Use RBAC to assign administrators only the permissions they need to perform their job duties, following the principle of least privilege.
• Conduct periodic reviews of administrator accounts to ensure that privileges are appropriate.
• Use a PAM solution to manage, monitor, and control administrator access to sensitive resources.
• Auditing and monitoring administrator activities.
Technique: Permission Groups Discovery,
Account Discovery, Valid Accounts
Sub-Technique: T1069.002 - Domain Groups
Technique ID: T1069, T1087, T1078
Mitigation:
• Regularly audit your privileged accounts to ensure they don't have unnecessary SPNs defined.
• Remove any SPNs from privileged accounts that don't specifically require them.
• Implement Managed Service Accounts (MSAs) or Group Managed Service Accounts (gMSAs) for services instead of using privileged user accounts.
For more information on this topic please visit: https://blog.netwrix.com/2022/08/31/extracting-service-account-passwords-with-kerberoasting/
Technique: Steal or Forge Kerberos Tickets
Sub-technique: T1558.003 Kerberoasting
Technique ID: T1558
Mitigation:
• Identify sensitive user accounts, such as administrators, service accounts, and high-value targets.
• Add these sensitive user accounts to the Protected Users group.
• Monitor and maintain the membership of the Protected Users group regularly, adding new sensitive accounts as needed and removing those that no longer require protection.
For more information on this topic please visit: https://blog.netwrix.com/2015/02/20/add-sensitive-user-accounts-to-active-directory-protected-users-group/">https://blog.netwrix.com/2015/02/20/add-sensitive-user-accounts-to-active-directory-protected-users-group/
Technique: Use Alternative Authentication method,
Modify Authentication Process
Sub-technique: T1550.002: Pass the Hash
Technique ID: T1550,
T1556
Mitigation:
Ensure that privileged accounts are only granted the minimum permissions necessary to perform their tasks. Regularly review and adjust permissions as needed.
• Implement PAM tools to manage, monitor, and control privileged access. These solutions can provide features like just-in-time access, session recording, and multi-factor authentication (MFA).
• Enforce complex passwords, regular password changes, and prevent password reuse. Consider using password vaulting solutions to securely store and manage privileged account passwords.
• Require MFA for all privileged account access to add an extra layer of security beyond passwords.
• Regularly monitor privileged account usage, and audit logs for suspicious activities. Set up alerts for abnormal behavior.
• Regularly review and remove unnecessary privileged accounts. Consider using temporary, time-limited accounts for specific tasks instead of permanent privileged accounts.
Technique: Valid Accounts
Sub-technique: T1078.003 Valid Accounts
T1078
Remediation:
1. Regularly review and audit AD admin accounts to identify stale or unused accounts.
2. Disable or delete stale admin accounts that are no longer needed.
3. Implement strong password policies and enforce regular password changes for admin accounts.
4. Enable multi-factor authentication (MFA) for all admin accounts to prevent unauthorized access.
5. Monitor admin account activities using security information and event management (SIEM) tools to detect suspicious behavior.
Valid Accounts: Local Accounts
Technique ID: T1078.003
Mitigation Steps:
• Regular Audits: Conduct regular audits of disabled accounts, ensuring that high-privilege group memberships are removed.
• Account Deletion: For accounts that are no longer needed, consider fully deleting them rather than just disabling them.
• Strict Monitoring: Implement stringent monitoring for any changes to disabled accounts, particularly any re-enablement actions.
• Privileged Access Management (PAM): Use PAM solutions to manage and monitor the use of privileged accounts and their group memberships.
Technique: Remote Services, System Services, Valid Accounts, Access Token Manipulation
Technique ID: T1021, T1569, T1078,T1134
Mitigation:
• Implement strict access controls and approval processes for creating privileged accounts.
• Regularly review and monitor privileged account creation activities using auditing and logging mechanisms.
• Use the principle of least privilege, granting privileged access only when necessary and revoking it when no longer needed.
• Implement multi-factor authentication (MFA) for all privileged accounts to prevent unauthorized access.
• Conduct regular security assessments and audits to identify and remove any unauthorized privileged accounts.
• Privileged Access Management (PAM): Use PAM solutions to protect and monitor the use of privileged accounts
Technique: Account Manipulation
Sub-Technique: T1098.003 Add User to Privileged Group
Technique ID: T1098
A privileged account without adminCount=1 is no longer governed by the SDProp process and could be left more insecure.
Potential Mitigation:
• Regularly audit accounts with adminCount=1 to ensure they are still members of the appropriate privileged groups.
• Regularly audit members of privileged groups to ensure they are set correctly with adminCount = 1
• Regular audit the AdminSDHolder container ACL which is propogated to all privileged accounts
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Contiunally monitor for and prevent adminstrative accounts from not requiring Kerberos pre-authentication
• Edit the property of the identified accounts by unchecking "Do not require Kerberos preauthentication
Technique: Steal or Forge Kerberos Tickets
Sub-Technique: AS-REP Roasting
Technique ID: T1558.004
Potential Mitigation:
• Ensure that administrators do not use their privileged account for browsing the internet or receiving emails.
• Implement a Tier Zero model. In this model, low privileged actions cannot be made by highly privileged accounts such as admins. This means that, in practice, administrators should have two separate Windows accounts: one for regular activities and one for performing privileged actions.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Review and remove the accounts or groups belonging to the "schema administrators" group.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Contiunally monitor for and prevent accounts from not requiring Kerberos pre-authentication
• Edit the property of the identified accounts by unchecking "Do not require Kerberos preauthentication"
Technique: Steal or Forge Kerberos Tickets
Sub-technique: AS-REP Roasting
Technique ID: T1558.004
Potential Mitigation:
• Regularly review and audit accounts with permissions to set Server Trust Accounts.
• Monitor and alert on suspicious activities related to trust relationships and server configurations.
• Revoke unnecessary permissions from accounts to set Server Trust Accounts.
Technique: Domain Controller Authentication
Technique ID: T1207
Potential Mitigation:
• Regularly review and identify potential stale computers
• Create a decomissioning process to remove stale objects from your environment
Technique: User Account Management
Technique ID: M1018
Duplicate accounts being present often means there are process failures, and they should be identified and removed.
Potential Mitigation:
• Remove any accounts identified as duplicates and are not in use
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Remove the "Everyone" and "Anonymous" from the PreWin2000 group while making sure that the group "Authenticated Users" is present, then reboot each DC. Note: removing the group "Authenticated Users" (and not keep it like advised here) is an advanced recommendation quoted in the rule A-PreWin2000AuthenticatedUsers
https://msdn.microsoft.com/en-us/library/cc223672.aspx [US]STIG V-8547 - The Anonymous Logon and Everyone groups must not be members of the Pre-Windows 2000 Compatible Access group.
Technique: Brute Force
Sub-technique: Password Spraying
Technique ID: T1110.003
Potential Mitigation:
• Locate the IP address which was found as not being part of declared subnet, then add this subnet to the "Active Directory Sites" tool. If you have found IPv6 addresses and it was not expected, you should disable the IPv6 protocol on the network card.
Technique: Active Directory Configuration
Technique ID: M1015
Remediation:
1. Regularly audit user and computer accounts to identify those with non-default PrimaryGroupIDs.
2. Investigate any accounts with non-default PrimaryGroupIDs to determine if the change was authorized and necessary.
3. If the change was unauthorized, reset the PrimaryGroupID to the default value (513 for users, 515 for computers) and monitor for any suspicious activities.
4. Implement strict access controls and monitoring for group management, especially for sensitive groups like Domain Admins.
5. Educate administrators about the risks associated with modifying PrimaryGroupIDs and enforce policies to prevent unauthorized changes.
Technique: Account Manipulation
Technique ID: T1098
In order to reduce this risk, organizations should
1. Regularly review and remove disabled privileged accounts that are no longer needed.
2. Implement a process to promptly revoke all permissions and group memberships from privileged accounts upon disabling them.
3. Monitor and alert on any activity from disabled accounts, as this could indicate a potential attack.
4. Implement strong password policies and multi-factor authentication (MFA) for all privileged accounts to reduce the risk of unauthorized access.
5. Conduct periodic access reviews to ensure that only authorized users have access to privileged accounts and that their permissions align with their current roles and responsibilities.
If an attacker compromises the password hash of an account with an SPN, they can use Kerberoasting techniques to request Kerberos service tickets for that account. They can then crack the password offline, potentially gaining access to the user's credentials. The potential damage and lateral movement capabilities would be more contained for non-privileged users than for privileged users, like Domain Admins, but it is still important to manage and secure non-privileged accounts.
Remediation:
1. Regularly audit your accounts to ensure they don't have unnecessary SPNs defined.
2. Remove any SPNs from accounts that don't specifically require them for their intended service.
3. Implement Managed Service Accounts (MSAs) or Group Managed Service Accounts (gMSAs) for services.
Technique: Steal or Forge Kerberos Tickets: Kerberoasting
Technique ID: T1558.003
Remediation:
1. Regularly review AD user accounts to identify those that have been inactive for an extended period (e.g., 30-90 days).
2. Disable or delete stale user accounts that are no longer needed.
3. Implement an automated process to detect and remove stale accounts on an ongoing basis.
Remediation:
• Regularly review krbtgt accounts to identify those that have not had their password changed for an extended period (e.g., 180 days).
• Apply strict controls for enforcing regular password updates for krbtgt accounts
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
An attacker could use brute-force attacks to guess the computer account password and gain access. The attacker could then use the compromised computer account to perform malicious activities, such as spreading malware or moving laterally through the network, escalating privilege, to gain access to network resources or take control of the entire domain.
Remediation:
1. Ensure that computer account passwords are changed at least every 90 days, in line with your organization's security policy.
2. Configure Group Policy to enforce regular password changes for computer accounts.
3. Set up monitoring and alerting systems to identify computer accounts with passwords older than the defined threshold.
4. Regularly audit and remove inactive or stale computer accounts from Active Directory to minimize the attack surface.
Technique: Account Manipulation
Technique ID: T1098
Remediation:
1. Ensure that the guest account is disabled in Active Directory. This can be done through Group Policy or by directly modifying the account settings.
2.Regularly review your Active Directory configuration to ensure that the guest account remains disabled and no other unnecessary accounts are enabled.
3.Enable logging and monitoring of account activities to detect and investigate any suspicious behavior or unauthorized access attempts.
Technique: Valid Accounts: Local Accounts
Technique ID: T1078.003
• Gaining unauthorized access to resources
• Escalating privileges
• Conducting reconnaissance
• Establishing persistence within the network
Mitigation:
1. Regularly review and monitor newly created AD objects using tools like PowerShell or third-party security solutions.
2. Implement strict access controls and approval processes for creating new AD objects.
3. Enforce strong password policies and enable multi-factor authentication (MFA) for all user accounts.
7. Regularly audit and remove unused or stale AD objects to maintain a clean and secure AD environment.
Technique: Create Account
Sub-Technique: T1136.002 Domain Account
Technique ID: T1136
Mitigation:
• Set a maximum password age policy for AD accounts, forcing regular password changes.
• Require users to use complex passwords that meet minimum length and complexity requirements.
• Implement MFA for all administrator accounts to provide an additional layer of security beyond passwords.
Technique: Brute Force, Credential Dumping
Technique ID: T1110, T1003
Potential Mitigation:
• Regularly review the ACL of the AdminSDHolder container to ensure only the required ACEs exist to be propogated to privileged objects
• Monitor changes to the AdminSDHolder ACL to ensure only required and intended changes occur to the permissions
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Regularly review and audit accounts with replication permissions to ensure they are limited to only necessary users or groups.
• Implement the principle of least privilege, granting replication permissions only to accounts that absolutely require them.
• Monitor and alert on suspicious replication activities, such as replication requests from unauthorized sources or during unusual hours.
Technique: OS Credentials Dumping
Sub-technique: DCSync
Technique ID: T1003.006
The Protected Users group is automatically created when the PDC (primary DC) emulator role is transferred to Windows Server 2012 R2 or newer domain controller. The group is then automatically replicated to all other domain controllers.
Technique: Privileged Account Management
Technique ID: M1026
This rule is considered "informative" because the default configuration where Authenticated Users can create DNS records is considered safe. The reason for this classification is that no exploitation of that vulnerability has been reported. The proposed enhancement is to replace the identity who has been granted the right to create DNS Records (permission CreateChild) from Authenticated Users to Domain Computers. To perform this change, you have to edit the permission of the DNSZone whose object is located in the container CN=MicrosoftDNS,DC=DomainDnsZones. It should be noticed that if there is a privilege escalation on a computer, an attacker can impersonate the computer account and bypass this mitigation.
Potential Mitigation:
Create the DNS records manually as part as the domain join process and to revoke the permission granted to Authenticated Users.
Technique: Adversary-in-the-Middle
Technique ID: T1557
Locate the GPO specified in Details and turn off the setting "Recovery console: Allow automatic administrative logon" The setting is located in : Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> Security Options. As an alternative, the file GptTmpl.inf can be manually edited.
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/recovery-console-allow-automatic-administrative-logon
Technique: Boot or Logon Autostart Execution
Technique ID: T1547
Potential Mitigation:
• Edit the root domain security descriptor.
• Identify the ACE giving the right ModifyDACL to the principal Exchange Windows Permissions.
• Go to the advanced settings and set the inheritance to Inherit Only.
Technique: Valid Accounts
Technique ID: T1078
When Open Access groups like "Authenticated Users," or "Everyone," or similar broadly-defined security principals have permissions to modify login scripts, it introduces a significant security risk. Specifically, these permissions allow any user who falls within these groups to alter the login script. Since login scripts are executed during the login process, any malicious modifications can result in the execution of arbitrary code with the privileges of the user logging in. If a privileged user, such as an administrator, logs in, the malicious code can run with elevated permissions, leading to a complete system compromise.
Potential Mitigation:
• Ensure that only trusted administrators have permissions to modify login scripts. Remove or severely limit access for groups like "Authenticated Users" or "Everyone" to prevent unauthorized modifications.
• Regularly audit the permissions on login scripts and other critical configuration files to ensure that only authorized users have access. Use tools that can automatically detect and report on insecure permissions.
• Implement monitoring and alerting mechanisms to detect when login scripts are modified. This can include file integrity monitoring (FIM) solutions that alert administrators whenever a script is altered.
• If possible, use code-signing to ensure that only verified and trusted scripts are executed. This adds an additional layer of security, making it more difficult for attackers to insert unauthorized scripts.
Technique: Boot or Logon Autostart Execution
Technique ID: T1547
To solve the issue, limit the number of extra computers that can be registered by a basic user. It can be reduced by modifying the value of ms-DS-MachineAccountQuota to zero (0). Another solution can be to remove the "Authenticated Users" group in the domain controllers policy altogether. Do note, that if you need to set delegation to an account, so it can add computers to the domain, it can be done through 2 methods: Delegation in the OU or by assigning the SeMachineAccountPrivilege to a special group
Technique: Valid Accounts
Technique ID: T1078
When default members, such as highly privileged accounts (e.g., Domain Admins, Enterprise Admins), are removed from the Denied RODC Password Replication Group, their passwords can be cached on the RODC. An attacker who gains access to an RODC can exploit cached credentials in several ways:
• Credential Dumping: Tools like Mimikatz can be used to dump cached credentials from the RODC, including passwords of highly privileged accounts if they were removed from the denied group.
• Lateral Movement: With the credentials of a high-privilege account, an attacker can move laterally within the network, gaining access to other resources and potentially compromising the entire domain.
• Domain Compromise: By exploiting these cached credentials, especially of domain or enterprise admins, an attacker can escalate privileges and take control of the domain.
Potential Mitigation:
• Review and Restore Default Settings: Regularly review the membership of the Denied RODC Password Replication Group and ensure that all default members are included. This includes high-privilege groups like Domain Admins, Enterprise Admins, and the krbtgt account.
• Audit Password Replication Policies: Use tools and scripts to audit and enforce proper password replication policies on all RODCs. Ensure that only accounts that need to authenticate locally are allowed to have their credentials cached.
• Monitor RODC Access: Implement monitoring and alerting for any unusual access or changes to RODC configurations. This helps in detecting potential unauthorized changes to replication policies or cached credentials.
• Regularly Rotate Credentials: Periodically change the passwords of highly privileged accounts and the krbtgt account, especially if there is any suspicion of compromise.
Technique: Credential Dumping
Sub-Technique: T115.002 Pass the Hash
Technique ID: T1003
If an RODC is compromised, an attacker can extract the password hashes of these accounts, potentially allowing offline password-cracking attacks. This is particularly concerning for privileged accounts.
If the compromised account is a privileged account, such as a member of the Domain Admins group, the attacker could leverage the cracked password to escalate their privileges within the domain. This could lead to a full domain compromise.
Mitigation Strategies:
• Limit Membership in the Allowed RODC Password Replication Group: Restrict membership to only the accounts that absolutely need their passwords replicated to the RODC. Ideally, this group should not include any privileged accounts (e.g., Domain Admins).
• Implement Strong Password Policies: Ensure that strong, complex passwords are enforced, making it more difficult for attackers to crack password hashes. Implement multi-factor authentication (MFA) wherever possible.
• Regularly Rotate Credentials: Regularly change passwords, especially for accounts with privileged access. This limits the window of opportunity for an attacker if credentials are compromised.
• Monitor and Audit RODC Access: Continuously monitor RODCs for any signs of compromise or unusual activity. Implement robust logging and alerting for any suspicious actions involving RODCs.
• Patch and Update Systems: Ensure that all systems, including RODCs, are regularly patched and updated to protect against known vulnerabilities.
• Disable Cached Credentials on RODCs: If possible, disable the caching of credentials on RODCs, or at least limit the scope of accounts whose credentials are cached.
Technique: Valid Accounts
Sub-Technique: T1003.001 - OS Credential Dumping: LSASS Memory, T1078.002 - Valid Accounts: Domain Accounts
Technique ID: T1078
If the msDS-NeverRevealGroup attribute is not properly configured, or expected groups (like Administrators, Server Operators, Account Operators, Backup Operators, and Denied RODC Password Replication Group) are missing, the password hashes for these highly privileged accounts could be replicated to RODCs. This poses a significant security risk if an RODC is compromised, as attackers could extract these password hashes and attempt to crack them.
An attacker who gains access to an RODC could use tools to dump all cached password hashes. If privileged accounts' hashes are stored on the RODC due to misconfiguration, these can be targeted for cracking. If the attacker successfully cracks the password of a privileged account, they could escalate their privileges, gaining broader access to the network.
Potential Mitigation:
• Ensure Proper Configuration of msDS-NeverRevealGroup: Verify that all critical groups, such as Administrators, Server Operators, Account Operators, Backup Operators, and the Denied RODC Password Replication Group, are included in the msDS-NeverRevealGroup attribute.
• Regularly audit the configuration of msDS-NeverRevealGroup to ensure that it includes all necessary groups and that no unauthorized changes have been made.
• Implement monitoring and alerting mechanisms to detect any unusual activities on RODCs, especially related to password replication and account access.
• Limit physical and network access to RODCs, especially in less secure locations, to reduce the risk of compromise.
Technique: Technique: Valid Accounts
Sub-Technique: T1003.001 - OS Credential Dumping: LSASS Memory, T1078.002 - Valid Accounts: Domain Accounts
Technique ID: T1078
Potential Mitigation:
• Ensure that RIGHT_DS_LIST_OBJECT is correctly configured to enforce proper isolation between OUs. Regularly review and audit ACL settings to prevent unauthorized visibility.
• If isolation is not necessary, consider reverting the DoListObject behavior to its default by adjusting the dsHeuristics setting to "0". This can reduce the complexity and potential misconfigurations.
• Monitoring and Auditing: Regularly monitor and audit access logs to detect any unauthorized attempts to view or access objects in different OUs.
Technique: Permission Groups Discovery
Sub-Technique: T1069.002 - Permission Groups Discovery: Domain Groups
Technique ID: T1069
Potential Mitigation:
• Implement regular audits of the "primaryGroupID" attribute across all accounts to ensure it aligns with expected group memberships.
• Ensure that the "primaryGroupID" is set to its default value unless there is a strong, justified reason for an exception. Use scripts to regularly check for deviations from this standard.
• Enable monitoring and alerts for changes to the "primaryGroupID" attribute to detect potential unauthorized modifications.
• Limit who can modify the "primaryGroupID" to only a few trusted administrators.
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
• Ensure the "primaryGroupID" is set to default values unless absolutely necessary. Regularly audit this attribute.
• Verify that all domain controllers reside in the "Domain Controllers" container to ensure proper policy application.
• Implement monitoring for changes to the "primaryGroupID" and the location of domain controllers to detect potential malicious activities.
• Limit permissions to modify the "primaryGroupID" to a select group of administrators to prevent unauthorized changes.
Technique: Account Manipulation
Technique ID: T1098
Exploitation by Attackers
• Undelete Objects (REANIMATE_TOMBSTONE): Attackers can restore deleted objects, such as user accounts, and use them to regain access to the environment.
• Undo Password Expiration (UNEXPIRE_PASSWORD): Attackers could prevent a compromised account's password from expiring, maintaining access for an extended period.
• Create Alternate Identities (SID_HISTORY): Attackers could use this right to impersonate other users by manipulating their SIDs, allowing them to escalate privileges or access sensitive resources.
Potential Mitigation:
• Restrict Privileges: Limit the assignment of REANIMATE_TOMBSTONE, UNEXPIRE_PASSWORD, and SID_HISTORY rights to only essential, highly trusted administrators.
• Audit and Review: Regularly audit and review the use of these rights to ensure they are not being misused. Investigate any suspicious delegations immediately.
• Remove Unnecessary Delegations: Unless there is a strong justification, remove these rights from accounts and groups that do not need them.
• Monitor for Abuse: Implement monitoring to detect the use of these rights, particularly in non-routine contexts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Remove Unnecessary Delegations: If a delegation cannot be traced to a valid account, remove it to eliminate potential risks.
• Audit and Monitor: Regularly audit delegations and monitor for any delegations linked to accounts that cannot be translated, indicating possible risks.
• Cross-Domain Review: Review cross-domain trust relationships and delegations to ensure they are necessary and secure.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Review and Restrict Delegations: Regularly review delegated permissions and remove overly broad access rights. Assign permissions only to specific groups that require them.
• Apply the principle of least privilege by ensuring that users have only the minimum permissions necessary to perform their tasks.
• Continuously audit and monitor changes to OU delegations to detect and respond to any misconfigurations promptly.
Technique: Account Manipulation, Exploitation for Privilege Escalation
Technique ID: T1098, T1068
Potential Mitigation:
• Analyze and restrict write permissions on key objects and servers to minimize risk.
• Ensure helpdesk personnel have the least privilege necessary to perform their duties, and segregate duties to limit their ability to access critical systems.
• Use tools like Netwrix Access Analyzer to identify shadow access and eliminate unnecessary permissions.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Review and restrict write permissions granted to groups like Everyone, Authenticated Users, and other broad groups to minimize the risk of exploitation.
• Ensure permissions are assigned only to specific, necessary groups, avoiding the inclusion of broad groups like Everyone or Domain Users in critical control paths.
• Use tools like Netwrix Enterprise Auditor to identify shadow access involving these broad groups and correct any overly permissive configurations.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
To mitigate this risk:
1. Regularly review and audit user accounts to identify stale or inactive accounts.
2. Implement a process to promptly disable or remove stale accounts, revoking their group memberships and permissions including permissions on AD Objects.
3. Use automated tools or scripts to detect and alert on stale accounts with sensitive group memberships and permissions.
4. Implement a least privilege model, ensuring that users only have the permissions necessary for their roles.
By proactively managing stale user accounts and their group memberships and permissions, organizations can reduce the risk of unauthorized access and limit the potential impact of a compromised account.
Technique: Permission Groups Discovery
Sub-Technique: Domain Groups
Technique ID: T1069.002
Potential Mitigation:
• Routinely audit AdminSDHolder permissions for unauthorized or unnecessary permissions.
• Do not allow users to possess administrative privileges across security boundaries. For example, an adversary who initially compromises a workstation should not be able to escalate privileges to move from the workstation to a server or domain controller. Eliminating these pathways to privilege escalation is essential.
• Aggressively enforce the principle of least privilege.
To learn more about this vulnerability, visit the attack catalog page: https://www.netwrix.com/adminsdholder_modification_ad_persistence.html and this blog post: https://blog.netwrix.com/2023/06/16/adminsdholder/
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
• Regularly review and limit the number of users with password reset privileges. Assign this permission only to trusted individuals who require it for their roles.
• Implement Multi-Factor Authentication (MFA) for all accounts, especially those with password reset capabilities, to prevent unauthorized access even if passwords are compromised.
• Enable auditing and monitoring of password reset activities to detect and alert on suspicious password changes.
Technique: Account Manipulation
Technique ID: T1098
Potential Mitigation:
1. Regularly audit and review the permissions assigned to domain users.
2. Apply the principle of least privilege. Remove unnecessary direct permissions from domain users. Ensure that only authorized administrators have the required permissions to manage critical objects.
3. Use role-based access control (RBAC): Implement RBAC to assign permissions based on job roles and responsibilities.
4. Use PAM solutions to control and monitor privileged access to sensitive objects. Require approval workflows and logging for privileged actions.
5. Regularly review and update permissions. Conduct periodic reviews of permissions to ensure they remain aligned with job roles and responsibilities. Remove permissions promptly when users change roles or leave the organization.
By following these steps, organizations can mitigate the risks associated with domain users having direct permissions and maintain a more secure Active Directory environment.
Technique: Valid Accounts
Technique ID: T1078
Remediation:
• Regularly review user permissions and ensure that only necessary users have permission to add computer accounts, following the principle of least privilege.
• Enable monitoring of changes in Active Directory and set up alerts for unusual activity, such as creation of a large number of new computer accounts or computer accounts being added by users who typicallly don't perform such actions.
• Use Role Based Access control (RBAC) to ensure only authorized administrative roles have ability to add computer accounts
Technique: Valid Accounts, Domain Trust Manipulation
Technique ID: T1078, T1075
Remediation:
• Locate the dsHeuristics attribute in the configuration partition on the object Configuration/Services/Windows NT/Directory Service
• Edit the attribute and set the 16th character to zero (0)
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/e5899be4-862e-496f-9a38-33950617d2c5
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/50097362-ede5-40fa-973e-8d65e782e384
Technique: Privileged Account Management
Technique ID: M1026
If an attacker or a compromised account with delegated access to GPOs linked onthe domain level, they can create and link malicious GPOs to the entire domain. Using these newly created GPOs, they can be used to distribute malware, change security settings, or grant unauthorized access to sensitive resources.
Mitigation:
• Regularly review and audit the delegated access to GPO linked at the domain level.
• Ensure that only trusted and authorized users or groups have the "Link GPOs" permission.
• Implement the principle of least privilege, granting permissions only when necessary.
• Monitor and alert on any suspicious GPO linking activities.
• Regularly review and update GPOs to ensure they align with the organization's security policies.
Technique: Impair Defenses, Valid Accounts, Exploitation for Privilege Escalation, Pass the Hash
Sub-Technique: T1562.001 Disable or Modify Tools, T1562.003 Histories and Logs, T1078.001 Domain Accounts
Technique ID: T1562, T1078, T1068, T1075
Mitigation:
• Audit accounts with the delegated access to GPOs linked on the Domain Controllers OU.
• Remove the "Link GPOs" permission from any unnecessary accounts or groups.
• Implement the principle of least privilege, ensuring that only the most essential and trusted accounts have the ability to link GPOs to the domain controller OU.
• Monitor and alert on changes to the domain controller OU's GPO linking permissions.
Technique: Command and Scripting Interpreter,
Valid Accounts
Sub-Technique: T1078.003 Local Accounts
Technique ID: T1059, T1078
Mitigation
• Limiting delegation to control access to link GPOs at the AD site level.
• Regularly audit GPO links and review the GPOs linked at the AD site level to ensure that no unauthorized or malicious GPOs are present.
• Follow best practices for GPO management, such as using GPO modeling, backing up GPOs before making changes, and using role-based access control for GPO management.
• Use monitoring tools to detect and alert on suspicious GPO changes or unusual activity related to GPOs.
5. Apply the principle of least privilege, granting only the necessary permissions to users and administrators.
Technique: Scheduled Task/Job, Software Deployment Tools, Command and Scripting Interpreter, Valid Accounts, Pass the Hash, Exploitation for Privilege Escalation, Create Account
Sub-Technique: T1053.005 Scheduled Task, T1059.001 PowerShell, T1059.003 Window Command Shell, 1078.001 Domain Accounts, T1136.001 Local Account, T1136.002 Domain Account
Technique ID: T1053, T1072, T1059, T1078, T1075, T1068, T1136
• SeLoadDriverPrivilege can be used to take control of the system by loading a specifically designed driver. This procedure can be performed by low privileged users as the driver can be defined in HKCU.
• SeTcbPrivilege is the privilege used to "Act on behalf the operating system". This is the privilege reserved to the SYSTEM user. This procedure allows any user to act as SYSTEM.
• SeDebugPrivilege is the privilege used to debug program and to access any program's memory. It can be used to create a new process and set the parent process to a privileged one.
• SeRestorePrivilege grants write access for all system files and can be used to modify services and perform DLL hijacking to escalate privileges.
• SeBackupPrivilege can be used to backup the Windows registry and use third party tools for extracting local NTLM hashes.
• SeTakeOwnershipPrivilege can be used to take ownership of any object in the system including a service registry key. Then to change its ACL to define its own service running as LocalSystem.
• SeCreateTokenPrivilege can be used to create a custom token with all privileges and thus be abused like SeTcbPrivilege SeImpersonatePrivilege and SeAssignPrimaryTokenPrivilege can be abused to impersonate privileged tokens. These tokens can be retrieved by establishing security context such as Local DCOM DCE/RPC reflection.
• SeSecurityPrivilege can be used to clear the Windows Security Event Log and shrink the size so events are quickly overwritten. Also read security log and view events where the user inverted the login and its password.
• SeManageVolumePrivilege can be used to reset the security descriptor on the system volume and thus, change the inherited permissions to critical files
Advised Remediation:
• Locate the group policy object name in the details section of this finding.
• Remove the privileges assigned by editing the group policy object with the Group Policy Management console, finding the settings in Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> User Rights Assignment and removing the dangerous group.
Documentation:
https://www.romhack.io/slides/RomHack%202018%20-%20Andrea%20Pierini%20-%20whoami%20priv%20-%20show%20me%20your%20Windows%20privileges%20and%20I%20will%20lead%20you%20to%20SYSTEM.pdf
https://www.tarlogic.com/en/blog/abusing-seloaddriverprivilege-for-privilege-escalation/ https://github.com/decoder-it/psgetsystem https://twitter.com/0gtweet/status/1303427935647531018?s=20
https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Check if the Hardened Path section in the GPO, located in Computer Configuration/Policies/Administrative Templates/Network/Network Provider is set to 1. Check each value reported here and make sure that entries containing SYSVOL or NETLOGON have RequireIntegrity and RequireMutualAuthentication set to 1. In addition to that, check entries having the pattern \\DCName\* and apply the same solution.
Technique: Adversary-in-the-Middle
Sub-Technique: LLMNR/NBT-NS Poisoning and SMB Relay
Technique ID: T1557.001
Potential Mitigation:
• Locate the GPO specified and remove the privilege "Allow log on locally" or "Allow log on through Remote Desktop Services" to "Everyone", "Authenticated Users", "Domain Users" or "Domain Computers". The settings are located in : Computer configuration -> Policies -> Windows Settings ->Security Settings -> Local Policies -> User Rights Assignment.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Edit the Access Control List (ACL) of the GPO object or the directory where the items is located. Then remove any write permission given to the group.
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Locate the file mentioned by the GPO specified in Details and change its permissions.
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Identify scripts leveraged by DisplaySpecifiers and properly secure them in SYSVOL
Technique: System Services
Technique ID: T1569
Potential Mitigation:
• You should add a GPO to prohibit the logon of specific groups Domain Admins and Administrators. The setting is located in Computer Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment. Then "Deny" logon locally and "Deny" logon through Remote Desktop Services.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Migrate from NTFRS to DFS replication. To know if the setting is enabled, the following LDAP entry should be analyzed: CN=Domain System Volume (SYSVOL share),CN=File Replication Service,CN=System If there is any entry found, NTFRS is in use for SYSVOL replication.
Technique: Remote Service Session Hijacking
Technique ID: T1563
Potential Mitigation:
Edit the GPO and change the local group assignment or change the principle being added from the Everyone group
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Identify the setting modified in the GPO and fix it. All security settings should be modified in the Domain GPO Editor and are located in Computer Configuration / Policies / Windows Settings / Security Settings / Local Policies / Security Options For NoLMHash the setting is located in: Network security: Do not store LAN Manager hash value on next password change For LmCompatibilityLevel the setting is located in: Network security: LAN Manager authentication level
Technique: Brute Force
Sub-Technique: Password Cracking
Technique ID: T1110.002
Potential Mitigation:
• Locate the policy having the setting "Limit local account use of blank passwords to console logon only" disabled and enabled the setting.
Technique: Brute Force
Sub-Technique: Password Spraying
Technique ID: T1110.003
Attacks of this nature vary in mitigation. Some examples include:
• Applying a patch (PetitPotam)
• Disablling Services (Spooler)
• Changing configuration (RPC Filters via EDR or firewall)
• Ensuring integrity mechanisms (SMB Integrity)
This check is completed using a malformed RPC packet and if the error RPC_X_BAD_STUB_DATA (1783) is returned the interface is considered available and vulnerable even though full exploitation is not tested.
Potential Mitigation:
1. Apply Group Policy Object (GPO) - "Network security: Restrict NTLM: Outgoing NTLM traffic to remote servers":
Apply this GPO specifically to the Organizational Unit (OU) "Domain Controllers".
Caution: Enabling this GPO might impact services dependent on NTLM such as files copy Backups.
Consider setting the GPO in "Audit mode" initially to identify and assess the impact on affected services.
2. Enable RPC Filters in Windows Firewall:
Configure Windows Firewall to block specific Interface IDs associated with vulnerable RPC interfaces.
This is done using the netsh command. See the documentation links for more information.
Exercise caution: This method filters the entire interface, not specific Operation Numbers (OpNum).
Adjust exceptions for necessary services to ensure critical functionality.
3. Implement External Filters (e.g., EDR, Firewalls):
Leverage third-party solutions, such as Endpoint Detection and Response (EDR) tools or firewalls.
Notable project: rpcfirewall https://github.com/zeronetworks/rpcfirewall, offering logical filtering at the OpNum level.
Be cautious of potential impact and ensure compatibility with existing infrastructure.
Technique: Forced Authentication
Technique ID: T1187
This check uses MS-SAMR with a NULL connection and MS-LSAT with a well known SID to test whether access is possible. It is also possible to verify this using rpcclient -U '' target_ip_address from a kali distribution.
Technique: Technique: Brute Force
Sub-Technique: Password Spraying
Technique ID: T1110.003
To enable Kerberos armoring for domain controllers, edit the GPO and go to Computer Configuration > Administrative Templates > System > KDC
then enable the policy "KDC support for claims, compound authentication and Kerberos armoring".
The policy should be set to at least "Supported".
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Technique: Data Backup
Technique ID: M1053
Enabling the Active Directory recycle bin is an irreversible change.
To enable the Active Directory Recycle Bin first ensure the forest functional level is Windows Server 2008 R2 or above. This can be completed using the Active Directory PowerShell command Get-ADForest. Once confirmed the recycle bin can be enabled using the following command and replacing my.domain with your own domain name.
Enable-ADOptionalFeature -Identity 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target 'my.domain'
Technique: Audit
Technique ID: M1047
After having carefully studied the possible impact of the following change, apply the script made by MSRC and referenced in the documentation below to alter the permission.
https://itpro-tips.com/wp-content/uploads/files/TechnetGallery/Enterprise-Key-Admins-720eb270.zip
https://secureidentity.se/adprep-bug-in-windows-server-2016/
Technique: Active Directory Configuration
While these Java attributes can have legitimate uses, it's recommended to ensure they are not actively used or to set com.sun.jndi.ldap.object.trustURLCodebase to "false" in all Java code. To disable the Java extension, you can mark these attributes as defunct by following this guide: https://docs.microsoft.com/en-us/windows/win32/ad/disabling-existing-classes-and-attributes.
Technique: Active Directory Configuration
Technique ID: M1015
Classes that contain the user or computer class in the possSuperiors attribute can be used as containers and subvert security restrictions such as allowing creation of new user and computers.
Remediation:
This vulnerability can be remediated by editing the schema for the affected class and removing computer/user class from the possSuperiors attribute. In the below documentation there are scripts that can be used to fix the active directory schema.
It should be noted that that the class msExchStorageGroup is known to have this vulnerability and documented under CVE-2021-34470. This can be exploited even if Microsoft Exchanged has been uninstalled.
https://bugs.chromium.org/p/project-zero/issues/detail?id=2186
https://gist.github.com/IISResetMe/399a75cfccabc1a17d0cc3b5ae29f3aa#file-update-msexchstoragegroupschema-ps1
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34470
Technique: User Account Management
Technique ID: M1018
Certificates contained in the WindowsServerUpdateServices certificate store are enforced by default to mitigate HTTPS intercepting attacks, but this can be disabled via Group Policy.
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/scan-changes-and-certificates-add-security-for-windows-devices/ba-p/2053668
Technique: Update Software
Technique ID: M1051
The HTTP protocol can be intercepted on the network with tools such as wsuxploit or WSuspicious (see below for links) and malicious updates can be delivered.
The attacker can then take control of many assets.
https://github.com/pimps/wsuxploit
https://github.com/GoSecure/WSuspicious
Technique: Update Software
Technique ID: M1051
https://techcommunity.microsoft.com/t5/windows-it-pro-blog/scan-changes-and-certificates-add-security-for-windows-devices/ba-p/2053668
Technique: Update Software
Technique ID: M1051
If LDAP signing is set to "None" (no negotiation), attackers may exploit this vulnerability.
Remediation:
• Ensure the "Network security: LDAP client signing requirements" setting is set to either "Negotiate signing" or "Require signing". Policy Location: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Security Options
References:
https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/network-security-ldap-client-signing-requirements.
Technique: Man-in-the-Middle
Technique ID: T1557
Microsoft strongly recommends disabling SMB v1 on both client and server systems whenever possible. However, if you're still using deprecated operating systems (e.g., Windows 2000, 2003, XP, CE), network printers with SMBv1 scan-to-share features, or software with custom implementations that rely on SMB v1, address these dependencies first. Otherwise, disabling SMB v1 may cause additional errors.
https://blogs.technet.microsoft.com/josebda/2015/04/21/the-deprecation-of-smb1-you-should-be-planning-to-get-rid-of-this-old-smb-dialect
https://github.com/lgandx/Responder-Windows
Technique: Adversary-in-the-Middle
Sub-Technique: LLMNR/NBT-NS Poisoning and SMB Relay
Technique ID: T1557.001
Remediation:
• Apply windows updates to the domain controller.
• Disable SMB version 1
References:
https://blogs.technet.microsoft.com/msrc/2017/04/14/protecting-customers-and-evaluating-risk/
https://github.com/misterch0c/shadowbroker/tree/master/windows/exploits
Technique: Update Software
Technique ID: M1051
Remediation:
• Apply windows updates to all affected domain controllers.
https://learn.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-068
Technique: Update Software
Technique ID: M1051
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Potential Mitigation:
• Periodically review certificate templates for risky EKUs and broad enrollment permissions
Potential Mitigations:
• Revoke enrollment permissions for broad security groups and assign enrollment access to required services
• If the Certificate Agent EKU is not required on the template remove the Certificate Agent enhanced key usage from the template
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Some tools may not reliably detect weak SSL protocols due to security enhancements in the .NET Framework, starting with version 4.7. To accurately test for these protocols, consider using tools like OpenSSL with deprecated protocols enabled (e.g., from Kali Linux).
Remediation:
• Apply Windows updates
• Implement registry changes to disable SSLv2 and SSLv3. IISCrypto tool can help simplify this.
References:
https://social.technet.microsoft.com/wiki/contents/articles/2249.windows-server-20082008r2-how-to-disable-sslv2-on-domain-controller-dsforum2wiki.aspx
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://adsecurity.org/?p=376
Technique: Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Audit settings can be configured in two locations:
Simple audit configuration: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Audit Policies.
Advanced audit configuration: Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Advanced Audit Policy Configuration.
Ensure the audit GPO is applied to all domain controllers, especially in OUs where it may not be enforced.
References:
https://adsecurity.org/?p=3377
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
Technique: Audit
Technique ID: M1047
Potential Mitigations:
• Verify if the DoNotVerifyUPNAndOrSPNUniqueness parameter is enabled by checking the 21st caharacter of the DsHeuristics attribute for a non-zero value.
Potential Mitigations:
• Correct the issue by modifying the 21st character of the DsHeuristics attribute from whatever is set to 0.
References:
https://support.microsoft.com/en-us/topic/kb5008382-verification-of-uniqueness-for-user-principal-name-service-principal-name-and-the-service-principal-name-alias-cve-2021-42282-4651b175-290c-4e59-8fcb-e4e5cd0cdb29
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/spn-and-upn-uniqueness
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Follow the procedure outlined in KB5008383 to apply these changes.
- Be cautious of control characters at the 10th and 20th positions to avoid unintended changes.
- If DsHeuristics is empty, the updated value should be: 00000000010000000002000000011.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/e5899be4-862e-496f-9a38-33950617d2c5
https://support.microsoft.com/en-au/topic/kb5008383-active-directory-permissions-updates-cve-2021-42291-536d5555-ffba-4248-a60e-d6cbc849cde1
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Configure Group Policy to enable "Digitally sign communications (always)". This option is located in "Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options"
• Reivew Group Policy Objects for instances of "Digitally sign communications (always)" being disabled.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/36172e53-ac81-48fb-b2e3-caa3761b9157
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/microsoft-network-client-digitally-sign-communications-always
https://www.cert.ssi.gouv.fr/actualite/CERTFR-2015-ACT-021/#SECTION00010000000000000000
Technique: Adversary-in-the-Middle
Technique ID: T1557
Remediation:
• Configure Group Policy to enable " Digitally sign communications (if client agrees)". This option is located in “Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options”
• Reivew Group Policy Objects for instances of "Digitally sign communications (if client agrees)” being disabled.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/36172e53-ac81-48fb-b2e3-caa3761b9157
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/microsoft-network-client-digitally-sign-communications-always
https://www.cert.ssi.gouv.fr/actualite/CERTFR-2015-ACT-021/#SECTION00010000000000000000
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Audit by enabling LDAP interface event logging on each domain controller:
• Monitor Windows Event IDs 3039 and 3040 to identify non-compliant clients.
• Once compatibility is verified, enforce Channel Binding by setting the LdapEnforceChannelBinding registry key
References:
https://support.microsoft.com/en-us/topic/use-the-ldapenforcechannelbinding-registry-entry-to-make-ldap-authentication-over-ssl-tls-more-secure-e9ecfa27-5e57-8519-6ba3-d2c06b21812e
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/ldap-channel-binding-and-ldap-signing-requirements-march-2020/ba-p/921536/page/4
https://oxfordcomputergroup.com/resources/ldap-channel-binding-signing-requirements/
https://github.com/zyn3rgy/LdapRelayScan
https://access.redhat.com/articles/4661861
http://gary-nebbett.blogspot.com/2020/01/ldap-channel-binding.html
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Review security descriptors across the domain to replace old SIDs with the new account SID. This process can be lengthly as requires every applied permission to a previous group is replaced with the updated group. Active Directory Migration projects should take this into account.
• Regularly audit SID History for unexpected values and remove when the original domain is decommissioned.
Technique: Access Token Manipulation
Sub-Technique: SID-History Injection
Technique ID: T1134.005
Potential Mitigations:
• Ensure all LDAP clients support LDAP signing.
• Audit clients that may not be compatible with LDAP signing.
Potential Mitigations:
• Follow Microsoft's guidelines to enable LDAP signing.
• Verify that all LDAP clients, including Unix systems, support signing.
• Enforce LDAP signing policy by configuring the relevant security policies.
References:
https://docs.microsoft.com/en-US/troubleshoot/windows-server/identity/enable-ldap-signing-in-windows-server
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/ldap-channel-binding-and-ldap-signing-requirements-march-2020/ba-p/921536/page/4
https://github.com/zyn3rgy/LdapRelayScan
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigations:
• Ensure RODCs have read-only access to SYSVOL.
• Regularly audit RODC permissions on SYSVOL.
Potential Mitigations:
• Set msDFSR-ReadOnly to TRUE on Read Only Domain Controllers. This can be completed by using ADSI Edit, navigating to the RODC, expanding CN=DFSR-LocalSetting and CN=Domain System Volume and editing the attribute on CN=SYSVOL Subscription
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-frs2/3588b343-4076-4776-b5c0-78e2b3d91ed3
Technique: Rougue Domain Controller
Technique ID: T1207
Potential Mitigations:
• Regularly audit the msDS-RevealedUsers attribute for privileged accounts.
• Avoid allowing privileged accounts to be cached on RODCs.
Potential Mitigations:
• Change the password for any privileged account cached on the RODC.
• Update the Password Replication Policy to prevent privileged accounts from being revealed to the RODC.
References:
https://learn.microsoft.com/en-us/windows/win32/adschema/a-msds-revealedusers
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigations:
• Regularly audit and ensure protection is enabled for critical OUs and containers.
Potential Mitigations:
• Enable the "Protect object from accidental deletion" option for OUs through the Active Directory Users and Computers console:
- Open the Properties of the OU or container.
- Under the Object tab, check Protect object from accidental deletion.
- Apply changes.
• Use PowerShell to list and protect unprotected OUs:
Get-ADOrganizationalUnit -filter {name -like "*"} -Properties ProtectedFromAccidentalDeletion | format-table Name,ProtectedFromAccidentalDeletion
• Use PowerShell to protect all organizational units from accidental deletion:
Get-ADOrganizationalUnit -filter {name -like "*"} -Properties ProtectedFromAccidentalDeletion | where-object {$_.ProtectedFromAccidentalDeletion -eq $false} | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $true
References:
https://dirteam.com/sander/2011/07/13/preventing-ous-and-containers-from-accidental-deletion/
Technique: Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigations:
• Implement group policy to restrict network session enumeration.
• Use tools like NetCease to automate this process.
References:
https://github.com/p0w3rsh3ll/NetCease
https://blog.netwrix.com/2022/11/18/making-internal-reconnaissance-harder-using-netcease-and-samri1o/
https://adsecurity.org/?p=3299
Technique: Account Discovery
Sub-Technique: Local Account
Technique ID: T1087.001
Remediation:
• Copy the login script to a share located inside the domain
Technique: Technique: Exploitation of Remote Services
Technique ID: T1210
LDAPS is automatically exposed once a certificate is available and the NTDS services are restarted.
Remediation:
• Apply necessary Windows updates and registry changes to enforce TLS 1.2+ usage. The DSInternals blog below shows how this can be completed via GPO
References:
https://support.microsoft.com/en-us/topic/kb5017811-manage-transport-layer-security-tls-1-0-and-1-1-after-default-behavior-change-on-september-20-2022-e95b1b47-9c7c-4d64-9baf-610604a64c3e
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://www.dsinternals.com/en/active-directory-domain-controller-tls-ldaps/
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Remediation:
• Apply Windows updates and registry settings to fully disable SSLv2 and SSLv3.
• Follow Microsoft's guidance on disabling weak SSL protocols in the SChannel component.
References:
https://social.technet.microsoft.com/wiki/contents/articles/2249.windows-server-20082008r2-how-to-disable-sslv2-on-domain-controller-dsforum2wiki.aspx
https://support.microsoft.com/en-us/help/187498/how-to-disable-pct-1-0-ssl-2-0-ssl-3-0-or-tls-1-0-in-internet-informat
https://adsecurity.org/?p=376
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Disabling TGT Delegation can be completed using the Netdom utility.
netdom.exe trust fabrikam.com /domain:contoso.com /EnableTGTDelegation:No
Mitigations:
• Disable TGT delegation on forest trusts except during migrations.
Remediation:
• Review and apply Microsoft's updates on TGT delegation.
• Identify and reconfigure services that rely on unconstrained delegation; resource-based delegation will not be affected.
References:
http://www.harmj0y.net/blog/redteaming/not-a-security-boundary-breaking-forest-trusts/
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/changes-to-ticket-granting-ticket-tgt-delegation-across-trusts/ba-p/440261
https://support.microsoft.com/en-us/help/4490425/updates-to-tgt-delegation-across-incoming-trusts-in-windows-server
Technique: Forced Authentication
Technique ID: T1187
Remediation:
• Migrate deployment files to a trusted location in the domain
Technique: Exploitation of Remote Services
Technique ID: T1210
Mitigation:
• Enable Extended Protection for Authentication (EPA) on ADCS servers.
• Restrict authentication methods to Kerberos only to prevent NTLM relay attacks.
Remediation:
• Open the IIS console on the enrollment server.
• In the Authentication settings, go to Advanced Settings for Windows Authentication.
• Set Extended Protection to Required for both WebEnrollment and CES services.
References:
https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429
https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf
https://dirkjanm.io/ntlm-relaying-to-ad-certificate-services/
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Adversary-in-the-Middle
Technique ID: T1557
Potential Mitigation:
• Disable Zone Transfers entirely unless required.
• Restrict Zone Transfers to authorized servers only.
• Regularly audit DNS server configurations to prevent unintended settings.
Remediation:
• Use the DNS console to access the "Forward Lookup Zones" and disable "Allow zone transfers" to "Any server".
• Alternatively, run the command:
dnscmd /zoneresetsecondaries <zone> /noxfr
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/f97756c9-3783-428b-9451-b376f877319a
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
Technique: Remote System Discovery
Technique ID: T1018
Mitigation:
• Enable only secure dynamic updates for DNS records.
• Regularly audit DNS zones for insecure update settings.
Remediation:
• Go to the DNS console, navigate to the "Forward Lookup Zones", and ensure the "Dynamic updates" setting is changed from "Nonsecure and secure" to "Secure only" in the "General" tab.
• Alternatively, use the command:
dnscmd <servername> /Config <zone> /AllowUpdate 2
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/f97756c9-3783-428b-9451-b376f877319a
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
Technique: Adversary-in-the-Middle
Technique ID: T1557
Mitigations:
• Avoid modifying default OUs unless necessary.
• Regularly audit changes to the wellKnownObjects attribute.
• Ensure programs dependent on default OUs are updated to handle any changes.
Remediation:
• Use the redircmp tool to revert the default OU settings to their original values.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/5a00c890-6be5-4575-93c4-8bf8be0ca8d8
https://rickardnobel.se/verify-redirected-computers-container-in-active-directory/
Technique: User Account Management
Technique ID: M1018
Potential Mitigations:
• Limit write permissions on certificate templates to trusted administrators.
• Regularly audit permissions on certificate templates.
Remediation:
• Review and adjust security permissions on certificate templates, removing write access from groups like Domain Users, Domain Computers, Everyone, and Authenticated Users.
• Ensure the ms-DS-MachineAccountQuota value is appropriately configured to limit unintended account creation.
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
Potential Mitigation:
• Enforce HTTPS-only communication on IIS for ADCS-related services.
Remediation:
• Open IIS on the enrollment server and remove HTTP bindings from WebEnrollment (certsrv) or CES (CES_Kerberos).
• Ensure only HTTPS is allowed by keeping the HTTPS binding intact while removing the HTTP binding.
• Refer to KB5005413 for detailed steps to mitigate NTLM relay attacks in ADCS.
References:
https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429
https://dirkjanm.io/ntlm-relaying-to-ad-certificate-services/
https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf
Technique: Adversary-in-the-Middle
Technique ID: T1557
The patch for this introduced a new OID, szOID_NTDS_CA_SECURITY_EXT (1.3.6.1.4.1.311.25.2), that embeds the requesting user’s security identifier and is enabled by default. To disable this functionality a new flag was introduced to the msPKI-Enrollment-Flag attribute for certificate templates called CT_FLAG_NO_SECURITY_EXTENSION.
Potential Mitigations:
• Edit the certificate template object and adjust the msPKI-Enrollment-Flag attribute so the CT_FLAG_NO_SECURITY_EXTENSION is no longer set. This can be completed by subtracting 524288 (0x80000) from the current value
References:
https://research.ifcr.dk/certifried-active-directory-domain-privilege-escalation-cve-2022-26923-9e098fe298f4
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-26931
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
• Manager approval disabled
• No issuance requirements
• Low Privilege Users can enroll
• Enrollee supplies their own subject.
Mitigation:
• Limit certificate template usage to specific, trusted groups of users to minimize the attack surface.
Potential Mitigation:
• Review certificate templates to ensure the "Supply in the request" option is disabled where not required.
• If the “Supply in the request” option is required, then ensure CA Manager approval is enabled so all certificates are reviewed before being issued.
References:
https://posts.specterops.io/certified-pre-owned-d95910965cd2
https://www.riskinsight-wavestone.com/en/2021/06/microsoft-adcs-abusing-pki-in-active-directory-environment/
Technique: Steal or Forge Kerberos Tickets
Technique ID: T1558
• For a Read/Write Domain Controller (RW DC): SERVER_TRUST_ACCOUNT (0x00002000) | TRUSTED_FOR_DELEGATION (0x00080000) = 0x00082000
• For a Read-Only Domain Controller (RODC): PARTIAL_SECRETS_ACCOUNT (0x04000000) | TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (0x01000000) | WORKSTATION_TRUST_ACCOUNT (0x00001000) = 0x05001000
This rule can indicate manual or software misconfiguration or even signs of a compromise.
Potential Mitigations:
• For InvalidUserAccount: Verify that the userAccountControl value for RW DCs is 0x00082000 and for RODCs is 0x05001000. Correct any discrepancies found.
• For NoConfiguration: If the domain controller is not registered in the configuration partition, demote it immediately, as it should not be active.
• For NoNTDS: If the NTDS settings are missing, likely replication issues are present. Demote the domain controller to prevent further problems.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/9164e4e8-f892-4ca2-8067-059f6f9387a4
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/8ebf2419-1169-4413-88e2-12a5ad499cf5
Technique: Rougue Domain Controller
Technique ID: T1207
Mitigation:
• Ensure AES support is enabled in the trust configuration to prevent fallback to RC4 or NTLM.
Remediation:
• Enable both RC4 and AES encryption for a smoother transition by running the command:
ksetup /setenctypeattr mytrust.com RC4-HMAC-MD5 AES128-CTS-HMAC-SHA1-96 AES256-CTS-HMAC-SHA1-96
• Verify the msDS-SupportedEncryptionTypes attribute on the trust is configured to support both RC4 and AES.
References:
https://techcommunity.microsoft.com/t5/itops-talk-blog/tough-questions-answered-can-i-disable-rc4-etype-for-kerberos-on/ba-p/382718
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/6cfc7b50-11ed-4b4d-846d-6f08f0812919
https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/decrypting-the-selection-of-supported-kerberos-encryption-types/ba-p/1628797
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Audit which accounts and groups are allowed to be cached by the RODC.
• Regularly review and update the msDS-RevealOnDemandGroup attribute.
Potential Mitigation:
• Edit the msDS-RevealOnDemandGroup attribute to remove privileged users or groups.
References:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/8dfc81be-7461-48f2-8caf-07402bccb0ea
Technique: Active Directory Configuration
Technique ID: M1015
Potential Mitigation:
• Regularly review domain audit groups to ensure no unnecessary groups like DOMAIN-$$$ exist.
• Use LDAP queries (e.g., sAMAccountName=*$$$) to detect and monitor these groups.
Potential Mitigation:
• Remove the DOMAIN-$$$ auditing group after completing the migration.
• Ensure only authorized accounts have access to create or modify the SID History attribute.
• Monitor for unauthorized SID History modifications using security tools.
References:
https://cyber.gouv.fr/sites/default/files/IMG/pdf/NP-ActiveDirectory-NoteTech.pdf#paragraph.3.3.1.5
Technique: Privileged Account Management
Technique ID: M1026
Mitigations:
• Avoid disabling SID Filtering on forest trusts unless absolutely necessary.
Remediation:
• For domain trusts, use the command netdom trust <TrustingDomain> /domain:<TrustedDomain> /quarantine:yes to enable SID Filtering.
- Do not apply the /quarantine flag to forest trusts, as this will disrupt trust transitivity.
• For forest trusts, verify the SID Filtering status using PowerShell and disable SID History with netdom trust <TrustingForest> /forest:<TrustedForest> /enablesidhistory:no.
References:
https://msdn.microsoft.com/en-us/library/cc237940.aspx
https://activedirectoryfaq.com/2015/10/active-directory-sid-filtering/
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1134.005
Unless the remote party in the trust is an NT4 domain, this type of trust should not be used and should be recreated with a more modern trust type.
Mitigation:
• Avoid creating new Downlevel trusts unless absolutely necessary for NT4 domain compatibility.
Remediation:
• If a Downlevel trust is found and the remote party is not an NT4 domain, delete and recreate the trust using a more secure, modern trust type.
References:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/36565693-b5e4-4f37-b0a8-c1b12138e18e
Technique: Privileged Account Management
Technique ID: M1026
Remediation:
• Revoke and reissue any certificates generated with the vulnerable library if they are still valid.
• Revoke and replace any dependent certificates if they rely on compromised keys.
• Remove expired certificates affected by the ROCA vulnerability from systems and stores.
References:
https://crocs.fi.muni.cz/public/papers/rsa_ccs17
https://github.com/crocs-muni/roca
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV190026
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV170012
https://keychest.net/roca
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Potential Mitigation:
• Plan and perform Active Directory backups according to Microsoft standards, using tools like wbadmin (e.g., wbadmin start systemstatebackup -backuptarget:d:).
• Follow specific backup schedules based on the system's Risk Management Framework (RMF) categorization:
- Moderate/High Availability: Back up Active Directory data daily.
- Low Availability: Back up Active Directory data weekly.
References:
https://technet.microsoft.com/en-us/library/jj130668(v=ws.10).aspx
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigations:
• Avoid using SHA-1 for cryptographic purposes.
Remediation:
• Remove SHA-1-based certificates from the Group Policy Object (GPO).
• Reissue any certificates that rely on SHA-1, using a more secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-0 for any cryptographic applications.
Remediation:
• Remove any certificates that use SHA-0 from the Group Policy Object (GPO).
• Reissue certificates that rely on SHA-0 with a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD5 for any cryptographic purposes.
Remediation:
• Remove certificates that use MD5 from the Group Policy Object (GPO).
• Reissue any certificates that depend on MD5 using a secure hashing algorithm.
References:
https://www.kb.cert.org/vuls/id/836068
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD4 for cryptographic applications.
Remediation:
• Remove any certificates that rely on MD4 from the Group Policy Object (GPO).
• Reissue certificates dependent on MD4 using a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6150
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD2 for any cryptographic operations.
Remediation:
• Remove certificates that use MD2 from the Group Policy Object (GPO).
• Reissue any certificates dependent on MD2 using a more secure hashing algorithm.
References:
https://www.ssi.gouv.fr/archive/fr/sciences/fichiers/lcr/mu04c.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-1 for cryptographic purposes.
Remediation:
• Remove SHA-1-based certificates from the Group Policy Object (GPO).
• Reissue any certificates that rely on SHA-1, using a more secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using SHA-0 for any cryptographic applications.
Remediation:
• Remove any certificates that use SHA-0 from the Group Policy Object (GPO).
• Reissue certificates that rely on SHA-0 with a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6194
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD5 for any cryptographic purposes.
Remediation:
• Remove certificates that use MD5 from the Group Policy Object (GPO).
• Reissue any certificates that depend on MD5 using a secure hashing algorithm.
References:
https://www.kb.cert.org/vuls/id/836068
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD4 for cryptographic applications.
Remediation:
• Remove any certificates that rely on MD4 from the Group Policy Object (GPO).
• Reissue certificates dependent on MD4 using a secure hashing algorithm.
References:
https://tools.ietf.org/html/rfc6150
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using MD2 for any cryptographic operations.
Remediation:
• Remove certificates that use MD2 from the Group Policy Object (GPO).
• Reissue any certificates dependent on MD2 using a more secure hashing algorithm.
References:
https://www.ssi.gouv.fr/archive/fr/sciences/fichiers/lcr/mu04c.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
If the whenChanged attribute remains unchanged, it suggests a potential problem with the remote domain, such as network connectivity issues or the domain no longer existing. If the remote domain is inaccessible or has been decommissioned, the trust should be removed. Failure to address this could allow the stale secret to be exploited to issue fake Kerberos tickets, potentially creating a backdoor into the system.
Potential Mitigations:
• Confirm whether the remote domain still exists.
• If the remote domain no longer exists, remove the trust.
• If the domain exists, force a password change to refresh the shared secret.
References:
https://msdn.microsoft.com/fr-fr/library/ms680921(v=vs.85).aspx
Technique: Adversary-in-the-Middle
Technique ID: T1557
Due to the deprecation of DSA for digital signature generation, it is crucial to phase out its use in systems. Continuing to use DSA after its deprecation could pose security risks and result in non-compliance with updated standards.
Potential Mitigations:
• Avoid using DSA for any new digital signature generation.
Potential Mitigations:
• Remove certificates utilizing DSA from the Group Policy Object (GPO).
• Reissue certificates that depend on DSA using a more secure and approved algorithm.
References:
https://csrc.nist.gov/publications/detail/fips/186/5/draft
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigations:
• Locate and remove the weak certificate from the GPO.
Remediation:
• Reissue certificates: If other certificates rely on the weak one, reissue them using a key size of 2048 bits or greater (consider 3072 bits for future-proofing).
References:
https://media.defense.gov/2022/Sep/07/2003-071834/-1/-1/0/CSA-CNSA-2.0-ALGORITHMS.PDF
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Potential Mitigation:
• Avoid generating certificates with a weak RSA exponent
Remediation:
• If other certificates rely on the weak ones, reissue them using the standard exponent of 65537.
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Avoid using RSA with certificates that have extremely long lifetimes
• Avoid using RSA with less than 2048 bits
Remediation:
• Reissue certificates: If other certificates rely on the weak ones, reissue them using a key size of 2048 bits or greater (consider 3072 bits for future-proofing).
References:
https://media.defense.gov/2022/Sep/07/2003-071834/1/1/0/CSA-CNSA-2.0-ALGORITHMS.PDF
https://cyber.gouv.fr/sites/default/files/2022-10/RGS-v-2-0-B1.pdf
Technique: Weaken Encryption
Sub-Technique: Reduce Key Space
Technique ID: T1600.001
Mitigation:
• Implement and enforce strict policies for creating and managing trust relationships between domains. Avoid adding FSPs from untrusted domains to privileged groups unless absolutely necessary and after thorough vetting.
• Conduct regular audits of privileged groups to ensure all members are necessary. Monitor FSP activities closely for any unusual or suspicious behavior.
• Apply the principle of least privilege to ensure that FSPs have only the minimum access required for their roles. Avoid granting excessive privileges that could be exploited.
Technique: Valid Accounts, Hide Artifacts, Create Account, Valid Accounts, Domain Policy Modification
Sub-Technique: T1078.003 - Local Accounts, T1078.001 - Domain Accounts, T1564.002 - Hidden Users, T1136.002 - Domain Account, T1484.001 - Group Policy Modification
Technique ID: T1078, T1564, T1136, T1078, T1484
Mitigation:
• Implement security monitoring tools that can detect and alert on DCShadow attacks.
• Analyze replication traffic for unusual or unexpected changes originating from unknown sources.
• Monitor for suspicious domain controller registrations or unrecognized DCs in the environment.
• Ensure that only authorized domain controllers are allowed to replicate changes in the AD environment.
• Implement strict access controls and least privilege principles for AD administration accounts.
• Keep systems up to date with the latest security patches.
• Regularly monitor and audit AD objects and their changes for any suspicious activities.
Technique: Remote System Discovery, Account Discovery,
Remote Services, Valid Accounts, Exploitation for Privilege Escalation, OS Credential Dumping
Sub-Technique: T1087.002 Domain Account, T1078.001 Domain Accounts, T1003.001 LSASS Memory, T1003.002 Security Account Manager (SAM), T1003.003 NTDS.dit.
Technique ID: T1018, T1087, T1021, T1078, T1068, T1003
Remediation:
• Regularly audit your domain to determine whether Anonymous Bind is enabled
• Disable Anonymous Bind in every domain unless it is required
3. If Anonymous Bind cannot be disabled, ensure AD settings are adjusted to restrict the types of information that can be accessed anonymously to only information that is necessary for legitimate purposes.
Technique: Brute Force: Password Spraying
Technique ID: T1110.003
Remediation:
• Regularly audit your domain to find where AllowAnonNSPI is enabled
2.Ensure AllowAnonNSPI is disabled (replace the 8th character of the DsHeuristics attribute with a value of 0).
Technique: Account Discovery
Technique ID: T1087
Remediation:
• Regularly audit your environment to determine whether PowerShell logging is enabled on any machines
2. Ensure PowerShell logging is enabled via a group policy (even if these security settings may be part of the workstation or server images).
Technique: Credential Dumping, Malicious Script Execution
Technique ID: T1003, T1059
Remediation:
• Ensure all computers are upgraded to supported Windows OS versions
• Ensure all computers are upgraded regularly to apply security updates, patches, and fixes that are issued by Microsoft.
Technique: Elevation of Privilege, Subvert Trust Controls
Technique ID: T1068, T1553
Remediation:
• Ensure all DCs are monitored and login activity is audited and reviewed regularly
• Implement strict policies for disabling inactive DCs
Technique: Valid Accounts
Technique ID: T1078.003
If SID History is enabled on the outbound forest trust, it means that when a user from Forest A accesses resources in Forest B, their previous SIDs (from Forest A) are also considered for authorization. An attacker who compromises a user account in Forest A can potentially gain unauthorized access to resources in Forest B that the user had access to before the migration, exploiting the SID History information. By carefully managing forest trusts and SID History, you can minimize the potential for unauthorized access across forests in your Active Directory environment.
Mitigation:
• Evaluate the necessity of the outbound forest trust and remove it if not required.
• If the trust is necessary, disable SID History on the trust unless it's absolutely needed for resource access.
• Regularly monitor and audit access attempts using SID History across the trusted forests.
Technique: Remote Services, Use Alternate Authentication Material
Sub-Technique: T1021.001 Remote Desktop Protocol (RDP), T1021.002 SMB/Windows Admin Shares, T1021.003 Distributed Component Object Model (DCOM), T1021.004 SSH, T1021.005 VNC, T1550.001 Application Access Token, T1550.002 Pass the Hash, T1550.003 Pass the Ticket, T1550.004 Web Session Cookie.
Technique ID: T1021, T1550
Mitigation:
• Audit all domain trusts and remove the "TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION" attribute where not absolutely needed.
• Enforce the principle of least privilege and limit domain admin accounts.
• Monitor for suspicious trust creation and modification activities.
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.002 - Pass the Ticket
Technique ID: T1550
Remediation:
• Disable the Print Spooler service, unless needed, on all Domain Controllers
• Perform regular audits of Active Directory to uncover any unusual activity related to this service
• Monitor for unauthorized access attempts or changes to the configuration of this service and set up alerts for attempts to exploit known vulnerabilities
Technique: Exploitation for Privilege Escalation, Exploitation for Client Execution
Technique ID: T1203, T1068
Remediation:
• Ensure the ownership of Domain Controllers matches the "Domain Administrators" or "Enterprise Administrators" group
Technique: Account Manipulation
Technique ID: T1098
Remediation:
• Ensure that Domain Controller passwords are changed at least every 30-60 days, in line with your organization's security policy.
• Configure Group Policy to enforce regular password changes for Domain Controllers
• Set up monitoring and alerting systems to identify Domain Controllers with passwords older than the defined threshold.
• Regularly audit and remove inactive or stale Domain Controller accounts from Active Directory to minimize the attack surface.
Technique: Valid Accounts: Local Accounts, Steal or Forge Kerberos Tickets, Brute Force
Technique ID: T1078.003, T1558, T1110
Remeditation:
• Upgrade domains to the highest functional level the domain controllers support (ideally Windows Server 2016 or later)
• Ensure all domain controllers are running the appropriate Windows Server version
• Upgrade or decommission any obsolete domain controllers
Technique: Valid Accounts, Exploitation for Privilege Escalation, Exploitation of Remote Services
Technique ID: T1078.003, T1068, T1212
To mitigate this finding
• Ensure strict access control on the krbtgt account. Only trusted administrators should have write access to this account.
• Regularly monitor and audit the permissions on sensitive accounts like krbtgt to detect any unauthorized changes.
• Ensure that sensitive accounts that should not be delegated are marked as such.
To learn more about how Resource Baseed Constrained Delegation can be abused, visit this blog post: https://blog.netwrix.com/2022/09/29/resource-based-constrained-delegation-abuse/f
Technique: Account Manipulation
Technique ID: T1098
Remediation:
• Regularly audit your Active Directory environment to determine whether RBCD is enabled on Domain Controllers
• Ensure RBCD is not enabled on domain controllers unless absolutely necessary
• Limit RBCD to only servers that absolutely require it.
• Monitor and alert on any changes to RBCD configurations, especially on Domain Controllers.
Technique: Resource-Based Constrained Delegation (RBCD)
Technique ID: T1550.004
Remediation:
• Regularly audit your domain to determine Non-Domain Controllers have Unconstrained Delegation in place
• Replace Unconstrained Delegation with Constrained Delegation (e.g: replace "trust this computer for delegation to any service" with "trust this computer for delegation to specified services only" on the Delegation tab of the account object).
• Ensure that servers with Constrained Delegation are monitored for signs of compromise.
Technique: Unconstrained Delegation
Technique ID: T1550.001
Remediation:
• Regularly audit your domain to determine if users have Unconstrained Delegation in place
• Replace Unconstrained Delegation with Constrained Delegation (e.g: replace "trust this computer for delegation to any service" with "trust this computer for delegation to specified services only" on the Delegation tab of the account object).
Technique: Unconstrained Delegation
Technique ID: T1550.001
Attack Process:
1. Compromise Initial Machine: The attacker gains control over a machine where RBCD is enabled.
2. Configure Delegation: The attacker modifies the resource's permissions to allow their controlled machine to impersonate users.
3. Impersonate a User: Using extensions like S4U2Self, the attacker requests a service ticket on behalf of another user.
4. Access Target Resources: The attacker uses this service ticket to access other resources or services as the impersonated user.
Mitigation:
• Limit write access to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on computer accounts to only trusted and necessary accounts.
• Regularly audit and monitor the permissions on the msDS-AllowedToActOnBehalfOfOtherIdentity attribute using tools like PowerShell or AD security scanners.
• Implement the principle of least privilege and ensure that no unnecessary accounts have write access to this attribute.
• Enable auditing of RBCD configuration changes and monitor for any suspicious modifications.
• Keep DCs and AD permissions tightly controlled and regularly updated to prevent potential misconfigurations or unauthorized access.
To learn more about abusing RBCD, read this blog post: https://blog.netwrix.com/2022/09/29/resource-based-constrained-delegation-abuse/
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1550
Remediation:
• Immediately disable RBCD on the krbtgt account.
• Rotate the krbtgt account password twice to invalidate any Kerberos tickets that may have been issued with the misconfigured delegation.
• Investigate the scope of the breach and identify any compromised servers or accounts.
• Implement strict controls and approval processes for enabling RBCD on any account, especially sensitive accounts like krbtgt.
• Regularly audit Active Directory for misconfigurations and adherence to security best practices.
Technique: Account Manipulation
Technique ID: T1098
Mitigation:
• Limit write access to the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on DC computer accounts to only trusted and necessary accounts.
• Regularly audit and monitor the permissions on the msDS-AllowedToActOnBehalfOfOtherIdentity attribute using tools like PowerShell or AD security scanners.
• Implement the principle of least privilege and ensure that no unnecessary accounts have write access to this attribute.
• Enable auditing of RBCD configuration changes and monitor for any suspicious modifications.
• Keep DCs and AD permissions tightly controlled and regularly updated to prevent potential misconfigurations or unauthorized access.
Technique: Account Manipulation
Technique ID: T1098
To mitigate this risk:
• Limit constrained delegation to only necessary services.
• Ensure servers with constrained delegation are well-protected and monitored for signs of compromise.
• Educate users about phishing tactics and the risks of clicking on suspicious links.
• Implement strong authentication methods (e.g., multi-factor authentication) to make impersonation harder.
• Regularly review and audit constrained delegation configurations to ensure they adhere to the principle of least privilege.
Read this blog post to learn more on attacking constrained delgation to elevate access https://blog.netwrix.com/2023/04/21/attacking-constrained-delegation-to-elevate-access/
Technique: Account Manipulation, Credential Dumping
Sub-Technique: T1078.003 Domain Account Permissions
Technique ID: T1098, T1003
If an attacker compromises a non-DC server that has the "Trusted for Delegation" setting enabled, the attacker can then impersonate any user accessing the compromised server and perform actions on their behalf, potentially gaining unauthorized access to other resources in the domain.
Mitigation:
• Regularly review and audit the "Trusted for Delegation" setting on all servers in the domain.
• Ensure that only DCs and necessary service accounts have this setting enabled.
• If a non-DC server is found with this setting enabled, investigate the reason and remove the setting if it's not required.
• Implement strong security measures, such as keeping systems updated, using strong passwords, and enabling multi-factor authentication, to prevent attackers from compromising servers in the first place.
Technique: Use Alternate Authentication Material
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1550
Mitigation:
• Limit the use of unconstrained delegation and only assign it to service accounts that absolutely require it.
• Implement "Kerberos Constrained Delegation" instead, which allows you to specify which services the account can delegate to, reducing the attack surface.
• Regularly monitor and audit service accounts with delegation privileges to detect any suspicious activities.
• Ensure service accounts have strong, unique passwords and are protected from compromise.
Technique: OS Credential Dumping
Sub-Technique: T1550.003 Pass-the-Ticket
Technique ID: T1003
Potential Mitigation:
• You should edit the msDS-AllowedToDelegateTo attribute of the accounts to remove the SPN of the domain controllers involved
Technique: Forced Authentication
Technique ID: T1187
Potential Mitigation:
• You should edit the msDS-AllowedToDelegateTo attribute of the accounts to remove the SPN of the domain controllers involved.
Technique: Forced Authentication
Technique ID: T1187
Potential Mitigation:
• Implement and enforce strong password policies across the organization, including minimum length, complexity, and regular password changes.
• Educate users on creating strong, unique passwords and the importance of password security.
• Enable multi-factor authentication (MFA) for all user accounts to provide an additional layer of security beyond passwords.
• Use a password filter to prevent users from setting weak, easily guessable, or previously compromised passwords.
• Regularly audit and monitor user accounts for suspicious login attempts or password changes.
• Consider implementing a password manager to help users generate and securely store strong, unique passwords for each account.
By enforcing strong password policies and educating users on password security best practices, organizations can significantly reduce the risk of attackers compromising user accounts through weak passwords.
Technique: Brute Force
Sub-Technique: Credential Stuffing
Technique ID: T1110.004
Potential Mitigations:
• Manually change the password to a new one. If this password is shared on many systems, each system should have a different password. If the GPO was used to define the native local administrator account, it is recommended to install a password solution manager such as LAPS.
Technique: Unsecured Credentials
Sub-Technique: Group Policy Preferences
Technique ID: T1552.006
Potential Mitigation:
• Ensure that the registry keys controlling password changes (DisablePasswordChange and MaximumPasswordAge) are configured correctly, with regular audits to verify compliance.
• Regularly monitor and audit computer accounts for password changes and flag accounts that exceed the 30-day threshold.
• Limit the number of computer accounts that can be created by default and apply strict monitoring to detect and address potential backdoor accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Remove the "Store password using reversible encryption" flag from all accounts to prevent storing plaintext passwords.
• Require a password change for any account that previously had reversible encryption enabled to ensure that plaintext passwords are removed from the directory.
• Run regular audits using PowerShell commands to identify any accounts that still have reversible encryption enabled and correct them promptly.
Technique: Credential Dumping
Sub-Technique: T1003.006 - OS Credential Dumping: DCSync
Technique ID: T1003
Potential Mitigation:
• Disable NTLMv1: Configure the LAN Manager Authentication Level to "Send NTLMv2 response only. Refuse LM & NTLM" to prevent the use of NTLMv1.
• Regularly audit network traffic and authentication logs to identify and address any instances of NTLMv1 usage.
• Ensure all systems and software in the environment are compatible with NTLMv2 or Kerberos, and update or replace systems that rely on NTLMv1.
Technique: Adversary-in-the-Middle, OS Credential Dumping, Remote Services
Technique ID: T1557, T1003, T1021
Potential Mitigation:
• Ensure the GPO setting "Domain controller: Refuse machine account password changes" is set to "Disabled" or not configured, allowing automatic password changes.
• Conduct regular audits to ensure that machine account passwords are being updated as expected.
• Implement monitoring for unusual authentication attempts or access patterns that could indicate exploitation of stale credentials.
Technique: Valid Accounts, Adversary-in-the-Middle
Technique ID: T1078, T1557
Potential Mitigation:
• Implement a Strong Password Policy: Enforce a Password Setting Object (PSO) or Group Policy Object (GPO) requiring service accounts to use passwords of at least 20 characters.
• Leverage a PAM solution like Netwrix Privilege Secure to significantly enhance the security of service accounts by automating and controlling access to these critical credentials, thereby reducing the risk of compromise and ensuring compliance with security best practices.
• Perform regular audits to ensure service accounts comply with the enforced password policies and are using strong, updated passwords.
Technique: Brute Forece, Valid Accounts
Technique ID: T110, T1078
Potential Mitigation:
• Ensure that SeTrustedCredManAccessPrivilege is not assigned to any user or group by editing the GPO under User Rights Assignment.
• Regularly audit user rights assignments to ensure no unnecessary privileges are granted, particularly those related to sensitive areas like Credential Manager.
• Implement monitoring to detect and alert on any unauthorized attempts to access or exploit Credential Manager.
Technique: Valid Accounts, Credentials from Password Stores
Technique ID: T1078, T1555
Potential Mitigation:
• Implement LAPS to automatically manage and randomize local administrator passwords, ensuring each password is unique and regularly updated.
• Conduct regular audits of local administrators and ensure proper password hygiene across these accounts
• Implement monitoring to detect and respond to any unauthorized use of local administrator accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Use the PowerShell script provided by Microsoft to immediately roll over the AZUREADSSOACC password. This script ensures that the account's Kerberos decryption key is updated and securely stored. https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sso-faq#how-can-i-roll-over-the-kerberos-decryption-key-of-the-azureadssoacc-computer-account
• Schedule regular executions of the password roll-over script to ensure that the AZUREADSSOACC password is periodically updated. This mitigates the risk of stale credentials being exploited.
• Implement advanced monitoring to detect abnormal behavior associated with the AZUREADSSOACC account, such as unexpected authentication attempts or Kerberos ticket requests. Utilize Azure AD Conditional Access policies to monitor and restrict high-risk sign-ins that originate from compromised tokens.
• Enhance Azure AD Conditional Access policies to add an additional layer of protection. Require multi-factor authentication (MFA) even for users authenticated via Kerberos or SAML, especially for privileged actions or access to sensitive resources.
Technique: OS Credential Dumping, Valid Accounts
Sub-Technique: T1003.006 - OS Credential Dumping: DCSync, T1078.003 - Valid Accounts: Cloud Accounts
Technique ID: T1003, T1078
Potential Mitigation:
• Implement a Group Policy Object (GPO) to disable LLMNR by enabling the "Turn off multicast name resolution" setting. This prevents LLMNR from being used in the environment, reducing the risk of MitM attacks.
• Regularly audit your environment to ensure that the GPO is correctly applied and that no other GPOs override this setting.
• Implement network monitoring solutions to detect any unauthorized LLMNR traffic, which could indicate potential exploitation attempts.
Technique: Valid Accounts, Adversary-in-the-Middle
Technique ID: T1078, T1557
Potential Mitigation:
• Ensure that the Group Policy setting "Network security: Do not store LAN Manager hash value on next password change" is enabled. This will prevent the storage of LM hashes when passwords are changed.
• Set the "Network security: LAN Manager authentication level" to "Send NTLMv2 response only. Refuse LM & NTLM," ensuring that only the more secure NTLMv2 protocol is used for authentication.
• Regularly audit your environment to ensure that LM hashes are not being stored and that legacy protocols like LM and NTLM are not in use.
• After enabling these settings, prompt users to change their passwords to ensure that any existing LM hashes are replaced with more secure NTLMv2 hashes.
Technique: OS Credential Dumping, Valid Accounts
Technique ID: T1003, T1078
Potential Mitigation:
• Remove the unixUserPassword and userPassword attributes from user accounts unless they are securely encrypted and necessary for legacy system support.
• Ensure that all passwords stored in AD attributes are protected with strong cryptographic protocols if their storage is unavoidable.
• Conduct regular audits of AD to identify and remove insecure attributes, ensuring that passwords are not exposed or stored insecurely.
• Transition to using secure password management solutions and enforce policies that prevent storing passwords in clear text or using weak encryption within AD attributes.
Technique: Unsecured Credentials
Sub-Technique: T1552.003 - Unsecured Credentials: Credentials in Files
Technique ID: T1552
Potential Mitigation:
• Ensure that the registry keys controlling password changes (DisablePasswordChange and MaximumPasswordAge) are configured correctly, with regular audits to verify compliance.
• Regularly monitor and audit computer accounts for password changes and flag accounts that exceed the 30-day threshold.
• Limit the number of computer accounts that can be created by default and apply strict monitoring to detect and address potential backdoor accounts.
Technique: Account Manipulation, Valid Accounts
Technique ID: T1098, T1078
Potential Mitigation:
• Regularly update the password for accounts with the "Smart Card required" flag to ensure the NT hash is refreshed.
• If using Windows Server 2016 or later, ensure the msDS-ExpirePasswordsOnSmartCardOnlyAccounts attribute is configured to handle periodic hash changes automatically.
• Verify that the GPO "Enable rolling of expiring NTLM secrets during sign-on" is not disabled, ensuring periodic password hash updates during sign-in for smart card users.
• As an alternative, disable and then re-enable the "Smart Card required" flag to force a password hash update, or use a script like Invoke-SmartcardHashRefresh to manually refresh the NT hash.
Technique: Valid Accounts, Use Alternate Authentication Material
Sub-Technique: T1550.003 - Pass-the-Hash
Technique ID: T1078, T1550
Remediation:
• Regularly audit your Active Directory environment to identify any accounts with "PASSWD_NOTREQUD" set to True in the UserAccountControl attribute
• Set this flag to False for all accounts that have it
Technique: Valid Accounts
Technique ID: T1078
Attackers can use the breached passwords to attempt login on multiple services and accounts, including the AD environment. Since users often reuse passwords, a breached password can be used to gain unauthorized access to the AD account. Knowing historical passwords can help attackers reduce the time and effort needed to crack current passwords, especially if the user has a pattern in creating passwords (e.g., incremental changes like "Password1" to "Password2"). Lastly, historical passwords can provide attackers with personal information or patterns that can be leveraged in phishing attacks or other social engineering tactics.
Mitigation:
• Implement and enforce strong password policies across the organization, including minimum length, complexity, and regular password changes.
• Educate users on creating strong, unique passwords and the importance of password security.
• Enable multi-factor authentication (MFA) for all user accounts to provide an additional layer of security beyond passwords.
• Use a password policy to prevent users from setting weak, easily guessable, or previously compromised passwords.
• Regularly audit and monitor user accounts for suspicious login attempts or password changes.
• Consider implementing a password manager to help users generate and securely store strong, unique passwords for each account.
Technique: Brute Force
Sub-Technique: T1110.002 - Password Cracking, T1110.004 - Credential Stuffing
Technique ID: T1110
Mitigation:
• Implement and enforce a strong password policy that requires unique passwords for each account.
• Educate users about the risks of password reuse and the importance of using unique, strong passwords.
• Enable multi-factor authentication (MFA) to add an extra layer of security, even if a password is compromised.
Technique: Brute Force, Valid Accounts
Sub-Technique: T1110.003 - Password Spraying, T1078.001 - Domain Accounts
Technique ID: T1110, T1078
If an account is removed from these privileged groups, the adminCount attribute may remain set to 1, but the account will no longer have the same safeguards. This makes the account vulnerable to attacks.
Remediation:
• Regularly audit accounts with adminCount=1 to ensure they are still members of the appropriate privileged groups.
• If an account is removed from a privileged group, manually reset the adminCount attribute to 0.
• Implement strict access controls and monitoring for all privileged accounts.
4. Use dedicated admin workstations and accounts for administrative tasks to minimize the risk of compromise.
Technique: Abuse Elevation Control Mechanism: Domain account
Technique ID: T1548.002
Remediation:
• Regularly audit admin accounts to ensure "Account is sensitive and cannot be delegated" is set
• Limit delegation to only services and computers that absolutely require it
• Use Least Privilege, only delegating minimal needed rights to admin accounts
• Monitor for and alert on suspicious admin account activity and usage
• Ensure administrator accounts are members of the built-in "Protected Users" group
Technique: Abuse Elevation Control Mechanism: Domain account
Technique ID: T1548.002
Remediation:
• Avoid using DES Encryption Only and switch to modern, secure encryption algorithms like AES (Advanced Encryption Standard) with at least 128-bit keys.
• Use encryption in combination with other security measures, such as message authentication codes (MAC) or digital signatures, to ensure data integrity and authenticity.
• Keep encryption libraries and software up to date to protect against newly discovered vulnerabilities.
Technique: Unsecured Credentials
Technique ID: T1552
Remediation:
• Ensure your systems are using the more secure NTLMv2 authentication instead of LM.
• Disable LM Hash storage entirely by editing the Windows Registry or using Group Policy.
• Enforce strong, complex passwords that are harder to crack even if the hashes are compromised.
4. Keep your systems updated with the latest security patches.
Technique: OS Credential Dumping: NTDS / Security account manager
Technique ID: T1003.003, T1003.002
Remediation:
• Identify accounts with reversible encryption enabled using AD tools or PowerShell scripts.
• Change the "Store password using reversible encryption" setting to "Disabled" for each affected user account.
• Force users to change their passwords at next logon to replace the decryptable password.
• Educate administrators not to enable reversible encryption unless absolutely necessary for specific applications.
• Regularly audit AD for any accounts with this setting enabled and remediate them promptly.
Technique: Unsecured Credentials: Credentils in Files
Technique ID: T1552.001
Remediation:
• Ensure that all domain controllers are updated with Microsoft's security patch MS14-025, released in May 2014, which prevents the storage of plaintext passwords in GPP files.
• Remove any existing GPP files containing plaintext passwords from the SYSVOL folder on all domain controllers.
• Change all passwords that were previously set using GPP to ensure they are no longer compromised.
• Educate administrators to avoid using GPP for distributing passwords and instead use more secure methods, such as Microsoft LAPS (Local Administrator Password Solution).
Technique: Brute Force: Password Cracking
Technique ID: T1110.002
Remediation:
• Regularly review accounts with non-expiring passwords and limit this feature to only necessary accounts.
• Enforce strong password policies for all users, including those with non-expiring passwords.
• Monitor for suspicious activity on accounts with non-expiring passwords and respond promptly to any potential breaches.
Technique: Valid Accounts: Local Accounts
Technique ID: T1078.003
Mitigation:
• Audit Active Directory to identify users with expired passwords to ensure either the password is updated or the account disabled/deleted.
• Ensure that expired passwords are no longer usable and that users are required to change them.
• Set up monitoring to detect and respond to any attempts to use expired passwords, which could indicate an attack.
Technique: Valid Accounts
Technique ID: T1078
Potential Mitigation
• Enforce a strong password policy that requires users to change their passwords regularly, such as every 90 days.
• Implement multi-factor authentication (MFA) to add an extra layer of security, making it harder for attackers to access accounts even if they have the password.
• Monitor for and block known compromised passwords
• Educate users about creating strong, unique passwords and the risks of password reuse.
Technique: Valid Accounts
Technique ID: T1078
Mitigation:
• Implement and enforce a strong password policy that requires unique, complex passwords for each account.
• Educate users about the risks of password reuse and the importance of using unique passwords for different accounts.
• Enable multi-factor authentication (MFA) for all user accounts, to add an extra layer of security beyond passwords.
• Use a password manager to help users generate and store unique, strong passwords for each account.
Technique: Brute Force, Valid Accounts
Sub-Technique: T1078.001 - Domain Accounts
Technique ID: T1110, T1078
Mitigation:
• Regularly monitor gMSA objects to ensure their passwords are being rotated as expected.
• Set up alerts to notify administrators if a gMSA password rotation fails.
• Investigate and resolve any issues causing password rotation failures promptly.
• Limiting gMSA access to specific resources and regularly auditing gMSA usage.
Technique: OS Credential Dumping
Technique ID: T1003
Remediation:
• Identify services that are using regular service accounts and migrate them to gMSA.
• Configure gMSA for each service, ensuring that it has the necessary permissions to function properly.
• Regularly review and audit service account usage to ensure gMSA is being utilized where appropriate.
• Implement strong password policies and regularly rotate passwords for any remaining service accounts that cannot be migrated to gMSA.
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Periodically audit all computers and devices to ensure that no default passwords are in use and that all passwords meet the organization's security standards.
• Remove or disable any unnecessary default accounts that come with the computer or device.
Technique: OS Credential Dumping
Technique ID: T1003
Remediation:
• Regularly audit the permissions on the "ms-Mcs-AdmPwd" attribute using tools like PowerShell or AD Security Explorer.
• Ensure that only authorized groups, such as "Domain Admins" or a dedicated LAPS admin group, have read access to this attribute.
• Implement change monitoring to detect and alert on unauthorized modifications to the attribute's ACL.
Technique: OS Credential Dumping: LAPS
Technique ID: T1003.006
Mitigation:
• Use secure, one-way hashing for storing passwords rather than reversible encryption.
• Identify and address instances where reversible encryption is used for passwords.
Technique: OS Credential Dumping
Technique ID: T1003
Pass-the-Ticket (PTT) Attacks: Attackers can capture Kerberos tickets and reuse them to impersonate users without needing their passwords. Older encryption types make it easier for attackers to decrypt and reuse these tickets. See our Attack Catalog for more information at https://www.netwrix.com/pass_the_ticket.html
Kerberoasting: This attack involves requesting service tickets for service accounts and attempting to crack their passwords offline. Service tickets encrypted with weaker encryption types are easier to crack, enabling attackers to gain access to service accounts and potentially escalate their privileges. See our Attack Catalog for more information at https://www.netwrix.com/cracking_kerberos_tgs_tickets_using_kerberoasting.html
Mitigation:
• Enforce a strong password policy that requires users to change their passwords regularly, such as every 90 days.
• Implement multi-factor authentication (MFA) to add an extra layer of security, making it harder for attackers to access accounts even if they have the password.
• Monitor for and block known compromised passwords.
• Educate users about creating strong, unique passwords and the risks of password reuse.
https://www.netwrix.com/pass_the_ticket.html
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Regularly audit Active Directory for accounts with empty passwords.
• Enforce a strong password policy that requires all user accounts to have a password meeting complexity requirements.
Technique: OS Credential Dumping
Technique ID: T1003
Mitigation:
• Remove computer accounts from admin groups unless absolutely necessary.
• Use separate admin workstations for administrative tasks.
• Implement strong password policies and regular password rotation for computer accounts.
• Monitor and audit computer account activities for suspicious behavior.
• Implement least privilege access controls for computer accounts.
Technique: Valid Accounts
Technique ID: T1078
Attack Process:
1. The attacker compromises a regular user account that owns an administrative group.
2. The attacker adds their controlled account or another compromised account to the group.
3. The attacker can now perform privileged actions, such as creating new accounts, accessing sensitive data, or disabling security controls.
Mitigations:
• Review and Audit Group Ownership: Regularly audit the ownership of all administrative groups to ensure that only highly privileged accounts (e.g., Domain Admins) are set as owners.
• Implement Strict Access Controls: Limit who can change the ownership of groups by restricting these permissions to a small number of trusted administrators.
• Monitor Changes: Enable logging and monitoring for any changes to group memberships or ownership, using tools like SIEM to detect and respond to suspicious activities.
• Use Least Privilege: Ensure that users only have the minimum necessary privileges, and avoid assigning excessive permissions to non-administrative users.
Technique: Valid Accounts
Technique ID: T1078
This level of access can be exploited by attackers to gather intelligence on the domain's structure, identify high-value targets like Domain Admins, and potentially escalate privileges. For instance, by having read access to attributes such as userAccountControl, an attacker can identify accounts that might have weak security configurations, like those with the "PasswordNotRequired" flag, making it easier to compromise those accounts.
Mitigation:
• It is recommended to remove Authenticated Users from the Pre-Windows 2000 Compatible Access group. This action significantly reduces the exposure of sensitive information. However, organizations should first test this change in a controlled environment to ensure it does not disrupt any legacy applications or systems that might still rely on these permissions.
• Conducting regular reviews of the members of this group and removing any that do not require these permissions is crucial for maintaining security.
• Whenever possible, upgrade or migrate systems that still require these backward-compatible settings to modern, supported versions of Windows, which do not require membership in this group.
Technique: Valid Accounts
Technique ID: T1078
Mitigation:
• Investigate the recent activity of the built-in domain Administrator account to determine if the usage was legitimate or suspicious.
• Suspicious activity should be immediately followed-up with reseting the password for the account and enable multi-factor authentication (MFA) to prevent unauthorized access.
• Limit the use of the built-in domain Administrator account and consider creating separate, dedicated administrator accounts for daily administrative tasks.
• Consider implementing a Privileged Access Management (PAM) solution to secure, monitor, and control privileged access to critical resources.
Technique: Valid Accounts
Sub-Technique: T1078.003 Local Accounts
Technique ID: T1078
Mitigation:
• Set a maximum password age policy for administrator accounts, forcing regular password changes.
• Require users to use complex passwords that meet minimum length and complexity requirements.
• Implement MFA for all administrator accounts to provide an additional layer of security beyond passwords.
Technique: Brute Force, OS Credential Dumping
Technique ID: T1110, T1003
Mitigation:
• Regularly review the membership of the DNS Admins group and ensure that only authorized and necessary accounts are included.
• Implement strict access controls and approval processes for modifying group memberships, especially for privileged groups like DNS Admins
Technique: Valid Accounts Exploitation for Privilege Escalation
Technique ID: T1078, T1068
Mitigation:
• Avoid deleting and recreating accounts with the same username whenever possible.
• If an account must be recreated, carefully review and update ACLs and group memberships to ensure the new account has appropriate permissions.
• Regularly audit and clean up historical SIDs to maintain a secure Active Directory environment.
Technique: Access Token Manipulation
Sub-Technique: T1134.005 SID-History Injection
Technique ID: 1134
Mitigation:
• Remove the Administrator SID from any regular user accounts that have it assigned.
• Review and correct any processes that may be improperly assigning the Administrator SID to regular accounts.
Technique: Indicator Removal on Host,
Valid Accounts, Exploitation for Privilege Escalation
Technique ID: T1070, T1078, T1068
Mitigation:
• Use RBAC to assign administrators only the permissions they need to perform their job duties, following the principle of least privilege.
• Conduct periodic reviews of administrator accounts to ensure that privileges are appropriate.
• Use a PAM solution to manage, monitor, and control administrator access to sensitive resources.
• Auditing and monitoring administrator activities.
Technique: Permission Groups Discovery,
Account Discovery, Valid Accounts
Sub-Technique: T1069.002 - Domain Groups
Technique ID: T1069, T1087, T1078
Mitigation:
• Regularly audit your privileged accounts to ensure they don't have unnecessary SPNs defined.
• Remove any SPNs from privileged accounts that don't specifically require them.
• Implement Managed Service Accounts (MSAs) or Group Managed Service Accounts (gMSAs) for services instead of using privileged user accounts.
For more information on this topic please visit: https://blog.netwrix.com/2022/08/31/extracting-service-account-passwords-with-kerberoasting/
Technique: Steal or Forge Kerberos Tickets
Sub-technique: T1558.003 Kerberoasting
Technique ID: T1558
Mitigation:
• Identify sensitive user accounts, such as administrators, service accounts, and high-value targets.
• Add these sensitive user accounts to the Protected Users group.
• Monitor and maintain the membership of the Protected Users group regularly, adding new sensitive accounts as needed and removing those that no longer require protection.
For more information on this topic please visit: https://blog.netwrix.com/2015/02/20/add-sensitive-user-accounts-to-active-directory-protected-users-group/">https://blog.netwrix.com/2015/02/20/add-sensitive-user-accounts-to-active-directory-protected-users-group/
Technique: Use Alternative Authentication method,
Modify Authentication Process
Sub-technique: T1550.002: Pass the Hash
Technique ID: T1550,
T1556
Mitigation:
Ensure that privileged accounts are only granted the minimum permissions necessary to perform their tasks. Regularly review and adjust permissions as needed.
• Implement PAM tools to manage, monitor, and control privileged access. These solutions can provide features like just-in-time access, session recording, and multi-factor authentication (MFA).
• Enforce complex passwords, regular password changes, and prevent password reuse. Consider using password vaulting solutions to securely store and manage privileged account passwords.
• Require MFA for all privileged account access to add an extra layer of security beyond passwords.
• Regularly monitor privileged account usage, and audit logs for suspicious activities. Set up alerts for abnormal behavior.
• Regularly review and remove unnecessary privileged accounts. Consider using temporary, time-limited accounts for specific tasks instead of permanent privileged accounts.
Technique: Valid Accounts
Sub-technique: T1078.003 Valid Accounts
T1078
Remediation:
1. Regularly review and audit AD admin accounts to identify stale or unused accounts.
2. Disable or delete stale admin accounts that are no longer needed.
3. Implement strong password policies and enforce regular password changes for admin accounts.
4. Enable multi-factor authentication (MFA) for all admin accounts to prevent unauthorized access.
5. Monitor admin account activities using security information and event management (SIEM) tools to detect suspicious behavior.
Valid Accounts: Local Accounts
Technique ID: T1078.003
Mitigation Steps:
• Regular Audits: Conduct regular audits of disabled accounts, ensuring that high-privilege group memberships are removed.
• Account Deletion: For accounts that are no longer needed, consider fully deleting them rather than just disabling them.
• Strict Monitoring: Implement stringent monitoring for any changes to disabled accounts, particularly any re-enablement actions.
• Privileged Access Management (PAM): Use PAM solutions to manage and monitor the use of privileged accounts and their group memberships.
Technique: Remote Services, System Services, Valid Accounts, Access Token Manipulation
Technique ID: T1021, T1569, T1078,T1134
Mitigation:
• Implement strict access controls and approval processes for creating privileged accounts.
• Regularly review and monitor privileged account creation activities using auditing and logging mechanisms.
• Use the principle of least privilege, granting privileged access only when necessary and revoking it when no longer needed.
• Implement multi-factor authentication (MFA) for all privileged accounts to prevent unauthorized access.
• Conduct regular security assessments and audits to identify and remove any unauthorized privileged accounts.
• Privileged Access Management (PAM): Use PAM solutions to protect and monitor the use of privileged accounts
Technique: Account Manipulation
Sub-Technique: T1098.003 Add User to Privileged Group
Technique ID: T1098
A privileged account without adminCount=1 is no longer governed by the SDProp process and could be left more insecure.
Potential Mitigation:
• Regularly audit accounts with adminCount=1 to ensure they are still members of the appropriate privileged groups.
• Regularly audit members of privileged groups to ensure they are set correctly with adminCount = 1
• Regular audit the AdminSDHolder container ACL which is propogated to all privileged accounts
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Contiunally monitor for and prevent adminstrative accounts from not requiring Kerberos pre-authentication
• Edit the property of the identified accounts by unchecking "Do not require Kerberos preauthentication
Technique: Steal or Forge Kerberos Tickets
Sub-Technique: AS-REP Roasting
Technique ID: T1558.004
Potential Mitigation:
• Ensure that administrators do not use their privileged account for browsing the internet or receiving emails.
• Implement a Tier Zero model. In this model, low privileged actions cannot be made by highly privileged accounts such as admins. This means that, in practice, administrators should have two separate Windows accounts: one for regular activities and one for performing privileged actions.
Technique: Privileged Account Management
Technique ID: M1026
Potential Mitigation:
• Review and remove the accounts or groups belonging to the "schema administrators" group.
Technique: Privileged Account Management
Technique ID: M1026