Disable username enumeration on WordPress
Disable username enumeration on WordPress

I found a simple way to disable/prevent the username enumeration on a WordPress installation. Follow these steps
edit the file .htaccess of your WordPress installation
add the following lines :

RewriteCond %{QUERY_STRING} author=\d
RewriteRule ^ /? [L,R=301]

You can check everything is ok by running the tool WPScan described in the following post.


Reference

Source

Apache Module mod_rewrite
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

mod_rewrite provides a flexible and powerful way to manipulate URLs using an unlimited number of rules. Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps.

mod_rewrite operates on the full URL path, including the path-info section. A rewrite rule can be invoked in httpd.conf or in .htaccess. The path generated by a rewrite rule can include a query string, or can lead to internal sub-processing, external request redirection, or internal proxy throughput.

Further details, discussion, and examples, are provided in the detailed mod_rewrite documentation.

<>

My Powershell script categories

Disable username enumeration on WordPress

Leave a Reply

Your email address will not be published.