{"id":896,"date":"2008-11-08T02:03:44","date_gmt":"2008-11-08T01:03:44","guid":{"rendered":"http:\/\/www.craigmurphy.com\/blog\/?p=896"},"modified":"2008-11-15T13:29:42","modified_gmt":"2008-11-15T12:29:42","slug":"cleaning-up-after-the-wordpress-264-incident","status":"publish","type":"post","link":"http:\/\/www.craigmurphy.com\/blog\/?p=896","title":{"rendered":"Cleaning up after the WordPresz 2.6.4 incident"},"content":{"rendered":"<p>As many of you are probably aware, <a href=\"http:\/\/www.craigmurphy.com\/blog\/?p=874\">earlier this week<\/a> I noticed that my trusty <a href=\"http:\/\/wordpress.org\/\">WordPress<\/a> blog was duping me into downloading and installing an essential security upgrade to version 2.6.4.  At the time, I was running version 2.5.1.  You&#8217;re possibly wondering why I had not already upgraded to an authentic WordPress 2.6.x release&#8230;I am after all, supposed to be <em>setting an example<\/em>.  Well, a number of factors delayed the upgrade &#8211; most notably <a href=\"http:\/\/www.craigmurphy.com\/blog\/?p=879\">lots of travel<\/a> and a few time-consuming home-life issues meant the upgrade was back-burner-ed.  Via <a href=\"http:\/\/www.theregister.co.uk\/2008\/11\/06\/trojanised_wordpress\/\">The Register<\/a>, <a href=\"http:\/\/www.sophos.com\/security\/blog\/2008\/11\/1942.html\">Sophos<\/a> picked up on hack, classifying it as <a href=\"http:\/\/\">Troj\/WPHack-A.<\/a>   I managed to record a <a href=\"http:\/\/www.craigmurphy.com\/blog\/?p=887\">short video<\/a> of the dashboard hack, notice that I&#8217;m at WordPress 2.6.3&#8230;<\/p>\n<p>That being said, a small part of me always prefers to wait a while before upgrading, i.e. I don&#8217;t like to upgrade immediately.  If memory serves me, I recall a WordPress upgrade that caused me a few minor problems because I upgraded the moment it came out &#8211; it was soon followed by a further release.  Anyway, I&#8217;m digressing.<\/p>\n<p>Since Monday, I have upgraded to WordPress 2.6.3, twice.  Naturally I used the <a href=\"http:\/\/wordpress.org\/download\/\">definitive link<\/a> for getting my hands on the 2.6.3 zip file.  On both occasions the WordPresz 2.6.4 upgrade advice was still appearing in my dashboard.  I&#8217;ve also been liaising with the good folks over at WordPress and have followed as much of their advice as I can at this stage.  Huge thanks to the WordPress chaps for picking up on this issue &#8211; whilst it hasn&#8217;t affected me, I&#8217;m sure some folks have accidentally installed the fake 2.6.4 release.<\/p>\n<p>My second install of 2.6.3 saw me cleaning out the various wp-admin, wp-includes, folders and then FTPing a fresh 2.6.3 set of files.  I then started poking around in the WordPress database &#8211; table wp_options caught my attention.  Themes tend to leave a lot of fingerprints in wp_options, as do a number of plug-ins.  I cleaned out around about 40% of the <strong>wp_options<\/strong> records that were related to themes I no longer have installed.  <\/p>\n<p>After further searching, I found the field <strong>dashboard_widget_options<\/strong>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.craigmurphy.com\/blog\/wp-content\/uploads\/2008\/11\/wp_options.jpg\" style=\"border:none\" \/><\/p>\n<p>As you can see, the WordPresz 2.6.4 injection text, or at least part of it, is in there.  In order to remove it from my dashboard, I simply removed the entire contents of the dashboard_widget_options field, i.e. its content is empty &#8211; I did not delete the entire record.  WordPress was kind enough to recreate the contents of this record.<\/p>\n<p>Further poking around in wp_options revealed an RSS record: <strong>rss_412e29f6467d015b137ccc293b42bdff<\/strong>.  Its contents were familiar:<\/p>\n<blockquote><p>O:9:&#8221;MagpieRSS&#8221;:17:{s:6:&#8221;parser&#8221;;i:0;s:12:&#8221;current_item&#8221;;a:0:{}s:5:&#8221;items&#8221;;a:1:{i:0;a:4:{s:5:&#8221;title&#8221;;s:43:&#8221;High risk vulnerability for WordPress users&#8221;;s:11:&#8221;description&#8221;;s:132:&#8221;High risk vulnerability for WordPress users, we wanted to get an update out immediately.  2.6.4 is available for download right now.&#8221;;s:4:&#8221;link&#8221;;s:21:&#8221;http:\/\/wordpresz.org\/&#8221;;s:7:&#8221;summary&#8221;;s:132:&#8221;High risk vulnerability for WordPress users, we wanted to get an update out immediately.  2.6.4 is available for download right now.&#8221;;}}s:7:&#8221;channel&#8221;;a:7:{s:5:&#8221;title&#8221;;s:43:&#8221;High risk vulnerability for WordPress users&#8221;;s:4:&#8221;link&#8221;;s:21:&#8221;http:\/\/wordpresz.org\/&#8221;;s:11:&#8221;description&#8221;;s:29:&#8221;Just another WordPress weblog&#8221;;s:13:&#8221;lastbuilddate&#8221;;s:31:&#8221;Thu, 30 Oct 2008 02:29:53 +0000&#8243;;s:4:&#8221;docs&#8221;;s:34:&#8221;http:\/\/backend.userland.com\/rss092&#8243;;s:8:&#8221;language&#8221;;s:2:&#8221;en&#8221;;s:7:&#8221;tagline&#8221;;s:29:&#8221;Just another WordPress weblog&#8221;;}s:9:&#8221;textinput&#8221;;a:0:{}s:5:&#8221;image&#8221;;a:0:{}s:9:&#8221;feed_type&#8221;;s:3:&#8221;RSS&#8221;;s:12:&#8221;feed_version&#8221;;s:4:&#8221;0.92&#8243;;s:5:&#8221;stack&#8221;;a:0:{}s:9:&#8221;inchannel&#8221;;b:0;s:6:&#8221;initem&#8221;;b:0;s:9:&#8221;incontent&#8221;;b:0;s:11:&#8221;intextinput&#8221;;b:0;s:7:&#8221;inimage&#8221;;b:0;s:13:&#8221;current_field&#8221;;s:0:&#8221;&#8221;;s:17:&#8221;current_namespace&#8221;;b:0;s:19:&#8221;_CONTENT_CONSTRUCTS&#8221;;a:6:{i:0;s:7:&#8221;content&#8221;;i:1;s:7:&#8221;summary&#8221;;i:2;s:4:&#8221;info&#8221;;i:3;s:5:&#8221;title&#8221;;i:4;s:7:&#8221;tagline&#8221;;i:5;s:9:&#8221;copyright&#8221;;}}<\/p><\/blockquote>\n<p>I elected to remove (delete) that record (rss_412e29f6467d015b137ccc293b42bdff and rss_412e29f6467d015b137ccc293b42bdff_ts &#8211; I would imagine your field names might look a little different to mine).<\/p>\n<p>My WordPress 2.6.3 install is now looking a little healthier.  However there are still a number of unanswered questions.  How did the 2.6.4 information make its way into the wp_options table?  Was it a WordPress or a MySQL exploit or was it something else?  Has my MySQL database password been comprised in some way?  What about my FTP password?  Was a malicious theme responsible for this compromise? I am very close to developing a theme myself, hopefully that learning curve will help me find answers to some of these questions.  Who knows the answers to these questions?  Hopefully over time the truth will out, I would certainly like to know.<\/p>\n<p>Whatever the case, my blog hasn&#8217;t been visibly <a href=\"http:\/\/en.wikipedia.org\/wiki\/Owned\">owned<\/a> as yet&#8230;I suppose time will tell.  In the meantime, password changes are aplenty!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As many of you are probably aware, earlier this week I noticed that my trusty WordPress blog was duping me into downloading and installing an essential security upgrade to version 2.6.4. At the time, I was running version 2.5.1. You&#8217;re possibly wondering why I had not already upgraded to an authentic WordPress 2.6.x release&#8230;I am &hellip; <a href=\"http:\/\/www.craigmurphy.com\/blog\/?p=896\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Cleaning up after the WordPresz 2.6.4 incident<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,21],"tags":[178,174,180,34,166,179],"class_list":["post-896","post","type-post","status-publish","format-standard","hentry","category-on-blogging","category-security","tag-dashboard_widget_options","tag-sophos","tag-the-register","tag-wordpress","tag-wordpresz","tag-wp_options"],"_links":{"self":[{"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=896"}],"version-history":[{"count":7,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/896\/revisions"}],"predecessor-version":[{"id":949,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/896\/revisions\/949"}],"wp:attachment":[{"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=896"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.craigmurphy.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}