שימוש בפונקציות של מדדים בכללים של ניתוח סיכונים

שימוש בפונקציות של מדדים בכללים של ניתוח סיכונים
נתמך ב:

במסמך הזה מתוארים הרכיבים העיקריים של תכונות התחביר של 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 – סכום כל הערכים בכל תקופה, בכל חלון הזמן.

לדוגמה, הכלל הבא מציג את המספר הממוצע של ניסיונות אימות שנכשלו עבור משתמש ספציפי (Alice) בכל יום נתון ב-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
))

מסנן

מסננים מאפשרים לסנן מדד לפני צבירה לפי ערך במדד שחושב מראש (ראו ערכים במדד). המסננים יכולים להיות כל ביטוי תקף של אירועים (שורה אחת בקטע האירועים) שלא מכיל שדות אירועים או placeholders. המשתנים היחידים שאפשר לכלול בתנאי הזה הם משתנים מסוג מדד.

הכלל הבא כולל רק מדדים שבהם 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

מדד מסונן לפי 1, 2 או 3 שדות UDM, בהתאם לפונקציה. מידע נוסף זמין במאמר בנושא פונקציות.

הפונקציות של המדדים משתמשות בסוגים הבאים של שדות UDM:

  • מאפיינים – (חובה) שילובים שונים מפורטים במסמך הזה. אי אפשר לצרף מדד עם ערך ברירת מחדל ("" למחרוזת ו-0 למספר שלם).
  • מרחבי שמות – (אופציונלי) אפשר להשתמש במרחבי שמות רק עבור ישויות שמציינים במאפיינים. לדוגמה, אם משתמשים ב-principal.asset.hostname filter, אפשר להשתמש גם ב-principal.namespace filter. אם לא כוללים מסנן של מרחב שמות, הנתונים מכל מרחבי השמות מצטברים יחד. אפשר להשתמש בערך ברירת מחדל כמסנן של מרחב שמות.

חישובים בחלון

‫Google Security Operations מחשבת מדדים באמצעות חלון מדדים יומי או שעתי.

חלונות יומיים

כל חלונות הזמן היומיים, כמו 30d, נקבעים באותו אופן. ‫Google Security Operations משתמש בנתוני המדדים העדכניים ביותר שנוצרו ולא חופפים לטווח הזמן של הכלל. חישוב המדדים היומיים יכול להימשך עד 6 שעות, והוא מתחיל רק בסוף היום לפי שעון UTC. נתוני המדדים של היום הקודם יהיו זמינים בכל יום בשעה 6:00 UTC או לפני כן.

לדוגמה, אם הכלל פועל על נתוני אירועים מ-31 באוקטובר 2023 בשעה 4:00 UTC עד 31 באוקטובר 2023 בשעה 7:00 UTC, סביר להניח שהמדדים היומיים ל-31 באוקטובר 2023 נוצרו, ולכן בחישוב המדדים ייעשה שימוש בנתונים מ-1 באוקטובר 2023 עד 30 באוקטובר 2023 (כולל). לעומת זאת, אם הכלל מופעל על נתוני אירועים מהתאריך 31.10.2023 בשעה 1:00 UTC עד התאריך 31.10.2023 בשעה 3:00 UTC, סביר להניח שהמדדים היומיים לתאריך 30.10.2023 לא ייווצרו, ולכן חישוב המדדים יתבסס על הנתונים מהתאריך 30.9.2023 עד התאריך 29.10.2023 (כולל).

חלון של שעה today

חלון המדדים השעתי מחושב בצורה שונה מחלון המדדים היומיים. חלון המדדים השעתי של today הוא לא בגודל קבוע כמו חלון 30d של מדדים יומיים. חלון המדדים השעתי today מתמלא בכמה שיותר נתונים בין סוף החלון היומי לתחילת חלון הזמן של הכלל.

