欢迎来到好人卡资源网,专注网络技术资源收集,我们不仅是网络资源的搬运工,也生产原创资源。寻找资源请留言或关注公众号:烈日下的男人

阿里云 ECS 云盾(安骑士)卸载

linux sky995 7年前 (2017-09-10) 2093次浏览 0个评论

本文及资源最后更新时间 2017-09-10 by sky995

阿里云 ECS 云盾(安骑士)卸载

使用阿里云ECS(尤其是海外的)之前得先把监控软件干掉,要不然啥都给阿里云监控了,一点隐私都没了。下面转载一篇卸载过程的日志,以后用得上。
一、卸载云盾(安骑士)
直接上:
$ curl -sSL http://update.aegis.aliyun.com/download/quartz_uninstall.sh | sudo bash

$ sudo rm -rf /usr/local/aegis

$ sudo rm /usr/sbin/aliyun-service

$ sudo rm /lib/systemd/system/aliyun.service
代码备份
或者用网友简单粗暴版本:
#!/bin/bash
rm -rf /usr/local/aegis
for A in $(ps aux | grep Ali | grep -v grep | awk ‘{print $2}’)
do
kill -9 $A;
done
腾讯云解决方案
据说腾讯云也有类似问题:转:
#!/bin/bash
#fuck tx process
rm -rf /usr/local/sa
rm -rf /usr/local/agenttools
rm -rf /usr/local/qcloud
process=(sap100 secu-tcs-agent sgagent64 barad_agent agent agentPlugInD pvdriver )
for i in ${process[@]}
do
for A in $(ps aux | grep $i | grep -v grep | awk ‘{print $2}’)
do
kill -9 $A
done
done

chkconfig –level 35 postfix off
service postfix stop
echo ”>/var/spool/cron/root
echo ‘#!/bin/bash’ >/etc/rc.local
Links:
https://www.v2ex.com/t/217931
https://help.aliyun.com/knowledge_detail/40477.html
二、屏蔽云盾 IP
而后检查服务器记录时发现一堆 Alibaba.Security.Heimdall 的访问记录。网上查询发现是云盾。
根据官方介绍:
云盾会通过公网模拟黑客入侵攻击,进行安全扫描。所以服务器有安全防护时,需要对云盾扫描ip进行放行。
赶快屏蔽!
此处使用 UFW,iptables 用户请自己找一下添加方法。注意:如果已有接受 80 端口之类的规则,新增的拒绝 IP 规则在其后将不会生效。所以要在 /etc/ufw/before.rules 设置。
sudo nano 编辑此文件并找到 # End required lines,在其后添加:
# Block Ali Yun Dun https://help.aliyun.com/knowledge_detail/37436.html

-A ufw-before-input -s 140.205.201.0/28 -j DROP
-A ufw-before-input -s 140.205.201.16/29 -j DROP
-A ufw-before-input -s 140.205.201.32/28 -j DROP
-A ufw-before-input -s 140.205.225.192/29 -j DROP
-A ufw-before-input -s 140.205.225.200/30 -j DROP
-A ufw-before-input -s 140.205.225.184/29 -j DROP
-A ufw-before-input -s 140.205.225.183/32 -j DROP
-A ufw-before-input -s 140.205.225.206/32 -j DROP
-A ufw-before-input -s 140.205.225.205/32 -j DROP
-A ufw-before-input -s 140.205.225.195/32 -j DROP
-A ufw-before-input -s 140.205.225.204/32 -j DROP
保存后运行 sudo ufw reload。完毕!
三、删除阿里云登录界面欢迎信息
每次登录看到
Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-19-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

Welcome to Alibaba Cloud Elastic Compute Service !

Last login from
就莫名的不爽,于是查了一下 sudo nano /etc/motd 就可以编辑/删除倒数第二行的 Welcome to Alibaba Cloud Elastic Compute Service ! 欢迎信息了。
原文链接:https://blog.whe.me/post/uninstall-aliyun-monitoring.html


好人卡资源网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:阿里云 ECS 云盾(安骑士)卸载
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址