שימוש ב-Cloud Run Threat Detection

בדף הזה מוסבר איך להגדיר את זיהוי האיומים ב-Cloud Run למשאבים שלכם ב-Cloud Run.

ההליכים שבדף הזה רלוונטיים רק לגלאים של Cloud Run Threat Detection בזמן הריצה. במאמר שימוש ב-Event Threat Detection מוסבר איך עובדים עם גלאי מישור הבקרה ב-Cloud Run.

לפני שמתחילים

  1. כדי לקבל את ההרשאות שנדרשות לניהול השירות Cloud Run Threat Detection והמודולים שלו, בקשו מהאדמין להקצות לכם את התפקיד אדמין ניהול של Security Center (roles/securitycentermanagement.admin) ב-IAM ברמת הארגון, התיקייה או הפרויקט. כדי לקרוא הסבר על מתן תפקידים, ראו איך מנהלים את הגישה ברמת הפרויקט, התיקייה והארגון.

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

  2. כדי לוודא שאין בעיות תאימות, כדאי לבדוק את קונטיינרי Cloud Run באמצעות סביבת ההפעלה מהדור השני. למידע נוסף, קראו את המאמר סביבות הרצה נתמכות.

  3. מוודאים שה-API של זיהוי איומים בקונטיינר מופעל בכל הפרויקטים שכוללים שירותי Cloud Run שרוצים לעקוב אחריהם. אם הוא לא מופעל בפרויקט הרלוונטי, צריך להפעיל אותו.

    התפקידים שנדרשים כדי להפעיל ממשקי API

    כדי להפעיל ממשקי API, צריך את ההרשאה serviceusage.services.enable. אם אתם יצרתם את הפרויקט, סביר להניח שכבר יש לכם את ההרשאה הזו דרך התפקיד "בעלים" (roles/owner). אחרת, אתם יכולים לקבל את ההרשאה הזו דרך התפקיד "אדמין בממשק 'שימוש בשירות'" (roles/serviceusage.serviceUsageAdmin). איך מקצים תפקידים

    להפעלת ה-API

הפעלה או השבתה של Cloud Run Threat Detection

כשמפעילים את Cloud Run Threat Detection בארגון, בתיקייה או בפרויקט, המערכת עוקבת באופן אוטומטי אחרי כל המשאבים הנתמכים של Cloud Run באותו היקף.

אחרי שמפעילים את Cloud Run Threat Detection, צריך לפרוס מחדש את שירותי Cloud Run שרוצים לעקוב אחריהם.

כדי להפעיל או להשבית את Cloud Run Threat Detection:

המסוף

  1. נכנסים לדף Service Enablement של Cloud Run Threat Detection במסוף Google Cloud .

    מעבר אל "הפעלת שירותים"

  2. בוחרים את הארגון או הפרויקט.

  3. בכרטיסייה Service Enablement, בעמודה Cloud Run Threat Detection, בוחרים את סטטוס ההפעלה של הארגון, התיקייה או הפרויקט שרוצים לשנות, ואז בוחרים אחת מהאפשרויות הבאות:

    • ‫Enable: הפעלת Cloud Run Threat Detection
    • ‫Disable: השבתת Cloud Run Threat Detection
    • Inherit: זמין רק לפרויקטים ולתיקיות. ב-Cloud Run Threat Detection, ההגדרה הזו זהה ל-Disable.

gcloud

הפקודה gcloud scc manage services update מעדכנת את הסטטוס של שירות או מודול ב-Security Command Center.

לפני השימוש בנתוני הפקודה הבאים, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לעדכן (organization,‏ folder או project)
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט האלפאנומרי.
  • ‫NEW_STATE: הערך ENABLED כדי להפעיל את Cloud Run Threat Detection, הערך DISABLED כדי להשבית את Cloud Run Threat Detection, או הערך INHERITED כדי לרשת את סטטוס ההפעלה של משאב ההורה (תקף רק לפרויקטים ולתיקיות)

מריצים את הפקודה gcloud scc manage services update:

‫Linux,‏ macOS או Cloud Shell

gcloud scc manage services update cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID \
    --enablement-state=NEW_STATE

‏Windows (PowerShell)

