ランサムウェアを探す

注:

Microsoft Defender XDRを体験したいですか? Microsoft Defender XDRを評価およびパイロットする方法について詳しくは、こちらをご覧ください。

適用対象:

  • Microsoft Defender XDR

ランサムウェアは、個々のコンピューター ユーザーに影響を与える単純なコモディティ マルウェアから、業界や政府機関に深刻な影響を与える企業の脅威へと急速に進化しました。 Microsoft Defender XDRはランサムウェアや関連する侵入アクティビティを検出およびブロックする多くの機能を提供しますが、侵害の兆候を事前にチェックすると、ネットワークの保護を維持するのに役立ちます。

人が操作するランサムウェアについて読む

Microsoft Defender XDRの高度なハンティングを使用すると、ランサムウェア アクティビティに関連付けられている個々の成果物を検索するクエリを作成できます。 さらに高度なクエリを実行して、アクティビティの兆候を探し、それらの兆候の重み付けを行って、すぐに注意が必要なデバイスを見つけることもできます。

ランサムウェア アクティビティの兆候

Microsoft のセキュリティ研究者は、高度な侵入者によって開始された多くのランサムウェア キャンペーンで、さまざまな一般的で微妙なアーティファクトを観察してきました。 これらの兆候には、暗号化の準備、検出の防止、フォレンジック証拠のクリアのためのシステム ツールの使用が主に含まれます。

ランサムウェアのアクティビティ 一般的なツール Intent
プロセスを停止する taskkill.exeネットストップ 暗号化の対象となるファイルがさまざまなアプリケーションによってロックされていないことを確認します。
サービスをオフにする sc.exe - 暗号化の対象となるファイルがさまざまなアプリケーションによってロックされていないことを確認します。
- セキュリティ ソフトウェアが暗号化やその他のランサムウェア アクティビティを中断しないようにします。
- 回復可能なコピーの作成からバックアップ ソフトウェアを停止します。
ログとファイルを削除する cipher.exewevtutilfsutil.exe フォレンジック証拠を削除します。
シャドウ コピーを削除する vsadmin.exewmic.exe 暗号化されたファイルの回復に使用できるドライブ シャドウ コピーを削除します。
バックアップの削除と停止 wbadmin.exe 既存のバックアップを削除し、スケジュールされたバックアップ タスクを停止し、暗号化後の回復を防ぎます。
ブート設定を変更する bcdedit.exe 暗号化プロセスによって発生する可能性があるブート エラーの後に警告と自動修復をオフにします。
回復ツールをオフにする schtasks.exeregedit.exe [システムの復元] やその他のシステム回復オプションをオフにします。

ランサムウェア アクティビティの個々の兆候を確認する

前のセクションで説明したアクティビティを含め、ランサムウェアの動作を構成する多くのアクティビティは問題ありません。 次のクエリを使用してランサムウェアを見つける場合は、複数のクエリを実行して、同じデバイスがランサムウェア アクティビティのさまざまな兆候を示しているかどうかをチェックします。

taskkill.exe を使用して複数のプロセスを停止する

このクエリでは、 taskkill.exe ユーティリティを使用して、少なくとも 10 個の個別のプロセスを停止する試行がチェックされます。 クエリの実行

// Find attempts to stop processes using taskkill.exe
DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "taskkill.exe" 
| summarize taskKillCount = dcount(ProcessCommandLine), TaskKillList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 2m)
| where taskKillCount > 10

net stop を使用したプロセス の停止

このクエリは、 net stop コマンドを使用して、少なくとも 10 個の個別のプロセスを停止しようとする試みをチェックします。 クエリの実行

// Find attempts to stop processes using net stop
DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "net.exe" and ProcessCommandLine has "stop"
| summarize netStopCount = dcount(ProcessCommandLine), NetStopList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 2m)
| where netStopCount > 10

cipher.exe を使用して複数のドライブ上のデータを削除する

このクエリでは、cipher.exeを使用して複数のドライブ上のデータを削除する試行 確認します。 このアクティビティは通常、暗号化後のデータの回復を防ぐためにランサムウェアによって実行されます。 クエリの実行

// Look for cipher.exe deleting data from multiple drives
DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "cipher.exe" 
// cipher.exe /w flag used for deleting data 
| where ProcessCommandLine has "/w" 
| summarize CipherCount = dcount(ProcessCommandLine),
CipherList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 1m) 
// cipher.exe accessing multiple drives in a short timeframe 
| where CipherCount > 1

wevtutil を使用したイベント ログからのフォレンジック証拠のクリア

このクエリでは、 wevtutil を使用して、イベント ログから少なくとも 10 個のログ エントリをクリアしようとする試行がチェックされます。 クエリの実行

// Look for use of wevtutil to clear multiple logs
DeviceProcessEvents
| where Timestamp > ago(1d)
| where ProcessCommandLine has "WEVTUTIL" and ProcessCommandLine has "CL"
| summarize LogClearCount = dcount(ProcessCommandLine), ClearedLogList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 5m)
| where LogClearCount > 10

