{"id":2593,"date":"2008-08-15T00:40:55","date_gmt":"2008-08-15T04:40:55","guid":{"rendered":"http:\/\/www.prefblog.com\/?p=2593"},"modified":"2008-08-15T00:40:55","modified_gmt":"2008-08-15T04:40:55","slug":"prefblog-hacked","status":"publish","type":"post","link":"https:\/\/prefblog.com\/?p=2593","title":{"rendered":"PrefBlog Hacked!"},"content":{"rendered":"<p><a href=\"http:\/\/wordpress.org\/support\/topic\/196762\">My query<\/a><\/p>\n<p><a href=\"http:\/\/wordpress.org\/support\/topic\/178824\">A similar query<\/a><\/p>\n<p><a href=\"http:\/\/linux.byexamples.com\/archives\/397\/wordpress-exploit-we-been-hit-by-hidden-spam-link-injection\/\">A good explanation<\/a>. I had one of these. I took the call to &#8220;wp_footer()&#8221; out of my footer.php file, and that stopped that nonsense. I couldn&#8217;t find any of the files noted in this articles example; I can only hope it gets weeded out on a re-install.<\/p>\n<p><a href=\"http:\/\/www.teohuiming.name\/blog\/wordpress-exploit\">An even better explanation<\/a> &#8230; I got one of those &#8220;active_ plugins&#8221;, but the option value is &#8220;a:0:{}&#8221;. I have no idea what it means &#8230; it looks like a placeholder. What I do have is one with &#8220;option_name&#8221; equal to &#8220;wp_links&#8221;, with the &#8220;freemacwareDOTcom&#8221; address conspicuously highlighted. This was causing popups on closure. I have <a href='http:\/\/www.prefblog.com\/wp-content\/uploads\/2008\/08\/id_1029_name_wp_links.txt' title='id_1029_name_wp_links.txt'>uploaded the value of the memo field<\/a> for scientific purposes. NOTE: I removed all of the left-angle brackets (&#8220;<\") from this file to disable the code.\n\n<a href=\"http:\/\/technorati.com\/weblog\/2008\/04\/424.html\">Not indexed by Technocrati<\/a> &#8230; How wonderful! Now I&#8217;ll have to reinstall the current version of WordPress and cross my fingers that I can still understand it!<\/p>\n<p><a href=\"http:\/\/www.village-idiot.org\/archives\/2008\/04\/03\/wordpress-capturing-_post-requests\/\">Capturing $_POST commands<\/a> &#8230; I just might try this, you know. PrefBlog has been under heavy attack lately by spam comments.<\/p>\n<p>So anyway &#8230; my apologies to all readers who have been inconvenienced &#8211; or simply puzzled &#8211; by the recent popups. Please let me know of any odd behavior by PrefBlog (I mean odd behavior that is system-related, of course!) in the future and I&#8217;ll be that much quicker tracking things down.<\/p>\n<p><b>Update, 2008-8-16<\/b>: The database has a table, wp_postmeta, which tracks attachments. One record in this table has the values: meta_id=8474, post_id=2181, meta_key = &#8216;_wp_attached_file&#8217;, meta_value=&#8217;\/services1\/webpages\/p\/r\/prefblog.com<br \/>\/public\/\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/tmp\/10bum.txt&#8217;<\/p>\n<p>There is also: meta_id=8472, post_id=2180, meta_key = &#8216;__wp_attached_file&#8217;, meta_value = &#8216;\/services1\/webpages\/p\/r\/prefblog.com<br \/>\/public\/\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/tmp\/2newbum.txt&#8217;<\/p>\n<p>These records have been removed.<\/p>\n<p>I have also deleted some entries in the wp_posts table. As far as I can make out from the <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/get_post\">WordPress codex<\/a> the value of &#8216;post_parent&#8217; should reference a &#8216;post_id&#8217; in the same table, which are all positive integers.<\/p>\n<p>After noting some odd entries, I queried the database: &#8216;select * from wp_posts where post_parent < 0' and came up with seven records. Two have post_parent set to numbers that are large and negative; the 'guid' field indicates that this is stuff that I did, in fact, upload but somehow screwed up.\n\nThe remaining 5 records all have post_parent set to -1, with 'guid' having a variety of values: the first one, with 'post_modifed' = '2008-03-25 05:26:58' has 'guid' = 'http:\/\/www.prefblog.com<br \/>\/\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/..\/tmp\/3rbsmag.txt&#8217;. The other entries are similar, with filenames 10bum.txt (three times) and 2newbum.txt.<\/p>\n<p>All these records have been deleted. Note that with these long field values, I have added a HTML line-break to make the full field look nice on this post.<\/p>\n<p>I note that the first of these highly suspicious entries occurred within a week of my WP 2.3.3 installation! I have <a href=\"http:\/\/wordpress.org\/support\/topic\/197203?replies=1\">requested database validation<\/a> for forthcoming releases of WordPress.<\/p>\n<p><b>Update, 2008-8-16<\/b>: Problems with the file 3rbsmag.txt <a href=\"http:\/\/wordpress.org\/support\/topic\/163322?replies=6\">have been discussed on WordPress<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>My query A similar query A good explanation. I had one of these. I took the call to &#8220;wp_footer()&#8221; out of my footer.php file, and that stopped that nonsense. I couldn&#8217;t find any of the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2593","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/prefblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prefblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prefblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prefblog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2593"}],"version-history":[{"count":0,"href":"https:\/\/prefblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2593\/revisions"}],"wp:attachment":[{"href":"https:\/\/prefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prefblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}