gcloud scc manage services update cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID `
    --enablement-state=NEW_STATE

Windows‏ (cmd.exe)

gcloud scc manage services update cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID ^
    --enablement-state=NEW_STATE

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

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

ה-method‏ RESOURCE_TYPE.locations.securityCenterServices.patch של Security Command Center Management API מעדכנת את המצב של שירות או מודול של Security Command Center.

לפני שמשתמשים בנתוני הבקשה, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לעדכן (organizations,‏ folders או projects)
  • ‫QUOTA_PROJECT: מזהה הפרויקט שמשמש למעקב אחרי חיובים ומכסות.
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט האלפאנומרי.
  • ‫NEW_STATE: הערך ENABLED כדי להפעיל את Cloud Run Threat Detection, הערך DISABLED כדי להשבית את Cloud Run Threat Detection, או הערך INHERITED כדי לרשת את סטטוס ההפעלה של משאב ההורה (תקף רק לפרויקטים ולתיקיות)

ה-method של ה-HTTP וכתובת ה-URL:

PATCH https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection?updateMask=intendedEnablementState

תוכן בקשת JSON:

{
  "intendedEnablementState": "NEW_STATE"
}

כדי לשלוח את הבקשה צריך להרחיב אחת מהאפשרויות הבאות:

אתם אמורים לקבל תגובת JSON שדומה לזו:

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

הפעלה או השבתה של מודול Cloud Run Threat Detection

כדי להפעיל או להשבית מודול ספציפי של Cloud Run Threat Detection: במאמר גלאי Cloud Run Threat Detection מפורט מידע על כל ממצאי האיומים של Cloud Run Threat Detection והמודולים שלהם.

המסוף

אם השירות Cloud Run Threat Detection מופעל, אתם יכולים להגדיר את מצב ההפעלה של המודולים הנפרדים שלו.

  1. נכנסים לדף Modules של Cloud Run Threat Detection במסוף Google Cloud .

    מעבר אל Modules

  2. בוחרים את הארגון או הפרויקט.
  3. בכרטיסייה Modules, בעמודה Status, בוחרים את הסטטוס הנוכחי של המודול שרוצים להפעיל או להשבית, ואז בוחרים אחת מהאפשרויות הבאות:
    • הפעלה: הפעלת המודול.
    • השבתה: השבתת המודול.

gcloud

הפקודה gcloud scc manage services update מעדכנת את הסטטוס של שירות או מודול ב-Security Command Center.

לפני השימוש בנתוני הפקודה הבאים, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לעדכן (organization,‏ folder או project).
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט שמכיל אותיות וספרות.
  • ‫MODULE_NAME: שם המודול שרוצים להפעיל או להשבית. ערכים תקינים מפורטים במאמר גלאים של Cloud Run Threat Detection.
  • ‫NEW_STATE: הערך ENABLED כדי להפעיל את המודול, הערך DISABLED כדי להשבית את המודול או הערך INHERITED כדי לרשת את סטטוס ההפעלה של משאב ההורה (רלוונטי רק לפרויקטים ולתיקיות).

שומרים את התוכן הבא בקובץ בשם request.json:

{
  "MODULE_NAME": {
    "intendedEnablementState": "NEW_STATE"
  }
}

מריצים את הפקודה gcloud scc manage services update:

‫Linux,‏ macOS או Cloud Shell

gcloud scc manage services update cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID \
    --module-config-file=request.json

‏Windows (PowerShell)

gcloud scc manage services update cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID `
    --module-config-file=request.json

Windows‏ (cmd.exe)

gcloud scc manage services update cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID ^
    --module-config-file=request.json

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

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

ה-method‏ RESOURCE_TYPE.locations.securityCenterServices.patch של Security Command Center Management API מעדכנת את המצב של שירות או מודול של Security Command Center.

לפני שמשתמשים בנתוני הבקשה, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לעדכן (organizations,‏ folders או projects).
  • ‫QUOTA_PROJECT: מזהה הפרויקט שמשמש למעקב אחרי חיובים ומכסות.
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט שמכיל אותיות וספרות.
  • ‫MODULE_NAME: שם המודול שרוצים להפעיל או להשבית. ערכים תקינים מפורטים במאמר גלאים של Cloud Run Threat Detection.
  • ‫NEW_STATE: הערך ENABLED כדי להפעיל את המודול, הערך DISABLED כדי להשבית את המודול או הערך INHERITED כדי לרשת את סטטוס ההפעלה של משאב ההורה (רלוונטי רק לפרויקטים ולתיקיות).

ה-method של ה-HTTP וכתובת ה-URL:

PATCH https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection?updateMask=modules

תוכן בקשת JSON:

{
  "modules": {
    "MODULE_NAME": {
      "intendedEnablementState": "NEW_STATE"
    }
  }
}

כדי לשלוח את הבקשה צריך להרחיב אחת מהאפשרויות הבאות:

אתם אמורים לקבל תגובת JSON שדומה לזו:

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

החרגת משתני סביבה מהממצאים

כברירת מחדל, כשמערכת Cloud Run Threat Detection יוצרת ממצא, היא מדווחת על משתני הסביבה שמשמשים את כל התהליכים שמוזכרים בממצא. הערכים של משתני הסביבה יכולים להיות חשובים בחקירות של איומים.

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

  • כדי להחריג משתני סביבה של תהליכים מהממצאים של זיהוי איומים ב-Cloud Run, מגדירים את המודול CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES לערך DISABLED.

  • כדי לכלול משתני סביבה של תהליכים בממצאים של זיהוי איומים ב-Cloud Run, מגדירים את המודול CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES לערך ENABLED.

הוראות מפורטות מופיעות בקטע הפעלה או השבתה של מודול Cloud Run Threat Detection שבהמשך.

החרגת ארגומנטים של CLI מהממצאים

