Results 1 to 2 of 2

Thread: Cron for copying file, replacing all existing instances? (Fixing timthumb exploit)

  1. #1

    Default Cron for copying file, replacing all existing instances? (Fixing timthumb exploit)

    I'm trying to figure out a cron job which will copy a file (timthumb.php) from the root of ftp (above public_html) and recursively replace all existing instances of the file throughout the FTP. My linux and cron knowledge is minimal, so I'm hoping someone more experienced may be able to help with this. I'm also open to other ideas if someone has another method for doing this.

    The master file would live at:
    /timthumb.php

    A cron would run daily to replace instances such as:
    /public_html/wp-content/themes/xxxxxx/scripts/timthumb.php
    or
    /public_html/mysite1/tools/timthumb.php

    (We're assuming the instance will always be named timthumb.php, so there's no need to look into the content of the file)


    The goal of this cron is to prevent old instances of timthumb from existing. I've already search via SSH and replaced all the instances on our accounts. The issue is if one of our clients decides to install a wordpress plugin, it may contain an old version of timthumb, recreating the vulnerability we removed.

    Any help or ideas would be greatly appreciated
    Thanks
    -Sam


    You can read about the timthumb exploit here:
    http://markmaunder.com/2011/08/01/ze...dpress-themes/

  2. #2
    Join Date
    Apr 2008
    Location
    Chasing the Holy Grail - Pacific Northwest
    Posts
    1,312

    Default

    timthumb.php is not the only instance of this. Some themes installed this and called it thumb.php.

    Your best bet may be to advise your clients to check with you first before installing and new themes.
    In the Hyperion universe, a farcaster is an instantaneous transportation device.
    Experience: The thing you get just after you need it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •