{"id":57,"date":"2009-05-19T23:08:44","date_gmt":"2009-05-20T04:08:44","guid":{"rendered":"http:\/\/www.danielansari.com\/wordpress\/?p=57"},"modified":"2009-05-21T09:19:17","modified_gmt":"2009-05-21T14:19:17","slug":"automatic-removal-of-gumblarmartuz-trojan","status":"publish","type":"post","link":"http:\/\/www.danielansari.com\/wordpress\/2009\/05\/automatic-removal-of-gumblarmartuz-trojan\/","title":{"rendered":"Automatic removal of Gumblar\/Martuz trojan"},"content":{"rendered":"<p>I won&#8217;t duplicate information contained on other websites, but I will refer to them here instead.<\/p>\n<h3>How your machine gets infected by Gumblar, or a &#8220;Gumblaroid&#8221; (Gumblar-type exploit) such as Martuz<\/h3>\n<p><a href=\"http:\/\/blog.unmaskparasites.com\/2009\/05\/07\/gumblar-cn-exploit-12-facts-about-this-injected-script\/\">http:\/\/blog.unmaskparasites.com\/2009\/05\/07\/gumblar-cn-exploit-12-facts-about-this-injected-script\/<\/a><br \/>\n<a href=\"http:\/\/blog.unmaskparasites.com\/2009\/05\/18\/martuz-cn-is-a-new-incarnation-of-gumblar-exploit\/\">http:\/\/blog.unmaskparasites.com\/2009\/05\/18\/martuz-cn-is-a-new-incarnation-of-gumblar-exploit\/<\/a><br \/>\n<a href=\"http:\/\/www.pcauthority.com.au\/forums\/yaf_postsm289075_A-nasty-virus-called-Gumblar.aspx\">http:\/\/www.pcauthority.com.au\/forums\/yaf_postsm289075_A-nasty-virus-called-Gumblar.aspx<\/a><\/p>\n<h3>How to determine if your PC has the infection<\/h3>\n<p><a href=\"http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695\">http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695<\/a><\/p>\n<p>These were the symptoms that I noticed on my PC:<\/p>\n<p>1. My Visual Studio .NET 2005 was crashing a lot, and I could not get any work done using it.<br \/>\n2. In Firefox 3, each search result would initially redirect to a bogus ad page (I always open search results in a new tab), but clicking the search result once more would open the genuine page.<br \/>\n3. I could not start cmd from the XP Start\/Run menu item.<\/p>\n<h3>How I removed this malware from my PC<\/h3>\n<p>1. I installed and scanned my PC with Malwarebytes&#8217; Anti-Malware, which found the single file &#8211; in my case it was C:\\WINDOWS\\ukvvq.qnx &#8211; that was keeping the infection active. Manually deleting it, or letting Anti-Malware attempt to delete it, would delete it, but the file would reappear almost immediately. Don&#8217;t worry if Anti-Malware is unable to update its definitions online &#8211; this is another symptom of Gumblar &#8211; it still detects it, though as something else.<br \/>\n2. I ran Hijackthis (I didn&#8217;t need a scan), chose &#8220;misc tools&#8221;, and chose &#8220;delete file on reboot&#8221; for this file (according to <a href=\"http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695\">http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695<\/a>).<br \/>\n3. I ran regedit and deleted the registry entry (according to <a href=\"http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695\">http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695<\/a>).<\/p>\n<p>That was it to remove it from my PC, voila! To protect my PC from re-infection, I disabled Adobe JavaScript according to <a href=\"http:\/\/www.pcauthority.com.au\/forums\/yaf_postsm289075_A-nasty-virus-called-Gumblar.aspx\">http:\/\/www.pcauthority.com.au\/forums\/yaf_postsm289075_A-nasty-virus-called-Gumblar.aspx<\/a>.<\/p>\n<p>Unfortunately, it seems that several people resorted to rebuilding their machines from scratch.<\/p>\n<h3>How to remove the infection from a website<\/h3>\n<p>If you manage websites using an FTP program, there is a chance that your sites have become infected. The first thing you must do is change the ftp passwords after your machine has been cleaned.<\/p>\n<p>As yet, I am unaware of any automated script which removes the infection from a website, so I wrote my own and applied it to 5 of the websites that I manage that were infected.<\/p>\n<p>I started off using the script by rad-one at <a href=\"http:\/\/blog.unmaskparasites.com\/2009\/05\/07\/gumblar-cn-exploit-12-facts-about-this-injected-script\/comment-page-1\/#comment-896\">http:\/\/blog.unmaskparasites.com\/2009\/05\/07\/gumblar-cn-exploit-12-facts-about-this-injected-script\/comment-page-1\/#comment-896<\/a>.<\/p>\n<p>I modified it heavily to use PHP regular expressions, to remove the gumblar modifications in html, php, and js files (it scans files with all extensions except .bak). Unlike rad-one&#8217;s detection script, this one yielded zero false positives for me, and eradicated the infection completely, as far as I can tell.<\/p>\n<p>Here is what my script does:<\/p>\n<p>1. Recurses through the whole website, excluding files and\/or directories of your choosing.<br \/>\n2. Applies regular expressions to remove the infection from all the files (except those with the .bak extension) in each directory.<br \/>\n3. All modified files are backed up using the .bak extension.<br \/>\n4. Removes all files with paths ending in \/images\/image.php or \/images\/gifimg.php.<br \/>\n5. Runs in report mode by default, so you can see which files would be modified.<br \/>\n6. Has a &#8220;verbose&#8221; option, so you can see how each file will be modified.<\/p>\n<p>It does not change directory permissions. I haven&#8217;t got around to investigating that area yet.<\/p>\n<p>You may download it <a href=\"\/wordpress\/code\/scan_files.zip\">here<\/a>. (Use at your own risk.)<\/p>\n<h4>Instructions for use<\/h4>\n<ol>\n<li>Place the file scan_files.php at your web document root.<\/li>\n<li>Invoke it with no parameters to run it in report mode, where no modifications will be made.<\/li>\n<li>Use scan_files.php?v=1 to run it in verbose mode.<\/li>\n<li>Use scan_files.php?u=1 to run it in update mode, where the modifications will actually be made.<\/li>\n<li>Use scan_files.php?u=1&amp;v=1 to run it in both update and verbose modes.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I won&#8217;t duplicate information contained on other websites, but I will refer to them here instead. How your machine gets infected by Gumblar, or a &#8220;Gumblaroid&#8221; (Gumblar-type exploit) such as Martuz http:\/\/blog.unmaskparasites.com\/2009\/05\/07\/gumblar-cn-exploit-12-facts-about-this-injected-script\/ http:\/\/blog.unmaskparasites.com\/2009\/05\/18\/martuz-cn-is-a-new-incarnation-of-gumblar-exploit\/ http:\/\/www.pcauthority.com.au\/forums\/yaf_postsm289075_A-nasty-virus-called-Gumblar.aspx How to determine if your PC has the infection http:\/\/www.dynamicdrive.com\/forums\/showthread.php?p=194695 These were the symptoms that I noticed on my PC: 1. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[10,26,11],"_links":{"self":[{"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/posts\/57"}],"collection":[{"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":7,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":59,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/posts\/57\/revisions\/59"}],"wp:attachment":[{"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.danielansari.com\/wordpress\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}