100% Free · Open Source GPLv2 · Zero setup requiredGet the Plugin

Opens in a new tab
ITX UserOps

Back to Blog

There is an administrator account nobody created

An account you do not recognise, with full privileges, created at 02:14. What it usually means, why your logs probably did not record how it happened, and the order to contain it in — which is not the obvious one.

Operations

You are looking at the Users screen and there is an administrator you do not recognise.

Maybe the name is plausible — wp-admin, support, backup_user, a first name that could belong to somebody at the agency. Maybe it is obviously wrong. Either way the immediate question is the same, and it is not "who is this".

It is: how did it get administrator, and what else has already happened?

Do not delete it yet

The instinct is to delete the account. It is the wrong first move, for the same reason you do not clean up a break-in before looking at it.

That account is the only physical evidence you have of how somebody got in. Its registration timestamp, the address it was created from, what it has touched since — all of that disappears with it, and you will want it in about twenty minutes when you are trying to work out whether there is a second one.

Revoke its access. Keep the record. Those are separable operations, and conflating them is why so many WordPress incidents end with "we deleted it and it came back".

The three ways an account becomes an administrator

There are exactly three routes, and which one was used tells you most of what you need to know.

1. Through the role API. WP_User::set_role() or add_role() — what happens when a human uses the admin interface, and what any well-behaved plugin does. This fires WordPress's own actions, so anything watching will see it.

2. At registration. An account created directly into a privileged role. On a site where registration is open and the default role is Subscriber, this should never happen.

3. By writing the capabilities directly. A raw update_user_meta( $id, 'wp_capabilities', … ) that grants privilege the account did not have.

That third one is the interesting case, and here is why:

Nothing in WordPress core promotes a user that way.

Core always goes through the role API. So a direct capabilities write that adds privilege, with no role-API call in the same request to explain it, is not a plugin doing something unusual. It is the classic post-exploitation backdoor — a compromised plugin or an injected payload granting itself administrator without firing any of the actions a monitoring tool would be listening for.

It is also, for exactly that reason, the thing most audit logs do not record. They hook set_user_role and user_register, because those are the documented events. The third route fires neither.

Why "watch for capability changes" is harder than it sounds

The naive version of this detection is unusable, and it is worth understanding why before you trust any tool that claims to do it.

WP_User::add_cap() and remove_cap() rewrite the entire capabilities map and fire no role action at all. So a membership plugin, an LMS, or a WooCommerce extension calling add_cap() on an administrator rewrites 'administrator' => true as part of that map — and a detector watching for capability writes sees an administrator capability being written and cries wolf.

We built exactly that bug. The fix is to diff every capabilities write against the map stored immediately before it, and count only newly granted keys. A rewrite that changes nothing is not a promotion.

The second trap is deciding what "privileged" means. Matching by capability rather than by role slug sounds more thorough and is worse: it sweeps in WooCommerce's shop_manager and warns you every time a shop hires somebody. The capability view is useful context when you are reading a real event; it is a terrible trigger.

A detection that fires on ordinary activity gets muted, and a muted detection is worse than no detection at all — because now you also believe you have one.

What to do, in order

If the account is real, contain it. The order matters more than the speed, and the obvious order is wrong.

The wrong order

End their sessions first, because that feels like slamming the door.

It is not. Destroying sessions first signs the attacker out while their application password or passkey still works. They notice immediately — being logged out is the most visible possible signal — re-authenticate on a channel that never touches the password, and re-establish before you have finished the rest.

You have alerted them and closed nothing.

The right order

  1. Revoke alternative credentials first. Application passwords, then passkeys. These are the routes that survive a password change, and they are the ones an attacker would use to come back.
  2. Force a password reset, so the credential they have stops working.
  3. Disable the account. This closes every authentication channel — the login form, XML-RPC, and application-password REST auth — and makes new application passwords unavailable for that user. From this point a still-live session cannot mint a replacement credential.
  4. Destroy sessions last, when there is no longer any way back in.

Step 4 is usually a no-op, because disabling already destroys sessions. It earns its place in the one case that matters: when the disable step is refused because the account is the last administrator, and a live session would otherwise survive the entire run.

A containment dry run for one account, summarised as "2 sessions · 1 application password · 1 passkey · two-factor enrolled", above six steps. Revoke application passwords, revoke passkeys, force a password reset, disable the account and end all sessions are each marked "Will run". Reset two-factor enrolment is switched off and marked "Not selected".
A dry run states what it will do before it does it — including the step it has deliberately left switched off. Resetting somebody's second factor cannot be undone, so it is the one thing here you have to choose on purpose.

One thing to know about the forced reset

Flagging a password for reset typically emails a reset link to the account's own address. If the account is disabled the mail never goes out, because the disable blocks authentication before the password gate is ever reached.

But if the disable was skipped or refused, that link is a way back in for whoever controls that mailbox — which, in this scenario, may well be the attacker. It is a real interaction between two steps that each look self-contained, and it is worth knowing before you press the button rather than after.

Then find out whether it is the only one

An unknown administrator is a symptom. Assume it is not the whole picture until you have checked:

  • Other accounts created or promoted around the same time. Sort by registration date and look at the neighbours. Backdoors come in pairs more often than they come alone.
  • Application passwords across every account, not just this one. This is the most commonly missed step, because they are invisible on the Users screen and survive password resets. An API credential minted on a legitimate administrator account is a quieter foothold than a fake user.
  • Plugin and theme activity. A role change at 02:14 followed by a plugin activation at 02:15 tells a story that two separate logs would not.
  • What actually changed. New posts, changed options, modified files.

The uncomfortable question

Once you have contained it, there is one more thing to establish, and most sites cannot: is what you are reading true?

An activity log stored as ordinary database rows can be edited by anyone with database access — and if the attacker reached your database, they reached your log. A clean log is not evidence of a clean site. It is evidence that either nothing happened, or that the thing that happened also had write access to the record of it.

Hash-chaining each entry to the one before it raises the cost of quietly rewriting history from "run an UPDATE" to "own the whole server". That is a large step and it is not the same as impossible — we have written about exactly where that guarantee stops, because a tamper-evidence claim that oversells itself is worse than none.

Afterwards

Rotate your salts and keys. Reset passwords for every administrator. Revoke every application password on the site and reissue the ones you can account for. Check what the account touched before you contained it.

And then ask the question that would have made this a five-minute event instead of an afternoon: would anything have told you? Not "was it in the log" — logs are read after you already know. Would something have reached you, at 02:14, when an account was promoted to administrator by a route that WordPress itself never uses?

If the honest answer is no, that is the thing to fix. Not this account.

—

*ITX UserOps records which of the three routes was used for every privilege escalation, and the direct-capabilities path is diffed against the previous map so ordinary plugin behaviour does not trigger it. Containment runs all five revocations as one audited action, in the order above, with a dry run. Privilege watch and containment are premium; the activity log and disabling are in the free plugin.*

A clearer WordPress admin
starts here.

Start with the free plugin. Add more control when you need it.

Log in

Vote on ideas, submit your own and join the discussion.