Skip to content
Threat Feed
medium advisory

Potential Persistence via Mandatory User Profile Modification

Adversaries may abuse Windows mandatory profiles by dropping a malicious NTUSER.MAN file containing pre-populated persistence-related registry keys to establish persistence, which can evade traditional registry-based monitoring.

Attackers may leverage Windows mandatory profiles to achieve persistence by crafting or modifying an NTUSER.MAN file containing malicious registry entries. Windows loads registry settings directly from this file when a user logs in, causing embedded persistence mechanisms, such as Run keys or logon scripts, to activate. This technique allows adversaries to establish persistence without directly modifying the live registry, potentially evading detection by traditional registry-based monitoring tools. This technique may be used for stealthy persistence on systems where mandatory profiles are in use.

Attack Chain

  1. The adversary gains initial access to the system, possibly through exploiting a vulnerability or using stolen credentials.
  2. The attacker locates a user profile directory on the system, typically found under C:\\Users\\.
  3. The attacker creates or modifies an NTUSER.MAN file within the user’s profile directory. This file contains registry settings that will be loaded when the user logs in.
  4. The adversary embeds malicious registry keys within the NTUSER.MAN file, such as entries in the Run or RunOnce keys, or configurations for logon scripts.
  5. The user logs off and then logs back onto the system.
  6. Upon logon, Windows loads the registry settings from the NTUSER.MAN file.
  7. The malicious registry keys are executed, enabling the attacker to establish persistence or perform other malicious activities.
  8. The adversary maintains persistence on the system, enabling them to execute commands, install malware, or steal data.

Impact

Successful exploitation allows attackers to establish a persistent presence on the compromised system. This can lead to unauthorized access to sensitive data, further compromise of the network, and potential data exfiltration. The use of mandatory profiles for persistence can make detection more challenging as the malicious activity is triggered during user logon.

Recommendation

  • Deploy the Sigma rule “Potential Persistence via Mandatory User Profile Creation” to detect the creation of NTUSER.MAN files by non-SYSTEM processes (see below).
  • Deploy the Sigma rule “Potential Persistence via Mandatory User Profile Modification” to detect modification of NTUSER.MAN files by non-SYSTEM processes (see below).
  • Monitor file creation and modification events related to NTUSER.MAN in user profile directories to identify suspicious activity.
  • Review endpoint detection coverage to ensure offline registry hive and profile-based persistence techniques are monitored.
  • Investigate any file creation or modification of NTUSER.MAN files by reviewing process.name, process.executable, and parent process relationships.

Detection coverage 2

Potential Persistence via Mandatory User Profile Creation

medium

Detects the creation of NTUSER.MAN file by non-system processes which may indicate malicious persistence.

sigma tactics: persistence techniques: T1547.001 sources: file_event, windows

Potential Persistence via Mandatory User Profile Modification

medium

Detects the modification of NTUSER.MAN file by non-system processes which may indicate malicious persistence.

sigma tactics: persistence techniques: T1547.001 sources: file_event, windows

Detection queries are kept inside the platform. Get full rules →