

BlackTech 组织与他们使用的恶意软件Gh0stTimes
source link: https://paper.seebug.org/1737/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

译者:知道创宇404实验室翻译组
原文链接:https://blogs.jpcert.or.jp/en/2021/10/gh0sttimes.html
自2018年以来,黑客组织BlackTech一直在频繁攻击日本组织。虽然它不像以前那么突出,日本计算机应急响应协调中心(JPCERT/CC)现在仍然可以看到它的一些案例。这篇文章介绍了恶意软件Gh0stTimes的详细信息。
Gh0stTimes概述
Gh0stTimes是基于Gh0st RAT定制的,自2020年以来已经在一些攻击案例中使用。下图显示了Gh0stTimes和Gh0st RAT代码的比较。
- C2服务器控制面板
与Gh0st RAT一样,Gh0stTimes与C2服务器通信时使用自定义协议,但包格式不同。下图显示了通信流程。
RC4
加密的,然后是zlib
压缩的。Gh0stTimes使用其自定义RC4算法,该算法对加密数据进行XOR 0xAC
处理。import zlib
# Load keydata for first packet
with open(args[1], "rb") as fb:
keydata = fb.read()
# Load encoded packet data
with open(args[2], "rb") as fb:
data = fb.read()
comp_data = custom_rc4(data[12:], keydata[5:21])
dec_data = zlib.decompress(comp_data)
def custom_rc4(data, keydata):
key = []
key_1 = [0x98, 0x19, 0x3C, 0x56, 0xD9, 0xBB, 0xC7, 0x86, 0xFF, 0x3E]
key_2 = [0] * 16
key_3 = [0xAC, 0xBB, 0x30, 0x5E, 0xCC, 0xDD, 0x19, 0x23, 0xFC, 0xBD]
keybox = [7, 0, 2, 3, 9, 10, 4, 13, 14, 8, 1, 11, 5, 6, 12, 15]
i = 0
for i in range(16):
key_2[i] = keydata[keybox[i]]
key = key_1 + key_2 + key_3
x = 0
box = list(range(256))
for i in range(256):
x = (x + box[i] + key[i % len(key)]) % 256
box[i], box[x] = box[x], box[i]
x = 0
y = 0
out = []
for char in data:
x = (x + 1) % 256
y = (y + box[x]) % 256
box[x], box[y] = box[y], box[x]
out.append((char ^ box[(box[x] + box[y]) % 256] ^ 0xAC).to_bytes(1, byteorder='little'))
return b''.join(out)
Gh0stTimes配备了以下5种类型的命令:
- FileManager(命令号0x1):文件操作
- ShellManager(命令编号0x28):远程shell执行
- PortmapManager(命令号0x32): C2服务器重定向功能
- UltraPortmapManager(命令号0x3F):代理功能
- 无名称(命令号0):结束通信
BlackTech使用的某些类型的恶意软件包含伪代码,这会加大分析难度。Gh0stTimes便有这样的代码(图7),但是它对分析没有太大的影响。
C2服务器控制面板
在分析过程中,我们发现了Gh0stTimes控制面板。图8显示了控制面板运行时的GUI
。这个被命名为“Times v1.2”。
BlackTech一直在进行攻击行动,我们将继续分析和监控。请确保您的任何设备都没有与它们通信。 我们已经确定,感染Gh0stTimes的服务器也会受到其他类型的恶意软件影响,如下载程序,后门,ELF Bifrose和下面列出的攻击工具。请注意,这些工具可能被BlackTech使用。
- https://github.com/Yang0615777/PocList
- https://github.com/liuxu54898/CVE-2021-3019
- https://github.com/knownsec/pocsuite3
- Citrix exploit tool
- MikroTik exploit tool
- Exploit for CVE-2021-28482
- Exploit for CVE-2021-1472/CVE-2021-1473
- Exploit for CVE-2021-28149/CVE-2021-28152
- Exploit for CVE-2021-21975/CVE-2021-21983
- Exploit for CVE-2018-2628
- Exploit for CVE-2021-2135
附录A:交换数据
Table A-1: Format of data sentOffset Length Contents 0x00 4 ID 0x04 4 Data length xor 0x3A4BFDCC 0x08 4 Data length after 0x0C before compression xor 0x7C2E56D2 0x0C - Encrypted data (zlib + RC4) Table A-2: Format of data receivedOffset Length Contents 0x00 4 ID 0x04 4 Data length xor 0xC3A2B5D2 0x08 4 Data length after 0x0C before compression xor 0x68FC2AD3 0x0C - Encrypted data (zlib + RC4)附录B: 命令
Table B: FileManager commands Value Contents 2 SendFilesList 3 UploadToRemote 4 CreateLocalRecvFile 5 WriteLocalRecvFile 7 SendFileData 8 StopTransfer 9 DeleteFile 10 DeleteDirectory 11 GetFileData 12 CreateFolder 13 MoveFile 14 OpenFile(SW_SHOW) 15 OpenFile(SW_HIDE)附录C:IoCs
- tftpupdate.ftpserver.biz
- 108.61.163.36(zoomeye搜索结果)
- update.centosupdates.com
- 107.191.61.40(zoomeye搜索结果)
- osscach2023.hicloud.tw
- 103.85.24.122(zoomeye搜索结果)
- 106.186.121.154(zoomeye搜索结果)
附录D: Malware hash value
- 01581f0b1818db4f2cdd9542fd8d663896dc043efb6a80a92aadfac59ddb7684
- 18a696b09d0b7e41ad8ab6a05b84a3022f427382290ce58f079dec7b07e86165
- 15b8dddbfa37317ccdfbc340764cd0f43b1fb8915b1817b5666c4816ccb98e7c
- 849ec6055f0c18eff76170912d8500d3da7be1435a9117d67f2134138c7e70c3
- f19ab3fcbc555a059d953196b6d1b04818a59e2dc5075cf1357cee84c9d6260b
- 836b873ab9807fbdd8855d960250084c89af0c4a6ecb75991542a7deb60bd119
- a69a2b2a6f5a68c466880f4c634bad137cb9ae39c2c3e30c0bc44c2f07a01e8a
- bd02ca03355e0ee423ba0e31384d21b4afbd8973dc888480bd4376310fe6af71
本文由 Seebug Paper 发布,如需转载请注明来源。本文地址:https://paper.seebug.org/1737/
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK