{"id":970,"date":"2010-05-25T01:36:25","date_gmt":"2010-05-24T22:36:25","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=970"},"modified":"2010-05-25T01:36:25","modified_gmt":"2010-05-24T22:36:25","slug":"scanning-for-base64_decode-references","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/","title":{"rendered":"scanning for base64_decode references"},"content":{"rendered":"<p>A friend&#8217;s site was recently hit by the <a href=\"http:\/\/blog.sucuri.net\/2010\/05\/new-attack-today-against-wordpress.html\">massive infections\/hacks<\/a> on <a href=\"http:\/\/www.dreamhost.com\/\">Dreamhost<\/a>&#8216;s servers, so I decided to do some scanning on some servers that I administrate for base64_decode references.<\/p>\n<p>The simple command I used to find suspect files was:<br \/>\n<code># find . -name \\*.php -exec grep -l \"eval(base64_decode\" {} \\;<\/code><\/p>\n<p>The results could be sorted in just 2 categories. Malware and stupidity. There was no base64_decode reference that did something useful in any possible way.<\/p>\n<p>The best malware I found was a slightly modified version of the c99 php shell on a hacked joomla installation (the site has been hacked multiple times but the client insists on just re-installing the same joomla installation over and over and always wonders how the hell do they find him and hack him&#8230;oh well). c99 is impressive though&#8230;excellent work. I won&#8217;t post the c99 shell here&#8230;google it, you can even find infected sites running it and you can &#8220;play&#8221; with them if you like&#8230;<\/p>\n<p>And now comes the good part, stupidity.<br \/>\nMy favorite php code containing a base64_decode reference that I found:<br \/>\n<pre><code2 class=\"preserve-code-formatting\">$hash&nbsp;&nbsp;= &#039;aW5jbHVkZSgnLi4vLi&#039;;\n$hash .= &#039;4vaW5jX2NvbmYvY29u&#039;;\n$hash .= &#039;Zi5pbmMucGhwJyk7aW&#039;;\n$hash .= &#039;5jbHVkZSgnLi4vLi4v&#039;;\n$hash .= &#039;aW5jX2xpYi9kZWZhdW&#039;;\n$hash .= &#039;x0LmluYy5waHAnKTtl&#039;;\n$hash .= &#039;Y2hvICRwaHB3Y21zWy&#039;;\n$hash .= &#039;d2ZXJzaW9uJ107&#039;;\neval(base64_decode($hash));\n<\/code2><\/pre><\/p>\n<p>Let&#8217;s see what this little diamond does:<br \/>\n<pre><code2 class=\"preserve-code-formatting\">\n% base64 -d \naW5jbHVkZSgnLi4vLi4vaW5jX2NvbmYvY29uZi5pbmMucGhwJyk7aW5jbHVkZSgnLi4vLi4vaW5jX2xpYi9kZWZhdWx0LmluYy5waHAnKTtlY2hvICRwaHB3Y21zWyd2ZXJzaW9uJ107\ninclude(&#039;..\/..\/inc_conf\/conf.inc.php&#039;);include(&#039;..\/..\/inc_lib\/default.inc.php&#039;);echo $phpwcms[&#039;version&#039;];\n<\/code2><\/pre><\/p>\n<p>So this guy used a series of strings which all of them together create a base64 encoded string in order to prevent someone from changing the version tag of his software. That&#8217;s not software, that&#8217;s crapware. Hiding the code where the version string appears ? That&#8217;s how you protect your software ? COME OOOOON&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A friend&#8217;s site was recently hit by the massive infections\/hacks on Dreamhost&#8216;s servers, so I decided to do some scanning on some servers that I administrate for base64_decode references. The simple command I used to find suspect files was: # find . -name \\*.php -exec grep -l &#8220;eval(base64_decode&#8221; {} \\; The results could be sorted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[5,3,4],"tags":[279,281,231,280,595,278,277],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-internet","category-linux","category-privacy","tag-base64_decode","tag-crapware","tag-hack","tag-joomla","tag-linux","tag-malware","tag-php"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"A friend&#039;s site was recently hit by the massive infections\/hacks on Dreamhost&#039;s servers, so I decided to do some scanning on some servers that I administrate for base64_decode references. The simple command I used to find suspect files was: # find . -name \\*.php -exec grep -l &quot;eval(base64_decode&quot; {} \\; The results could be sorted\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"kargig\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#article\",\"name\":\"scanning for base64_decode references | Into.the.Void.\",\"headline\":\"scanning for base64_decode references\",\"author\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\"},\"datePublished\":\"2010-05-25T01:36:25+03:00\",\"dateModified\":\"2010-05-25T01:36:25+03:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#webpage\"},\"articleSection\":\"Internet, Linux, Privacy, base64_decode, crapware, hack, joomla, Linux, malware, php\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#listItem\",\"name\":\"scanning for base64_decode references\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#listItem\",\"position\":3,\"name\":\"scanning for base64_decode references\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\",\"name\":\"Into.the.Void.\",\"description\":\"Into The Void\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/kargig\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/\",\"name\":\"kargig\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#webpage\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/\",\"name\":\"scanning for base64_decode references | Into.the.Void.\",\"description\":\"A friend's site was recently hit by the massive infections\\\/hacks on Dreamhost's servers, so I decided to do some scanning on some servers that I administrate for base64_decode references. The simple command I used to find suspect files was: # find . -name \\\\*.php -exec grep -l \\\"eval(base64_decode\\\" {} \\\\; The results could be sorted\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2010\\\/05\\\/25\\\/scanning-for-base64_decode-references\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"datePublished\":\"2010-05-25T01:36:25+03:00\",\"dateModified\":\"2010-05-25T01:36:25+03:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"name\":\"Into.the.Void.\",\"description\":\"Into The Void\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"scanning for base64_decode references | Into.the.Void.","description":"A friend's site was recently hit by the massive infections\/hacks on Dreamhost's servers, so I decided to do some scanning on some servers that I administrate for base64_decode references. The simple command I used to find suspect files was: # find . -name \\*.php -exec grep -l \"eval(base64_decode\" {} \\; The results could be sorted","canonical_url":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#article","name":"scanning for base64_decode references | Into.the.Void.","headline":"scanning for base64_decode references","author":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"publisher":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization"},"datePublished":"2010-05-25T01:36:25+03:00","dateModified":"2010-05-25T01:36:25+03:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#webpage"},"isPartOf":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#webpage"},"articleSection":"Internet, Linux, Privacy, base64_decode, crapware, hack, joomla, Linux, malware, php"},{"@type":"BreadcrumbList","@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/www.void.gr\/kargig\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","name":"Linux"}},{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","position":2,"name":"Linux","item":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#listItem","name":"scanning for base64_decode references"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#listItem","position":3,"name":"scanning for base64_decode references","previousItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","name":"Linux"}}]},{"@type":"Organization","@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization","name":"Into.the.Void.","description":"Into The Void","url":"https:\/\/www.void.gr\/kargig\/blog\/","sameAs":["https:\/\/x.com\/kargig"]},{"@type":"Person","@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author","url":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/","name":"kargig"},{"@type":"WebPage","@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#webpage","url":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/","name":"scanning for base64_decode references | Into.the.Void.","description":"A friend's site was recently hit by the massive infections\/hacks on Dreamhost's servers, so I decided to do some scanning on some servers that I administrate for base64_decode references. The simple command I used to find suspect files was: # find . -name \\*.php -exec grep -l \"eval(base64_decode\" {} \\; The results could be sorted","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/#breadcrumblist"},"author":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"creator":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"datePublished":"2010-05-25T01:36:25+03:00","dateModified":"2010-05-25T01:36:25+03:00"},{"@type":"WebSite","@id":"https:\/\/www.void.gr\/kargig\/blog\/#website","url":"https:\/\/www.void.gr\/kargig\/blog\/","name":"Into.the.Void.","description":"Into The Void","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"970","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-01-04 11:56:20","updated":"2026-10-21 09:47:55","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.void.gr\/kargig\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/\" title=\"Linux\">Linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tscanning for base64_decode references\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.void.gr\/kargig\/blog\/"},{"label":"Linux","link":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/"},{"label":"scanning for base64_decode references","link":"https:\/\/www.void.gr\/kargig\/blog\/2010\/05\/25\/scanning-for-base64_decode-references\/"}],"views":9682,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=970"}],"version-history":[{"count":19,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":989,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/970\/revisions\/989"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}