Part of Datorkirurgen AB – IT experts across Sweden

Unauthorised administrators in WordPress are one of the clearest signs that someone has broken into the website. Business IT Support traces them in the database, finds what the attacker did and closes the hole, step by step.

The database reveals what the attacker did

In general, attackers rarely stop at one change. Typically, they create one or more administrator accounts, publish spam posts and plant code that keeps them inside. Many of these traces never show in the WordPress dashboard, because the attacker hides them on purpose.

The database, however, does not lie. With direct queries, we see every user, every role and every post, including those the dashboard does not list. Therefore, database forensics is the fastest way to understand the full extent of an intrusion.

Step 1: check the server load and alerts

First of all, we look at the server. A sudden rise in CPU load often means that the site sends spam, mines cryptocurrency or serves thousands of spam pages to search engines. For example, the command top shows which processes use the resources.

In addition, monitoring alerts, such as CloudWatch alarms on AWS, show when the problem started. As a result, we can compare the time with log entries and database changes, which helps us find the entry point.

The top command showing high server load during a search for unauthorised administrators
The command top showing the server load. A sudden rise in load is often the first technical sign of an intrusion.

Step 2: search for posts the attacker published

Next, we search the posts table for content published at odd hours, by unknown authors or with typical spam words. Moreover, we look for posts with the status private or draft that still receive traffic, because attackers use them to hide spam from the owner.

In addition, we export the suspicious posts before we delete them. Consequently, we keep evidence of what happened, which can matter for insurance, reporting or a later investigation.

Database query showing posts published by an attacker in WordPress
Database query showing posts published by the attacker. We document the posts before we remove them.

Step 3: review every administrator account

After that, we list all users with the administrator role directly in the database, together with their email address and registration date. For example, unauthorised administrators often have generic names, unusual email domains or a registration date that matches the attack.

However, attackers sometimes also change the role of an existing user through the capabilities field in the usermeta table. For that reason, we check the roles in the database rather than trusting the user list in the dashboard alone.

Database query showing unauthorised administrators in WordPress
Database query showing unauthorised administrators. The query also reveals accounts that the dashboard does not show.
WordPress user list with unauthorised administrators
The WordPress user list with unknown administrators. We compare the list with the database and remove every unknown account.

Step 4: clean up, prevent and follow up

Finally, we remove the unauthorised administrators, change every password and replace the security keys in wp-config.php, which signs out all sessions. In addition, we remove planted files, update WordPress, themes and plugins, and close the vulnerability the attacker used.

After the clean-up, we monitor the site closely for some weeks. For instance, we set alerts for new administrators, file changes and unusual load. As a result, a new attempt becomes visible at once.

CloudWatch alarm for CPU load used to monitor the site after the clean-up
CloudWatch alarm for CPU usage on an EC2 server. Alerts make a new intrusion attempt visible quickly.

Contact Datorkirurgen AB about unauthorised administrators

Business IT Support is part of Datorkirurgen AB, which has more than 30 years of experience in IT for businesses. We investigate hacked WordPress sites, remove unauthorised administrators and harden the site for companies remotely anywhere, and on site in Stockholm and across Sweden.

In addition, our prices start at €250 per hour excluding VAT, or as agreed, and we guarantee to solve the problem. WordPress gives advice in its WordPress hardening guide. Contact us as soon as you suspect an intrusion, because every hour counts.

Frequently asked questions about unauthorised administrators

Questions about unauthorised administrators

The investigation step by step

Prevention and support

Website developed by Datorkirurgen AB · Privacy policy