שימוש ב-Cloud Run Threat Detection

בדף הזה מוסבר איך להגדיר את Cloud Run Threat Detection למשאבי Cloud Run.

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

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

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

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

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

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

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

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

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

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

כדי להפעיל או להשבית את התכונה 'זיהוי איומים ב-Cloud Run', פועלים לפי השלבים הבאים:

המסוף

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

    כניסה לדף Service Enablement

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

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

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

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

השיטה של Security Command Center Management API RESOURCE_TYPE.locations.securityCenterServices.patch מעדכנת את המצב של שירות או מודול של 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

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

המסוף

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

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

    מעבר אל 'מודולים'

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

gcloud

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

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

  • RESOURCE_TYPE: סוג המשאב לעדכון (organization,‏ folder או project)
  • RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט האלפאנומרי.
  • MODULE_NAME: השם של המודול שרוצים להפעיל או להשבית. ערכים תקינים מפורטים במאמר גלאים של Cloud Run לזיהוי איומים.
  • 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

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

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

  • RESOURCE_TYPE: סוג המשאב לעדכון (organizations,‏ folders או projects)
  • QUOTA_PROJECT: מזהה הפרויקט שישמש לחיוב ולמעקב אחר מכסות
  • RESOURCE_ID: המזהה המספרי של הארגון, התיקייה או הפרויקט שרוצים לעדכן. בפרויקטים אפשר להשתמש גם במזהה הפרויקט האלפאנומרי.
  • MODULE_NAME: השם של המודול שרוצים להפעיל או להשבית. ערכים תקינים מפורטים במאמר גלאים של Cloud Run לזיהוי איומים.
  • 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 בדף הזה.

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

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

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

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

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

הוראות מפורטות מופיעות בקטע הפעלה או השבתה של מודול לזיהוי איומים ב-Cloud Run בדף הזה.

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

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

gcloud

הפקודה gcloud scc manage services describe מחזירה את הסטטוס של שירות או מודול של Security Command Center.

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

  • RESOURCE_TYPE: סוג המשאב שרוצים לקבל (organization,‏ folder או project)
  • QUOTA_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. נכנסים לדף Findings ב-Security Command Center במסוף Google Cloud .

    כניסה לדף Findings

  2. בוחרים את הפרויקט או הארגון. Google Cloud
  3. בקטע Quick filters, בסעיף המשנה Source display name, בוחרים באפשרות Cloud Run Threat Detection. תוצאות השאילתה של הממצאים מתעדכנות כך שיוצגו רק הממצאים מהמקור הזה.
  4. כדי לראות את הפרטים של ממצא ספציפי, לוחצים על שם הממצא בעמודה קטגוריה. חלונית הפרטים של הממצא תיפתח ותציג את הכרטיסייה סיכום.
  5. בכרטיסייה סיכום, בודקים את פרטי הממצא, כולל מידע על מה שזוהה, על המשאב המושפע ועל השלבים שאפשר לבצע כדי לטפל בממצא – אם הם זמינים.
  6. אופציונלי: כדי לראות את הגדרת ה-JSON המלאה של הממצא, לוחצים על הכרטיסייה JSON.

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

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

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

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