לדוגמה, אם כלל מופעל על נתוני אירועים מ-31.10.2023 בשעה 04:00:00 (שעון UTC) עד 31.10.2023 בשעה 07:00:00 (שעון UTC), החישוב היומי של המדד יתבסס על הנתונים מ-1.10.2023 עד 30.10.2023 (כולל), והחלון השעתי של המדד יתבסס על הנתונים מ-31.10.2023 בשעה 00:00:00 (שעון UTC) עד 31.10.2023 בשעה 04: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_name
  • principal.asset.asset_id, principal.process.file.full_path, principal.user.employee_id, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.full_path, principal.user.userid, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.full_path, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.sha256, principal.user.employee_id, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.sha256, principal.user.userid, security_result.rule_name
  • principal.asset.asset_id, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_name
  • principal.asset.asset_id, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, principal.user.employee_id, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, principal.user.userid, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_name
  • principal.asset.hostname, principal.process.file.full_path, security_result.rule_name
  • principal.asset.hostname, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_name
  • principal.asset.hostname, principal.process.file.sha256, principal.user.employee_id, security_result.rule_name
  • principal.asset.hostname, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_name
  • principal.asset.hostname, principal.process.file.sha256, principal.user.userid, security_result.rule_name
  • principal.asset.hostname, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_name
  • principal.asset.hostname, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, principal.user.employee_id, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, principal.user.userid, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_name
  • principal.asset.ip, principal.process.file.full_path, security_result.rule_name
  • principal.asset.ip, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_name
  • principal.asset.ip, principal.process.file.sha256, principal.user.employee_id, security_result.rule_name
  • principal.asset.ip, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_name
  • principal.asset.ip, principal.process.file.sha256, principal.user.userid, security_result.rule_name
  • principal.asset.ip, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_name
  • principal.asset.ip, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, principal.user.employee_id, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, principal.user.userid, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_name
  • principal.asset.mac, principal.process.file.full_path, security_result.rule_name
  • principal.asset.mac, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_name
  • principal.asset.mac, principal.process.file.sha256, principal.user.employee_id, security_result.rule_name
  • principal.asset.mac, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_name
  • principal.asset.mac, principal.process.file.sha256, principal.user.userid, security_result.rule_name
  • principal.asset.mac, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_name
  • principal.asset.mac, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, principal.user.email_addresses, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, principal.user.employee_id, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, principal.user.product_object_id, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, principal.user.userid, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, principal.user.windows_sid, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.full_path, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.sha256, principal.user.email_addresses, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.sha256, principal.user.employee_id, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.sha256, principal.user.product_object_id, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.sha256, principal.user.userid, security_result.rule_name
  • principal.asset.product_object_id, principal.process.file.sha256, principal.user.windows_sid, security_result.rule_name
  • principal.asset.product_object_id, security_result.rule_name

ניסיונות אימות

metrics.auth_attempts_total precomputes historical values for UDM events with a USER_LOGIN event type.

metrics.auth_attempts_success נדרש גם שלאירוע יהיה לפחות SecurityResult.Action אחד של ALLOW.

במקום זאת, metrics.auth_attempts_fail מחייב שאף אחד מהערכים של SecurityResult.Actions לא יהיה ALLOW.

