Rogue administrator account
| Class | Persistence |
|---|---|
| Also known as | Backdoor account |
| MITRE ATT&CK | T1136 Create Account; T1098 Account Manipulation |
| Typical severity | Critical |
| Affects | Linux servers (/etc/passwd, /etc/group), the admin role table of a web app, and self-hosted tools with their own user lists |
After breaking in, an attacker who wants to come back later can give themselves a login of their own. A rogue administrator account is that login: an account with administrative rights that the attacker creates, or raises to admin, and then uses as any ordinary user would. It can be a new local, domain or cloud account,1 or an existing account the attacker adds to a privileged group.2 Both are forms of Persistence.
Description
An attacker who exploits a flaw, guesses a password or uses a leaked key holds access that ends when the flaw is patched or the key is rotated. An account of their own keeps working after both, and it is a second way in that needs no remote access tool running on the system.1 Attackers pick names that blend in. Accounts found in real intrusions were called help, DefaultAccount, SafeMode and monerodaemon, and LockBit 2.0 used names as short as a.13
Creating or changing accounts takes rights the attacker must already hold, so a rogue admin comes after the first break-in.2 In cloud tenants, an account limited to a few services draws less attention than a full administrator, and attackers create those too.1
Mechanism
On a Linux server
Each line of /etc/passwd describes one account in seven fields separated by colons: name:password:UID:GID:GECOS:directory:shell. The root account has user ID (UID) 0, and only root may write to the file.4 A second line with UID 0 under another name gives that name the superuser's user ID.
With root, the attacker has several routes. useradd creates a normal account.3 Salt Typhoon skipped the tool on network devices and edited /etc/passwd and /etc/shadow by hand.1 usermod puts an existing account in the sudo group, after which it can run commands with elevated rights through sudo.5 That membership is stored in /etc/group, one group per line, with the members listed at the end and separated by commas.6
Inside a web app
An app's own administrators are usually rows in a database. In the role model from the Supabase documentation, a table public.user_roles links a user ID from auth.users to a role such as admin, and a hook copies that role into the user's token at sign-in.7 Anyone who can insert a row into that table, through the service role key key, a database password or an admin panel, makes any account an admin. The guide revokes all rights on the table from the anon, authenticated and public roles.7
Impact
A rogue admin holds every right the role carries, for as long as nobody notices the account. Rotating passwords and keys does not touch it, and deleting it does not always end the intrusion: after the Confluence break-ins of 2023, CISA warned that attackers whose admin accounts were removed might still be inside through "additional persistence mechanisms".8
Notable incidents
On 4 October 2023 Atlassian disclosed CVE-2023-22515 in Confluence Data Center and Server, after customers reported attackers using it "to create unauthorized Confluence administrator accounts"; Atlassian later reported evidence that a known nation-state actor was exploiting it.9 An unauthenticated request to /server-info.action changed the server's configuration so that setup appeared unfinished, and the setup page /setup/setupadministrator.action then created a new administrator.8 Versions 8.0.0 to 8.5.1 were affected; Atlassian Cloud sites were not.89
The flaw was exploited before a patch existed. CISA added it to the Known Exploited Vulnerabilities catalog on 5 October, and its joint advisory of 16 October with the FBI and MS-ISAC reported data taken out with cURL and Rclone.8 Atlassian's list of signs of compromise began with unexpected members of the confluence-administrators group and unexpected new user accounts.9
Detection
On a Linux server, list every account with UID 0. The output should be root alone:
awk -F: '$3 == 0 {print $1}' /etc/passwdRead the members of the admin group and the full account list, and compare them with the people who should have access:
grep '^sudo:' /etc/group
cut -d: -f1,3,7 /etc/passwdOngoing monitoring on Linux watches for runs of useradd and adduser and for writes to /etc/passwd and /etc/shadow. Cloud accounts show up in CloudTrail or the provider's equivalent audit log.1
In a Supabase app built on the documented role table, the admins are the rows this query returns:
select user_id, role from public.user_roles where role = 'admin';Prevention
Keep the number of accounts that can create other accounts small, and require multi-factor authentication on user and privileged accounts.1 In an app, only a server-side role should be able to write the role table, as in the Supabase guide; see Principle of least privilege.7
An application should log each user it adds or deletes, each change to privileges and every action its administrators take.10 Who may read those logs should itself be limited and reviewed from time to time.10
Finding a rogue admin means the server or app was entered, and removing the account is one step of the response. For the Confluence case, CISA advised reviewing processes, logins and network connections, taking affected hosts offline, issuing new credentials and reimaging the hosts.8 The Responding to an unrecognised server login playbook covers the server side.
Prompt for a coding agent
Find every place in this project where a user can become an administrator: role columns, role tables, admin flags, user_metadata or app_metadata fields, seed scripts and admin panels. For each, list which code paths and database roles can write it. Make sure only server-side code with a checked admin session can grant or remove admin rights, that the anon and authenticated database roles cannot write the role table, and that every grant and removal is written to a log with who did it and when. List each file you changed and anything you were unsure about.
In SecFlash
On the Server page, SecFlash reports an account other than root with user ID 0 as SF-SRV-301. On the Detections page it reports a new account on the server as SF-DET-103, an account that newly has root's user ID as SF-DET-102, a changed user ID, login shell or password state as SF-DET-104, an account added to the sudo, wheel, admin or docker group as SF-DET-105, and a changed sudo rules file as SF-DET-106.
See also
- SSH authorized key persistence
- Scheduled task persistence
- Orphaned access tokens and OAuth grants
- Responding to an unrecognised server login
- Responding to an administrator account takeover
- Authorization
- Category: Persistence
References
- a b c d e f g MITRE (version 2.6, 4 November 2026). "Create Account, T1136". MITRE ATT&CK.
- a b MITRE (version 2.8, 12 May 2026). "Account Manipulation, T1098". MITRE ATT&CK.
- a b MITRE (version 1.5, 4 November 2026). "Create Account: Local Account, T1136.001". MITRE ATT&CK.
- back Linux man-pages project (n.d.). "passwd(5)". Linux manual page.
- back MITRE (n.d.). "Account Manipulation: Additional Local or Domain Groups, T1098.007". MITRE ATT&CK.
- back Linux man-pages project (n.d.). "group(5)". Linux manual page.
- a b c Supabase (n.d.). "Custom Claims & Role-based Access Control (RBAC)". Supabase Docs.
- a b c d e CISA, FBI and MS-ISAC (16 October 2023). "Threat Actors Exploit Atlassian Confluence CVE-2023-22515 for Initial Access to Networks" (AA23-289A). CISA.
- a b c Atlassian (4 October 2023, updated). "CVE-2023-22515: Broken Access Control Vulnerability in Confluence Data Center and Server". Atlassian Support.
- a b OWASP (n.d.). "Logging Cheat Sheet". OWASP Cheat Sheet Series.
External links
- Create Account, T1136, MITRE ATT&CK
- passwd(5), Linux manual page