sc.exe を使用してサービスをオフにする

このクエリでは、sc.exeを使用して、少なくとも 10 個の既存のサービスをオフにする試行 確認します。 クエリの実行

// Look for sc.exe disabling services
DeviceProcessEvents
| where Timestamp > ago(1d)
| where ProcessCommandLine has "sc" and ProcessCommandLine has "config" and ProcessCommandLine has "disabled"
| summarize ScDisableCount = dcount(ProcessCommandLine), ScDisableList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 5m)
| where ScDisableCount > 10

システムの復元をオフにする

このクエリは、システムの復元を停止し、システムが復元ポイントを作成できないようにする試行を識別します。これは、ランサムウェアによって暗号化されたデータを回復するために使用できます。 クエリの実行

DeviceProcessEvents
//Pivoting for rundll32  
| where InitiatingProcessFileName =~ 'rundll32.exe'   
//Looking for empty command line   
and InitiatingProcessCommandLine !contains " " and InitiatingProcessCommandLine != ""  
//Looking for schtasks.exe as the created process  
and FileName in~ ('schtasks.exe')  
//Disabling system restore   
and ProcessCommandLine has 'Change' and ProcessCommandLine has 'SystemRestore' 
and ProcessCommandLine has 'disable'

バックアップの削除

このクエリでは、暗号化の前にシャドウ コピー スナップショットを削除するための wmic.exe の使用を識別します。 クエリの実行

DeviceProcessEvents
| where FileName =~ "wmic.exe"
| where ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete"
| project DeviceId, Timestamp, InitiatingProcessFileName, FileName,
ProcessCommandLine, InitiatingProcessIntegrityLevel, InitiatingProcessParentFileName

ランサムウェア アクティビティの複数の兆候を確認する

複数のクエリを個別に実行する代わりに、ランサムウェア アクティビティの複数の兆候をチェックする包括的なクエリを使用して、影響を受けるデバイスを特定することもできます。 次の統合クエリ:

  • ランサムウェア アクティビティの比較的具体的な兆候と微妙な兆候の両方を探します
  • これらの兆候の存在の重み付け
  • ランサムウェアのターゲットになる可能性が高いデバイスを識別します

この統合クエリを実行すると、複数の攻撃の兆候を示したデバイスの一覧が返されます。 ランサムウェア アクティビティの種類ごとの数も表示されます。 この統合クエリを実行するには、 高度なハンティング クエリ エディターに直接コピーします。

