分析該軟件在(1)啓動回連,(2)安裝到目標機(3)及其餘任意操做時(如進程遷移或抓屏,重要是你感興趣)。該後門軟件chrome
(3)讀取、添加、刪除了哪些註冊表項shell
(4)讀取、添加、刪除了哪些文件windows
(5)鏈接了哪些外部IP,傳輸了什麼數據(抓包分析)網絡
使用schtasks /create /TN netstat5317 /sc MINUTE /MO 1 /TR "cmd /c netstat -bn > c:\netstatlog.txt"
命令建立計劃任務netstat5317
工具
TN
是TaskName的縮寫,咱們建立的計劃任務名是netstat5317;sc
表示計時方式,咱們以分鐘計時填MINUTE;TR
=Task Run,要運行的指令是 netstatbn
,b
表示顯示可執行文件名,n
表示以數字來顯示IP和端口;>
表示輸出重定向,將輸出存放在c:\netstatlog.txt
文件中netstat5317.bat
腳本文件,寫入如下內容 (能夠先創建文本文檔,再修改拓展名)date /t >> c:\netstat20165317.txt time /t >> c:\netstat20165317.txt netstat -bn >> c:\netstat20165317.txt
打開任務計劃程序,能夠看到新建立的這個任務:
性能
雙擊這個任務,點擊操做並編輯,將「程序或腳本」改成咱們建立的netstat5317.bat
批處理文件,肯定便可。
網站
條件
選項卡中,取消勾選只有在計算機使用交流電源時才啓動此任務
;常規
選項卡中,選擇無論用戶是否登錄都要運行
,勾選不儲存密碼
,並勾選使用最高權限運行
;執行此腳本必定時間,就能夠在netstat20165317.txt
文件中查看到本機在該時間段內的聯網記錄:
firefox
使用Excel統計所收集的數據
線程
sysmon20165317.xml
<Sysmon schemaversion="4.12"> <!-- Capture all hashes --> <HashAlgorithms>*</HashAlgorithms> <EventFiltering> <!-- Log all drivers except if the signature --> <!-- contains Microsoft or Windows --> <ProcessCreate onmatch="exclude"> <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> </ProcessCreate> <ProcessCreate onmatch="include"> <ParentImage condition="end with">cmd.exe</ParentImage> </ProcessCreate> <FileCreateTime onmatch="exclude" > <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> </FileCreateTime> <NetworkConnect onmatch="exclude"> <Image condition="end with">chrome.exe</Image> <Image condition="end with">firefox.exe</Image> <SourcePort condition="is">137</SourcePort> <SourceIp condition="is">127.0.0.1</SourceIp> </NetworkConnect> <NetworkConnect onmatch="include"> <DestinationPort condition="is">80</DestinationPort> <DestinationPort condition="is">443</DestinationPort> </NetworkConnect> <CreateRemoteThread onmatch="include"> <TargetImage condition="end with">explorer.exe</TargetImage> <TargetImage condition="end with">svchost.exe</TargetImage> <TargetImage condition="end with">firefox.exe</TargetImage> <TargetImage condition="end with">winlogon.exe</TargetImage> <SourceImage condition="end with">powershell.exe</SourceImage> </CreateRemoteThread> </EventFiltering> </Sysmon>
sysmon.exe -i sysmon20165317.xml
安裝sysmon。右擊個人電腦->管理->事件查看器->應用程序和服務日誌->Microsoft->Windows->Sysmon->Operational。在這裏,咱們能夠看到按照配置文件的要求記錄的新事件,以及事件ID、任務類別、詳細信息等等
設計
打開kali,運行木馬文件,使其回連kali攻擊機。查看日誌,經過搜索關鍵字能夠找到相關的後門文件:
從中能夠查看到端口號和目標主機。
Process Explorer是Windows系統和應用程序監視工具,包括Filemon(文件監視器)和Regmon(註冊表監視器),還有多項重要的加強功能。包括穩定性和性能改進、強大的過濾選項、修正的進程樹對話框(增長了進程存活時間圖表)、可根據點擊位置變換的右擊菜單過濾條目、集成帶源代碼存儲的堆棧跟蹤對話框、更快的堆棧跟蹤、可在 64位 Windows 上加載 32位 日誌文件的能力、監視映像(DLL和內核模式驅動程序)加載、系統引導時記錄全部操做等。
(1)若是在工做中懷疑一臺主機上有惡意代碼,但只是猜測,全部想監控下系統一每天的到底在幹些什麼。請設計下你想監控的操做有哪些,用什麼方法來監控。
使用windows自帶的schtasks指令設置一個計劃任務,每隔必定的時間對主機的聯網記錄等進行記錄。
使用sysmon工具,經過配置想要監控的端口、註冊表信息、網絡鏈接等信息,記錄相關的日誌文件。
利用wireshark查看數據包
(2)若是已經肯定是某個程序或進程有問題,你有什麼工具能夠進一步獲得它的哪些信息。
使用Wireshark進行抓包分析
使用systracer工具分析惡意軟件,進行快照的對比(註冊表、文件等).
使用Process Explorer查看調用的程序庫