הרשימה המלאה של שדות UDM שזמינים כמסננים

  • principal.asset.asset_id
  • principal.asset.asset_id, target.asset.asset_id
  • principal.asset.asset_id, target.asset.hostname
  • principal.asset.asset_id, target.asset.ip
  • principal.asset.asset_id, target.asset.mac
  • principal.asset.asset_id, target.asset.product_object_id
  • principal.asset.hostname
  • principal.asset.hostname, target.asset.asset_id
  • principal.asset.hostname, target.asset.hostname
  • principal.asset.hostname, target.asset.ip
  • principal.asset.hostname, target.asset.mac
  • principal.asset.hostname, target.asset.product_object_id
  • principal.asset.ip
  • principal.asset.ip, target.asset.asset_id
  • principal.asset.ip, target.asset.hostname
  • principal.asset.ip, target.asset.ip
  • principal.asset.ip, target.asset.mac
  • principal.asset.ip, target.asset.product_object_id
  • principal.asset.mac
  • principal.asset.mac, target.asset.asset_id
  • principal.asset.mac, target.asset.hostname
  • principal.asset.mac, target.asset.ip
  • principal.asset.mac, target.asset.mac
  • principal.asset.mac, target.asset.product_object_id
  • principal.asset.product_object_id
  • principal.asset.product_object_id, target.asset.asset_id
  • principal.asset.product_object_id, target.asset.hostname
  • principal.asset.product_object_id, target.asset.ip
  • principal.asset.product_object_id, target.asset.mac
  • principal.asset.product_object_id, target.asset.product_object_id
  • principal.user.email_addresses
  • principal.user.email_addresses, target.asset.asset_id
  • principal.user.email_addresses, target.asset.hostname
  • principal.user.email_addresses, target.asset.ip
  • principal.user.email_addresses, target.asset.mac
  • principal.user.email_addresses, target.asset.product_object_id
  • principal.user.employee_id
  • principal.user.employee_id, target.asset.asset_id
  • principal.user.employee_id, target.asset.hostname
  • principal.user.employee_id, target.asset.ip
  • principal.user.employee_id, target.asset.mac
  • principal.user.employee_id, target.asset.product_object_id
  • principal.user.product_object_id
  • principal.user.product_object_id, target.asset.asset_id
  • principal.user.product_object_id, target.asset.hostname
  • principal.user.product_object_id, target.asset.ip
  • principal.user.product_object_id, target.asset.mac
  • principal.user.product_object_id, target.asset.product_object_id
  • principal.user.userid
  • principal.user.userid, target.asset.asset_id
  • principal.user.userid, target.asset.hostname
  • principal.user.userid, target.asset.ip
  • principal.user.userid, target.asset.mac
  • principal.user.userid, target.asset.product_object_id
  • principal.user.windows_sid
  • principal.user.windows_sid, target.asset.asset_id
  • principal.user.windows_sid, target.asset.hostname
  • principal.user.windows_sid, target.asset.ip
  • principal.user.windows_sid, target.asset.mac
  • principal.user.windows_sid, target.asset.product_object_id
  • target.application
  • target.user.email_addresses
  • target.user.email_addresses, network.tls.client.certificate.sha256
  • target.user.email_addresses, principal.ip_geo_artifact.location.country_or_region
  • target.user.email_addresses, principal.ip_geo_artifact.network.organization_name
  • target.user.email_addresses, target.application
  • target.user.employee_id
  • target.user.employee_id, network.tls.client.certificate.sha256
  • target.user.employee_id, principal.ip_geo_artifact.location.country_or_region
  • target.user.employee_id, principal.ip_geo_artifact.network.organization_name
  • target.user.employee_id, target.application
  • target.user.product_object_id
  • target.user.product_object_id, network.tls.client.certificate.sha256
  • target.user.product_object_id, principal.ip_geo_artifact.location.country_or_region
  • target.user.product_object_id, principal.ip_geo_artifact.network.organization_name
  • target.user.product_object_id, target.application
  • target.user.userid
  • target.user.userid, network.tls.client.certificate.sha256
  • target.user.userid, principal.ip_geo_artifact.location.country_or_region
  • target.user.userid, principal.ip_geo_artifact.network.organization_name
  • target.user.userid, target.application
  • target.user.windows_sid
  • target.user.windows_sid, network.tls.client.certificate.sha256
  • target.user.windows_sid, principal.ip_geo_artifact.location.country_or_region
  • target.user.windows_sid, principal.ip_geo_artifact.network.organization_name
  • target.user.windows_sid, target.application

metrics.auth_attempts_total יש שדות UDM נוספים שזמינים כמסננים

  • target.application, target.asset.asset_id
  • target.application, target.asset.hostname
  • target.application, target.asset.ip
  • target.application, target.asset.mac
  • target.application, target.asset.product_object_id

