שימוש בפונקציות של מדדים לכללים של ניתוח סיכונים
במסמך הזה מתוארים הרכיבים העיקריים של תכונות התחביר של YARA-L 2.0, שמיועדות במיוחד לניתוח סיכונים. הוא מספק סקירה כללית מפורטת על השימוש בפונקציות של מדדים מיוחדים כדי לצבור כמויות גדולות של נתונים היסטוריים, וכך מאפשר זיהוי מתוחכם יותר וחישוב של ציון סיכונים. מידע נוסף על YARA-L זמין במאמר סקירה כללית על YARA-L 2.0.
ב-Google Security Operations יש תמיכה בכמה פונקציות של מדדים, שיכולות לצבור כמויות גדולות של נתונים היסטוריים. כל הכללים שמשתמשים בפונקציית המדד מסווגים באופן אוטומטי ככללים מרובי אירועים, גם אם אין להם קטע match והם משתמשים רק במשתנה אירוע אחד. כלומר, הם נכללים במכסת הכללים של אירועים מרובים.
פרמטרים של פונקציות מדדים
אפשר להשתמש בפונקציות המדדים לכללים שמבצעים ניתוח התנהגותי של ישויות.
דוגמה: חישוב המספר המקסימלי של בייטים יומיים יוצאים לכל כתובת IP
בדוגמה הבאה מוצג כלל שמחשב את המספר המקסימלי של בייטים שנשלחו ביום מכתובת IP ספציפית במהלך החודש האחרון. במקרה הזה, כתובת ה-IP מיוצגת על ידי משתנה הפלייסהולדר ($ip). מידע נוסף על משתני פלייסהולדר
$max_bytes_per_day = max(metrics.network_bytes_outbound(
period:1d, window:30d,
metric:value_sum,
agg:max,
principal.asset.ip:$ip
))
בגלל המספר הגדול של הארגומנטים שמשמשים בפונקציות האלה, בדוגמה נעשה שימוש בפרמטרים בעלי שם, שאפשר לציין בכל סדר. אלה הפרמטרים:
נקודה
משך הזמן שבו אירועי יומן נפרדים משולבים לתצפית אחת. הערכים היחידים שמותרים הם 1h ו-1d.
חלון
משך הזמן שבו תצפיות נפרדות נצברות לערך אחד, כמו הממוצע והמקסימום. הערכים המותרים של window מבוססים על התקופה של המדד. המיפוי התקין הוא:
period:1h : window:today
period:1d : window:30d
דוגמה: זיהוי שיא יומי של אימותים שנכשלו למשתמש ספציפי
דוגמה: זיהוי שיא יומי של אימותים שנכשלו למשתמש ספציפי
הדוגמה הבאה ממחישה כלל שמזהה את המספר הגבוה ביותר של ניסיונות אימות שנכשלו (max(metrics.auth_attempts_fail) שתועדו למשתמש ספציפי (alice) ביום אחד (1d), ומחושב על פני תקופת מבט לאחור של 30 יום (30d):
$user = "alice"
$max_fail = max(metrics.auth_attempts_fail(
period:1d, window:30d,
metric:event_count_sum,
agg:max,
target.user.userid:$user
))
דוגמה: זיהוי התחברויות של משתמשים שנראו בפעם הראשונה באמצעות מדדים לפי שעה ולפי יום
בדוגמה הבאה אפשר לראות איך לשלב פונקציות של מדדים לפי שעה ולפי יום כדי לזהות התנהגויות של "נצפה לראשונה". הכלל הזה קובע אם משתמש מתחבר לאפליקציה מסוימת בפעם הראשונה, על ידי בדיקה של המרווחים השעתיים של היום הנוכחי וגם של חלון היסטורי רחב יותר של 30 יום.
events:
$e.metadata.event_type = "USER_LOGIN"
$e.security_result.action = "ALLOW"
$userid = $e.target.user.userid
$app = $e.target.application
match:
// find events from now - 4h ago, which is the recommended look-back period
$userid, $app over 4h
outcome:
// check hourly analytics until daily analytics are available
$first_seen_today = max(metrics.auth_attempts_success(
period:1h, window:today, metric:first_seen, agg:max,
target.user.userid:$userid, target.application:$app))
$first_seen_monthly = max(metrics.auth_attempts_success(
period:1d, window:30d, metric:first_seen, agg:max,
target.user.userid:$userid, target.application:$app))
condition:
$e and ($first_seen_today = 0) and ($first_seen_monthly = 0)
מדד
בכל תקופה, לכל תצפית יש כמה מדדים שמשויכים אליה.
צריך לבחור אחת מהאפשרויות האלה לצבירה לאורך כל החלון. יש חמישה סוגים נתמכים של metric:
-
event_count_sum: מספר אירועי היומן הייחודיים בכל תקופה. -
first_seen: חותמת הזמן של הפעם הראשונה שבה נצפה אירוע תואם ביומן בכל תקופה. -
last_seen: חותמת הזמן של הפעם האחרונה שבה נראה אירוע תואם ביומן בכל תקופה. -
value_sum: מייצג את סכום מספר הבייטים בכל אירועי היומן ששולבו בתקופה. אפשר להשתמש בערך הזה רק בפונקציית מדד שכוללת אתbytesבשם שלה. -
num_unique_filter_values: מדד שלא מחושב מראש על ידי Google SecOps, אבל אפשר לחשב אותו במהלך הפעלת הכלל. פרטים נוספים זמינים במאמר ספירת מדדים ייחודיים.
Agg
איזו צבירת נתונים חלה על המדד. הצבירות חלות על כל חלון הזמן (למשל, הערך היומי הגבוה ביותר ב-30 הימים האחרונים). הערכים המותרים הם:
avg – הערך הממוצע לכל תקופה. זהו ממוצע סטטיסטי שלא כולל ערכים של אפס.
max – הערך הגבוה ביותר לתקופה.
min – הערך הקטן ביותר בכל תקופה.
num_metric_periods – מספר התקופות בחלון הזמן שבהן ערך המדד לא היה אפס.
stddev – סטיית התקן של הערך לכל תקופה. זוהי סטיית תקן סטטיסטית שלא כוללת ערכי אפס.
sum – סכום של כל ערך לכל תקופה, לאורך כל חלון הזמן.
לדוגמה, הכלל הבא מציג את המספר הממוצע של ניסיונות האימות שנכשלו עבור משתמש ספציפי (אליס) בכל יום נתון במהלך 30 הימים האחרונים:
$user = "alice"
$avg_fail = max(metrics.auth_attempts_fail(
period:1d, window:30d,
metric:event_count_sum,
agg:avg,
target.user.userid:$user
))
הכלל הבא מראה כמה אימותים מוצלחים היו למשתמש ספציפי ב-30 הימים האחרונים:
$total_success = max(metrics.auth_attempts_success(
period:1d, window:30d,
metric:event_count_sum,
agg:sum,
target.user.userid:$user
))
הכלל הבא מציין אם משתמש ספציפי התחבר בהצלחה לפחות פעם אחת ב-30 הימים האחרונים:
$days_success = max(metrics.auth_attempts_success(
period:1d, window:30d,
metric:event_count_sum,
agg:num_metric_periods,
target.user.userid:$user
))
הכלל הבא מציג את הפעם הראשונה או האחרונה שבה משתמש מסוים התחבר בהצלחה:
$first_seen = max(metrics.auth_attempts_success(
period:1d, window:30d,
metric:first_seen,
agg:min,
target.user.userid:$user
))
$last_seen = max(metrics.auth_attempts_success(
period:1d, window:30d,
metric:last_seen,
agg:max,
target.user.userid:$user
))
הכלל הבא מציג את המספר המקסימלי של בייטים שמשתמש שלח ביום נתון במהלך 30 הימים האחרונים:
$max_daily_bytes = max(metrics.network_bytes_outbound(
period:1d, window:30d,
metric:value_sum,
agg:max,
target.user.userid:$user
))
מסנן
מסננים מאפשרים לסנן מדד לפני צבירת הנתונים לפי ערך במדד שחושב מראש (ראו ערכים במדד). המסננים יכולים להיות כל ביטוי אירועים תקין (שורה אחת בקטע האירועים) שלא מכיל שדות אירועים או פלייסהולדרים. המשתנים היחידים שאפשר לכלול בתנאי הזה הם סוגי מדדים.
הכלל הבא כולל רק מדדים שבהם value_sum > 10 AND
event_count_sum > 2:
$max_bytes_per_day = max(metrics.network_bytes_outbound(
period:1d, window:30d,
metric:value_sum,
agg:max,
principal.asset.ip:$ip
filter:value_sum > 10 AND event_count_sum > 2
))
דוגמאות למסננים תקינים
filter:value_sum > 10 AND event_count_sum != 5
filter:event_count_sum = 100 OR event_count_sum > 1000
filter:timestamp.get_day_of_week(first_seen) = 3
דוגמאות למסננים לא תקינים
// No placeholders in filter expressions.
filter:value_sum > $ph
// No event fields in filter expressions.
filter:event_count_sum + $e.field > 10
// No event fields in filter expressions.
filter:timestamp.subtract(first_seen, $e.metadata.timestamp)
שדות UDM
מדד מסונן לפי שדה אחד, 2 או 3 שדות UDM, בהתאם לפונקציה. מידע נוסף זמין בקטע פונקציות.
הסוגים הבאים של שדות UDM משמשים לפונקציות של מדדים:
- מאפיינים – (חובה) שילובים שונים מפורטים במסמך הזה. אי אפשר לצרף מדד עם ערך ברירת מחדל (
""למחרוזת ו-0למספר שלם). - מרחבי שמות – (אופציונלי) אפשר להשתמש במרחבי שמות רק לישויות שצוינו במאפיינים. לדוגמה, אם אתם משתמשים ב-
principal.asset.hostname filter, אתם יכולים להשתמש גם ב-principal.namespace filter. אם לא תכללו מסנן של מרחב שמות, הנתונים מכל מרחבי השמות יקובצו יחד. אפשר להשתמש בערך ברירת מחדל כמסנן של מרחב שמות.
חישובים בחלון
מערכת Google Security Operations מחשבת את המדדים לפי חלון זמן יומי או שעתי.
חלונות יומיים
כל החלונות היומיים, כמו 30d, נקבעים באותו אופן.
מערכת Google Security Operations משתמשת בנתוני המדדים העדכניים ביותר שנוצרו, שלא חופפים לטווח התאריכים של הכלל. חישוב המדדים היומיים יכול להימשך עד 6 שעות, והוא מתחיל רק בסוף היום לפי שעון UTC. נתוני המדדים של היום הקודם יהיו זמינים בכל יום בשעה 06:00 (שעון UTC) או לפני כן.
לדוגמה, אם כלל פועל על נתוני אירועים מ-31.10.2023 בשעה 4:00 (שעון UTC) עד 31.10.2023 בשעה 7:00 (שעון UTC), סביר להניח שהמדדים היומיים של 31.10.2023 כבר נוצרו, ולכן חישוב המדדים יתבסס על הנתונים מ-1.10.2023 עד 30.10.2023 (כולל). לעומת זאת, אם הכלל פועל על נתוני אירועים מ-31 באוקטובר 2023 בשעה 1:00 (לפי שעון UTC) עד 31 באוקטובר 2023 בשעה 3:00 (לפי שעון UTC), סביר להניח שהמדדים היומיים של 30 באוקטובר 2023 לא נוצרו, ולכן חישוב המדדים יתבסס על הנתונים מ-30 בספטמבר 2023 עד 29 באוקטובר 2023 (כולל).
חלון today שעתי
חלון הזמן של המדדים השעתיים מחושב בצורה שונה מחלון הזמן של המדדים היומיים. חלון המדדים השעתיים של today הוא לא בגודל קבוע כמו החלון של 30d למדדים יומיים. חלון המדדים השעתי today ממלא כמה שיותר נתונים בין סוף החלון היומי לבין תחילת חלון הזמן של הכלל.
לדוגמה, אם כלל פועל על נתוני אירועים מ-31.10.2023 בשעה 4:00:00 (שעון UTC) עד 31.10.2023 בשעה 7:00:00 (שעון UTC), חישוב המדד היומי ישתמש בנתונים מ-1.10.2023 עד 30.10.2023 (כולל), וחלון המדד השעתי ישתמש בנתונים מ-31.10.2023 בשעה 00:00:00 (שעון UTC) עד 31.10.2023 בשעה 4:00:00 (שעון UTC).
ספירת מדדים ייחודיים
יש סוג מיוחד של מדד num_unique_filter_values שלא מחושב מראש על ידי Google SecOps, אלא מחושב במהלך הפעלת הכלל. כדי לעשות את זה, צוברים את הנתונים לפי מאפיין קיים במדד שחושב מראש. לדוגמה, אפשר להפיק את המדד
daily total count of distinct countries that a user attempted to authenticate
ב- מהמדד auth_attempts_total שחושב מראש
במאפיינים target.user.userid ו-
principal.ip_geo_artifact.location.country_or_region, על ידי ביצוע צבירת נתונים של ספירת
ערכים ייחודיים במאפיין האחרון.
הכלל לדוגמה הבא סופר מדדים ייחודיים:
$outcome_variable = max(metrics.auth_attempts_total(
period: 1d,
window: 30d,
// This metric type indicates any filter with a wildcard value should be
// aggregated over each day to produce a new metric on-the-fly.
metric: num_unique_filter_values,
agg: max,
target.user.userid: $userid,
// Filter whose value should be counted over each day to produce the
// num_unique_filter_values metric.
principal.ip_geo_artifact.location.country_or_region: *
))
פונקציות
בקטע הזה יש מסמכי תיעוד על פונקציות המדדים הספציפיות שנתמכות ב-Google Security Operations.
אירועי התרעה
metrics.alert_event_name_count מחשב מראש ערכים היסטוריים של אירועי UDM שנוצרו להם התראות על ידי Carbon Black, CrowdStrike Falcon, Microsoft Graph API Alerts או Microsoft Sentinel.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_id, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.full_path, principal.user.employee_id, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.full_path, principal.user.userid, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.full_path, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.sha256, principal.user.employee_id, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.sha256, principal.user.userid, security_result.rule_nameprincipal.asset.asset_id, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_nameprincipal.asset.asset_id, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, principal.user.employee_id, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, principal.user.userid, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_nameprincipal.asset.hostname, principal.process.file.full_path, security_result.rule_nameprincipal.asset.hostname, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_nameprincipal.asset.hostname, principal.process.file.sha256, principal.user.employee_id, security_result.rule_nameprincipal.asset.hostname, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_nameprincipal.asset.hostname, principal.process.file.sha256, principal.user.userid, security_result.rule_nameprincipal.asset.hostname, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_nameprincipal.asset.hostname, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, principal.user.employee_id, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, principal.user.userid, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_nameprincipal.asset.ip, principal.process.file.full_path, security_result.rule_nameprincipal.asset.ip, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_nameprincipal.asset.ip, principal.process.file.sha256, principal.user.employee_id, security_result.rule_nameprincipal.asset.ip, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_nameprincipal.asset.ip, principal.process.file.sha256, principal.user.userid, security_result.rule_nameprincipal.asset.ip, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_nameprincipal.asset.ip, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, principal.user.employee_id, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, principal.user.userid, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_nameprincipal.asset.mac, principal.process.file.full_path, security_result.rule_nameprincipal.asset.mac, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_nameprincipal.asset.mac, principal.process.file.sha256, principal.user.employee_id, security_result.rule_nameprincipal.asset.mac, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_nameprincipal.asset.mac, principal.process.file.sha256, principal.user.userid, security_result.rule_nameprincipal.asset.mac, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_nameprincipal.asset.mac, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, principal.user.employee_id, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, principal.user.userid, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.full_path, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.sha256, principal.user.employee_id, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.sha256, principal.user.userid, security_result.rule_nameprincipal.asset.product_object_id, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_nameprincipal.asset.product_object_id, security_result.rule_name
ניסיונות אימות
metrics.auth_attempts_total מחשב מראש ערכים היסטוריים לאירועי UDM באמצעות USER_LOGIN event
type.
בנוסף, כדי ש-metrics.auth_attempts_success יתקיים, צריך שבאירוע יהיה לפחות SecurityResult.Action אחד של ALLOW.
לעומת זאת, ב-metrics.auth_attempts_fail נדרש שאף אחד מהערכים של
SecurityResult.Actions
לא יהיה ALLOW.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_idprincipal.asset.asset_id,target.asset.asset_idprincipal.asset.asset_id,target.asset.hostnameprincipal.asset.asset_id,target.asset.ipprincipal.asset.asset_id,target.asset.macprincipal.asset.asset_id,target.asset.product_object_idprincipal.asset.hostnameprincipal.asset.hostname,target.asset.asset_idprincipal.asset.hostname,target.asset.hostnameprincipal.asset.hostname,target.asset.ipprincipal.asset.hostname,target.asset.macprincipal.asset.hostname,target.asset.product_object_idprincipal.asset.ipprincipal.asset.ip,target.asset.asset_idprincipal.asset.ip,target.asset.hostnameprincipal.asset.ip,target.asset.ipprincipal.asset.ip,target.asset.macprincipal.asset.ip,target.asset.product_object_idprincipal.asset.macprincipal.asset.mac,target.asset.asset_idprincipal.asset.mac,target.asset.hostnameprincipal.asset.mac,target.asset.ipprincipal.asset.mac,target.asset.macprincipal.asset.mac,target.asset.product_object_idprincipal.asset.product_object_idprincipal.asset.product_object_id,target.asset.asset_idprincipal.asset.product_object_id,target.asset.hostnameprincipal.asset.product_object_id,target.asset.ipprincipal.asset.product_object_id,target.asset.macprincipal.asset.product_object_id,target.asset.product_object_idprincipal.user.email_addressesprincipal.user.email_addresses,target.asset.asset_idprincipal.user.email_addresses,target.asset.hostnameprincipal.user.email_addresses,target.asset.ipprincipal.user.email_addresses,target.asset.macprincipal.user.email_addresses,target.asset.product_object_idprincipal.user.employee_idprincipal.user.employee_id,target.asset.asset_idprincipal.user.employee_id,target.asset.hostnameprincipal.user.employee_id,target.asset.ipprincipal.user.employee_id,target.asset.macprincipal.user.employee_id,target.asset.product_object_idprincipal.user.product_object_idprincipal.user.product_object_id,target.asset.asset_idprincipal.user.product_object_id,target.asset.hostnameprincipal.user.product_object_id,target.asset.ipprincipal.user.product_object_id,target.asset.macprincipal.user.product_object_id,target.asset.product_object_idprincipal.user.useridprincipal.user.userid,target.asset.asset_idprincipal.user.userid,target.asset.hostnameprincipal.user.userid,target.asset.ipprincipal.user.userid,target.asset.macprincipal.user.userid,target.asset.product_object_idprincipal.user.windows_sidprincipal.user.windows_sid,target.asset.asset_idprincipal.user.windows_sid,target.asset.hostnameprincipal.user.windows_sid,target.asset.ipprincipal.user.windows_sid,target.asset.macprincipal.user.windows_sid,target.asset.product_object_idtarget.applicationtarget.user.email_addressestarget.user.email_addresses,network.tls.client.certificate.sha256target.user.email_addresses,principal.ip_geo_artifact.location.country_or_regiontarget.user.email_addresses,principal.ip_geo_artifact.network.organization_nametarget.user.email_addresses,target.applicationtarget.user.employee_idtarget.user.employee_id,network.tls.client.certificate.sha256target.user.employee_id,principal.ip_geo_artifact.location.country_or_regiontarget.user.employee_id,principal.ip_geo_artifact.network.organization_nametarget.user.employee_id,target.applicationtarget.user.product_object_idtarget.user.product_object_id,network.tls.client.certificate.sha256target.user.product_object_id,principal.ip_geo_artifact.location.country_or_regiontarget.user.product_object_id,principal.ip_geo_artifact.network.organization_nametarget.user.product_object_id,target.applicationtarget.user.useridtarget.user.userid,network.tls.client.certificate.sha256target.user.userid,principal.ip_geo_artifact.location.country_or_regiontarget.user.userid,principal.ip_geo_artifact.network.organization_nametarget.user.userid,target.applicationtarget.user.windows_sidtarget.user.windows_sid,network.tls.client.certificate.sha256target.user.windows_sid,principal.ip_geo_artifact.location.country_or_regiontarget.user.windows_sid,principal.ip_geo_artifact.network.organization_nametarget.user.windows_sid,target.application
ב-metrics.auth_attempts_total יש שדות UDM נוספים שאפשר להשתמש בהם כמסננים
target.application,target.asset.asset_idtarget.application,target.asset.hostnametarget.application,target.asset.iptarget.application,target.asset.mactarget.application,target.asset.product_object_id
ב-metrics.auth_attempts_success יש שדות UDM נוספים שאפשר להשתמש בהם כמסננים
network.http.user_agentprincipal.asset.asset_id,metadata.event_typeprincipal.asset.hostname,metadata.event_typeprincipal.asset.ip,metadata.event_typeprincipal.asset.mac,metadata.event_typeprincipal.asset.product_object_id,metadata.event_type
בייטים יוצאים של DNS
metrics.dns_bytes_outbound מחשב מראש ערכים היסטוריים לאירועי UDM שבהם network.sent_bytes גדול מ-0, ויציאת היעד היא 53/udp, 53/tcp או 3000/tcp.
network.sent_bytes זמין בתור value_sum.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_idprincipal.asset.asset_id,target.ipprincipal.asset.hostnameprincipal.asset.hostname,target.ipprincipal.asset.ipprincipal.asset.ip,target.ipprincipal.asset.macprincipal.asset.mac,target.ipprincipal.asset.product_object_idprincipal.asset.product_object_id,target.ipprincipal.user.email_addressesprincipal.user.email_addresses,target.ipprincipal.user.employee_idprincipal.user.employee_id,target.ipprincipal.user.product_object_idprincipal.user.product_object_id,target.ipprincipal.user.useridprincipal.user.userid,target.ipprincipal.user.windows_sidprincipal.user.windows_sid,target.iptarget.ip
שאילתות DNS
metrics.dns_queries_total מחשב מראש ערכים היסטוריים של אירועי UDM שיש להם ערך ב-network.dns.id.
בנוסף, לפי metrics.dns_queries_success,
network.dns.response_code
הייתה 0 (NoError).
metrics.dns_queries_fail מתייחס רק לאירועים עם network.dns.response_code
גדול מ-0.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_idprincipal.asset.asset_id,network.dns_domainprincipal.asset.asset_id,network.dns.questions.typeprincipal.asset.hostnameprincipal.asset.hostname,network.dns_domainprincipal.asset.hostname,network.dns.questions.typeprincipal.asset.ipprincipal.asset.ip,network.dns_domainprincipal.asset.ip,network.dns.questions.typeprincipal.asset.macprincipal.asset.mac,network.dns_domainprincipal.asset.mac,network.dns.questions.typeprincipal.asset.product_object_idprincipal.asset.product_object_id,network.dns_domainprincipal.asset.product_object_id,network.dns.questions.typeprincipal.user.email_addressesprincipal.user.email_addresses,network.dns_domainprincipal.user.email_addresses,network.dns.questions.typeprincipal.user.employee_idprincipal.user.employee_id,network.dns_domainprincipal.user.employee_id,network.dns.questions.typeprincipal.user.product_object_idprincipal.user.product_object_id,network.dns_domainprincipal.user.product_object_id,network.dns.questions.typeprincipal.user.useridprincipal.user.userid,network.dns_domainprincipal.user.userid,network.dns.questions.typeprincipal.user.windows_sidprincipal.user.windows_sid,network.dns_domainprincipal.user.windows_sid,network.dns.questions.type
הפעלות של קבצים
metrics.file_executions_total מחשב מראש ערכים היסטוריים של אירועי UDM עם PROCESS_LAUNCH event
type.
כדי ש-metrics.file_executions_success יתקיים, צריך גם שיהיה לאירוע לפחות
SecurityResult.Action
אחד
של ALLOW.
לעומת זאת, כדי להשתמש ב-metrics.file_executions_fail, אף אחד מהערכים של SecurityResult.Actions לא יכול להיות ALLOW.
הרשימה המלאה של שדות UDM שזמינים כמסננים
metadata.event_type,principal.process.file.sha256metadata.event_type,principal.asset.asset_id,principal.process.file.sha256metadata.event_type,principal.asset.hostname,principal.process.file.sha256metadata.event_type,principal.asset.ip,principal.process.file.sha256metadata.event_type,principal.asset.mac,principal.process.file.sha256metadata.event_type,principal.asset.product_object_id,principal.process.file.sha256metadata.event_type,principal.user.email_addresses,principal.process.file.sha256metadata.event_type,principal.user.employee_id,principal.process.file.sha256metadata.event_type,principal.user.product_object_id,principal.process.file.sha256metadata.event_type,principal.user.userid,principal.process.file.sha256metadata.event_type,principal.user.windows_sid,principal.process.file.sha256
שאילתות HTTP
metrics.http_queries_total מחשב מראש ערכים היסטוריים של אירועי UDM שיש להם ערך ב-network.http.method.
בנוסף, לפי metrics.http_queries_success,
network.http.response_code קטן מ-400.
metrics.http_queries_fail מתייחס רק לאירועים עם network.http.response_code גדול מ-400 או שווה לו.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_idprincipal.asset.asset_id,network.http.user_agentprincipal.asset.asset_id,target.hostnameprincipal.asset.asset_id,network.http.user_agent,target.hostnameprincipal.asset.hostnameprincipal.asset.hostname,network.http.user_agentprincipal.asset.hostname,target.hostnameprincipal.asset.hostname,network.http.user_agent,target.hostnameprincipal.asset.ipprincipal.asset.ip,network.http.user_agentprincipal.asset.ip,target.hostnameprincipal.asset.ip,network.http.user_agent,target.hostnameprincipal.asset.macprincipal.asset.mac,network.http.user_agentprincipal.asset.mac,target.hostnameprincipal.asset.mac,network.http.user_agent,target.hostnameprincipal.asset.product_object_idprincipal.asset.product_object_id,network.http.user_agentprincipal.asset.product_object_id,target.hostnameprincipal.asset.product_object_id,network.http.user_agent,target.hostnameprincipal.user.email_addressesprincipal.user.email_addresses,network.http.user_agentprincipal.user.email_addresses,target.hostnameprincipal.user.email_addresses,network.http.user_agent,target.hostnameprincipal.user.employee_idprincipal.user.employee_id,network.http.user_agentprincipal.user.employee_id,target.hostnameprincipal.user.employee_id,network.http.user_agent,target.hostnameprincipal.user.product_object_idprincipal.user.product_object_id,network.http.user_agentprincipal.user.product_object_id,target.hostnameprincipal.user.product_object_id,network.http.user_agent,target.hostnameprincipal.user.useridprincipal.user.userid,network.http.user_agentprincipal.user.userid,target.hostnameprincipal.user.userid,network.http.user_agent,target.hostnameprincipal.user.windows_sidprincipal.user.windows_sid,network.http.user_agentprincipal.user.windows_sid,target.hostnameprincipal.user.windows_sid,network.http.user_agent,target.hostnametarget.hostname
בייטים ברשת
metrics.network_bytes_inbound מחשב מראש ערכים היסטוריים של אירועי UDM עם ערך שאינו אפס בשדה network.received_bytes, והופך את השדה הזה לזמין בתור value_sum.
הפונקציה metrics.network_bytes_outbound דורשת ערך שאינו אפס בשדה network.sent_bytes, והופכת את השדה הזה לזמין בתור value_sum.
metrics.network_bytes_total מתייחס לאירועים שבהם הערך של network.received_bytes או של network.sent_bytes (או של שניהם) הוא לא אפס, ומציג את הסכום של שני השדות האלה בתור value_sum.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.asset.asset_idprincipal.asset.asset_id,principal.ip_geo_artifact.location.country_or_regionprincipal.asset.asset_id,security_result.categoryprincipal.asset.asset_id,target.ip_geo_artifact.network.organization_nameprincipal.asset.hostnameprincipal.asset.hostname,principal.ip_geo_artifact.location.country_or_regionprincipal.asset.hostname,security_result.categoryprincipal.asset.hostname,target.ip_geo_artifact.network.organization_nameprincipal.asset.ipprincipal.asset.ip,principal.ip_geo_artifact.location.country_or_regionprincipal.asset.ip,security_result.categoryprincipal.asset.ip,target.ip_geo_artifact.network.organization_nameprincipal.asset.macprincipal.asset.mac,principal.ip_geo_artifact.location.country_or_regionprincipal.asset.mac,security_result.categoryprincipal.asset.mac,target.ip_geo_artifact.network.organization_nameprincipal.asset.product_object_idprincipal.asset.product_object_id,principal.ip_geo_artifact.location.country_or_regionprincipal.asset.product_object_id,security_result.categoryprincipal.asset.product_object_id,target.ip_geo_artifact.network.organization_nameprincipal.user.email_addressesprincipal.user.email_addresses,principal.ip_geo_artifact.location.country_or_regionprincipal.user.email_addresses,security_result.categoryprincipal.user.email_addresses,target.ip_geo_artifact.network.organization_nameprincipal.user.employee_idprincipal.user.employee_id,principal.ip_geo_artifact.location.country_or_regionprincipal.user.employee_id,security_result.categoryprincipal.user.employee_id,target.ip_geo_artifact.network.organization_nameprincipal.user.product_object_idprincipal.user.product_object_id,principal.ip_geo_artifact.location.country_or_regionprincipal.user.product_object_id,security_result.categoryprincipal.user.product_object_id,target.ip_geo_artifact.network.organization_nameprincipal.user.useridprincipal.user.userid,principal.ip_geo_artifact.location.country_or_regionprincipal.user.userid,security_result.categoryprincipal.user.userid,target.ip_geo_artifact.network.organization_nameprincipal.user.windows_sidprincipal.user.windows_sid,principal.ip_geo_artifact.location.country_or_regionprincipal.user.windows_sid,security_result.categoryprincipal.user.windows_sid,target.ip_geo_artifact.network.organization_name
יצירת משאבים
metrics.resource_creation_total מחשב מראש ערכים היסטוריים של אירועי UDM עם RESOURCE_CREATION event
type או USER_RESOURCE_CREATION event
type.
רשימה של סוגי אירועים מקבילים מופיעה בקטע סוגי אירועים של מטא-נתונים.
בנוסף, ב-metrics.resource_creation_success נדרש שלאירוע יהיה לפחות SecurityResult.Action אחד של ALLOW.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.user.email_addresses,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,metadata.vendor_name,metadata.product_nameprincipal.user.userid,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.userid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nametarget.user.email_addresses,metadata.vendor_name,metadata.product_nametarget.user.employee_id,metadata.vendor_name,metadata.product_nametarget.user.product_object_id,metadata.vendor_name,metadata.product_nametarget.user.userid,metadata.vendor_name,metadata.product_nametarget.user.windows_sid,metadata.vendor_name,metadata.product_name
מחיקת משאבים
metrics.resource_deletion_success מחשב מראש ערכים היסטוריים של אירועי UDM עם RESOURCE_DELETION event
type, ודורש שלאירוע יהיה לפחות SecurityResult.Actions אחד של ALLOW.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.user.email_addresses,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,metadata.vendor_name,metadata.product_nameprincipal.user.userid,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.userid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nametarget.user.email_addresses,metadata.vendor_name,metadata.product_nametarget.user.employee_id,metadata.vendor_name,metadata.product_nametarget.user.product_object_id,metadata.vendor_name,metadata.product_nametarget.user.userid,metadata.vendor_name,metadata.product_nametarget.user.windows_sid,metadata.vendor_name,metadata.product_name
קריאת משאבים
metrics.resource_read_success מחשב מראש ערכים היסטוריים של אירועי UDM עם RESOURCE_READ event
type, ודורש שלאירוע יהיה לפחות SecurityResult.Action אחד של ALLOW.
לעומת זאת, ב-metrics.resource_read_fail נדרש שאף אחד מהערכים של SecurityResult.Actions לא יהיה ALLOW.
הרשימה המלאה של שדות UDM שזמינים כמסננים
principal.user.email_addresses,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,metadata.vendor_name,metadata.product_nameprincipal.user.userid,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.userid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,principal.ip,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.application,target.location.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,metadata.vendor_name,metadata.product_nameprincipal.user.email_addresses,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.employee_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.product_object_id,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.userid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nameprincipal.user.windows_sid,target.resource.name,target.resource_type,metadata.vendor_name,metadata.product_nametarget.user.email_addresses,metadata.vendor_name,metadata.product_nametarget.user.employee_id,metadata.vendor_name,metadata.product_nametarget.user.product_object_id,metadata.vendor_name,metadata.product_nametarget.user.userid,metadata.vendor_name,metadata.product_nametarget.user.windows_sid,metadata.vendor_name,metadata.product_name
מגבלות שקשורות למדדים
כשיוצרים כללי YARA-L עם מדדים, חשוב לשים לב למגבלות הבאות:
- אי אפשר לצרף מדד עם ערך ברירת מחדל (
""למחרוזת ו-0למספר שלם). - ערכי ברירת מחדל:
- אם אין נתוני מדדים שתואמים לאירוע, הערך שמוחזר מפונקציית המדד הוא 0.
- אם יש אירוע בזיהוי שאין לו נתוני מדדים, שימוש ב-
minלצבירה בפונקציה עשוי להחזיר את הערך 0. - כדי לבדוק אם יש נתונים לאירוע מסוים, אפשר להשתמש בצבירה של המדד
num_metric_periodsבאותו אירוע עם אותם מסננים.
- אפשר להשתמש בפונקציות של מדדים רק בקטע של התוצאה.
- מכיוון שפונקציות של מדדים משמשות רק בקטע התוצאה, צריך לצבור אותן בדיוק כמו כל ערך אחר בכללים עם קטע התאמה.
הבעיה עדיין לא נפתרה? קבלת תשובות מחברי הקהילה וממומחי Google SecOps.