T1556: Modify Authentication Process

Adversaries may modify authentication mechanisms and processes to access user credentials or enable otherwise unwarranted access to accounts. The authentication process is handled by mechanisms, such as the Local Security Authentication Server (LSASS) process and the Security Accounts Manager (SAM) on Windows, pluggable authentication modules (PAM) on Unix-based systems, and authorization plugins on MacOS systems, responsible for gathering, storing, and validating credentials. By modifying an authentication process, an adversary may be able to authenticate to a service or system without using Valid Accounts.

Adversaries may maliciously modify a part of this process to either reveal credentials or bypass authentication mechanisms. Compromised credentials or access may be used to bypass access controls placed on various resources on systems within the network and may even be used for persistent access to remote systems and externally available services, such as VPNs, Outlook Web Access and remote desktop.

Positive Technologies products that cover the technique

MaxPatrol SIEM knowledge base

enterprise_1c_and_bitrix: PT-CR-1723: Enterprise_1C_Standard_Password_Set: Password authentication for a 1C system user was enabled mssql_database: PT-CR-412: MSSQL_Enable_Mixed_Authentication: An attempt to enable mixed authentication mode in a database zabbix: PT-CR-2046: Zabbix_Auth_Settings_Changed: Authentication parameters were changed in Zabbix. This could be an attacker's attempt to escalate privileges or jeopardize system security.

Subtechniques

Expert Required. The technique is detected only with the combination of «PT Product + Expert»

Detection

IDDS0015Data source and componentApplication Log: Application Log ContentDescription

Enable security auditing to collect logs from hybrid identity solutions. For example, monitor sign-ins to the Azure AD Application Proxy Connector, which are typically generated only when a new Pass Through Authentication (PTA) Agent is added. If AD FS is in use, review the logs for event ID 501, which specifies all EKU attributes on a claim, and raise alerts on any values that are not configured in your environment.

IDDS0009Data source and componentProcess: Process AccessDescription

Monitor for unexpected processes interacting with authentication mechanisms and processes to access user credentials or enable otherwise unwarranted access to accounts.

IDDS0028Data source and componentLogon Session: Logon Session CreationDescription

Monitor for newly constructed logon behavior across systems that share accounts, either user, admin, or service accounts. Examples: one account logged into multiple systems simultaneously; multiple accounts logged into the same machine simultaneously; accounts logged in at odd times (ex: when the user is not present) or outside of business hours. Activity may be from interactive login sessions or process ownership from accounts being used to execute binaries on a remote system as a particular account. Correlate other security systems with login information (e.g., a user has an active login session but has not entered the building or does not have VPN access). Configure robust, consistent account activity audit policies across the enterprise and with externally accessible services.

IDDS0026Data source and componentActive Directory: Active Directory Object ModificationDescription

Monitor for changes made to AD security settings related to MFA logon requirements, such as changes to Azure AD Conditional Access Policies or the registration of new MFA applications.

Monitor for changes made to security settings related to Azure AD Conditional Access Policies. These can be found in the Azure AD audit log under the operation name Update Conditional Access policy.

IDDS0009Data source and componentProcess: OS API ExecutionDescription

Monitor for calls to OpenProcess that can be used to manipulate lsass.exe running on a domain controller as well as for malicious modifications to functions exported from authentication-related system DLLs (such as cryptdll.dll and samsrv.dll).

Monitor for abnormal API calls to NPLogonNotify() that may highlight malicious network provider DLLs.

IDDS0024Data source and componentWindows Registry: Windows Registry Key CreationDescription

Monitor for the addition of network provider Registry keys (e.g., HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<NetworkProviderName>\NetworkProvider).

IDDS0011Data source and componentModule: Module LoadDescription

Monitor for new, unfamiliar DLL files written to a domain controller and/or local computer. Password filters will also show up as an autorun and loaded DLL in lsass.exe. If AD FS is in use, monitor the AD FS server for the creation of DLLs as well as the loading of unrecognized or unsigned DLLs into the Microsoft.IdentityServer.Servicehost application.

IDDS0025Data source and componentCloud Service: Cloud Service ModificationDescription

Monitor for changes made to conditional access policies used by SaaS identity providers and internal IaaS identity and access management systems.

IDDS0002Data source and componentUser Account: User Account AuthenticationDescription