לכל התהליכים יש ארגומנט אחד או יותר של ממשק שורת הפקודה (CLI). כברירת מחדל, כשמערכת Cloud Run Threat Detection כוללת פרטי תהליך בממצא, היא מתעדת את הארגומנטים של ה-CLI של התהליך. ערכי הארגומנטים של CLI יכולים להיות חשובים בחקירות של איומים.

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

  • כדי להחריג ארגומנטים של CLI מהממצאים של Cloud Run Threat Detection, מגדירים את המודול CLOUD_RUN_REPORT_CLI_ARGUMENTS לערך DISABLED.

  • כדי לכלול ארגומנטים של CLI בממצאים של זיהוי איומים ב-Cloud Run, מגדירים את המודול CLOUD_RUN_REPORT_CLI_ARGUMENTS לערך ENABLED.

הוראות מפורטות מופיעות בקטע הפעלה או השבתה של מודול Cloud Run Threat Detection שבהמשך.

צפייה בהגדרות של המודולים לזיהוי איומים ב-Cloud Run

בטבלה גלאי Cloud Run Threat Detection מפורט מידע על כל ממצאי האיומים של Cloud Run Threat Detection.

gcloud

הפקודה gcloud scc manage services describe מציגה את המצב של שירות או מודול ב-Security Command Center.

לפני השימוש בנתוני הפקודה הבאים, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לקבל (organization,‏ folder או project)
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לקבל. בפרויקטים אפשר להשתמש גם במזהה הפרויקט שמכיל אותיות וספרות.

מריצים את הפקודה gcloud scc manage services describe:

‫Linux,‏ macOS או Cloud Shell

gcloud scc manage services describe cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID

‏Windows (PowerShell)

gcloud scc manage services describe cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID

Windows‏ (cmd.exe)

gcloud scc manage services describe cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID

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

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

ה-method RESOURCE_TYPE.locations.securityCenterServices.get של Security Command Center Management API מחזירה את הסטטוס של שירות או מודול של Security Command Center.

לפני שמשתמשים בנתוני הבקשה, צריך להחליף את הנתונים הבאים:

  • ‫RESOURCE_TYPE: סוג המשאב שרוצים לקבל (organizations,‏ folders או projects).
  • ‫QUOTA_PROJECT: מזהה הפרויקט שמשמש למעקב אחרי חיובים ומכסות.
  • ‫RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לקבל. בפרויקטים אפשר להשתמש גם במזהה הפרויקט שמכיל אותיות וספרות.

ה-method של ה-HTTP וכתובת ה-URL:

GET https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection

כדי לשלוח את הבקשה צריך להרחיב אחת מהאפשרויות הבאות:

אתם אמורים לקבל תגובת JSON שדומה לזו:

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

ממצאי הבדיקה

כשמערכת Cloud Run Threat Detection יוצרת ממצאים, אתם יכולים לראות אותם ב-Security Command Center.

אפשר להקצות את תפקידי ה-IAM של Security Command Center ברמת הארגון, התיקייה או הפרויקט. היכולת שלכם להציג, לערוך, ליצור או לעדכן ממצאים, נכסים ומקורות אבטחה תלויה ברמת הגישה שקיבלתם. למידע נוסף על התפקידים ב-Security Command Center, ראו בקרת גישה.

כדי לבדוק את הממצאים של Cloud Run Threat Detection ב-Security Command Center:

  1. במסוף Google Cloud , נכנסים לדף Findings של Security Command Center.

    כניסה לדף Findings

  2. בוחרים את הפרויקט או הארגון ב- Google Cloud .
  3. בקטע מסננים מהירים, בקטע המשנה השם המוצג של המקור, בוחרים באפשרות Cloud Run Threat Detection. תוצאות השאילתה של הממצאים מתעדכנות ומוצגים רק הממצאים מהמקור הזה.
  4. כדי לראות את הפרטים של ממצא ספציפי, לוחצים על שם הממצא בעמודה Category. חלונית הפרטים של הממצא נפתחת ומוצגת הכרטיסייה Summary.
  5. בכרטיסייה Summary, בודקים את פרטי הממצא, כולל מידע על מה שזוהה, המשאב המושפע, ואם יש, השלבים שאפשר לבצע כדי לתקן את הממצא.
  6. אופציונלי: כדי לראות את הגדרת ה-JSON המלאה של הממצא, לוחצים על הכרטיסייה JSON.

כדי לעזור לכם בחקירה, ממצאי האיומים מכילים גם קישורים למקורות המידע החיצוניים הבאים:

  • ערכים של מסגרת MITRE ATT&CK. המסגרת מסבירה טכניקות להתקפות נגד משאבים בענן ומספקת הנחיות לתיקון.
  • ‫VirusTotal, שירות בבעלות Alphabet שמספק הקשר לגבי קבצים, סקריפטים, כתובות URL ודומיינים שעלולים להיות זדוניים.

במאמר גלאים של Cloud Run Threat Detection מפורטים סוגי הממצאים של Cloud Run Threat Detection.

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