Jump to content
Kabron

Wordpress Remote Exploit - W3 Total Cache

Recommended Posts

Posted

Hi all,

From the developers' description [1], W3 Total Cache is:

The most complete WordPress performance framework.

Recommended by web hosts like: MediaTemple, Host Gator, Page.ly and WP Engine and countless more.

Trusted by countless sites like: stevesouders.com, mattcutts.com, mashable.com, smashingmagazine.com, makeuseof.com,

yoast.com, kiss925.com, pearsonified.com, lockergnome.com, johnchow.com, ilovetypography.com, webdesignerdepot.com,

css-tricks.com and tens of thousands of others.

W3 Total Cache improves the user experience of your site by improving your server performance, caching every aspect

of your site, reducing the download times and providing transparent content delivery network (CDN) integration.

Downloads: 1,388,876

Ratings: 4.6 out of 5 stars

Unfortunately, it's frequently incorrectly deployed. When I set it up

by going to the Wordpress panel and choosing "add plugin" and

selecting the plugin from the Wordpress Plugin Catalog (or whatever),

it left two avenues of attack open:

1) Directory listings were enabled on the cache directory, which means

anyone could easily recursively download all the database cache keys,

and extract ones containing sensitive information, such as password

hashes. A simple google search of

"inurl:wp-content/plugins/w3tc/dbcache" and maybe some other magic

reveals this wasn't just an issue for me. As W3 Total Cache already

futzes with the .htaccess file, I see no reason for it not to add

"Options -Indexes" to it upon installation. I haven't read any W3

documentation, so it's possible this is a known and documented

misconfiguration, but maybe not.

2) Even with directory listings off, cache files are by default

publicly downloadable, and the key values / file names of the database

cache items are easily predictable. Again, it seems odd that "deny

from all" isn't added to the .htaccess file. Maybe it's documented

somewhere that you should secure your directories, or maybe it isn't;

I'm not sure.

If I had to categorize these holes, I'd say they're due to

"misconfiguration", but I figure it's relevant to write in to

full-disclosure & webappsec because I'm usually not horrible with

configuring things and I made these mistakes several times without

realizing. I'm copying the author on this email, as he may want to

include a warning message where nieve folks like myself can see it, or

document these somewhere if they're not already, or at least apply the

two .htaccess tweaks mentioned above.

Anyway I put together a short and simple shell script that works

pretty decently against my own various wordpress websites, and

exploits the configuration error in point (2) above. Exploiting point

(1) can be done with wget & grep and is even more dull than the below

exploit.

****************

W3 Total Fail

Exploit for point (2):

w3-total-fail - Intelligently guesses hash values in order to extract Wordpress password hashes via W3 Total Cache. (Read the

entire usage message.)

Screencast for point (2):

http://git.zx2c4.com/w3-total-fail/plain/screencast.ogv or

****************

Merry Christmas.

- Jason

zx2c4

Full Disclosure: Wordpress Remote Exploit - W3 Total Cache

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...