{"id":3197,"date":"2010-09-06T00:01:35","date_gmt":"2010-09-06T07:01:35","guid":{"rendered":"http:\/\/blog.webroot.com\/?p=3197"},"modified":"2018-01-30T12:34:33","modified_gmt":"2018-01-30T19:34:33","slug":"php-backdoor-has-another-backdoor-inside","status":"publish","type":"post","link":"https://www.webroot.com/blog/2010\/09\/06\/php-backdoor-has-another-backdoor-inside\/","title":{"rendered":"PHP Backdoor Has Another Backdoor Inside"},"content":{"rendered":"<p class=\"getsocial\" style=\"text-align: left;\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2005.png\" \/><a title=\"Add to Facebook\" href=\"http:\/\/www.facebook.com\/sharer.php?u=http:\/\/blog.webroot.com\/2010\/09\/06\/php-backdoor-has-another-backdoor-inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Facebook\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2015.png\" \/><\/a><a title=\"Add to Digg\" href=\"http:\/\/digg.com\/submit?phase=2&amp;url=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;title=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Digg\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2025.png\" \/><\/a><a title=\"Add to Del.icio.us\" href=\"http:\/\/del.icio.us\/post?url=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;title=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Del.icio.us\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2035.png\" \/><\/a><a title=\"Add to Stumbleupon\" href=\"http:\/\/www.stumbleupon.com\/submit?url=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;title=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Stumbleupon\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2045.png\" \/><\/a><a title=\"Add to Reddit\" href=\"http:\/\/reddit.com\/submit?url=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;title=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Reddit\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2055.png\" \/><\/a><a title=\"Add to Blinklist\" href=\"http:\/\/www.blinklist.com\/index.php?Action=Blink\/addblink.php&amp;Description=&amp;Url=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;Title=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Blinklist\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2065.png\" \/><\/a><a title=\"Add to Twitter\" href=\"http:\/\/twitter.com\/home\/?status=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside+%40+http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Twitter\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2075.png\" \/><\/a><a title=\"Add to Technorati\" href=\"http:\/\/www.technorati.com\/faves?add=http:\/\/blog.webroot.com\/2010\/09\/06\/php-backdoor-has-another-backdoor-inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Technorati\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2085.png\" \/><\/a><a title=\"Add to Yahoo Buzz\" href=\"http:\/\/buzz.yahoo.com\/buzz?targetUrl=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;headline=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Yahoo Buzz\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2095.png\" \/><\/a><a title=\"Add to Newsvine\" href=\"http:\/\/www.newsvine.com\/_wine\/save?u=http%3A%2F%2Fblog.webroot.com%2F2010%2F09%2F06%2Fphp-backdoor-has-another-backdoor-inside&amp;h=PHP%20Backdoor%20Has%20Another%20Backdoor%20Inside\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"Add to Newsvine\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2105.png\" \/><\/a><img decoding=\"async\" style=\"border: 0; margin: 0; padding: 0;\" alt=\"\" src=\"http:\/\/getsocialserver.files.wordpress.com\/2009\/08\/gs2115.png\" \/><\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_botcommands.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-full wp-image-3200\" title=\"20100905_backdoor_botcommands_crop\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_botcommands_crop.jpg\" width=\"313\" height=\"111\" \/><\/a>Is there no honor among thieves anymore?<\/p>\n<p>The other day I was looking at a remote access Trojan written in the PHP scripting language. The bot loads into memory on a victim&#8217;s computer when an unsuspecting user, for example, stumbles upon an iframe pointing to the PHP script embedded in a Web page. The code is\u00a0 nicely appointed with such desirable features as the ability to execute shell commands on the host server, send a flood of data packets at another computer, and scan remote computers.<\/p>\n<p>Once loaded into a victim&#8217;s browser, the bot connects to, and is capable of executing commands issued by, a botnet server&#8211;until the victim reboots their computer. But for most users, that&#8217;s probably long enough. If an attacker can execute commands on an infected user&#8217;s computer, installing more Trojans is just child&#8217;s play.<\/p>\n<p>But someone appears to have embedded a surprise into this PHP backdoor: It&#8217;s <em>another <\/em>backdoor within the backdoor.<\/p>\n<p><!--more--><\/p>\n<p>I&#8217;m not even going to try to understand why whoever is distributing the bot&#8217;s source code chose to name the Web domain where they&#8217;d store a Trojan<em> getemgirlfriday.com<\/em>. Perhaps a closet <a href=\"http:\/\/en.wikipedia.org\/wiki\/His_Girl_Friday\" target=\"_blank\">Howard Hawks or Rosalind Russell fan<\/a> camps out among the malcode community. Wonderful, in a loathsome sort of way. All I know is, someone&#8217;s bugged this bug with another bug.<\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_getemgirlfriday.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3201\" title=\"20100905_backdoor_getemgirlfriday\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_getemgirlfriday.jpg\" width=\"543\" height=\"91\" \/><\/a><\/p>\n<p>The second chunk of code, invoked during the PHP bot&#8217;s loading routine, looks to many like a blob of base64-encoded garbage. But to a security researcher, the presence of an unexpected, obfuscated code section screams <em>hidden goodies here<\/em>.<\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_base64.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3203\" title=\"20100905_backdoor_base64_crop\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_base64_crop.jpg\" width=\"298\" height=\"145\" \/><\/a><\/p>\n<p>Decoding base64-encoded text is not exactly difficult. Down near the end of the bot&#8217;s code, there&#8217;s this blob of data, set into the variable $dc_source.<\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_connectback.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3204\" title=\"20100905_backdoor_connectback\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_connectback.jpg\" width=\"366\" height=\"110\" \/><\/a><\/p>\n<p>Once decoded, the meaning of $dc_source becomes clear. The bot writes out the decoded commands into a Perl script then executes them.\u00a0 The commands instruct the bot to connect elsewhere. Were I the criminally minded type to use such a bot, I&#8217;m not sure I&#8217;d be particularly happy to discover the &#8220;Data Cha0s Connect Back Backdoor&#8221; on my server. I suppose that&#8217;s why the page hosting the code offers the following overblown expression of gratitude from the group distributing the code:<\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_thanksforall.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3205\" title=\"20100905_backdoor_thanksforall\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_thanksforall.jpg\" width=\"413\" height=\"44\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.imdb.com\/character\/ch0013378\/quotes\" target=\"_blank\">Go get &#8217;em, Hildy<\/a>. Happy Labor Day, everyone else.<\/p>\n<p><a href=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_hildyjohnson.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3212\" title=\"20100905_backdoor_hildyjohnson\" alt=\"\" src=\"http:\/\/webrootblog.files.wordpress.com\/2010\/09\/20100905_backdoor_hildyjohnson.jpg\" width=\"136\" height=\"170\" \/><\/a><\/p>\n<p><a title=\"wordpress blog stats\" href=\"http:\/\/www.statcounter.com\/wordpress.com\/\" target=\"_blank\"><img decoding=\"async\" alt=\"wordpress blog stats\" src=\"http:\/\/c.statcounter.com\/4868061\/0\/92d716bc\/1\/\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is there no honor among thieves anymore? The other day I was looking at a remote access Trojan written in the PHP scripting language. The bot loads into memory on a victim&#8217;s computer when an unsuspecting user, for example, stumbles upon an iframe pointing to the PHP script embedded in a Web page. The code [&hellip;]<\/p>\n","protected":false},"author":65,"featured_media":17052,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3005],"tags":[],"yst_prominent_words":[7799,7265,7947,5137,7945,3453,3769,7949,7951,4199,3919,5951,6163,4681,3895,4397,4143,3471,6623,4313],"acf":[],"_links":{"self":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/3197"}],"collection":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/comments?post=3197"}],"version-history":[{"count":1,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/3197\/revisions"}],"predecessor-version":[{"id":23824,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/posts\/3197\/revisions\/23824"}],"wp:featuredmedia":[{"embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/media\/17052"}],"wp:attachment":[{"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/media?parent=3197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/categories?post=3197"},{"taxonomy":"post_tag","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/tags?post=3197"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https://www.webroot.com/blog/wp-json\/wp\/v2\/yst_prominent_words?post=3197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}