Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://danhilltech.tumblr.com/" rel="noreferrer">Dan Hill</a> wrote an <a href="http://www.tumblr.com/tagged/hack?before=1329947869" rel="noreferrer">article</a> about getting base64 hacked for WordPress installations.</p> <p>To quote the results of Dan's findings:</p> <blockquote> <p>The hack I found essentially created a new php file in the uploads folder of Wordpress that allowed remote filesystem control, and then modified the pages being served (every .php file) to include a script tag redirecting visitors to some dodgy sites.</p> </blockquote> <p><em>To get rid of the problem, <a href="http://danhilltech.tumblr.com/" rel="noreferrer">Dan</a> tried the following:</em></p> <hr> <p>I did this in three stages. First, find any world-writable directories (tsk tsk):</p> <pre><code>find . -type d -perm -o=w </code></pre> <p>And make them not world writable:</p> <pre><code>find . -type d -perm -o=w -print -exec chmod 770 {} \; </code></pre> <p>Delete all the new files these guys created:</p> <pre><code>find . -wholename '*wp-content/uploads/*.php' -exec rm -rf {} \; </code></pre> <p>(In wordpress, the uploads folder shouldn’t contain any PHP)</p> <p>Stage two, repair all your infected PHP files. I played around using sed and xargs for this, but eventually gave up and wrote a quick ruby script to do the job. Run this run this ruby script from your root directory:</p> <pre><code>#!/usr/bin/env ruby Dir.glob('**/*.php').each do|f| puts f begin contents = File.read(f) contents = contents.gsub(/\&lt;\?php \/\*\*\/ eval\(.*\)\);\?\&gt;/, "") File.open(f, 'w') {|f| f.write(contents) } rescue puts "FILE ERROR" end end </code></pre> <p>The final step is to upgrade all your old, forgotten about Wordpress installs to prevent any other vulnerabilities showing up. The bonus step for good luck is to reset your passwords, especially any MySQL passwords stored in plain text in your wp-config.php file.</p> <hr> <p>Hope Dan's findings help!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload