The North Korean-linked Andariel hacking group has been observed using an advanced attack technique known as RID Hijacking to stealthily create hidden administrator accounts on Windows systems. This attack method allows attackers to escalate privileges by manipulating the Relative Identifier (RID) of low-privilege accounts to match that of high-privilege accounts, such as administrators. The attackers modify the Security Account Manager (SAM) registry to grant administrative access to these low-privilege accounts without needing the administrator’s password, making the attack difficult to detect using conventional behavior-based security tools.
To carry out the RID Hijacking attack, Andariel uses privilege escalation tools like PsExec and JuicyPotato to gain SYSTEM-level access, which is required to modify the SAM registry. Once the attackers gain SYSTEM privileges, they create a hidden user account by appending a “$” symbol to the username, making it invisible in standard user listings but still accessible in the registry. They then add the newly created account to high-privilege groups, such as Remote Desktop Users and Administrators, enabling the account to operate with full administrative rights.
After making the necessary changes to the SAM registry, Andariel exports the modified settings and deletes the rogue account, leaving no traces in the system logs. This process allows the attackers to maintain persistence on the compromised system while avoiding detection by most security measures.
The group employs both custom malware, which modifies SAM registry access permissions.
Also, open-source tools like CreateHiddenAccount, which leverages regini.exe to adjust registry permissions, ensuring stealthy manipulation of the system without triggering alarms.
Organizations can defend against RID Hijacking attacks by restricting the use of privilege escalation tools, monitoring for unauthorized SAM registry modifications, and enforcing multi-factor authentication (MFA) for all accounts, including low-privilege ones. Additionally, regular audits of user accounts and RID configurations can help identify anomalies that could indicate an attack. As cybersecurity threats continue to grow more sophisticated, adopting proactive security measures and vigilant monitoring is essential to protect against advanced techniques like RID Hijacking.