進程是系統運行的縮影,準確識別非法進程是手動查殺木馬/病毒的核心技能。本文提供從可視化工具到註冊表/服務/安全模式的完整清除鏈路。
resmon (資源監視器) / Process Explorer (Sysinternals,推薦)。System (PID 4)、smss.exe、csrss.exe、wininit.exe、services.exe、lsass.exe、winlogon.exe、explorer.exe、svchost.exe (多實例)、spoolsv.exe、taskhostw.exe、dwm.exe、fontdrvhost.exe、SearchIndexer.exe 等。| 紅旗指標 | 說明 | 驗證方法 |
|---|---|---|
| 路徑異常 | 不在 C:\Windows\System32/SysWOW64/Program Files 等標準目錄 | Process Explorer → Image 道 → Verify Signatures / Properties → Image Path |
| 無數位簽名/簽名無效/自簽名 | 合法微軟/知名廠商程式均有有效 EV 代碼簽名 | Process Explorer → Verify Signatures (綠色=受信任,紅色=無效/無簽名) |
| 命令列參數異常 | 包含編碼腳本、下載命令、反彈 Shell 特徵 (powershell -enc、cmd /c、wscript //E:jscript) | Process Explorer → Image 道 → Command Line |
| 父進程異常 | 如 winword.exe 產生 cmd.exe/powershell.exe、svchost.exe 非 services.exe 啟動 | Process Explorer → Tree View / Parent Process |
| 網絡行為異常 | 非業務端口、連接惡意 IP/域名、大量出站流量、周期性心跳 | Process Explorer → TCP/IP 道 / TCPView / netstat -ano |
regedit (管理員)。HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunHKLM\...\RunOnceHKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunHKCU\...\RunOnceHKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run (32 位程式)HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices (舊版)HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run、HKCU\...\Policies\Explorer\Run。services.msc。regedit → HKLM\SYSTEM\CurrentControlSet\Services\服務名 → 刪除整個鍵 → 重啟。$runPaths = @(
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce',
'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce',
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run',
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices'
)
foreach ($path in $runPaths) {
if (Test-Path $path) {
Get-ItemProperty $path | ForEach-Object {
$_.PSObject.Properties | Where-Object { $_.Name -notmatch '^PS' } | ForEach-Object {
$val = $_.Value
if ($val -and ($val -match '^[^:]*[\\/][^\\/]*\.(exe|bat|cmd|vbs|ps1|js|jse|wsf|scr|msi|dll)$' -or $val -match '(Temp|AppData|Public|ProgramData)' -or $val -match '^\s*[a-z]{1,8}\.exe\s*$')) {
Write-Warning "Suspicious: $path \ $($_.Name) = $val"
}
}
}
}
}
掌握進程分析方法論,配合正確工具鏈與自動化腳本,非法進程無處遁形。**持續練習、建立基線、保持好奇**,是安全分析師的核心素養。