{
	"id": "d0eda196-e13e-4021-9ab3-22615e3d715e",
	"created_at": "2026-04-06T00:20:19.533573Z",
	"updated_at": "2026-04-10T03:20:34.787078Z",
	"deleted_at": null,
	"sha1_hash": "c899993e08c702b47e73d5e7d60102b6f555d029",
	"title": "蠕蟲惡意程式 Win32.Parite 深度分析與掃描程式",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 2750540,
	"plain_text": "蠕蟲惡意程式 Win32.Parite 深度分析與掃描程式\r\nBy IR Team\r\nPublished: 2023-02-14 · Archived: 2026-04-05 22:09:14 UTC\r\nTeamT5 資安事件應變團隊(Incident Response Team) 在某次事件調查中，發現受害主機中的執行\r\n檔遭受一款名為 Win32.Parite 的蠕蟲惡意程式感染。 受到感染的主機，會散播至其他執行檔並\r\n等待攻擊者連線；若連線成功後，攻擊者可在受感染的主機上執行各種通訊和數據收集行為，\r\n影響甚深。\r\n我們於本文詳細分析該惡意程式，也開發掃描程式與說明解毒方式，協助企業提升資安防禦能\r\n量。 我們並呼籲尚在使用 WinXP/2003/7 等32位元作業系統的組織、企業，建議可以使用掃瞄\r\n程式來掃內網系統。\r\n惡意程式 Win32.Parite 基本資訊\r\n圖片來源: VirusTotal\r\n惡意程式分析\r\nWin32.Parite - Shellcode\r\nTeamT5 取得惡意檔案，可以使用 Stud_PE 觀察，可以看到節區(Sections)裡面多了一個名稱為.heb節區，\r\n並且程式進入點(Entry Point)被指向該節區。Win32.Parite病毒的特徵，就是會將自己插入在最後一個節\r\n區，該節區名稱是隨機的字母組合。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 1 of 23\n\n進入點是一段小小的解碼程式(Decoder)，暫存器中的edx為xor解碼的運算數值，而esi為編碼資料的位\r\n址，edi為編碼資料的大小。解碼時，運算一次為4 bytes，全部處裡的範圍是\r\n0x43502E+4~0x43502E+0x59C，因為使用[push/pop] dword ptr [esi+edi]的手法，所以這裡的xor的目標位址\r\n才會是[esp]。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 2 of 23\n\n在理解了上述的組語後，可以使用010 Editor來做XOR的運算。解開後可以發現是一段shellcode的程式\r\n碼。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 3 of 23\n\n有趣的是此蠕蟲惡意程式也有變形的功能，觀察三個被感染的檔案，從中發現到shellcode的指令都不一\r\n樣，但目的都是相同的，都是要取得解碼的運算數值、編碼資料的位址與編碼資料的大小。\r\n解碼後，繼續分析shellcode程式碼，解開後的第一個組語的指令是一個call，下面緊接著是一個Parite自訂\r\n義的結構，裡面比較有趣的是原程式的進入點(OEP)是被編碼保護起來的。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 4 of 23\n\nShellcode的主程式的功能僅有幾項：\r\nGetDeclareAPI：取得要時用的API位址存於Stack\r\nRegQuery_PINF：查詢PINF機碼是否存在，內容存放病毒主體路徑\r\nCall_DLL_Initiate：呼叫主程式DLL中的Initiate，裡面包含解開EXE原始進入點\r\nDrop_DLL_File：如果PINF不存在時，會丟出病毒主體(DLL)及建立PINF登入檔機碼數值\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 5 of 23\n\nShellcode透過GetDeclareAPI(sub_435254)取得一些必要的Windows API後，接著透過\r\nRegQuery_PINF(sub_435360)查詢位於\r\nHKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer的PINF鍵值。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 6 of 23\n\n在被感染的機器中可以看到PINF的數值內容是\\x09\\x00，這地方的9為病毒版本，以\\x00分隔，後再接\r\nDLL路徑。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 7 of 23\n\n若該鍵值存在並且前2 bytes的數值大於等於9，shellcode會透過Call_DLL_Initate(sub_4353C8)載入病毒主\r\n體的DLL模組，並使用GetProcAddress取得Initiate函數位址，傳入000435032的組態位址後並且跳入執行。\r\n若該鍵值不存在，shellcode則會透過Drop_DLL_File(sub_435400)將位在後方的病毒主體(DLL)解碼後丟出\r\n來，接著執行Call_DLL_Initate(sub_4353C8)載入病毒主體的DLL模組。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 8 of 23\n\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 9 of 23\n\n而DLL的偏移位址(Offset)及檔案大小(Size)，還有編碼的XOR key，都可以在組態中看到。\r\n在Drop_DLL_File(sub_435400)函數裡面會呼叫Decoder_Content(sub_4355A0)函數，其內容是使用xor\r\ndword進行編解碼。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 10 of 23\n\nWin32.Parite - 病毒主體\r\n解碼出來的DLL使用UPX加殼，病毒主體模組本身是使用Delphi所撰寫，所導出的Initiate函數第23行有一\r\n個解碼原始進入點(OEP)的函數。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 11 of 23\n\nDecode_OEP(sub_4022BC)函數中的程式碼，主要是取得組態區塊中的43504D、43506E的二個陣列位址，\r\n經由sub_40232C函數進行運算，產生出16 bytes的數值，拆成4組DWORD值，與被編碼的OEP進行四次的\r\nXOR運算，最後的結果為原始OEP，有了OEP就能順利的修復被感染的PE執行檔。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 12 of 23\n\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 13 of 23\n\n接著使用SetWindowsHookExA設置全局鉤子，將DLL注入所有處理程序中。\r\n當被注入的處理程序為explorer.exe時，Win32.Parite則會開始執行蠕蟲的行為。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 14 of 23\n\nWin32.Parite - 後門功能\r\n在病毒主體DLL中的程式碼，可以看到一段有興趣的程式碼，Win32.Parite支援後門功能，後門利用UDP\r\n協議來發送指令，被控制端會監聽UDP 30167通訊埠等待接收指令，被控制端回報之結果會回傳到控制端\r\n的UDP 30168通訊埠，需要上傳資料時，則需要在控制端上監聽TCP 30169通訊埠，等待被控制端主動連\r\n線，此時就能上傳資料內容。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 15 of 23\n\n回報主機資訊\r\n控制端發送出e的字元到被控制端的UDP 30167通訊埠。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 16 of 23\n\n被控制端會回報主機資訊到控制端的UDP 30168通訊埠。\r\n執行指令\r\n控制端發送出y的字元，接著DWORD值，1是顯示在畫面中，0是隱藏在背景中執行，隨後跟著要下達的\r\n指令(可接參數)，最後以\\x00結尾。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 17 of 23\n\n當指令成功被執行後，被控制端會回傳g字元，後面接上Done的字串。\r\n上傳檔案\r\n控制端發送出z的字元，接著檔案名稱，最後以\\x00結尾，該檔案會被存放在%WINDIR%資料夾下。\r\n控制端監聽TCP 30169通訊埠，等待被控制端連線成功後之後便可以傳送的資料內容，結束連線後，資料\r\n將被寫入到檔案裡面。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 18 of 23\n\n修復被感染的檔案\r\n被感染的檔案差異\r\n這裡分析一下被感染後的執行檔有什麼變化：\r\nSection數多1\r\n原始進入點(OEP)被指向最後一個病毒所在的Section\r\n載入記憶體的映像檔(Image)變大\r\n修改了.rdata的屬性\r\n新增了新的病毒節區\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 19 of 23\n\n檔案比對中，還有最後被修改的二個地方，分別為C600、E9F8。\r\n可以看到這二個地方，其實是Import Tables中kernel32.dll的前二個函數，感染後的檔案因為沒寫自己取\r\nAPI的Shellcode，因此靠著在導入表中插入LoadLibraryA，GetProcAddress來確保Shellcode中能正常使用此\r\n二個函數取得要用的API，在執行Shellcode時會將其還原。\r\n解毒程式\r\n在了解被感染的檔案有什麼改變之後，我們便可以撰寫解毒程式來修復被感染的檔案。 解毒程式基本上\r\n做了以下的事情：\r\n1. 檢查進入點是否落在最後一個節區，且節區名稱為 .\r\n2. 讀取xor解碼的運算數值、編碼資料的位址與編碼資料的大小\r\n3. 解碼並讀取Parite的組態\r\n4. 解碼原始進入點(oep)\r\n5. NumberOfSections減1\r\n6. SizeOfImage減最後一個節區的虛擬大小\r\n7. 刪除最後一個節區頭\r\n8. 修改.rdata節區的屬性\r\n9. 修復導入表\r\n使用方法\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 20 of 23\n\nUsage: fix.exe \u003cfile or directory\u003e\r\n測試\r\n\u003e fix.exe setupSrv.exe\r\n修復好的檔案會在同樣路徑，檔案名稱以 _clean 結尾。 查看修復的檔案，可以看到最後一個被感染的節\r\n區與進入點(ep)都已經修正。\r\n檢查主機是否受害\r\n我們了解當控制端發送出e的字元到被控制端的UDP 30167通訊埠後，被控制端會回報主機資訊到控制端\r\n的UDP 30168通訊埠。 因此我們可以利用這點開發一個掃描程式，對內網主機傳送e的字元並在發送端監\r\n聽UDP 30168通訊埠等待回傳資訊。\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 21 of 23\n\n掃描程式\r\n使用方法\r\nUsage: scan.exe iplist\r\n測試\r\n\u003e scan.exe 127.0.0.1\r\n\u003e scan.exe 192.168.0.0/16\r\n掃描程式工具下載點\r\nIoC\r\nfile name md5 compiler-stamp (UTC) type\r\nsetupSrv.exe c5e7e7007b7ea6a3361fea7d4b029859 2009-12-04 13:35:59 UTC EXE\r\ncft3B18.tmp fe763c2d71419352141c77c310e600d2 2001-10-11 12:01:58 UTC DLL\r\nTeamT5 杜浦數位安全團隊長期研究與解析駭客族群入侵行為，具備第一線國內外資安事件處理\r\n的豐富經驗。當資安事件發生，我們可快速完成受駭現場與歷史軌跡的綜整分析，發掘攻擊者\r\n的入侵過程與手法，提供事件處理的深入分析及建議，協助您復原與改善資安環境。\r\n參考資料\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 22 of 23\n\nSource: https://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nhttps://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/\r\nPage 23 of 23",
	"extraction_quality": 1,
	"language": "ZH",
	"sources": [
		"Malpedia"
	],
	"references": [
		"https://teamt5.org/tw/posts/how-to-detect-and-recover-from-virus-win32-parite/"
	],
	"report_names": [
		"how-to-detect-and-recover-from-virus-win32-parite"
	],
	"threat_actors": [],
	"ts_created_at": 1775434819,
	"ts_updated_at": 1775791234,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/c899993e08c702b47e73d5e7d60102b6f555d029.pdf",
		"text": "https://archive.orkl.eu/c899993e08c702b47e73d5e7d60102b6f555d029.txt",
		"img": "https://archive.orkl.eu/c899993e08c702b47e73d5e7d60102b6f555d029.jpg"
	}
}