ציד אחר תוכנות כופר

חל על:

  • Microsoft Defender XDR

תוכנת כופר התפתחה במהירות מתוכנות זדוניות לסחורות פשוטות המשפיעות על משתמשי מחשב בודדים לאיומים ארגוניים המשפיעים באופן חמור על תעשיות ומוסדות ממשלתיים. למרות Microsoft Defender XDR מספק יכולות רבות שמאתרות וחסום תוכנות כופר ופעילויות הפרעה משויכות, ביצוע בדיקה יזומה לסימנים לפשרה יכול לסייע בהגנה על הרשת שלך.

קרא אודות תוכנת כופר המופעלת על-ידי בני אדם

באמצעות ציד מתקדם ב- Microsoft Defender XDR, באפשרותך ליצור שאילתות המאתרות ממצאים בודדים המשויכים לפעילות תוכנת כופר. באפשרותך גם להפעיל שאילתות מתוחכמות יותר, שעשויות לחפש סימני פעילות ולשקול סימנים אלה כדי למצוא מכשירים הדורשים תשומת לב מיידית.

סימנים לפעילות תוכנת כופר

חוקרי האבטחה של Microsoft נתקלו במגוון ממצאים נפוצים אך עדינים בקמפיינים רבים של תוכנות כופר שהושקו על-ידי פולשים מתוחכמים. סימנים אלה כרוכים בעיקר בשימוש בכלי מערכת כדי להתכונן להצפנה, למנוע זיהוי וראיות משפטיות ברורות.

פעילות תוכנת כופר כלים נפוצים כוונה
הפסק תהליכים taskkill.exe, עצירת רשת ודא שקבצים ייעודיים להצפנה אינם נעולים על-ידי יישומים שונים.
כיבוי שירותים sc.exe - ודא שקבצים ייעודיים להצפנה אינם נעולים על-ידי אפליקציות שונות.
- למנוע מתוכנות האבטחה להפריע להצפנה ולפעילות אחרת של תוכנת כופר.
- למנוע מתוכנות הגיבוי ליצור עותקים הניתנים לשחזור.
מחיקת יומני רישום וקבצים cipher.exe, וותוטיל, fsutil.exe הסר ראיות מז"פ.
מחק עותקי צל vsadmin.exe, wmic.exe הסר עותקי צל של כונן שניתן להשתמש בהם כדי לשחזר קבצים מוצפנים.
מחיקה והפסקה של גיבויים wbadmin.exe מחק גיבויים קיימים והפסק משימות גיבוי מתוזמנות ומנע שחזור לאחר ההצפנה.
שינוי הגדרות אתחול bcdedit.exe בטל אזהרות ותיקונים אוטומטיים לאחר כשלי אתחול שעלולים להיגרם עקב תהליך ההצפנה.
ביטול כלי שחזור schtasks.exe, regedit.exe, כבה את שחזור המערכת ואפשרויות שחזור מערכת אחרות.

בדוק אם קיימים סימנים בודדים של פעילות תוכנת כופר

פעילויות רבות המהוות אופן פעולה של תוכנת כופר, כולל הפעילויות המתוארות בסעיף הקודם, יכולות להיות מועילות. בעת שימוש בשאילתות הבאות כדי לאתר תוכנות כופר, הפעל יותר מהשאילתה אחת כדי לבדוק אם אותם מכשירים מציגים סימנים שונים של פעילות תוכנות כופר אפשרית.

הפסקת תהליכים מרובים באמצעותtaskkill.exe

שאילתה זו בודקת אם יש ניסיונות לעצור לפחות 10 תהליכים נפרדים באמצעות כליtaskkill.exe השירות. הפעל שאילתה

// 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

הפסקת תהליכים באמצעות עצירת רשת

שאילתה זו בודקת אם קיימים ניסיונות לעצור לפחות 10 תהליכים נפרדים באמצעות פקודת net stop . הפעל שאילתה

// 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

שאילתה זו בודקת ניסיונות לנקות לפחות 10 ערכי יומן רישום מיומני אירועים באמצעות wevtutil. הפעל שאילתה

// 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

שאילתה זו בודקת אם קיימות ניסיונות לבטל לפחות 10 שירותים קיימים באמצעות sc.exe. הפעל שאילתה

// 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 – בפעם הראשונה שנצפה סימן כלשהו לפעילות תוכנת כופר במכשיר
  • סימני פעילות ספציפיים - הספירה עבור כל סימן המוצג בעמודות מרובות, כגון BcdEdit או FsUtil
  • TotalEvidenceCount — מספר הסימנים שנצפתו
  • UniqueEvidenceCount — מספר סוגי הסימנים שנצפתו

דוגמה לשאילתה מאוחדת עבור פעילות תוכנת כופר בפורטל Microsoft Defender שלך

תוצאות שאילתה המציגות מכשירים מושפעים וספירות של סימנים שונים של פעילות תוכנת כופר

כברירת מחדל, תוצאת השאילתה מפרטת רק מכשירים בעלי יותר משני סוגים של פעילות תוכנת כופר. כדי לראות את כל המכשירים עם סימן כלשהו לפעילות תוכנת כופר, where שנה את האופרטור הבא והגדר את המספר לאפס (0). כדי לראות פחות מכשירים, הגדר מספר גבוה יותר.

| where UniqueEvidenceCount > 2

משאבים נוספים של תוכנת כופר

מידע מפתח מ- Microsoft:

Microsoft 365:

Microsoft Azure:

יישומי ענן של Microsoft Defender אישית:

רשומות בלוג של צוות האבטחה של Microsoft:

עצה

האם ברצונך לקבל מידע נוסף? צור קשר עם קהילת האבטחה של Microsoft בקהילת הטכנולוגיה שלנו: קהילת האבטחה של Microsoft Defender XDR.