NetBuilders

You are welcome to look around. You will have to register before you can post a message, create a blog, chat live with our members, or add a site to our directory.



Advertise With Us
Reply ServInt - AMAZING and Inexpensive Managed VPS/Dedicated Server Hosting
Old 19 October, 2009, 18:26 PM   #1 (permalink)
nux nux is online now
Moderator
 
Location: Minneapolis
Thanked 64 Times in 44 Posts
Posts: 453
$NetBucks: 615
Join Date: Dec 2008
Last Online: Today 16:41 PM
Default Wordpress Exploit

The latest version of Wordpress is exploitable by what seems to be an 0day exploit. There is no patch on wordpress.org. Here's the actual exploit:
pastebin - collaborative debugging tool

It looks like it's an issue in wp-trackback.php

Temporarily disabling trackbacks should be a work around for now. Nothing has been testing though....
__________________
Submit your proxies: Proxy Sites
Bored? Play some parking games
  Reply With Quote
Thanked by:
Snak3 (20 October, 2009)
Old 19 October, 2009, 18:32 PM   #2 (permalink)
nux nux is online now
Moderator
 
Location: Minneapolis
Thanked 64 Times in 44 Posts
Posts: 453
$NetBucks: 615
Join Date: Dec 2008
Last Online: Today 16:41 PM
Default

Update: I just tested it on my server and it hurts. Dirty exploit:

top - 13:29:56 up 36 days, 1:06, 12 users, load average: 45.95, 13.40, 4.66

I'm working on a workaround...and

<Files ~ "wp-trackback.php">
Order allow,deny
Deny from all
</Files>


Add that to your apache config file to disallow wp-trackback.php on every site hosted on the server.

A nasty workaround, but will help until a real fix is out.
__________________
Submit your proxies: Proxy Sites
Bored? Play some parking games
  Reply With Quote
Old 19 October, 2009, 18:56 PM   #3 (permalink)
nux nux is online now
Moderator
 
Location: Minneapolis
Thanked 64 Times in 44 Posts
Posts: 453
$NetBucks: 615
Join Date: Dec 2008
Last Online: Today 16:41 PM
Default

I made a post about it on my blog:
New 0-Day Wordpress Exploit | Steve Fortuna
__________________
Submit your proxies: Proxy Sites
Bored? Play some parking games
  Reply With Quote
Old 19 October, 2009, 19:03 PM   #4 (permalink)
God bless Atheism
 
Keldorn's Avatar
 
Location: Canada
Thanked 60 Times in 52 Posts
Posts: 416
$NetBucks: 775
Join Date: Dec 2008
Last Online: 28 March, 2010 20:11 PM
Default

Imagine if they change to this.

PHP Code:
for($n 0$n <= 10000000$n++){

//fputs attack  stuff


It will loop 10 million times. Imagine if they put usleep(); at a Quarter second to prevent crashing your server, then hitting page over and over for oh about 7 days. You will have a page with 2,419,200 tackback comment on it saying "lol", now imagine having to delete that shit to clean up. Priceless. xD
Hopefully wordpress has some of mechasim to block repeated trackbacks from the same IP...
__________________
Submit new proxies -
  Reply With Quote
Old 19 October, 2009, 19:13 PM   #5 (permalink)
nux nux is online now
Moderator
 
Location: Minneapolis
Thanked 64 Times in 44 Posts
Posts: 453
$NetBucks: 615
Join Date: Dec 2008
Last Online: Today 16:41 PM
Default

I have come up with a fix for this exploit. It's posted on my blog, linked above.
__________________
Submit your proxies: Proxy Sites
Bored? Play some parking games
  Reply With Quote
Old 19 October, 2009, 19:23 PM   #6 (permalink)
I'm Not Sure.
 
garfish's Avatar
 
Blog Entries: 5
Thanked 41 Times in 39 Posts
Posts: 607
$NetBucks: 661
Join Date: May 2009
Last Online: Today 13:55 PM
Default

thanks guys. i'm adding the code. dyou have any idea when will wp fix be release?
  Reply With Quote
Old 19 October, 2009, 19:38 PM   #7 (permalink)
God bless Atheism
 
Keldorn's Avatar
 
Location: Canada
Thanked 60 Times in 52 Posts
Posts: 416
$NetBucks: 775
Join Date: Dec 2008
Last Online: 28 March, 2010 20:11 PM
Default

Quote:
Originally Posted by nux View Post
I have come up with a fix for this exploit. It's posted on my blog, linked above.
What is $charset and does check if it greater then 50 characters stop the attack?
__________________
Submit new proxies -
  Reply With Quote
Old 19 October, 2009, 19:44 PM   #8 (permalink)
nux nux is online now
Moderator
 
Location: Minneapolis
Thanked 64 Times in 44 Posts
Posts: 453
$NetBucks: 615
Join Date: Dec 2008
Last Online: Today 16:41 PM
Default

the problem is in this function: PHP: mb_convert_encoding - Manual

what the exploit does is tell the server that there's thousands of charsets to convert it to the fix limits the input on the charset value to 50 chars. I tested on my server and it works. 50 might be too much anyways, but it stops the exploit
__________________
Submit your proxies: Proxy Sites
Bored? Play some parking games
  Reply With Quote
Old 19 October, 2009, 19:51 PM   #9 (permalink)
God bless Atheism
 
Keldorn's Avatar
 
Location: Canada
Thanked 60 Times in 52 Posts
Posts: 416
$NetBucks: 775
Join Date: Dec 2008
Last Online: 28 March, 2010 20:11 PM
Default

okay, I think I understand. So wp-trackback accept a Character encoding with a var called $_POST['charset'],
with this code they generate thousands of things saying "UTF-8"
$charset = str_pad($charset,140000,"UTF-8,");

for a payload to mb_convert_encoding, which will loop over then thousands of times. Running up the load on the server.
So I guess checking if $charset is less then 50 might work and is probably too much anways. Must character encodign name will around 10 char right?
Looks good..

Keldorn.
__________________
Submit new proxies -
  Reply With Quote
Old 20 October, 2009, 08:57 AM   #10 (permalink)
Moderator
 
Snak3's Avatar
 
Location: Undisclosed Location
Thanked 113 Times in 86 Posts
Posts: 599
Recent Blog: Rule 30
$NetBucks: 1,249
Join Date: Jul 2009
Last Online: Today 15:42 PM
Send a message via Yahoo to Snak3
Default

@nux
can you show where exactly in wp-trackback.php have we to paste the following code as mentioned by you in your blog post :
Code:
if(strlen($charset) > 50)
die;
I understand line 47 but to be precise
I mean, before what and after what piece of code should it come/appear.
__________________
Learn My Rare Method Of Finding High Pagerank Dofollow Backlinks
Funny Motivational Posters

Hostgator Code for $9.94 discount - snak3snak3
  Reply With Quote
Reply

Bookmarks

Tags
exploit, wordpress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 17:02 PM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.1
vBAdvertise v1.0.0 Copyright ©2009, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios