GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Zero Day Vulnerability in many WordPress Themes (https://gfy.com/showthread.php?t=1032584)

TheSenator 08-02-2011 04:13 AM

Zero Day Vulnerability in many WordPress Themes
 
If you are using a theme that re-sizes images then you are mostly likely using a version of TimThumb.php.

There is a fix....

URL: http://markmaunder.com/2011/zero-day...dpress-themes/
================
Update: Ben, the developer of timthumb has been in contact and is working on a fix. His own site was hacked Friday using the same method. I?ve submitted a tiny patch and if you?re a solid PHP hacker it?d be great if you could eyeball the code with us and submit a patch (really easy to do on Google code) if you spot any other opportunities for cleanup (there are many). Given enough eyeballs? you know the quote.

The Exec summary: An image resizing utility called timthumb.php is widely used by many WordPress themes. Google shows over 39 million results for the script name. If your WordPress theme is bundled with an unmodified timthumb.php as many commercial and free themes are, then you should immediately either remove it or edit it and set the $allowedSites array to be empty. The utility only does a partial match on hostnames allowing hackers to upload and execute arbitrary PHP code in your timthumb cache directory. I haven?t audited the rest of the code, so this may or may not fix all vulnerabilities. Also recursively grep your WordPress directory and subdirs for the base64_decode function and look out for long encoded strings to check if you?ve been compromised..............
http://markmaunder.com/2011/zero-day...dpress-themes/

paymeback 08-02-2011 06:36 AM

Bump fixed mine up, thanks

fris 08-02-2011 06:56 AM

i dont use it

JamesGw 08-02-2011 08:54 AM

Thanks for this.

TrustCash 08-02-2011 08:54 AM

Thanks for the heads up, man. :-)

alias 08-02-2011 09:14 AM

Thanks, had it on a couple blogs.

Brujah 08-02-2011 09:17 AM

A lot of Themeforest authors rely on TimThumb heavily instead of using WP built-in functions. Definitely check your themforest themes for timthumb.php

TheSenator 08-02-2011 09:40 AM

Quote:

Originally Posted by Brujah (Post 18326413)
A lot of Themeforest authors rely on TimThumb heavily instead of using WP built-in functions. Definitely check your themforest themes for timthumb.php

Fuck...

Everybody pretty much uses this script or modify it a bit.

Well, at least I now know how to exploit a WordPress site using TimThumb

Brujah 08-02-2011 10:32 AM

Discussion on Google Code seems to be ongoing about whether the fix is good enough or not.
http://code.google.com/p/timthumb/issues/detail?id=212

CyberHustler 08-02-2011 10:45 AM

Sucks for you guys...

cooldude7 08-02-2011 11:21 AM

when the day wil come, when wp wont need updates....?

Brujah 08-02-2011 11:28 AM

Quote:

Originally Posted by cooldude7 (Post 18326690)
when the day wil come, when wp wont need updates....?

It's important to note that this is not WordPress. It's something separate that several theme authors and plugin authors have used to make the creation of images of various sizes easier.

harvey 08-02-2011 12:09 PM

Quote:

Originally Posted by cooldude7 (Post 18326690)
when the day wil come, when wp wont need updates....?

when you have something that is 4 or 5 years ahead of the standard you may find that things may need correction here and there. The good news is that they are actually corrected. Think about this: is absolutely impossible for any program, piece of software, code snippet, whatever to be as advanced as a collaborative environment with tens of thousands programmers behind it

Quote:

Originally Posted by Brujah (Post 18326715)
It's important to note that this is not WordPress.

this.


either way, personally, I couldn't care less, I don't use timthumbs since like 4 years ago. It was nice and OK if you didn't mind the look of your site, but it gets very random results. WP built in image features might not be as complete, but they're 100 times better :2 cents:

sicone 08-02-2011 12:19 PM

Dumb question here... but is there a quick way to search my WP installs for this file? I know it's not one I have installed as a plugin but as said many themes and plugins use it that I may not be aware of.

TheSenator 08-02-2011 01:01 PM

Quote:

Originally Posted by sicone (Post 18326861)
Dumb question here... but is there a quick way to search my WP installs for this file? I know it's not one I have installed as a plugin but as said many themes and plugins use it that I may not be aware of.

Look in the /wp-content/themes/"theme folder you are using*/timthumb.php or thumb.php

Highest Def 08-02-2011 01:12 PM

Quote:

Originally Posted by sicone (Post 18326861)
Dumb question here... but is there a quick way to search my WP installs for this file? I know it's not one I have installed as a plugin but as said many themes and plugins use it that I may not be aware of.

It should be listed in the admin under the editor, where you edit all the theme files including CSS. It's usually listed near the bottom and the 'allowedsites' array will be pretty close to the top of the file. *not all themes that use it will have it listed here but odds are that it is.

Barry-xlovecam 08-02-2011 07:28 PM

Quote:

Originally Posted by sicone (Post 18326861)
Dumb question here... but is there a quick way to search my WP installs for this file? I know it's not one I have installed as a plugin but as said many themes and plugins use it that I may not be aware of.

Code:

ssh;

user@server$ locate timthumb.php

user@server$ locate thumb.php


V_RocKs 08-02-2011 09:03 PM

find ./ -name timthumb.php

fris 08-03-2011 08:46 AM

Quote:

Originally Posted by Barry-xlovecam (Post 18327701)
Code:

ssh;

user@server$ locate timthumb.php

user@server$ locate thumb.php


find would be better, locate only works if the locate db is up to date.

cooldude7 08-03-2011 08:56 AM

luckily, i dont have timthumb.php on my server.

V_RocKs 08-03-2011 09:11 AM

Quote:

Originally Posted by cooldude7 (Post 18328668)
luckily, i dont have timthumb.php on my server.

No luck about it Cool Dude. It's called skill!

cooldude7 08-03-2011 12:22 PM

Quote:

Originally Posted by V_RocKs (Post 18328708)
No luck about it Cool Dude. It's called skill!

damn, just noticed , the theme i am working on for current project is using older version of timthumb, so 1st i upgraded that file to
http://code.google.com/p/timthumb/so...k/timthumb.php

and then secured it by

http://markmaunder.com/2011/zero-day...dpress-themes/


thanks guys....

Barry-xlovecam 08-03-2011 01:05 PM

Quote:

Originally Posted by fris (Post 18328648)
find would be better, locate only works if the locate db is up to date.

Code:

stat /var/lib/mlocate/mlocate.db
  File: `/var/lib/mlocate/mlocate.db'
  Size: 19579819          Blocks: 38248      IO Block: 4096  regular file
Device: 801h/2049d        Inode: 657262      Links: 1
Access: (0640/-rw-r-----)  Uid: (    0/    root)  Gid: (  108/ mlocate)
Access: 2011-08-03 16:02:09.454826368 -0400
Modify: 2011-08-03 07:48:35.783993745 -0400
Change: 2011-08-03 07:48:35.783993745 -0400

Yeah, mine is 8 hours + old ...

fris 08-03-2011 02:04 PM

Quote:

Originally Posted by Barry-xlovecam (Post 18329390)
Code:

stat /var/lib/mlocate/mlocate.db
  File: `/var/lib/mlocate/mlocate.db'
  Size: 19579819          Blocks: 38248      IO Block: 4096  regular file
Device: 801h/2049d        Inode: 657262      Links: 1
Access: (0640/-rw-r-----)  Uid: (    0/    root)  Gid: (  108/ mlocate)
Access: 2011-08-03 16:02:09.454826368 -0400
Modify: 2011-08-03 07:48:35.783993745 -0400
Change: 2011-08-03 07:48:35.783993745 -0400

Yeah, mine is 8 hours + old ...

plus thats freebsd isnt it?

Barry-xlovecam 08-03-2011 02:31 PM

Quote:

Originally Posted by fris (Post 18329562)
plus thats freebsd isnt it?


No, a LINUX ...

tonyparra 08-18-2011 10:41 AM

i have dozens that may use timthumb :helpme not going to be a fun weekend :mad:


All times are GMT -7. The time now is 05:05 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123