WP pingbacks exploited for DDoS attacks?
-
A blogger recently got attacked by a hacker who used pingbacks to try and overload his servers. Here’s the entire post about it:
https://trilema.com/2014/o-hai-let-me-wanna-be/
Of particular note in this post is the message displayed only to WP users whose blogs were used in the attack:
You are seeing this because your blog was recently used as part of a DDOS attack against Trilema.
The way this works is that the attacker sends pingbacks to a long list of blogs. The blogs in question then load the indicated url to try and verify if the pingback is legitimate (ie, if the url of the pinged blog actually appears on page), resulting in massive traffic spikes for the victim.
This works because WordPress pingbacks are poorly implemented. A more solid implementation would verify if the pingback originates from the same IP as the site that supposedly sent it, and discard the request if there’s a mismatch. The current implementation allows pingbacks to be sent by any arbitrary IP, and so allow a malicious user yet another DDOS vector.
Please do your part by fixing your pingbacks implementation. The easiest way would be to open the file xmlrpc.php found in the root directory of your blog installtion, and modify the part that says
// Let's check the remote site $linea = wp_remote_fopen( $pagelinkedfrom );
To instead say
// Let's check the remote site // First, make sure we're not being used for DDoS! if (gethostbyname(parse_url($pagelinkedfrom, PHP_URL_HOST)) <> $_SERVER['REMOTE_ADDR']) die ("Sorry, you will have to send this from your blog's IP."); $linea = wp_remote_fopen( $pagelinkedfrom );
This checks that the IP of the domain you think you’ve been pinged by and the IP of the client informing you were pinged match, and dies if they don’t – rendering this particular DDoS avenue inoperable while maintaining all the pingback functionality you could possibily want.
Thanks for being part of the solution!
WordPress community, sound off? Does this vulnerability really exist, and if so, is it possible to fix it in the core? What do you think of the proposed solution? Could there be a possible downside to it?
I’m not a programmer and I had never heard about such a vulnerability before, but since my blog was one of the blogs implicated (the list is almost 300 MB, have asked the blogger to check it for me) I’m obviously quite concerned and I wonder if other people have heard of or experienced such attacks before.
- The topic ‘WP pingbacks exploited for DDoS attacks?’ is closed to new replies.