metrics.auth_attempts_success יש שדות UDM נוספים שזמינים כמסננים

  • network.http.user_agent
  • principal.asset.asset_id, metadata.event_type
  • principal.asset.hostname, metadata.event_type
  • principal.asset.ip, metadata.event_type
  • principal.asset.mac, metadata.event_type
  • principal.asset.product_object_id, metadata.event_type

DNS Bytes Outbound

metrics.dns_bytes_outbound מחשב מראש ערכים היסטוריים לאירועי UDM שבהם network.sent_bytes גדול מ-0, ויציאת היעד היא 53/udp,‏ 53/tcp או 3000/tcp. ‫network.sent_bytes זמין בתור value_sum.

הרשימה המלאה של שדות UDM שזמינים כמסננים

  • principal.asset.asset_id
  • principal.asset.asset_id, target.ip
  • principal.asset.hostname
  • principal.asset.hostname, target.ip
  • principal.asset.ip
  • principal.asset.ip, target.ip
  • principal.asset.mac
  • principal.asset.mac, target.ip
  • principal.asset.product_object_id
  • principal.asset.product_object_id, target.ip
  • principal.user.email_addresses
  • principal.user.email_addresses, target.ip
  • principal.user.employee_id
  • principal.user.employee_id, target.ip
  • principal.user.product_object_id
  • principal.user.product_object_id, target.ip
  • principal.user.userid
  • principal.user.userid, target.ip
  • principal.user.windows_sid
  • principal.user.windows_sid, target.ip
  • target.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_id
  • principal.asset.asset_id, network.dns_domain
  • principal.asset.asset_id, network.dns.questions.type
  • principal.asset.hostname
  • principal.asset.hostname, network.dns_domain
  • principal.asset.hostname, network.dns.questions.type
  • principal.asset.ip
  • principal.asset.ip, network.dns_domain
  • principal.asset.ip, network.dns.questions.type
  • principal.asset.mac
  • principal.asset.mac, network.dns_domain
  • principal.asset.mac, network.dns.questions.type
  • principal.asset.product_object_id
  • principal.asset.product_object_id, network.dns_domain
  • principal.asset.product_object_id, network.dns.questions.type
  • principal.user.email_addresses
  • principal.user.email_addresses, network.dns_domain
  • principal.user.email_addresses, network.dns.questions.type
  • principal.user.employee_id
  • principal.user.employee_id, network.dns_domain
  • principal.user.employee_id, network.dns.questions.type
  • principal.user.product_object_id
  • principal.user.product_object_id, network.dns_domain
  • principal.user.product_object_id, network.dns.questions.type
  • principal.user.userid
  • principal.user.userid, network.dns_domain
  • principal.user.userid, network.dns.questions.type
  • principal.user.windows_sid
  • principal.user.windows_sid, network.dns_domain
  • principal.user.windows_sid, network.dns.questions.type

הפעלות של קבצים

