סינון התראות

בדף הזה מוצגים מסננים לדוגמה שאפשר להשתמש בהם עם תכונת ההתראות של Security Command Center API, וההודעות שמיוצאות ל-Pub/Sub או ל-BigQuery. אפשר לסנן את ההתראות לפי כל שדה של ממצא, כולל:

  • parent
  • state
  • resource_name
  • category
  • source_properties (v1 API בלבד)
  • security_marks

אפשר גם להשתמש באופרטורים סטנדרטיים כחלק ממחרוזת המסנן:

  • AND כדי לכלול שדות שמכילים את כל קבוצת הערכים
  • OR כדי לכלול שדות שמכילים אחד מתוך קבוצת ערכים
  • - כדי להחריג שדות שמכילים ערך ספציפי
  • סוגריים לקיבוץ של קבוצת ערכים, לדוגמה:

    (category = \"BUCKET_LOGGING_DISABLED\" OR category = \"CLUSTER_LOGGING_DISABLED\") AND state = \"ACTIVE\"

הגדרת מסנן מקור

כל ממצא ב-Security Command Center כולל את מזהה המקור של ספק מקור האבטחה. לדוגמה, ממצא מ-Security Health Analytics כולל מזהה מקור שהוא ייחודי ל-Security Health Analytics. מזהה המקור משמש במסנן NotificationConfig כדי לציין את הממצאים של הספק שרוצים לשלוח לנושא של Pub/Sub או למערך הנתונים ב-BigQuery.

שלב 1: קבלת מזהה המקור

כדי לקבל מזהה מקור של ספק, משתמשים במסוף Google Cloud או ב-Google Cloud CLI.

המסוף

  1. נכנסים לדף Findings במסוף Google Cloud של Security Command Center.
    כניסה לדף Findings
  2. בוחרים את הארגון שרוצים ליצור עבורו מסנן התראות. ייפתח הדף Findings.
  3. בחלונית Quick filters, גוללים למטה לקטע Source display name ובוחרים את שם הספק שרוצים להשתמש בו כדי לסנן את תוצאות ההתראות.
  4. בעמודה Category (קטגוריה) בחלונית Findings query results (תוצאות של שאילתת ממצאים), לוחצים על שם אחד הממצאים כדי להציג את חלונית הפרטים של הממצא.
  5. בחלונית הפרטים של הממצא, לוחצים על הכרטיסייה JSON. מוצג קובץ ה-JSON המלא של הממצא.
  6. ב-JSON, מעתיקים את הערך של מאפיין parent. לדוגמה:

    "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID"

    המזהים מיוצגים על ידי הערכים הבאים:

    • ORGANIZATION_ID: המזהה של הארגון של ספק המקור הראשי.
    • SOURCE_ID: המזהה של ספק המקור הראשי.

gcloud

כדי לאחזר מזהה מקור, מריצים את הפקודה הבאה:

  gcloud scc sources describe ORGANIZATION_ID --source-display-name="SOURCE_NAME"

מחליפים את מה שכתוב בשדות הבאים:

  • ORGANIZATION_ID: מזהה הארגון.
  • SOURCE_NAME: השם של השירות שעבורו רוצים לקבל את מזהה המקור. אפשר להשתמש בשם של כל ספק ממצאים, כולל השירותים המובנים של Security Command Center,‏ Security Health Analytics,‏ Web Security Scanner,‏ Event Threat Detection ו-זיהוי איומים בקונטיינר.

הפלט של הפקודה ב-CLI של gcloud דומה לזה שמופיע בהמשך וכולל את מזהה המקור:

 {
   "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
   "displayName": "example-source",
   "description": "A source that creates findings."
 }

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

שלב 2: יצירת מסנן

כדי ליצור מסנן התראות, יוצרים NotificationConfig חדש.

אפשר להוסיף מסנן לקובץ NotificationConfig כדי לכלול או להחריג מקור ספציפי:

  • מסננים את הממצאים כדי לשלוח התראות רק מהמקור שצוין:

      state = \"ACTIVE\" AND parent = \"organizations/$ORGANIZATION_ID/sources/$SOURCE_ID\"
    
  • סינון הממצאים כדי לשלוח התראות מכל המקורות חוץ מהמקור שצוין:

      state = \"ACTIVE\" AND -parent = \"organizations/$ORGANIZATION_ID/sources/$SOURCE_ID\"
    

דוגמאות נוספות למסננים שבהם אפשר להשתמש מפורטות במאמר הצגת ממצאי אבטחה באמצעות Security Command Center API.

סינון ממצאים לפי קטגוריה ומצב כשמשתמשים בנושאים ב-Pub/Sub

בקטעים הבאים מופיעות דוגמאות לאופן שבו יוצרים מסנן למקורות ספציפיים ולסוגים ספציפיים של ממצאים, ולהודעת ההתראה שהמסנן שולח לנושא ה-Pub/Sub.

אם אתם משתמשים במערכי נתונים של BigQuery במקום בנושאים של Pub/Sub, הממצאים והשדות הקשורים מתוארים במאמר ייצוא ממצאים ל-BigQuery לצורך ניתוח.

Security Health Analytics

בדוגמה הזו של Security Health Analytics נעשה שימוש במסננים הבאים:

category = \"OPEN_FIREWALL\" AND state = \"ACTIVE\"

מידע נוסף על סוגי הממצאים שנוצרים ב-Security Health Analytics זמין בדף ממצאים של Security Health Analytics.

ההודעה ב-Pub/Sub לגבי ממצא מסונן של Security Health Analytics נראית כך:

{
   "notificationConfigName": "organizations/ORGANIZATION_ID/notificationConfigs/security-health-analytics-active-findings",
   "finding": {
     "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID",
     "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
     "resourceName": "//compute.googleapis.com/projects/PROJECT_ID/global/firewalls/,
     "state": "ACTIVE",
     "category": "OPEN_FIREWALL",
     "externalUri": "https://console.cloud.google.com/networking/firewalls/details/default-allow-icmp?project\u003PROJECT_ID",
     "sourceProperties": {
       "ReactivationCount": 0.0,
       "Allowed": "[{\"ipProtocol\":\"icmp\"}]",
       "WhitelistInstructions": "Add the security mark \"allow_open_firewall_rule\" to the asset with a value of \"true\" to prevent this finding from being activated again.",
       "Recommendation": "Restrict the firewall rules at: https://console.cloud.google.com/networking/firewalls/details/default-allow-icmp?project\u003PROJECT_ID",
       "AllowedIpRange": "All",
       "ActivationTrigger": "Allows all IP addresses",
       "SourceRange": "[\"0.0.0.0/0\"]",
       "ScanRunId": "2019-04-06T08:50:58.832-07:00",
       "SeverityLevel": "High",
       "ProjectId": "PROJECT_ID",
       "AssetCreationTime": "2019-03-28t17:58:54.409-07:00",
       "ScannerName": "FIREWALL_SCANNER",
       "Explanation": "Firewall rules that allow connections from all IP addresses or on all ports may expose resources to attackers."
     },
     "securityMarks": {
       "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID/securityMarks",
       "marks": {
         "sccquery152cd5aa66ea4bc8a672d8186a125580": "true",
         "sccquerya3cf2270123f4e91b84a3e613d2cac67": "true"
       }
     },
     "eventTime": "2019-09-22T21:26:57.189Z",
     "createTime": "2019-03-29T15:51:26.435Z"
   }
 }

זיהוי אנומליות

דוגמה זו של התראת זיהוי אנומליות משתמשת במסננים הבאים:

category = \"resource_involved_in_coin_mining\" AND state = \"ACTIVE\"

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

הודעת Pub/Sub להתראה על ממצא מסונן של זיהוי אנומליות נראית כך:

{
   "notificationConfigName": "organizations/ORGANIZATION_ID/notificationConfigs/cloud-anomaly-detection-active-findings",
   "finding": {
     "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID",
     "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
     "resourceName": "//cloudresourcemanager.googleapis.com/projects/PROJECT_ID",
     "state": "ACTIVE",
     "category": "resource_involved_in_coin_mining",
     "sourceProperties": {
       "vm_ips": "35.231.191.191",
       "end_time_usec": "1569003180000000",
       "abuse_target_ips": "54.38.176.231",
       "end_datetime_UTC": "2019-09-20 18:13:00 UTC",
       "urls": "swap2.luckypool.io, bitcash.luckypool.io",
       "vm_host_and_zone_names": "ubuntu-1804-tp100-gminer:us-east1-b",
       "finding_type": "Abuse originating from a resource in your organization.",
       "start_time_usec": "1569002700000000",
       "action_taken": "Notification sent",
       "summary_message": "We have recently detected activity on your Google Cloud Platform/APIs project that violates our Terms of Service or Acceptable Use Policy.",
       "start_datetime_UTC": "2019-09-20 18:05:00 UTC"
     },
     "securityMarks": {
       "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID/securityMarks",
       "marks": {
         "teste123": "true",
         "sccquery94c23b35ea0b4f8388268415a0dc6c1b": "true"
       }
     },
     "eventTime": "2019-09-20T18:59:00Z",
     "createTime": "2019-05-16T14:16:35.674Z"
   }
 }

Event Threat Detection

בדוגמה הזו של Event Threat Detection נעשה שימוש במסננים הבאים:

category = \"Persistence: Iam Anomalous Grant\" AND state = \"ACTIVE\"

מידע נוסף על סוגי הממצאים שנוצרים על ידי Event Threat Detection מופיע בדף הצגת נקודות חולשה ואיומים.

הודעת Pub/Sub להתראה על ממצא מסונן של Event Threat Detection נראית כך:

{
  "notificationConfigName": "organizations/ORGANIZATION_ID/notificationConfigs/event-threat-detection-active-findings",
  "finding": {
    "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID",
    "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
    "resourceName": "//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID",
    "state": "ACTIVE",
    "category": "Persistence: IAM Anomalous Grant",
    "sourceProperties": {
      "sourceId": {
        "organizationNumber": "ORGANIZATION_ID",
        "customerOrganizationNumber": "ORGANIZATION_ID"
      },
      "detectionCategory": {
        "technique": "persistence",
        "indicator": "audit_log",
        "ruleName": "iam_anomalous_grant",
        "subRuleName": "external_member_added_to_policy"
      },
      "detectionPriority": "HIGH",
      "evidence": [{
        "sourceLogId": {
          "timestamp": {
            "seconds": "1601066317",
            "nanos": 4.63E8
          },
          "insertId": "INSERT_ID"
        }
      }],
      "properties": {
        "sensitiveRoleGrant": {
          "principalEmail": "PRINCIPAL_EMAIL@gmail.com",
          "bindingDeltas": [{
            "action": "ADD",
            "role": "roles/owner",
            "member": "user:USER_EMAIL@gmail.com"
          }, {
            "action": "REMOVE",
            "role": "roles/viewer",
            "member": "user:USER_EMAIL@gmail.com"
          }],
          "members": ["USER_EMAIL@gmail.com"]
        }
      },
      "findingId": "FINDING_ID"
    },
    "securityMarks": {
      "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID/securityMarks"
    },
    "eventTime": "2020-09-25T20:38:39.441Z",
    "createTime": "2020-09-25T20:38:40.667Z"
  }
}

Sensitive Data Protection

בדוגמה הזו של Sensitive Data Protection נעשה שימוש במסננים הבאים:

category = \"CREDIT_CARD_NUMBER\" AND state = \"ACTIVE\"

מידע נוסף על סוגי הממצאים שנוצרים על ידי Event Threat Detection מופיע בדף הצגת נקודות חולשה ואיומים.

הודעת Pub/Sub להתראה על ממצא שסונן על ידי Sensitive Data Protection נראית כך:

{
   "notificationConfigName": "organizations/ORGANIZATION_ID/notificationConfigs/dlp-data-discovery-active-findings",
   "finding": {
     "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID",
     "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID",
     "resourceName": "//cloudresourcemanager.googleapis.com/projects/PROJECT_ID",
     "state": "ACTIVE",
     "category": "CREDIT_CARD_NUMBER",
     "externalUri": "https://console.cloud.google.com/dlp/projects/PROJECT_ID/dlpJobs/i-7536622736814356939;source\u003d5",
     "sourceProperties": {
       "COUNT": 2.0,
       "JOB_NAME": "projects/PROJECT_ID/dlpJobs/i-7536622736814356939",
       "FULL_SCAN": false
     },
     "securityMarks": {
       "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/findings/FINDING_ID/securityMarks",
       "marks": {
         "priority": "p1",
         "sccquerya3cf2270123f4e91b84a3e613d2cac67": "true"
       }
     },
     "eventTime": "2019-09-16T23:21:19.650Z",
     "createTime": "2019-04-22T23:18:17.731Z"
   }
 }

המאמרים הבאים