{"id":25347,"date":"2020-01-25T19:51:12","date_gmt":"2020-01-25T14:21:12","guid":{"rendered":"https:\/\/www.armourinfosec.com\/?p=25347"},"modified":"2020-01-29T17:49:28","modified_gmt":"2020-01-29T12:19:28","slug":"wordpress-enumeration","status":"publish","type":"post","link":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/","title":{"rendered":"WordPress Enumeration"},"content":{"rendered":"

WordPress User Enumeration<\/h1>\n

These 10 enumeration techniques<\/strong> are a very fast way to identify users<\/strong> of a WordPress installation. With valid usernames effective brute force attacks<\/strong> can be attempted to guess the password<\/strong> of the user accounts.<\/p>\n

Introduction to WordPress Security<\/h2>\n

There are many common attack vectors that hackers use to attack a WordPress website. In this article we expose many of the common avenues for attack. By revealing these, you can help build your website\u2019s defenses against WordPress attacks.<\/p>\n

There are some great guides available on securing a WordPress installation, this article is not intended to repeat those. To get started with securing a WordPress installation, try the excellent guide on wordpress.org<\/a> or the comprehensive guide on the OWASP<\/a> site.<\/p>\n

It is noteworthy that in a managed WordPress hosting service, some of the attacks (and mitigation) listed below will be the responsibility of the hosting provider. If you are self hosting then security and maintenance is your responsibility. Ready to start? Grab our hoodie and start hacking!<\/p>\n

In this article we are going to discuss several ways to identify the valid usernames of any WordPress website.<\/p>\n

Table Of Contents:<\/h2>\n

1.Usernames enumerating through the Author Archives<\/p>\n

2.WordPress Enumeration via JSON API<\/p>\n

3.WordPress Enumeration via the Login Form<\/p>\n

4.Enumerating WordPress Core Version<\/p>\n

5.WordPress Plugin (and version) Enumeration<\/p>\n

6. WordPress Theme Enumeration<\/p>\n

7.Directory Indexing<\/p>\n

8.Server Vulnerability Testing<\/p>\n

9.WP Scan<\/p>\n

10.Nmap NSE Scripts for WordPress<\/p>\n

1.Enumerate Usernames Through the Author Archives :<\/h4>\n

In many WordPress installations, it is possible to enumerate WordPress usernames through the author archives, including the admin username. To access the author archives, we just need to add author=n (where n equals any integer) as a parameter to the WordPress home page, as shown below:<\/p>\n

http:\/\/example.com\/?author=1<\/pre>\n

The request will be automatically redirected by WordPress to its counterparts:<\/p>\n

http:\/\/example.com\/author\/admin\/<\/pre>\n

Using this method, we will be able to identify all the usernames by fuzzing the author parameter.<\/p>\n

2.WordPress Enumeration via JSON API :<\/h4>\n

Using a json endpoint, it may be possible to get a list of users on the site. This was restricted in version 4.7.1 that shows only the user that has published a post and the user that has been configured. Prior to this version, all the users were shown by default.<\/p>\n

https:\/\/wordpressexample.com\/wp-json\/wp\/v2\/users<\/pre>\n

User Enumeration via the JSON user Endpoint<\/p>\n

\"\"<\/p>\n

 <\/p>\n

3.WordPress Enumeration via the Login Form :<\/h4>\n

You must confirm valid users with the login form. Brute forcing the user name is possible using the login form as the response is different for a valid as opposed to an invalid account. Using a tool such as Burp Intruder in Burp Suite, we would load a list of possible usernames and cycle through HTTP POST requests to the WordPress login form, examining the response in each case.<\/p>\n

A HTTP response that matches “invalid password” indicates that the username is valid. We could then move on to attacking the password using the same process with a common password list.<\/p>\n

\"\"<\/p>\n

 <\/p>\n

4.Enumerating WordPress Core Version :<\/h4>\n

Three simple methods can be used to determine the core version of WordPress.<\/p>\n

4.1 Meta Generator<\/h5>\n

Check the HTML source of the page for a meta generator tag in the HEAD section of the HTML source. This example is taken from the source of a default WP install of the version 3.5.2 and of twenty twelve theme. From the source HTML:<\/p>\n

<meta name=\"generator\" content=\"WordPress 3.5.2\" \/><\/pre>\n
4.2 Version in readme.html<\/h5>\n

If the meta tag has been disabled, check for the presence of \/readme.html from root of the install. Early versions of WordPress had the version right there at the top of the Read Me file. But the newer versions of WordPress have removed the version from the ReadMe file.<\/p>\n

\"\"<\/p>\n

Version in HTML source of site.<\/p>\n

In the HTML source, the version is often appended as a parameter on links to javascript and css resources that the page is loading. Depending on the plugin, this will not always be the case and sites that have minified js and css may not have all this information leaks present.<\/p>\n

4.3 Security Vulnerabilities in WordPress Core<\/h5>\n

If an attacker finds a site with an older WordPress Core version, this may be directly exploitable via a security vulnerability in the WordPress core, In addition, it is a clear indication that the site is not well maintained. In a poorly managed site, other components (plugins \/ themes) may not have been updated; in this case, the chance of a successful attack has increased considerably.<\/p>\n

5.WordPress Plugin (and version) Enumeration :<\/h4>\n

During WordPress Plugin Enumeration, we attempt to find as many installed plugins as we can (even those that are disabled). The knowledge of the installed WordPress plugins may allow us to identify the version and research whether it is vulnerable to known exploits.<\/p>\n

Passive analysis: It can be used to find plugins through regular HTTP requests to the WordPress site.
\nActive enumeration: It is more aggressive and usually involves using a script or tool to perform hundreds or even thousands of mostly invalid HTTP requests.<\/p>\n

Reading through the HTML source of the WordPress site can reveal installed plugins through javascript links, comments and resources, such as CSS that are loaded into the page. These are the easiest plugins to discover and require no aggressive testing of the target site. Even the HTTP headers can reveal information such as the X-Powered-By header that reveals the presence of the W3-Total-Cache plugin. Some plugins do not leave traces in the HTML source; to find all the installed plugins you have to be more aggressive. A number of tools can brute force known plugin lists from the path \/wp-content\/plugins\/ * plugin to test * \/. The web server response will usually reveal valid directories (often with HTTP 403) as opposed to unknown directories on the web server with its HTTP response code.<\/p>\n

Once you have a list of plugins that are present on the site, your WordPress scanner or manual requests can be used to determine the version of the plugin. In the readme.txt, we can see the version of the plugin. Compare this against known exploits and we can get a good idea if the site is vulnerable without actually throwing the exploit.<\/p>\n

6. WordPress Theme Enumeration :<\/h4>\n

WordPress themes can contain vulnerabilities that might expose the site to compromise. Themes are collections of PHP code with HTML and CSS resources. More complex themes have more included components and are more likely to introduce security vulnerabilities. The enumeration of the theme is similar to the detection of plugins. The theme path is often visible in the HTML of the page source. The CSS file getting loaded from the theme will often reveal the path. With the path we have the theme name, and we can load the readme.txt to confirm the theme in use and its version.<\/p>\n

curl http:\/\/examplewp.com\/wp-content\/themes\/Avada\/readme.txt<\/pre>\n

An important consideration when testing for vulnerable WordPress Themes (and plugins) is that a theme that is installed yet not active may still have code that is accessible and vulnerable. This is why brute force testing for theme paths is an important step when assessing an unknown WordPress installation.<\/p>\n

\"\"<\/p>\n

7.Directory Indexing :<\/h4>\n

Directory indexing enabled on plugins directory. Directory indexing is a function of the web server that allows you to view the contents of a directory in the web accessible path. Viewing the contents of a directory allows an attacker to gather valuable information about the installation such as installed plugins and themes without the need to brute force the paths.<\/p>\n

To check for directory indexing, you can browse to folder locations and see if you get a response that includes “Index Of” and a list of folders \/ files. Common locations to check would be:<\/p>\n

\/wp-content\/\r\n\/wp-content\/plugins\/\r\n\/wp-content\/themes\/\r\n\/uploads\/\r\n\/images\/<\/pre>\n

8.Server Vulnerability Testing :<\/h4>\n

In this phase, we move into testing network services rather than direct testing of the WordPress installation. Port scanning is the standard technique for the discovery of network services running on the server.<\/p>\n

Services that might be present on a WordPress host:<\/p>\n

MySQL<\/strong> Server Remotely Accessible (port 3306)
\nCPANEL<\/strong> administration login portal (port 2082 \/ 2083)
\nWebmin<\/strong> administration (port 10000)
\nFTP<\/strong> service for file system access
\nSSH<\/strong> for remote control
\nOther web services with admin or other sites (port 8080 \/ 8888 etc)<\/p>\n

Any of the above services may allow access to or control of the server through either a security vulnerability or a compromised password. Port scanning can be conducted using the excellent Nmap Port Scanner or an alternative security tool. Carrying on from our enumeration of network services using the port scanner, we could run vulnerability scans against the discovered services to identify exploitable services or other items of interest.<\/p>\n

8.1 Nikto Vulnerability Scanner<\/h5>\n

Nikto is another vulnerability scanner that focuses on the discovery of known vulnerable scripts, configuration mistakes and other web server items of interest. The Nikto tool has been around for many years yet still finds a place in the penetration testers toolbox. Tools such as this throw tens of thousands of tests against the target in an attempt to discover known vulnerabilities and other low hanging fruits. It is a noisy process filling the target system logs with 404’s and other errors. Not recommended if you are going after a target ninja style (pentest \/ red team).<\/p>\n

9.WPScan :<\/h4>\n

WPScan is a popular WordPress security testing tool that ties many of these simple enumeration techniques together, enabling users to quickly enumerate a WordPress installation. It has a commercial license that restricts the use for personal testing of WordPress sites and non-commercial usage.It attempts to identify users, plugins, and themes, depending on the selected command line options, and also show vulnerabilities for each of the discovered plugins.<\/p>\n

\"\"<\/p>\n

https:\/\/github.com\/wpscanteam\/wpscan<\/a><\/p>\n

10.Nmap NSE Scripts for WordPress :<\/h4>\n

Nmap comes bundled with NSE scripts that extend the functionality of this popular port scanner. A few of the Nmap NSE scripts are particularly helpful for enumerating WordPress users, plugins, and themes using the same techniques we have previously discussed. The best thing about this option is that if you have Nmap installed, you already have these scripts ready to go.<\/p>\n

\u250c\u2500[root@Dasagreeva]\u2500[\/usr\/share\/nmap\/scripts]\r\n\u2514\u2500\u2500\u257c #ls -lha |grep wordpress\r\n-rw-r--r-- 1 root root 5.0K Nov 26 14:51 http-wordpress-brute.nse\r\n-rw-r--r-- 1 root root 11K Nov 26 14:51 http-wordpress-enum.nse\r\n-rw-r--r-- 1 root root 4.6K Nov 26 14:51 http-wordpress-users.nse<\/pre>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

WordPress User Enumeration These 10 enumeration techniques are a very fast way to identify users of a WordPress installation. With…<\/p>\n","protected":false},"author":1,"featured_media":25359,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92,25],"tags":[],"yoast_head":"\nWordPress Enumeration - Armour Infosec<\/title>\n<meta name=\"description\" content=\"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Enumeration - Armour Infosec\" \/>\n<meta property=\"og:description\" content=\"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/\" \/>\n<meta property=\"og:site_name\" content=\"Armour Infosec\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ArmourInfosec\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-25T14:21:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-29T12:19:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.armourinfosec.com\/wp-content\/uploads\/2020\/01\/images.png\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Armour Infosec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:site\" content=\"@ArmourInfosec\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Armour Infosec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/\",\"url\":\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/\",\"name\":\"WordPress Enumeration - Armour Infosec\",\"isPartOf\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#website\"},\"datePublished\":\"2020-01-25T14:21:12+00:00\",\"dateModified\":\"2020-01-29T12:19:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\"},\"description\":\"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.armourinfosec.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Enumeration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.armourinfosec.com\/#website\",\"url\":\"https:\/\/www.armourinfosec.com\/\",\"name\":\"Armour Infosec\",\"description\":\"Do Your Part - Be Security Smart\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.armourinfosec.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308\",\"name\":\"Armour Infosec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g\",\"caption\":\"Armour Infosec\"},\"sameAs\":[\"https:\/\/www.armourinfosec.com\/\"],\"url\":\"https:\/\/www.armourinfosec.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Enumeration - Armour Infosec","description":"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Enumeration - Armour Infosec","og_description":"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.","og_url":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/","og_site_name":"Armour Infosec","article_publisher":"https:\/\/www.facebook.com\/ArmourInfosec","article_published_time":"2020-01-25T14:21:12+00:00","article_modified_time":"2020-01-29T12:19:28+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.armourinfosec.com\/wp-content\/uploads\/2020\/01\/images.png","type":"image\/png"}],"author":"Armour Infosec","twitter_card":"summary_large_image","twitter_creator":"@ArmourInfosec","twitter_site":"@ArmourInfosec","twitter_misc":{"Written by":"Armour Infosec","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/","url":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/","name":"WordPress Enumeration - Armour Infosec","isPartOf":{"@id":"https:\/\/www.armourinfosec.com\/#website"},"datePublished":"2020-01-25T14:21:12+00:00","dateModified":"2020-01-29T12:19:28+00:00","author":{"@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308"},"description":"In this article we are going to discuss several ways to identify the various vulnerabilities of any target website built on WordPress.","breadcrumb":{"@id":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.armourinfosec.com\/wordpress-enumeration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.armourinfosec.com\/wordpress-enumeration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.armourinfosec.com\/"},{"@type":"ListItem","position":2,"name":"WordPress Enumeration"}]},{"@type":"WebSite","@id":"https:\/\/www.armourinfosec.com\/#website","url":"https:\/\/www.armourinfosec.com\/","name":"Armour Infosec","description":"Do Your Part - Be Security Smart","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.armourinfosec.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/1d8ec30560e735c34fa5d464a1357308","name":"Armour Infosec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.armourinfosec.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17f812901d8294702576e81ddce5aa92?s=96&d=mm&r=g","caption":"Armour Infosec"},"sameAs":["https:\/\/www.armourinfosec.com\/"],"url":"https:\/\/www.armourinfosec.com\/author\/admin\/"}]}},"menu_order":0,"_links":{"self":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/25347"}],"collection":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/comments?post=25347"}],"version-history":[{"count":0,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/posts\/25347\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/media\/25359"}],"wp:attachment":[{"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/media?parent=25347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/categories?post=25347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.armourinfosec.com\/wp-json\/wp\/v2\/tags?post=25347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}