天天看點

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

病毒分析之Virut病毒感染樣本分析(setup.exe)

樣本概況

檔案: C:\Users\Hades-win7\Desktop\setup_mima666\setup.exe

大小: 369664 bytes

檔案版本:8.0.50727.42 (RTM.050727-4200)

修改時間: 2014年4月21日, 11:18:00

MD5: E29DAE6188A0B0BB797C42F68D8DFA41

SHA1: 16B5B2BBEFD499AAE7B3B6111ABB2409AC76FAB1

CRC32: 43952BC7

該樣本為正常程式被病毒感染後的樣本,運作效果如圖:

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

惡意行為

2.1建立記憶體映射,注入程序

2.2修改系統資料庫,添加防火牆信任清單

2.3挂鈎系統函數,過濾消息感染程序

2.4連接配接惡意網址,發送資料,接收資料,接受遠端控制(伺服器ilo.brenz.pl ant.trenz.pl)

2.5感染移動磁盤,複制病毒并建立autorun.inf檔案,寫入啟動資訊為病毒

2.6感染可執行檔案

分析記錄

執行完病毒代碼後,調用原程式執行.

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

建立病毒檔案到臨時目錄

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

通過Hash值來動态擷取函數位址.

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

使用GetTickCount函數與rdtsc指令擷取代碼執行時間,判斷是否處于調試狀态,驗證通過恢複代碼繼續執行.

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

申請記憶體拷貝惡意代碼并執行

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

加載advapi32.dll擷取函數并提權

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

建立程序快照,周遊程序,前四個程序不做操作,之後的程序對第一個可打開的程序HookAPI,建立共享記憶體,建立遠端線程.剩餘其他程序全部做inlineHook,但不執行遠端線程

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

開始Hook幾個核心

API(ZwDeviceIoControlFile,ZwOpenFile,ZwCreateProcess,ZwCreateProcessEx,ZwCreateUserProcess,ZwQueryInformationProcess)

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

挂鈎核心函數

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

建立記憶體映射之後,建立遠端線程,執行惡意代碼.

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

修改系統資料庫,添加防火牆信任清單

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

連接配接惡意網址線程

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

判斷移動磁盤,複制病毒檔案到移動磁盤,并建立autorun.inf檔案

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

建立socket連接配接,連接配接伺服器受控

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

可連接配接網址現在的狀态

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

發送資料

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

感染檔案會分成幾種類型,讀取要被感染的檔案,通過判斷入口附近是否有API調用等确定感染方式

如果有kernel32中的函數調用,更改其代碼: call dword ptr [ api ] 改成 jmp virut

沒有的話直接修改其入口等.

Virut類型病毒其感染方式多種,多态解密運作.是一個很有意思的樣本.感染檔案部分詳細分析後能很大的增長自己的功力

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)
病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

過濾資料包,含有以下字元的udp包全部攔截

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

執行流程

病毒分析之Virut病毒感染樣本分析(setup.exe)病毒分析之Virut病毒感染樣本分析(setup.exe)

參考文章:    virut詳細分析   https://www.cnblogs.com/Mikhail/p/5615286.html

繼續閱讀