// Find attempts to stop processes using taskkill.exe
let taskKill = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "taskkill.exe" 
| summarize taskKillCount = dcount(ProcessCommandLine), TaskKillList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 2m)
| where taskKillCount > 10;
// Find attempts to stop processes using net stop
let netStop = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "net.exe" and ProcessCommandLine has "stop"
| summarize netStopCount = dcount(ProcessCommandLine), NetStopList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 2m)
| where netStopCount > 10;
// Look for cipher.exe deleting data from multiple drives
let cipher = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "cipher.exe" 
// cipher.exe /w flag used for deleting data 
| where ProcessCommandLine has "/w" 
| summarize CipherCount = dcount(ProcessCommandLine), 
CipherList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 1m) 
// cipher.exe accessing multiple drives in a short timeframe 
| where CipherCount > 1;
// Look for use of wevtutil to clear multiple logs
let wevtutilClear = DeviceProcessEvents
| where Timestamp > ago(1d)
| where ProcessCommandLine has "WEVTUTIL" and ProcessCommandLine has "CL"
| summarize LogClearCount = dcount(ProcessCommandLine), ClearedLogList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 5m)
| where LogClearCount > 10;
// Look for sc.exe disabling services
let scDisable = DeviceProcessEvents
| where Timestamp > ago(1d)
| where ProcessCommandLine has "sc" and ProcessCommandLine has "config" and ProcessCommandLine has "disabled"
| summarize ScDisableCount = dcount(ProcessCommandLine), ScDisableList = make_set(ProcessCommandLine) by DeviceId, bin(Timestamp, 5m)
| where ScDisableCount > 10;
// Main query for counting and aggregating evidence
DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "vssadmin.exe" and ProcessCommandLine has_any("list shadows", "delete shadows")
or FileName =~ "fsutil.exe" and ProcessCommandLine has "usn" and ProcessCommandLine has "deletejournal"
or ProcessCommandLine has("bcdedit") and ProcessCommandLine has_any("recoveryenabled no", "bootstatuspolicy ignoreallfailures")
or ProcessCommandLine has "wbadmin" and ProcessCommandLine has "delete" and ProcessCommandLine has_any("backup", "catalog", "systemstatebackup")
or (ProcessCommandLine has "wevtutil" and ProcessCommandLine has "cl") 
or (ProcessCommandLine has "wmic" and ProcessCommandLine has "shadowcopy delete")
or (ProcessCommandLine has "sc" and ProcessCommandLine has "config" and ProcessCommandLine has "disabled")
| extend Bcdedit = iff(ProcessCommandLine has "bcdedit" and ProcessCommandLine has_any("recoveryenabled no", "bootstatuspolicy ignoreallfailures"), 1, 0)
| extend ShadowCopyDelete = iff (ProcessCommandLine has "shadowcopy delete", 1, 0)
| extend VssAdminShadows = iff(ProcessCommandLine has "vssadmin" and ProcessCommandLine has_any("list shadows", "delete shadows"), 1, 0)
| extend Wbadmin = iff(ProcessCommandLine has "wbadmin" and ProcessCommandLine has "delete" and ProcessCommandLine has_any("backup", "catalog", "systemstatebackup"), 1,0)
| extend Fsutil = iff(ProcessCommandLine has "fsutil" and ProcessCommandLine has "usn" and ProcessCommandLine has "deletejournal", 1, 0)
| summarize FirstActivity = min(Timestamp), ReportId = any(ReportId), Commands = make_set(ProcessCommandLine) by DeviceId, Fsutil, Wbadmin, ShadowCopyDelete, Bcdedit, VssAdminShadows, bin(Timestamp, 6h)
// Joining extra evidence
| join kind=leftouter (wevtutilClear) on $left.DeviceId == $right.DeviceId
| join kind=leftouter (cipher) on $left.DeviceId == $right.DeviceId
| join kind=leftouter (netStop) on $left.DeviceId == $right.DeviceId
| join kind=leftouter (taskKill) on $left.DeviceId == $right.DeviceId
| join kind=leftouter (scDisable) on $left.DeviceId == $right.DeviceId
| extend WevtutilUse = iff(LogClearCount > 10, 1, 0)
| extend CipherUse = iff(CipherCount > 1, 1, 0)
| extend NetStopUse = iff(netStopCount > 10, 1, 0)
| extend TaskkillUse = iff(taskKillCount > 10, 1, 0)
| extend ScDisableUse = iff(ScDisableCount > 10, 1, 0)
// Adding up all evidence
| mv-expand CommandList = NetStopList, TaskKillList, ClearedLogList, CipherList, Commands, ScDisableList
// Format results
| summarize BcdEdit = iff(make_set(Bcdedit) contains "1" , 1, 0), NetStop10PlusCommands = iff(make_set(NetStopUse) contains "1", 1, 0), Wevtutil10PlusLogsCleared = iff(make_set(WevtutilUse) contains "1", 1, 0),
CipherMultipleDrives = iff(make_set(CipherUse) contains "1", 1, 0), Fsutil = iff(make_set(Fsutil) contains "1", 1, 0), ShadowCopyDelete = iff(make_set(ShadowCopyDelete) contains "1", 1, 0),
Wbadmin = iff(make_set(Wbadmin) contains "1", 1, 0), TaskKill10PlusCommand = iff(make_set(TaskkillUse) contains "1", 1, 0), VssAdminShadow = iff(make_set(VssAdminShadows) contains "1", 1, 0), 
ScDisable = iff(make_set(ScDisableUse) contains "1", 1, 0), TotalEvidenceCount = count(CommandList), EvidenceList = make_set(Commands), StartofBehavior = min(FirstActivity) by DeviceId, bin(Timestamp, 1d)
| extend UniqueEvidenceCount = BcdEdit + NetStop10PlusCommands + Wevtutil10PlusLogsCleared + CipherMultipleDrives + Wbadmin + Fsutil + TaskKill10PlusCommand + VssAdminShadow + ScDisable + ShadowCopyDelete
| where UniqueEvidenceCount > 2

クエリ結果を理解して調整する

統合クエリは、次の結果を返します。

  • DeviceId — 影響を受けるデバイスを識別します
  • TimeStamp - ランサムウェア アクティビティの兆候がデバイスで初めて観察された場合
  • アクティビティの特定の兆候BcdEditFsUtil などの複数の列に表示される各記号の数
  • TotalEvidenceCount - 観察された兆候の数
  • UniqueEvidenceCount - 観察された兆候の種類の数

Microsoft Defender ポータルでのランサムウェア アクティビティの統合クエリの例

影響を受けるデバイスとランサムウェア アクティビティのさまざまな兆候の数を示すクエリ結果

既定では、クエリ結果には、ランサムウェア アクティビティの種類が 2 つを超えるデバイスのみが一覧表示されます。 ランサムウェア アクティビティの兆候があるすべてのデバイスを表示するには、次 where の演算子を変更し、数値を 0 (0) に設定します。 表示するデバイスの数を減らすには、数値を大きく設定します。

| where UniqueEvidenceCount > 2

その他のランサムウェア リソース

Microsoft の主な情報:

Microsoft 365:

Microsoft Azure

Microsoft Defender for Cloud Apps

Microsoft Security チームのブログ投稿:

ヒント

さらに多くの情報を得るには、 Tech Community: Microsoft Defender XDR Tech Community の Microsoft Security コミュニティとEngageします