IT Solutions · 2025-03-07 1

Leaked user names – WordPress Brute Force Attacker knows real admin Username

I have recently taken over maintenance for a small WP site and when I installed AOIS it told me to not make the admin username visible on the site. But there were still many failed login attempts with that username, so I removed the old admin account and added a new one (hard to guess). Now I get failed login attempts using the new login name even though I have blocked user enumeration etc. Can you spot if there is some setting I missed that allows hackers to find the admin username?

 

My problem was (as it is/was for many people) that the user names were coming from a known security issue with the REST API endpoints; this one in particular: /wp-json/wp/v2/users/1 as in https://wordpresssite.com/wp-json/wp/v2/users/1.

This allows either an anonymous user OR a logged-in user to enter that URL and retrieve the names and ids of users, including admin users. All they have to do is cycle through the id number at the end of the query.

Turning off the REST API endpoint through AIOS does not completely solve the problem as that only affects non-logged-in users. If a hacker gets an account on your machine and logs in, then they can just enter the same wp-json endpoint and once again retrieve the user information (I verified the operation).

The way I solved the problem was by doing this (with the disable_rest_endpoints function):

https://wordpress.org/support/topic/renamed-login-page-and-usernames-detected/

That solved my problem and I apparently am not using any plugin/feature that currently requires the REST API user endpoints.

https://security.stackexchange.com/questions/66272/wordpress-brute-force-attacker-knows-real-admin-username

Simon Guetta

URL