<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Transition Technology: Ticket #894: Brute Force Attacks Against WordPress XMLRPC</title>
    <link>http://localhost:8080/trac/ticket/894</link>
    <description>&lt;p&gt;
For a few months I have see a lot of requests going to &lt;a class="wiki" href="http://localhost:8080/trac/wiki/WordPress"&gt;WordPress&lt;/a&gt; &lt;tt&gt;/xmlrpc.php&lt;/tt&gt; and wasn't sure why, now it is clear:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Instead of going against wp-login.php (which can be easily blocked or protected via .htaccess) or doing a single attempt against xmlrpc, attackers are leveraging the system.multicall method to attempt to guess hundreds of passwords within just one HTTP request.
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://blog.sucuri.net/2015/10/brute-force-amplification-attacks-against-wordpress-xmlrpc.html"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://blog.sucuri.net/2015/10/brute-force-amplification-attacks-against-wordpress-xmlrpc.html&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
I'd like to install &lt;a class="ext-link" href="https://wordpress.org/plugins/stop-xmlrpc-attack/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Stop XML-RPC Attack&lt;/a&gt; on all the &lt;a class="wiki" href="http://localhost:8080/trac/wiki/WordPress"&gt;WordPress&lt;/a&gt; site we host, unless anyone has a good reason not to. This plugin simply whitelists the JetPack/Automattic's subnets and blocks all other access to &lt;tt&gt;/xmlrpc.php&lt;/tt&gt;.
&lt;/p&gt;
&lt;p&gt;
I started tracking the abuse a while ago and you can see it and manually address it on &lt;a class="wiki" href="http://localhost:8080/trac/wiki/ParrotServer"&gt;ParrotServer&lt;/a&gt; like this:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
wp-xmlrpc-abuse
IP addresses accessing xmlrpc.php more than twice for the last 1000 lines of each access.log:
      2 46.148.XX.XX
    733 195.62.53.243
    177 195.62.53.243
      2 66.76.XX.XX
dig -x 195.62.53.243 +short
  53-243.static.spheral.ru.
ipdrop 195.62.53.243
&lt;/pre&gt;&lt;p&gt;
But we need to be more pro-active in blocking access or we are going to probably see some compromised sites.
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>Transition Technology</title>
      <url>/trac/chrome/site/TransitionNetwork-Logo-Web-Small.jpg</url>
      <link>http://localhost:8080/trac/ticket/894</link>
    </image>
    <generator>Trac 0.12.5</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 07 Jan 2016 11:23:51 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/894#comment:1</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/894#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 07 Jan 2016 11:31:36 GMT</pubDate>
      <title>description changed</title>
      <link>http://localhost:8080/trac/ticket/894#comment:2</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/894#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/trac/ticket/894?action=diff&amp;amp;version=2"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 08 Jan 2016 11:04:25 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/894#comment:3</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/894#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.8&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.25&lt;/em&gt; to &lt;em&gt;1.05&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Installing &lt;a class="ext-link" href="https://wordpress.org/plugins/stop-xmlrpc-attack/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Stop XML-RPC Attack&lt;/a&gt; on all &lt;a class="wiki" href="http://localhost:8080/trac/wiki/WordPress"&gt;WordPress&lt;/a&gt; sites on &lt;a class="wiki" href="http://localhost:8080/trac/wiki/ParrotServer"&gt;ParrotServer&lt;/a&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;sudo -i
su - conference15 -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
  Installing Stop XML-RPC Attack (1.0.3)
  Downloading install package from https://downloads.wordpress.org/plugin/stop-xmlrpc-attack.1.0.3.zip...
  Unpacking the package...
  Installing the plugin...
  Plugin installed successfully.
wp plugin activate stop-xmlrpc-attack
  Success: Plugin 'stop-xmlrpc-attack' activated.
&lt;/pre&gt;&lt;p&gt;
Then a page needs to be requested on the site, &lt;a class="ext-link" href="https://conference15.transitionnetwork.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://conference15.transitionnetwork.org/&lt;/a&gt; to trigger the updating of the &lt;tt&gt;.htaccess&lt;/tt&gt; file, after that has been done this has been appended to it:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# BEGIN WORDPRESS PLUGIN stop_xmlrpc_attack
&amp;lt;Files "xmlrpc.php"&amp;gt;
order deny,allow
deny from all
allow from 10.0.0.0/8
allow from 64.34.206.0/24
allow from 66.135.48.128/25
allow from 66.155.38.0/24
allow from 69.174.248.128/25
allow from 76.74.248.128/25
allow from 76.74.254.0/25
allow from 76.74.255.0/25
allow from 127.0.0.0/8
allow from 172.16.0.0/12
allow from 192.0.64.0/18
allow from 192.168.0.0/16
allow from 198.181.116.0/22
allow from 207.198.101.0/25
allow from 207.198.112.0/23
allow from 209.15.21.0/24
allow from 216.151.209.64/26
allow from 216.151.210.0/25
&amp;lt;/Files&amp;gt;
# END WORDPRESS PLUGIN stop_xmlrpc_attack
&lt;/pre&gt;&lt;p&gt;
Adding the plugin to the other sites:
&lt;/p&gt;
&lt;pre class="wiki"&gt;su - cop21 -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
  Installing Stop XML-RPC Attack (1.0.3)
  Downloading install package from https://downloads.wordpress.org/plugin/stop-xmlrpc-attack.1.0.3.zip...
  Unpacking the package...
  Installing the plugin...
  Plugin installed successfully.