metrics.file_executions_total precomputes historical values for UDM events with a 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.sha256
  • metadata.event_type, principal.asset.asset_id, principal.process.file.sha256
  • metadata.event_type, principal.asset.hostname, principal.process.file.sha256
  • metadata.event_type, principal.asset.ip, principal.process.file.sha256
  • metadata.event_type, principal.asset.mac, principal.process.file.sha256
  • metadata.event_type, principal.asset.product_object_id, principal.process.file.sha256
  • metadata.event_type, principal.user.email_addresses, principal.process.file.sha256
  • metadata.event_type, principal.user.employee_id, principal.process.file.sha256
  • metadata.event_type, principal.user.product_object_id, principal.process.file.sha256
  • metadata.event_type, principal.user.userid, principal.process.file.sha256
  • metadata.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_id
  • principal.asset.asset_id, network.http.user_agent
  • principal.asset.asset_id, target.hostname
  • principal.asset.asset_id, network.http.user_agent, target.hostname
  • principal.asset.hostname
  • principal.asset.hostname, network.http.user_agent
  • principal.asset.hostname, target.hostname
  • principal.asset.hostname, network.http.user_agent, target.hostname
  • principal.asset.ip
  • principal.asset.ip, network.http.user_agent
  • principal.asset.ip, target.hostname
  • principal.asset.ip, network.http.user_agent, target.hostname
  • principal.asset.mac
  • principal.asset.mac, network.http.user_agent
  • principal.asset.mac, target.hostname
  • principal.asset.mac, network.http.user_agent, target.hostname
  • principal.asset.product_object_id
  • principal.asset.product_object_id, network.http.user_agent
  • principal.asset.product_object_id, target.hostname
  • principal.asset.product_object_id, network.http.user_agent, target.hostname
  • principal.user.email_addresses
  • principal.user.email_addresses, network.http.user_agent
  • principal.user.email_addresses, target.hostname
  • principal.user.email_addresses, network.http.user_agent, target.hostname
  • principal.user.employee_id
  • principal.user.employee_id, network.http.user_agent
  • principal.user.employee_id, target.hostname
  • principal.user.employee_id, network.http.user_agent, target.hostname
  • principal.user.product_object_id
  • principal.user.product_object_id, network.http.user_agent
  • principal.user.product_object_id, target.hostname
  • principal.user.product_object_id, network.http.user_agent, target.hostname
  • principal.user.userid
  • principal.user.userid, network.http.user_agent
  • principal.user.userid, target.hostname
  • principal.user.userid, network.http.user_agent, target.hostname
  • principal.user.windows_sid
  • principal.user.windows_sid, network.http.user_agent
  • principal.user.windows_sid, target.hostname
  • principal.user.windows_sid, network.http.user_agent, target.hostname
  • target.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_id
  • principal.asset.asset_id, principal.ip_geo_artifact.location.country_or_region
  • principal.asset.asset_id, security_result.category
  • principal.asset.asset_id, target.ip_geo_artifact.network.organization_name
  • principal.asset.hostname
  • principal.asset.hostname, principal.ip_geo_artifact.location.country_or_region
  • principal.asset.hostname, security_result.category
  • principal.asset.hostname, target.ip_geo_artifact.network.organization_name
  • principal.asset.ip
  • principal.asset.ip, principal.ip_geo_artifact.location.country_or_region
  • principal.asset.ip, security_result.category
  • principal.asset.ip, target.ip_geo_artifact.network.organization_name
  • principal.asset.mac
  • principal.asset.mac, principal.ip_geo_artifact.location.country_or_region
  • principal.asset.mac, security_result.category
  • principal.asset.mac, target.ip_geo_artifact.network.organization_name
  • principal.asset.product_object_id
  • principal.asset.product_object_id, principal.ip_geo_artifact.location.country_or_region
  • principal.asset.product_object_id, security_result.category
  • principal.asset.product_object_id, target.ip_geo_artifact.network.organization_name
  • principal.user.email_addresses
  • principal.user.email_addresses, principal.ip_geo_artifact.location.country_or_region
  • principal.user.email_addresses, security_result.category
  • principal.user.email_addresses, target.ip_geo_artifact.network.organization_name
  • principal.user.employee_id
  • principal.user.employee_id, principal.ip_geo_artifact.location.country_or_region
  • principal.user.employee_id, security_result.category
  • principal.user.employee_id, target.ip_geo_artifact.network.organization_name
  • principal.user.product_object_id
  • principal.user.product_object_id, principal.ip_geo_artifact.location.country_or_region
  • principal.user.product_object_id, security_result.category
  • principal.user.product_object_id, target.ip_geo_artifact.network.organization_name
  • principal.user.userid
  • principal.user.userid, principal.ip_geo_artifact.location.country_or_region
  • principal.user.userid, security_result.category
  • principal.user.userid, target.ip_geo_artifact.network.organization_name
  • principal.user.windows_sid
  • principal.user.windows_sid, principal.ip_geo_artifact.location.country_or_region
  • principal.user.windows_sid, security_result.category
  • principal.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_name
  • principal.user.employee_id, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, metadata.vendor_name, metadata.product_name
  • principal.user.userid, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • target.user.email_addresses, metadata.vendor_name, metadata.product_name
  • target.user.employee_id, metadata.vendor_name, metadata.product_name
  • target.user.product_object_id, metadata.vendor_name, metadata.product_name
  • target.user.userid, metadata.vendor_name, metadata.product_name
  • target.user.windows_sid, metadata.vendor_name, metadata.product_name

