Unauthorized Admin User Created via Disguised WordPress Plugin
Sucuri发现一起针对WordPress网站的恶意软件案例,攻击者通过安装名为"wp-compat"的假插件创建隐藏管理员账户并规避检测。该恶意软件可在每次页面加载时检查并创建特定用户,并阻止其被删除或编辑。此外,它还隐藏自身在插件列表中,并设置杀伤开关机制以避免被发现。此漏洞允许攻击者获得对网站的完全控制权,并长期保持隐蔽状态。 2025-7-30 00:7:44 Author: blog.sucuri.net(查看原文) 阅读量:14 收藏

Unauthorized Admin User Created via Disguised Wordpress Plugin

Recently at Sucuri, we investigated a malware case reported by one of our clients. Their WordPress site was compromised, and the attacker had installed a fake plugin. Upon analysis revealed that it was a sophisticated backdoor plugin designed to create a persistent and hidden administrator account.

What Did We Find?

The infection was located inside the WordPress plugins directory:

./wp-content/plugins/wp-compat/wp-compat.php

The plugin claimed to fix compatibility issues with newer WordPress and PHP versions. But in reality, it silently created an admin user and actively concealed it from the WordPress admin dashboard.

fake plugin details

Attack Vector & Indicators of Compromise

The attacker manually or programmatically uploaded the fake plugin into the plugins folder. Because it used a legitimate-looking name and metadata (WP Compatibility Patch), it could easily evade detection during a superficial plugin review.

Some key indicators of compromise (IoCs):

    • A fake plugin folder named: wp-compat
    • A suspicious administrator user: adminbackup
    • Email address: [email protected]
    • Option stored in database: _pre_user_id

Analysis of the Malware

Creating the Admin User

On every page load, it checks if a user named “adminbackup” exists. If the user doesn’t exist, the code creates them. If the user already exists but has a different email, the plugin resets the password and updates the email address.

Creating the Admin User

Hiding the User from Admin Views

To prevent detection, the malware uses multiple WordPress hooks to hide the malicious user. It filters out the malicious admin from user listings in the admin dashboard. Then it modifies the user role counts (e.g., number of admins) to make the hidden user less obvious.

Hiding the User from Admin Views

Blocking Edits and Deletion

To maintain persistence, the malware prevents the malicious account from being deleted or edited and kills any attempt to delete the user from the admin panel.

Blocking Edits and Deletion

Kill Switch Check via Cookie

To avoid being spotted in the plugins list, it hides itself so that even though the plugin is active, it doesn’t show up under the “Plugins” menu in wp-admin.

Lastly, the malware includes a conditional check that terminates page execution if a specific cookie is set. This likely serves as a kill switch or confirmation mechanism for the attacker.

Kill Switch Check via Cookie

Impact of the Malware

This malware allows attackers to create a backdoor administrator user with full control over the site and hide that user from other administrators in the dashboard.

It persists across user deletions or password resets and not just this, it also avoids visibility in the plugins list.

If undetected, the attacker can return at any time to reinfect the site, install further payloads, or exfiltrate data.

Remediation Steps

  • Delete any unused plugins from your plugins directory.
  • Review and remove any administrator user that you do not recognize.
  • Change all passwords
  • Use a website firewall like Sucuri to block future attacks and zero-days.
  • Update WordPress and all plugins.

Conclusion

This fake plugin is a powerful reminder of how malware authors can use subtle tactics to hide in plain sight. The attacker took care to blend into the WordPress ecosystem and used legitimate-looking metadata to avoid suspicion.

If your WordPress site has been acting strange, or you notice unknown users, it’s best to investigate thoroughly and don’t hesitate to reach out. We’re here to help.

Chat with Sucuri

Puja Srivastava is a Security Analyst with a passion for fighting new and undetected malware threats. With over 7 years of experience in the field of malware research and security, Puja has honed her skills in detecting, monitoring, and cleaning malware from websites. Her responsibilities include website malware remediation, training, cross-training and mentoring new recruits and analysts from other departments, and handling escalations. Outside of work, Puja enjoys exploring new places and cuisines, experimenting with new recipes in the kitchen, and playing chess.

Related Tags

文章来源: https://blog.sucuri.net/2025/07/unauthorized-admin-user-created-via-disguised-wordpress-plugin.html
如有侵权请联系:admin#unsafe.sh