Support » Plugin: NinjaFirewall (WP Edition) - Advanced Security » User enumeration through author archives

  • Resolved barnez

    (@pidengmor)


    Hi,

    I checked my firewall log today and noticed that my username has been successfully enumerated:

    15:56:39  #2422412  high         -  131.161.9.252    GET /index.php - User enumeration scan (author archives) - [author_name=xxxxx]

    Here are the raw access log entries for this:

    131.161.9.252 - - [22/May/2016:15:56:38 +0100] "GET /author/xxxx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
    131.161.9.212 - - [22/May/2016:15:56:40 +0100] "GET / HTTP/1.1" 200 8259 "-" "Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"

    In the Firewall policies I have “Protect against username enumeration” >> “Through the author archives” selected. If I try manually with http://www.my-site.com/?author=2 then I can also find the correct username when whitelisted and logged in, then when I log out I am successfully redirected to the homepage with no username returned in the address bar of the browser, so it seems to be working fine.

    Also, all the other user enumeration scans in the log show normal firewall protection.

    06/May/16 14:08:49  #1418364  high         -  5.159.96.155     GET /index.php - User enumeration scan (author archives) - [author=1]
    06/May/16 14:08:50  #3507227  high         -  5.159.96.155     GET /index.php - User enumeration scan (author archives) - [author=2]
    06/May/16 14:08:50  #8173023  high         -  5.159.96.155     GET /index.php - User enumeration scan (author archives) - [author=3]
    06/May/16 14:08:51  #3720998  high         -  5.159.96.155     GET /index.php - User enumeration scan (author archives) - [author=4]
    23/May/16 11:54:40  #1025033  high         -  90.205.152.78    GET /index.php - User enumeration scan (author archives) - [author=2]
    23/May/16 11:54:49  #2245905  high         -  90.205.152.78    GET /index.php - User enumeration scan (author archives) - [author=2]

    While I use a very strong password, I still like having the username concealed as first line of defence. Any ideas how this firewall policy may have failed on this one occasion?

    https://wordpress.org/plugins/ninjafirewall/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi

    The only way to bypass this policy is to be whitelisted.
    There could be at least two possibilities to find the username:

    1. It was discovered before you installed NinjaFirewall.

    2. WordPress, a theme, or a plugin leaked (or still leaks) it. I saw the same issue with a user of the WP+ Edition. I recommended him to add his username to the “Web Filter” feature and he did receive an alert. It was leaked by a theme.
    If you are running the WP Edition, can you search for it in the HTML code of the main page and some page where comments and articles are displayed?

    barnez

    (@pidengmor)

    Hi,
    Many thanks for your response. I suspect #2 as this installation of the plugin predates the current username. As I am using the WP+ Edition I have taken your advice and added the username to the Web Filter. I will try and track down the origin of the leak, resolve it and then change my username. For now my password is very strong and the login protection will anyway protect against brute force attack.

    barnez

    (@pidengmor)

    I’ve done some digging and found that this is actually a WordPress issue.

    Even if you set a nickname in the WordPress user profile, the user_nicename in wp-users that is used in the url in author-related pages is set to the username by default:

    <head>
    .....
    ..... "author_name":"nickname","author_url":"http:\/\/www.site.com\/author\/username\/" ......
    ..... <author_name>nickname</author_name><author_url>http://www.site.com/author/username/</author_url> ....

    (where nickname and username are the actual ones used)

    Change the user_nicename to match the display-name in the database and and then the username is replaced by the nickname:

    "author_url":"http:\/\/www.site.com\/author\/nickname\/"
    <author_url>http://www.site.com/author/nickname/</author_url>

    Is it possible that NinjaFirewall could make a check and warn users about this?

    Plugin Author nintechnet

    (@nintechnet)

    I am not sure we can do anything here, because there will always be a name displayed somewhere in the HTML source. Bots have no way to know if it is a username, nickname etc, and that is the reason why, after finding them, they try to check if they are valid by sending a author_name=xxxxx query. But as you can see in your logs, NinjaFirewall will always block them. They use this trick because many security plugins do not protect against it.

    barnez

    (@pidengmor)

    Understood. I have plugged that leak and love the suggestion of using the web filter to highlight where the username appears in the html output. Have also done my annual update of all passwords too so am feeling more secure with Ninja Firewall and good security practice. As another feature request for the free or premium plugin, scheduled anti-malware scans with email notification would be amazing. Keep up the great work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User enumeration through author archives’ is closed to new replies.