Cloud Run Threat Detection 可監控 Cloud Run 資源,偵測執行階段威脅和可疑程序活動,不需修改應用程式程式碼。您可以跨組織、資料夾或專案啟用服務、設定偵測工具模組、從發現項目中排除機密環境變數或 CLI 引數,以及查看發現項目。
本文程序適用於 Cloud Run Threat Detection 執行階段偵測工具。如要瞭解如何使用 Cloud Run 的控制層偵測工具,請參閱「使用 Event Threat Detection」。
事前準備
-
如要取得管理 Cloud Run Threat Detection 服務及其模組所需的權限,請要求管理員在組織、資料夾或專案中,授予您安全中心管理員 (
roles/securitycentermanagement.admin) IAM 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。 請使用第二代執行環境測試 Cloud Run 容器,確保沒有相容性問題。詳情請參閱「支援的執行環境」。
確認所有含有要監控的 Cloud Run 服務的專案,都已啟用 Container Threat Detection API。如果相關專案未啟用,請啟用。
啟用 API 所需的角色
如要啟用 API,您必須具備
serviceusage.services.enable權限。如果您建立了專案,可能已透過擁有者角色 (roles/owner) 取得這項權限。否則,您可以透過 Service Usage 管理員角色 (roles/serviceusage.serviceUsageAdmin) 取得這項權限。瞭解如何授予角色。
啟用或停用 Cloud Run Threat Detection
在組織、資料夾或專案啟用 Cloud Run Threat Detection 後,系統會自動監控該範圍內所有支援的 Cloud Run 資源。
啟用 Cloud Run Threat Detection 後,您必須重新部署要監控的 Cloud Run 服務。
如要啟用或停用 Cloud Run Threat Detection,請按照下列步驟操作:
控制台
前往 Google Cloud 控制台,查看 Cloud Run Threat Detection 的「Service Enablement」(服務啟用) 頁面。
選取您的機構或專案。
在「Service Enablement」(服務啟用) 分頁的「Cloud Run Threat Detection」(Cloud Run 威脅偵測) 欄中,選取要修改的組織、資料夾或專案啟用狀態,然後選取下列其中一項:
- 啟用:啟用 Cloud Run Threat Detection
- 停用:停用 Cloud Run Threat Detection
- 沿用:僅適用於專案和資料夾;對於 Cloud Run Threat Detection,這項設定與「停用」相同
gcloud
gcloud scc manage services update 指令會更新 Security Command Center 服務或模組的狀態。
使用下列任何指令資料前,請先替換以下項目:
-
RESOURCE_TYPE:要更新的資源類型 (organization、folder或project) -
RESOURCE_ID:要更新的組織、資料夾或專案數值 ID;如果是專案,您也可以使用英數字元專案 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:用於追蹤帳單和配額的專案 ID。 -
RESOURCE_ID:要更新的組織、資料夾或專案數值 ID;如果是專案,您也可以使用英數字元專案 ID -
NEW_STATE:ENABLED啟用 Cloud Run Threat Detection;DISABLED停用 Cloud Run Threat Detection;或INHERITED沿用上層資源的啟用狀態 (僅適用於專案和資料夾)
HTTP 方法和網址:
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 服務,您可以設定個別模組的啟用狀態。
- 在 Google Cloud 控制台,前往 Cloud Run Threat Detection 的「Modules」(模組) 頁面。
- 選取您的機構或專案。
- 在「Modules」(模組) 分頁的「Status」(狀態) 欄中,選取要啟用或停用的模組目前狀態,然後選取下列其中一項:
- 啟用:啟用模組。
- 停用:停用模組。
gcloud
gcloud scc manage services update 指令會更新 Security Command Center 服務或模組的狀態。
使用下列任何指令資料前,請先替換以下項目:
-
RESOURCE_TYPE:要更新的資源類型 (organization、folder或project)。 -
RESOURCE_ID:要更新的組織、資料夾或專案數字 ID。如果是專案,您也可以使用英數字元組成的專案 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
Security Command Center Management API 的 RESOURCE_TYPE.locations.securityCenterServices.patch 方法會更新 Security Command Center 服務或模組的狀態。
使用任何要求資料之前,請先修改下列項目的值:
-
RESOURCE_TYPE:要更新的資源類型 (organizations、folders或projects)。 -
QUOTA_PROJECT:用於追蹤帳單和配額的專案 ID。 -
RESOURCE_ID:要更新的組織、資料夾或專案數字 ID。如果是專案,您也可以使用英數字元組成的專案 ID。 -
MODULE_NAME:要啟用或停用的模組名稱。如要查看有效值,請參閱「Cloud Run Threat Detection 偵測工具」。 -
NEW_STATE:ENABLED表示啟用模組;DISABLED表示停用模組;INHERITED表示沿用父項資源的啟用狀態 (僅適用於專案和資料夾)。
HTTP 方法和網址:
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 Threat Detection 發現項目中排除程序環境變數,請將
CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES模組設為DISABLED。如要在 Cloud Run Threat Detection 發現項目中加入程序環境變數,請將
CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES模組設為ENABLED。
如需操作說明,請參閱本頁的「啟用或停用 Cloud Run Threat Detection 模組」。
從發現項目中排除 CLI 引數
所有程序都有一或多個指令列介面 (CLI) 引數。根據預設,Cloud Run Threat Detection 在發現項目中加入程序詳細資料時,會記錄程序的 CLI 引數。CLI 引數值在威脅調查中可能很重要。
不過,您可能會決定從發現項目中排除 CLI 引數,因為部分使用者可能會在 CLI 引數中傳遞 Secret 和其他機密資訊。
如要從 Cloud Run Threat Detection 發現項目中排除 CLI 引數,請將
CLOUD_RUN_REPORT_CLI_ARGUMENTS模組設為DISABLED。如要在 Cloud Run Threat Detection 發現項目中加入 CLI 引數,請將
CLOUD_RUN_REPORT_CLI_ARGUMENTS模組設為ENABLED。
如需操作說明,請參閱本頁的「啟用或停用 Cloud Run Threat Detection 模組」。
查看 Cloud Run Threat Detection 模組的設定
如要瞭解所有 Cloud Run Threat Detection 威脅發現項目,請參閱「Cloud Run Threat Detection 偵測工具」表格。
gcloud
gcloud scc manage services describe 指令會取得 Security Command Center 服務或模組的狀態。
使用下列任何指令資料前,請先替換以下項目:
-
RESOURCE_TYPE:要取得的資源類型 (organization、folder或project) -
RESOURCE_ID:要取得的組織、資料夾或專案數字 ID。如果是專案,您也可以使用英數字元組成的專案 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
Security Command Center Management API 的 RESOURCE_TYPE.locations.securityCenterServices.get 方法會取得 Security Command Center 服務或模組的狀態。
使用任何要求資料之前,請先修改下列項目的值:
-
RESOURCE_TYPE:要取得的資源類型 (organizations、folders或projects)。 -
QUOTA_PROJECT:用於追蹤帳單和配額的專案 ID。 -
RESOURCE_ID:要取得的組織、資料夾或專案數字 ID。如果是專案,您也可以使用英數字元組成的專案 ID。
HTTP 方法和網址:
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 查看。
您可以在組織、資料夾或專案層級,授予 Security Command Center 的 IAM 角色。您能否查看、編輯、建立或更新發現項目、資產和安全性來源,取決於您獲得的存取權層級。如要進一步瞭解 Security Command Center 角色,請參閱「存取控管」。
如要在 Security Command Center 查看 Cloud Run Threat Detection 發現項目,請按照下列步驟操作:
-
前往 Google Cloud 控制台的 Security Command Center「發現項目」頁面。
- 選取 Google Cloud 專案或組織。
- 在「快速篩選器」部分的「來源顯示名稱」子部分,選取「Cloud Run Threat Detection」。發現項目查詢結果會更新,只顯示這個來源的發現項目。
- 如要查看特定發現項目的詳細資料,請按一下「Category」(類別) 欄中的發現項目名稱。系統會開啟發現項目的詳細資料面板,並顯示「摘要」分頁。
- 在「摘要」分頁中,查看發現項目的詳細資料,包括偵測到的內容、受影響的資源,以及可採取的修復步驟 (如有)。
- 選用:如要查看發現項目的完整 JSON 定義,請按一下「JSON」分頁標籤。
為協助您調查,威脅發現項目也包含下列外部資源的連結:
- MITRE ATT&CK 框架項目。這個架構說明攻擊雲端資源的技術,並提供修復指南。
- VirusTotal:Alphabet 旗下的服務,可提供潛在惡意檔案、指令碼、網址和網域的相關資訊。
如需 Cloud Run Threat Detection 發現項目類型清單,請參閱「Cloud Run Threat Detection 偵測工具」。
後續步驟
- 進一步瞭解 Cloud Run Threat Detection。
- 瞭解如何測試 Cloud Run Threat Detection。
- 瞭解如何應對 Cloud Run 威脅發現項目。
- 請參閱威脅發現項目索引。
- 瞭解如何重新部署 Cloud Run 服務。
- 瞭解 Cloud Run 如何實行安全性最佳做法。