作者:
大學生
·
2015/04/25 21:05
0x00 前言
原文:http://resources.infosecinstitute.com/zero-access-malware/
木馬Zero Access到目前為止已經在世界範圍內感染了過億的計算機,嗯,ZA(Zero Access)能夠發展到這一個級別我想其中一個原因是因為惡意廣告的點選,和氾濫的比特幣挖掘。一旦ZA感染系統就會開始下載各種不同型別的惡意軟體,總的來說無論是個人還是組織一旦遭受感染最後的損失肯定不會小。
ZA的傳播媒介主要是 惡意郵件和 漏洞利用工具,同時也會透過分散式的p2p檔案分享服務,或者是看起來像 遊戲破解工具 和 序號產生器的軟體來傳播。ZA本身是有很多獨特的地方,感染之後ZA會連線到一個基於p2p的殭屍網路,之後想要繼續追蹤是非常難得。
ZA本身使用了先進的隱藏機制來逃避,殺軟和防火牆的檢測和逃避。(省略一小段扯淡的話) 可執行檔案通常在%TEMP%資料夾中,透過http請求與外部網站進行通訊。
一旦ZA感染你的系統,會進行如下的操作:
用你的sb系統進行點選詐騙和比特幣挖掘。
下載別的惡意軟體....
開啟殺軟逃逸功能
提取計算機上的資訊
0x01 分析
我們一開始進行的分析過程如下:
我們的第一步是隔離受感染的機器,然後對系統進行一次掃描,初次掃描我們沒有發現任何東西,但是在第二次掃描的時候我們發現在workstation中的%TEMP%資料夾新建了一個檔案。
在%SYSTEM%目錄中我們又發現了另外一個可疑檔案,這個似乎是某種配置檔案,並且該檔案處在ACL保護狀態下。
檔案在sandbox中執行的時候進行了網路操作。
檔名稱為fvshis.sav,內容已加密。
在檔案執行的過程中我們提取了記憶體中的字串很明顯的可以看到使用了Max++ dropper元件。


下一步我們很happy的分析了 dropper(用於惡意軟體的安裝)元件,咋一看這狗日的玩意好像沒加殼,

然而之後的分析,我們發現這玩意是加過殼的,使用了一些複雜的自定義加殼器,還使用了幾種不同的反debugging機制來鼓勵我們友好的加班。

int 20指令是一種系統中斷。
PS: 沒樣本,不過應該前幾個寫入了int 20,利用CPU會預讀取指令的特點,干擾單步跟蹤。如:
mov word ptr [@@],20cdh
@@:
nop
nop
正常情況下CPU預讀了2個nop,而不會執行INT 20(cd20),但單步跟蹤下來就不同了。
就是說程式可以檢測自己是否處於debugging狀態並且kill自己。
ZA本身還有著多層的加密機制,和他坑爹的殼。

剛才說了現在分析的是dropper,相當於一種部署惡意軟體的玩意,殼對其中的每一個段進行了加密,dropper執行的時候會一步一步進行解密,一次解密一個程式碼段,並且每個程式碼塊都有INT 20(mlgb...),如果分析狗哪裡一不小心多點了幾下單步,那麼程式崩潰。
在我們富有基情的努力下,最後還是完成了脫殼。之後我們就發現樣本嘗試訪問位於計算機中的一些目錄。

我們注意到的另一件事情,從使用int20我們可以看出,這玩意是一個執行在核心模式下的Ring0 rootkit,在分析了記憶體之後我們還發現惡意樣本在記憶體中建立了一個互斥鎖來檢測計算機之前是否被同樣的東西感染過。

另一個發現就是這玩意把自己注入到了 (explorer.exe)程式中,並且利用其來執行payload。

上面說了樣本是執行在核心模式下,我們發現其實是將惡意軟體作為一個核心模組安裝。

ZA會將自己偽裝成一個裝置驅動程式B48DADF8.sys,我們將這個核心dump 下來進行進一步分析。

初步的分析中,ZA發出了一些可以的網路流量,初步判斷是類似上線通知一樣的東西,跟打劍靈的時候“好友xxxx上線”差不多。


同時發出了一下http請求到特定的域名


這玩意顯然是想先建立連線,然後下載別的惡意程式。

之後我們分析了該域名,似乎是位於瑞士的蘇黎世,嗯,瑞士這個國家的法律會在很大程度上保護他們公民的隱私,同時也導致了網路罪犯們很喜歡把自己的 C&C伺服器託管在瑞士。

我們對域名進行了進一步的分析,發現該域名實際上預設到三個不同地方的ip,唯一的共同點就是當地的隱私保護做的很全面。

0x02 結語
我省略了一下類似安全建議的東西。
我們找到了三個ip
141.8.225.62 (Switzerland)
199.79.60.109 (Cayman Islands)
208.91.196.109 (Cayman Islands)
雖然這玩意不竊取使用者資訊,不過他會產生大量的網路流量,進行點選詐騙和比特幣挖掘。
本文章來源於烏雲知識庫,此映象為了方便大家學習研究,文章版權歸烏雲知識庫!