如何卸载阿里云盾、安骑士清除监控并屏蔽IP监测,1分钟搞定

使用阿里云ECS,卸载阿里云盾,尤其是香港和海外版的之前得先把监控软件干掉,虽然是用来监控咱们的云服务器是购安全,可用以起到自动扫描查杀病毒的作用,但是你懂的,不卸载清除阿里云监控(安骑士、阿里云盾)的话啥都给阿里云知道了,一点隐私都没了。因为厘米大神已经写过相关文章了,就分享给大家。

使用阿里云ECS,卸载阿里云盾,卸载安骑士,屏蔽监控,尤其是香港和海外版的之前得先把监控软件干掉,虽然是用来监控咱们的云服务器是购安全,可用以起到自动扫描查杀病毒的作用,但是你懂的,不卸载清除阿里云监控(安骑士、阿里云盾)的话啥都给阿里云知道了,一点隐私都没了。因为厘米大神已经写过相关文章了,就分享给大家。

如果你是用于特殊用途,还是建议使用国外VPS,这些问题全部都就不存在了,2019有哪些国外VPS值得推荐的呢?可以看2019年国外最便宜VPS推荐这篇文章。

卸载阿里云盾
卸载阿里云盾

从上图中查看进程管理可知,阿里云服务器后台都会运行AliYunDun、aliyun-service、AliYunDunUpdate这三个进程。而我们有些服务器可能不需要用上这个安全功能,因为重要功能都收费了,所以留着也是占资源:

  1. 木马查杀:这个功能也没有用,都种木马了,查也白查(估计以后会收费,或者拆分成高级功能收费)
  2. 暴力破解拦截:这个功能没有用,密码复杂点,用不用云盾都破解不了
  3. 异地登录提醒:这个功能没有用,都登陆了,还用你提示?

除了这三个根本没有其他免费功能了,所以我们要把他彻底卸载。

卸载阿里云盾/安骑士

wget http://update.aegis.aliyun.com/download/uninstall.sh
chmod +x uninstall.sh
./uninstall.sh
wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh
chmod +x quartz_uninstall.sh
./quartz_uninstall.sh

删除残留

pkill aliyun-service
rm -fr /etc/init.d/agentwatch /usr/sbin/aliyun-service
rm -rf /usr/local/aegis*

代码备份或者用网友简单粗暴版本:

#!/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

屏蔽云盾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 ! 欢迎信息了。

猜你喜欢

本站最新优惠

Namesilo优惠:新用户省 $1 域名注册-优惠码:45D%UYTcxYuCloZ 国外最便宜域名!点击了解更多

特别优惠:免费赠送 $100 Vultr主机-限时优惠!英文站必备海外服务器!点击了解更多

VPS优惠:搬瓦工优惠码:BWH3OGRI2BMW 最高省5.83%打开外面世界的一款主机点击了解更多

本文转载自dujin.org,原文链接:https://www.dujin.org/12870.html,本文观点不代表江湖人士立场,转载请联系原作者。

(0)
江小编的头像江小编
上一篇 2019-08-25 21:14
下一篇 2019-09-07 11:43

热门推荐

发表回复

登录后才能评论
畅访海外网站,外贸/外企/科技工作者专用工具,无缝体验真实的互联网,解锁LinkedIn访问
$19.95 /年
直达官网