מחיקת משאבים

metrics.resource_deletion_success precomputes historical values for UDM events with a RESOURCE_DELETION event type and further requires that the event have at least one SecurityResult.Actions of ALLOW.

הרשימה המלאה של שדות UDM שזמינים כמסננים

  • principal.user.email_addresses, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, metadata.vendor_name, metadata.product_name
  • principal.user.userid, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • target.user.email_addresses, metadata.vendor_name, metadata.product_name
  • target.user.employee_id, metadata.vendor_name, metadata.product_name
  • target.user.product_object_id, metadata.vendor_name, metadata.product_name
  • target.user.userid, metadata.vendor_name, metadata.product_name
  • target.user.windows_sid, metadata.vendor_name, metadata.product_name

קריאת משאבים

metrics.resource_read_success precomputes historical values for UDM events with a RESOURCE_READ event type and further requires that the event have at least one SecurityResult.Action of ALLOW.

metrics.resource_read_fail במקום זאת, נדרש שאף אחד מהערכים של SecurityResult.Actions לא יהיה ALLOW.

הרשימה המלאה של שדות UDM שזמינים כמסננים

  • principal.user.email_addresses, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, metadata.vendor_name, metadata.product_name
  • principal.user.userid, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ principal.ip,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.application,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.application, target.location.name, metadata.vendor_name, metadata.product_name
  • principal.user.email_addresses,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.employee_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.product_object_id,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.userid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.windows_sid,‏ target.resource.name,‏ metadata.vendor_name,‏ metadata.product_name
  • principal.user.email_addresses, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.employee_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.product_object_id, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.userid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • principal.user.windows_sid, target.resource.name, target.resource_type, metadata.vendor_name, metadata.product_name
  • target.user.email_addresses, metadata.vendor_name, metadata.product_name
  • target.user.employee_id, metadata.vendor_name, metadata.product_name
  • target.user.product_object_id, metadata.vendor_name, metadata.product_name
  • target.user.userid, metadata.vendor_name, metadata.product_name
  • target.user.windows_sid, metadata.vendor_name, metadata.product_name

מגבלות במדדים

כשיוצרים כללי YARA-L עם מדדים, חשוב לשים לב למגבלות הבאות:

  • אי אפשר לצרף מדד עם ערך ברירת מחדל ("" למחרוזת ו-0 למספר שלם).
  • ערכי ברירת מחדל:
    • אם אין נתוני מדדים שמתאימים לאירוע, הערך שמוחזר מהפונקציה של המדד הוא 0.
    • אם יש אירוע בזיהוי שלא כולל נתוני מדדים, שימוש בפונקציה min לצורך צבירה על פני הפונקציה עשוי להחזיר 0.
    • כדי לבדוק אם יש נתונים לאירוע, אפשר להשתמש במדד num_metric_periods aggregation על אותו אירוע עם אותם מסננים.
  • אפשר להשתמש בפונקציות של מדדים רק בקטע של התוצאה.
  • מכיוון שפונקציות של מדדים משמשות רק בקטע של התוצאה, צריך לצבור אותן כמו כל ערך אחר בכללים עם קטע של התאמה.

הבעיה עדיין לא נפתרה? קבלת תשובות מחברי הקהילה וממומחי Google SecOps.