由“Couldn‘t resolve host ‘mirrors.tencentyun.com‘“引发的安全问题

最近买了一个腾讯的云服务器,刚开始几天用起来没有一切都正常。后来发现使用yum update会报下面的错误:

Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
http://mirrors.tencentyun.com/epel/6/x86_64/repodata/repomd.xml : [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tencentyun.com'"
Trying other mirror.
http://mirrors.tencentyun.com/centos/6/extras/x86_64/repodata/repomd.xml : [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.tencentyun.com'"

mirrors.tencentyun.com是腾讯的内源,ping了一下,无法ping通,但是百度是可以通的,说明内网没问题。网上搜了一下,基本都说是需要设置下DNS,但是DNS一直没变过,而且之前也是没问题的,所以就怀疑是腾讯的内网出问题了,因为切换阿里网易的外网源是可以的。

联系腾讯的客服,让我修改下DNS,虽然不太相信,还是照办了,去修改 /etc/resolv.conf的时候,奇怪的事情发生了:提示文件是只读的,此时我用的是root权限,所以就chmod加写权限,但是并没有用,查看权限发现,文件被加了 i 权限!并且无法去除!

可能是中毒了,top一下,不看不知道,一看吓一跳

cpu占用率几乎百分之百,此时我只安装了一个ngnix mysql,而且直观上看不到哪个进程占用的!随后联系了腾讯的工程师,在他们帮助下看到了罪魁祸首

/usr/bin下有两个程序kthread bioset占用了所有的百分之90的cpu,是木马无疑了。

原因分析

刚买的主机,只设置了root的ssh远程登录,密码也比较简单,后来看安全记录是被暴力破解了,通过远程登录并植入了木马。所幸机器里没有重要的东西,黑客也只是用来挖矿,所以就重装了系统。

这件事也是给自己提个醒,加深下对网络完全的认知。采取的对策如下:

1.新增普通用户,ssh并使用密钥和密码登录

2.不再使用默认的ssh 22端口

3.关闭root的远程登录权限,对外只使用普通用户登录,需要使用root时使用sudo + 输入root密码确认

4.设置最大错误密码输入次数,多次输入错误限制登录,提高暴力破解的时间成本

5.在腾讯云端开启安全策略

6.启用系统定期快照,方便出问题时恢复系统。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
As an AI language model, I am not able to troubleshoot network issues or provide technical support. However, this error message usually means that the host "mirrors.aliyun.com" cannot be reached or resolved by the computer or device attempting to access it. Some possible causes for this error include: - DNS issues: The computer or device may not be able to resolve the domain name to an IP address. This could be due to a misconfigured DNS server or a problem with the network connection. - Firewall or proxy restrictions: The computer or device may be blocked from accessing the specified host by a firewall or proxy server. This could be due to security policies or network restrictions. - Server or network outage: The host may be temporarily unavailable due to maintenance or other issues. To troubleshoot this issue, you may try the following steps: - Check your network connection: Make sure that your computer or device is connected to the internet and that there are no connectivity issues. - Check your DNS settings: Ensure that your DNS settings are correct and that your computer or device can resolve domain names. - Check your firewall or proxy settings: If you are behind a firewall or proxy server, check that it is not blocking access to the specified host. - Try accessing the host from a different device or network: If possible, try accessing the host from a different device or network to see if the issue persists. If none of these steps resolves the issue, you may need to contact your network administrator or technical support for further assistance.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值