1. 程式人生 > >【取證分析】Wannacry樣本取證特征與清除

【取證分析】Wannacry樣本取證特征與清除

english version class ros cpu占用率 .exe crypt 重要 解析

一、取證特征

1)網絡域名特征

http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com

2)文件特征

母體文件

mssecsvc.exe   

c:\\WINDOWS\\tasksche.exe
c:\\WINDOWS\\qeriuwjhrf

3)系統現象

CPU占用率100%

4)系統補丁號

Windows XP SP3    KB4012598
Windows XP x64 SP2    KB4012598
Windows 2003 SP2    KB4012598
Windows 2003 x64 SP2    KB4012598
Windows Vista Windows Server 2008    KB4012598
Windows 7    KB4012212
Windows Server 2008 R2    KB4012215
Windows 8.1    KB4012213
Windows 8.1    KB4012216
Windows Server2012    KB4012214
Windows Server2012    KB4012217
Windows Server2012 R2    KB4012213
Windows Server2012 R2    KB4012216
Windows 10    KB4012606
Windows 10 1511    KB4013198
Windows 10 1607    KB4013429

二、已感染病毒主機處置

1)感染主機處置

針對已感染WannaCry病毒的主機,首先進行斷網隔離,判斷加密文件的重要性,決定是否格式化磁盤重裝系統,還是保持斷網狀態等待進一步解密進展。

如果內網存在主機無法訪問外部網絡的情況,需要迅速在內網中添加DNS解析,將www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com解析到某臺內網中可以訪問的主機上,確保內網主機可以訪問該域名,阻斷蠕蟲的進一步傳播。

2)病毒清除

在被感染主機上,需要對蠕蟲進行清除:

1. 關閉進程:

關閉tasksche.exe進程:

不完全執行的狀態下,還可能有mssecsvc.exe,即最初啟動的那個進程,在後續完全執行的狀態下,還可能有其他tor等的進程。

2.刪除相關服務:

(1)刪除服務mssecsvc2.0,服務路徑:

C:/WINDOWS/tasksche.exe或者C:/WINDOWS/mssecsvc.bin -m security

(2)刪除hnjrymny834(該服務名可能隨機)服務:

查找對應的路徑,在其路徑名下刪除可執行文件。

3.清除註冊表項:

在註冊表中,刪除以下鍵值:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\hnjrymny834 “C:\ProgramData\hnjrymny834\tasksche.exe”

或者

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\hnjrymny834

4.刪除病毒文件:

病毒運行後,釋放的文件目錄存在於

C:\ProgramData\hnjrymny834
C:\Users\All Users\hnjrymny834

病毒的可執行文件主要有以下文件

C:\WINDOWS\tasksche.exe
C:\ProgramData\hnjrymny834\tasksche.exe
C:\Users\All Users\hnjrymny834\tasksche.exe

其他病毒相關文件還存在於

文件夾 PATH 列表:
C:.
│  00000000.eky
│  00000000.pky
│  00000000.res
│  @[email protected]
│  @[email protected]
│  @[email protected]
│  b.wnry
│  c.wnry
│  f.wnry
│  out.txt
│  r.wnry
│  s.wnry
│  t.wnry
│  taskdl.exe
│  taskse.exe
│  u.wnry
│  
├─msg
│      m_bulgarian.wnry
│      m_chinese (simplified).wnry
│      m_chinese (traditional).wnry
│      m_croatian.wnry
│      m_czech.wnry
│      m_danish.wnry
│      m_dutch.wnry
│      m_english.wnry
│      m_filipino.wnry
│      m_finnish.wnry
│      m_french.wnry
│      m_german.wnry
│      m_greek.wnry
│      m_indonesian.wnry
│      m_italian.wnry
│      m_japanese.wnry
│      m_korean.wnry
│      m_latvian.wnry
│      m_norwegian.wnry
│      m_polish.wnry
│      m_portuguese.wnry
│      m_romanian.wnry
│      m_russian.wnry
│      m_slovak.wnry
│      m_spanish.wnry
│      m_swedish.wnry
│      m_turkish.wnry
│      m_vietnamese.wnry
│      
└─TaskData
    ├─Data
    │  └─Tor
    └─Tor
            libeay32.dll
            libevent-2-0-5.dll
            libevent_core-2-0-5.dll
            libevent_extra-2-0-5.dll
            libgcc_s_sjlj-1.dll
            libssp-0.dll
            ssleay32.dll
            taskhsvc.exe
            tor.exe
            zlib1.dll

三、參考

http://www.rising.com.cn/2017/eb/
http://blog.nsfocus.net/wannacry-blackmail-event-disposal-handbook/

【取證分析】Wannacry樣本取證特征與清除