SpiderLabs Blog

WordPress XML-RPC PingBack Vulnerability Analysis

Written by Ryan Barnett | Mar 12, 2014 1:10:00 PM

There were news stories this week outlining how attackers are abusing the XML-PRC "pingback" feature of WordPress blog sites to launch DDoS attacks on other sites. This blog post will provide some analysis on this attack and additional information for websites to protect themselves.

Not A New Vulnerabilty

The vulnerability in WordPress's XML-RPC API is not new. Here is data from the WordPress bug tracker from 7 years ago.

While the vulnerability itself is not new, it has only been within the past couple years that attack code/tools have been made available. This has certainly helped increase attacks by ScriptKiddies and resulted in more actual DDoS attacks.

WordPress XML-RPC Pingback DDoS Attack Walkthrough

The XML-RPC pingback functionality has a legitimate purpose with regards to linking blog content from different authors. The issue is that this functionality can be abuse by attackers to use the XML-RPC pingback feature of a blog site to attack a 3rd party site.

Patsy Proxy Attacks

SpiderLabs colleague Daniel Crowley gave a great presentation at DerbyCon in 2012 entitled "The Patsy Proxy: Getting others to do your dirty work" where he discussed various scenarios for sending attack traffic through 3rd party sites/services that will forward data onto other sites. (Slides here). Additionally, there have tools released in the community that extend this concept. One such tool is called "DDoS attacks via other sites execution tool (DAVOSET)" and it has the capability to send attacks through many different public sites that will forward traffic. Here is an example listing of URLs from DAVOSET -

As you can see, sending attack data through a "Patsy Proxy" site is quite easy. Now let's take a look at the WordPress XML-RPC Pingback issue.

WordPress XML-RPC Pingback DDoS attack

Here is an example attack command using curl -

The YELLOW highlighted data is a WordPress "Patsy Proxy" site while teh ORANGE highlighted data is the target/victim website. It is important to note for testing purposes that you must include the "Content-Type: text/xml" request header data otherwise the XML-RPC service will not treat the request as valid and will issue the following response:

With the previous request sent by the attacker, the Patsy Proxy WordPress site then initiates this HTTP request to the target/victim site -

Notice that the format of the HTTP request is only two lines:

  • URI
  • Host request header

This intelligence can be used by Web Application Firewalls (WAFs) that are protecting the victim sites to identify attack requests. Normal web browsers send many more request headers. While the pingback DDoS attack doesn't utilize any type of amplification as other more recent network protocol attacks (e.g. NTP), requests can cause more damage on the victim site if the URI is initiating a computationally expensive back-end query or process.

Protections

Disable XML-RPC

It is possible to disable the XML-RPC process altogether if you do not want to use it. There are even plugins that will disable it.

Disable Pingback Reqests

You may also disable the pingback feature by adding the following to your functions.php file:

Identify Initial Pingback Requests

By using a WAF, you can identify inital pingback XML attack requests on your WordPress site. We have added rules to our commercial SpiderLabs ModSecurity rules package to identify this attack.

Identifying Pingback Initiated Requests on the Victim Site

As mentioned previously, even though the construct of the URI line might be dynamic, the fact is that all proxies XML-RPC pingback requests will only have two lines in the HTTP request. WAFs can be used to identify these anomalies and then respond (perhaps by pushing out IP based blocking to infrastructure systems).