Monitor for account authentications in which MFA credentials are not provided by the user account to the authenticating entity.

IDDS0022Data source and componentFile: File CreationDescription

Monitor for suspicious additions to the /Library/Security/SecurityAgentPlugins directory.

Monitor for newly created files that may be used to register malicious network provider dynamic link libraries (DLLs).

IDDS0002Data source and componentUser Account: User Account ModificationDescription

Monitor for the enrollment of devices and user accounts with alternative security settings that do not require MFA credentials for successful logon.

IDDS0022Data source and componentFile: File ModificationDescription

Monitor for suspicious modification of files associated with authentication processes, such as configuration files and module paths (e.g. /etc/pam.d/). Use system-integrity tools such as AIDE and monitoring tools such as auditd to monitor PAM files. Also monitor for access to certificates and cryptographic keys material.

IDDS0024Data source and componentWindows Registry: Windows Registry Key ModificationDescription

Monitor for changes to Registry entries for password filters (ex: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Notification Packages) and correlate then investigate the DLL files these files reference.

Monitor for changes to Registry entries for network providers (e.g., HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order) and correlate then investigate the DLL files these values reference.

Mitigation

IDM1018NameUser Account ManagementDescription

Ensure that proper policies are implemented to dictate the the secure enrollment and deactivation of authentication mechanisms, such as MFA, for user accounts.

IDM1022NameRestrict File and Directory PermissionsDescription

Restrict write access to the /Library/Security/SecurityAgentPlugins directory.

IDM1024NameRestrict Registry PermissionsDescription

Restrict Registry permissions to disallow the modification of sensitive Registry keys such as HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order.

IDM1025NamePrivileged Process IntegrityDescription

Enabled features, such as Protected Process Light (PPL), for LSA.

IDM1026NamePrivileged Account ManagementDescription

Audit domain and local accounts as well as their permission levels routinely to look for situations that could allow an adversary to gain wide access by obtaining credentials of a privileged account. These audits should also include if default accounts have been enabled, or if new local accounts are created that have not be authorized. Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers.

Limit access to the root account and prevent users from modifying protected components through proper privilege separation (ex SELinux, grsecurity, AppArmor, etc.) and limiting Privilege Escalation opportunities.

Limit on-premises accounts with access to the hybrid identity solution in place. For example, limit Azure AD Global Administrator accounts to only those required, and ensure that these are dedicated cloud-only accounts rather than hybrid ones.

IDM1027NamePassword PoliciesDescription

Ensure that AllowReversiblePasswordEncryption property is set to disabled unless there are application requirements.

IDM1028NameOperating System ConfigurationDescription

Ensure only valid password filters are registered. Filter DLLs must be present in Windows installation directory (C:\Windows\System32\ by default) of a domain controller and/or local computer with a corresponding entry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Notification Packages.

Starting in Windows 11 22H2, the EnableMPRNotifications policy can be disabled through Group Policy or through a configuration service provider to prevent Winlogon from sending credentials to network providers.

IDM1032NameMulti-factor AuthenticationDescription

Integrating multi-factor authentication (MFA) as part of organizational policy can greatly reduce the risk of an adversary gaining control of valid credentials that may be used for additional tactics such as initial access, lateral movement, and collecting information. MFA can also be used to restrict access to cloud resources and APIs.

IDM1047NameAuditDescription

Review authentication logs to ensure that mechanisms such as enforcement of MFA are functioning as intended.

Periodically review the hybrid identity solution in use for any discrepancies. For example, review all Pass Through Authentication (PTA) agents in the Azure Management Portal to identify any unwanted or unapproved ones. If ADFS is in use, review DLLs and executable files in the AD FS and Global Assembly Cache directories to ensure that they are signed by Microsoft. Note that in some cases binaries may be catalog-signed, which may cause the file to appear unsigned when viewing file properties.

Periodically review for new and unknown network provider DLLs within the Registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<NetworkProviderName>\NetworkProvider\ProviderPath). Ensure only valid network provider DLLs are registered. The name of these can be found in the Registry key at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order, and have corresponding service subkey pointing to a DLL at HKEY_LOCAL_MACHINE\SYSTEM\CurrentC ontrolSet\Services\<NetworkProviderName>\NetworkProvider.