昨天下载了个大佬分享的PTCMS开心版,里面有三个木马。
http://hostloc.wiki/forum.php?mod=viewthread&tid=443648昨天一直没时间弄,刚刚开始弄,扫了一下发现有三个文件不对。
这位大佬从淘宝买的,但淘宝店主不知道哪里弄的,而且很有可能就是淘宝店主放的马。
下载了并使用了的,注意一下:
\ptcms\library\yarclient.php
\ptcms\driver\view\mc.php
\ptcms\library\bae\BaeImageService.class.php
其中第一个文件yarclient.php铁定是个后门,后面两个疑似后门。
有phper大佬帮忙检查一下这三个文件,再分享出来吧。 慕大夜 发表于 2018-4-18 21:54
大佬你是怎么查杀的?我不会这个,百度在线查杀,还下了个叫护卫神的查杀没查出 ...
下次看到不错的源码 先解压出来 用D盾扫一下,基本可疑的东西都能扫出来,然后自己打开看一下
http://www.d99net.net/down/WebShellKill_V2.0.9.zip 感谢大佬告知! 谢谢大佬提醒,前排关注一下 广而告之。。。。。 虽然不懂php,但是第一个的这个名字yc008t
yar->backyard->后庭->菊花->后门 是不是应该让,@我是人处理一下呢? yc014t我 草 不会吧,我找源码没有扫的习惯也不会,多谢提醒,我这就去255了,防止别的mjj上当,之前用了我分享的源码的mjj都查下!给大家道歉,不好意思! <?php
if (!class_exists('Yar_Client')) {
class Yar_client {
protected $uri;
/**
* @param $uri
*/
public function __construct($uri) {
$this->uri = $uri;
}
public function __call($method, $params = array()) {
$data = $this->pack($method, $params);
if ($res = $this->exec($data)) {
return $res;
}
exit('采集错误!方法' . $method . ' 参数:' . json_encode($params));
}
public function exec($data) {
//执行最多5次,防止失败!
for ($i = 1; $i < 5; $i++) {
$content = http::post($this->uri, $data);
if ($content) return $this->unpack($content);
}
return false;
}
/**
* from Yar_Simple_Protocol
*
* @param $method
* @param $params
* @return array
*/
public static function pack($method, $params) {
$struct = array(
'i' => time(),
'm' => $method,
'p' => $params,
);
$body = str_pad('PHP', 8, chr(0)) . serialize($struct);
//transaction id
$header = sprintf('%08x', mt_rand());
//protocl version
$header .= sprintf('%04x', 0);
//magic_num, default is: 0x80DFEC60
$header .= '80DFEC60';
//reserved
$header .= sprintf('%08x', 0);
//reqeust from who
$header .= sprintf('%064x', 0);
//request token, used for authentication
$header .= sprintf('%064x', 0);
//request body len
$header .= sprintf('%08x', strlen($body));
$data = '';
for ($i = 0; $i < strlen($header); $i = $i + 2)
$data .= chr(hexdec('0x' . $header[$i] . $header[$i + 1]));
$data .= $body;
return $data;
}
/**
* curl结果解析
*
* @param $con
* @return mixed
* @throws Exception
*/
public static function unpack($con) {
$ret = unserialize(substr($con, 82 + 8));
if ($ret['s'] === 0) {
return $ret['r'];
} elseif (is_array($ret)) {
throw new Exception($ret['e']);
} else {
return '';
//throw new Exception('malformed response header');
}
}
}
}
慕大夜 发表于 2018-4-18 21:47
我 草 不会吧,我找源码没有扫的习惯也不会,多谢提醒,我这就去255了,防止别的mjj上当,之前用了我 ...
我想了下还是不255,这样没人看到了,我已经把网盘地址去掉了。 大佬你是怎么查杀的?我不会这个,百度在线查杀,还下了个叫护卫神的查杀没查出