wp plugin activate stop-xmlrpc-attack
  Success: Plugin 'stop-xmlrpc-attack' activated.
exit
su - reconomy -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
  PHP Fatal error:  Class 'WP_Widget' not found in /home/reconomy/sites/default/wp-content/plugins/akismet/class.akismet-widget.php on line 5
  Fatal error: Class 'WP_Widget' not found in /home/reconomy/sites/default/wp-content/plugins/akismet/class.akismet-widget.php on line 5
&lt;/pre&gt;&lt;p&gt;
This is a error that lots of people have:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://wordpress.org/support/topic/version-44-update-fatal-error-class-wp_widget-not-found"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wordpress.org/support/topic/version-44-update-fatal-error-class-wp_widget-not-found&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
And the fix:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
WP CLI - Needs to be upgraded to the latest release, otherwise it won’t work.
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://wordpress.org/support/topic/read-this-first-wordpress-44-master-list?replies=5#post-7753846"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wordpress.org/support/topic/read-this-first-wordpress-44-master-list?replies=5#post-7753846&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So:
&lt;/p&gt;
&lt;pre class="wiki"&gt;which wp
/usr/local/bin/wp
ls -lah /usr/local/bin/ | grep wp
lrwxrwxrwx  1 root staff    20 Nov 20  2014 wp -&amp;gt; ../src/wp-cli/bin/wp
-rwxr-xr-x  1 root staff   286 Oct 24 13:03 wp-brute-force
-rwxr-xr-x  1 root staff   269 Oct 24 13:17 wp-xmlrpc-abuse
cd /usr/local/src/
wget https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod 755 wp-cli.phar
php wp-cli.phar --info --allow-root
  PHP binary:     /usr/bin/php5
  PHP version:    5.4.45-0+deb7u2
  php.ini used:   /etc/php5/cli/php.ini
  WP-CLI root dir:        phar://wp-cli.phar
  WP-CLI global config:
  WP-CLI project config:
  WP-CLI version: 0.22.0
rm -rf wp-cli
cd ../bin/
rm wp
ln -s ../src/wp-cli.phar wp
&lt;/pre&gt;&lt;p&gt;
Try again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;su - reconomy -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
  Installing Stop XML-RPC Attack (1.0.3)
  Downloading install package from https://downloads.wordpress.org/plugin/stop-xmlrpc-attack.1.0.3.zip...
  Unpacking the package...
  Installing the plugin...
  Plugin installed successfully.
  Success: Translations updates are not needed for the 'English (US)' locale.
wp plugin activate stop-xmlrpc-attack
  Success: Plugin 'stop-xmlrpc-attack' activated.
exit
su - tc -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
  PHP Fatal error:  Call to a member function separator() on a non-object in /home/tc/sites/default/wp-content/plugins/contactforms/buttonsnap.php on line 433
  Fatal error: Call to a member function separator() on a non-object in /home/tc/sites/default/wp-content/plugins/contactforms/buttonsnap.php on line 433
&lt;/pre&gt;&lt;p&gt;
The &lt;tt&gt;wp-content/plugins/contactforms&lt;/tt&gt; directory appears to have a variety of code in it.  Stop XML-RPC Attack was installed using the web interface, these pluging have updates available:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Akismet
&lt;/li&gt;&lt;li&gt;BackWPup
&lt;/li&gt;&lt;li&gt;Bad Behavior
&lt;/li&gt;&lt;li&gt;jQuery Colorbox
&lt;/li&gt;&lt;li&gt;Optimize Database after Deleting Revisions
&lt;/li&gt;&lt;li&gt;Query Monitor
&lt;/li&gt;&lt;li&gt;Simple Recent Comments
&lt;/li&gt;&lt;li&gt;Spam Destroyer
&lt;/li&gt;&lt;li&gt;Subscribe2
&lt;/li&gt;&lt;li&gt;Subscribe To Comments
&lt;/li&gt;&lt;li&gt;User Switching
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
I haven't updated these or updated &lt;a class="wiki" href="http://localhost:8080/trac/wiki/WordPress"&gt;WordPress&lt;/a&gt; itself for fear of breaking things -- Sam perhaps you might want to look at this, I think you did the last updates on the site?
&lt;/p&gt;
&lt;pre class="wiki"&gt;su - ts -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
wp plugin activate stop-xmlrpc-attack
exit
su - ttt -s /bin/bash
source /etc/bash_completion.d/wp
cd sites/default/
wp plugin install stop-xmlrpc-attack
wp plugin activate stop-xmlrpc-attack
exit
&lt;/pre&gt;&lt;p&gt;
The &lt;a class="ext-link" href="http://www.transitiontowntotnes.org/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.transitiontowntotnes.org/&lt;/a&gt; and &lt;a class="ext-link" href="http://www.transitionstreets.org.uk/"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://www.transitionstreets.org.uk/&lt;/a&gt; sites were accesses and the &lt;tt&gt;.htaccess&lt;/tt&gt; files were checked.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 08 Jan 2016 11:08:05 GMT</pubDate>
      <title>description changed</title>
      <link>http://localhost:8080/trac/ticket/894#comment:4</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/894#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/trac/ticket/894?action=diff&amp;amp;version=4"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>