今天下午, 同事登录nginx服务器, 发现一个进程占用CPU100%:

搜索得知是一个挖矿木马, 通过redis漏洞来植入的。

检查crontab:

发现一个redis进程:

查看操作日志:

查看/root/.ssh/authorized_keys, 发现多了个不明key:

 

初步判明, 由于187和186上以前同事测ABTestingGateway时启动了两个redis, 但是没有设redis的密码, 因为redis是root帐户启动的, 所以通过redis把ssh public key写入了root的authorized_keys, 从而运行了一个cron程序, 之前一直没发现是因为内存和CPU使用率都在正常范围内(CPU使用率60%)

按照网上方法杀之:

  1. 删除不明key
  2. 杀掉进程并清理crontab和运行程序

增加防火墙策略:

Categories: SECURITY

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *