整合 Vertex AI 與 Google SecOps

本文說明如何將 Vertex AI 與 Google Security Operations (Google SecOps) 整合。

整合版本:1.0

事前準備

如要使用整合功能,您需要 Google Cloud 專案、 Google Cloud 服務帳戶和 Identity and Access Management (IAM) 角色。

如要進一步瞭解定價,請參閱 Vertex AI 定價

設定 Google Cloud 專案

如要建立及設定 Vertex AI 整合專案,請設定專案 Google Cloud 。 Google Cloud

建立及設定服務帳戶

如要將 Vertex AI 與 Google SecOps 整合,可以使用現有服務帳戶或建立新帳戶。如需建立服務帳戶的指引,請參閱「建立服務帳戶」。

如果您未使用工作負載身分電子郵件設定整合,請在建立服務帳戶後以 JSON 格式建立服務帳戶金鑰。設定整合參數時,您必須提供下載的 JSON 金鑰檔案完整內容。

基於安全考量,建議您使用工作負載身分電子郵件地址,而非服務帳戶 JSON 金鑰。如要進一步瞭解工作負載身分,請參閱「工作負載身分」。

設定 IAM 角色

如要與 Vertex AI 整合,請將「Vertex AI 使用者」(roles/aiplatform.user) IAM 角色授予用於設定整合的服務帳戶。

如要進一步瞭解 Vertex AI IAM 角色,請參閱「運用 IAM 執行 Vertex AI 存取控管」。

整合參數

整合 Vertex AI 時需要下列參數:

參數 說明
API Root 必要

Vertex AI 整合的 API 根目錄。

預設值為 https://LOCATION-aiplatform.googleapis.com

Workload Identity Email 選用

Workload Identity Federation 的用戶端電子郵件地址。

您可以設定這個參數或 Service Account Json File Content 參數。

在這項整合中,使用服務帳戶金鑰 JSON 檔案進行驗證的優先順序,高於工作負載身分聯盟。

如要使用 Workload Identity Federation 模擬服務帳戶,請將 Service Account Token Creator 角色授予服務帳戶。如要進一步瞭解工作負載身分和使用方式,請參閱「工作負載的身分」。

Service Account Json File Content 選用

服務帳戶金鑰 JSON 檔案的內容。

您可以設定這個參數或 Workload Identity Email 參數。

如要設定這個參數,請提供您在建立服務帳戶時下載的服務帳戶金鑰 JSON 檔案完整內容。

如要進一步瞭解如何使用服務帳戶做為驗證方法,請參閱服務帳戶總覽

Project ID 選用

要在整合中使用的專案 ID。

如未設定這個參數的值,整合服務會從 Google Cloud 服務帳戶擷取專案 ID。

Default Model 選用

要在整合服務中使用的預設模型名稱。

預設值為 gemini-1.5-flash-002

Location 選用

Vertex AI API 的位置 ID。

如未設定值,整合服務會從 API 根目錄擷取位置 ID。

如要進一步瞭解位置、端點和資源,請參閱 Vertex AI API

Verify SSL 必要

如果選取這個選項,整合服務會驗證連線至 Vertex AI 的 SSL 憑證是否有效。

(此為預設選項)。

如需在 Google SecOps 中設定整合功能的操作說明,請參閱「設定整合功能」。

如有需要,您之後可以變更。設定整合執行個體後,您就可以在劇本中使用該執行個體。如要進一步瞭解如何設定及支援多個執行個體,請參閱「支援多個執行個體」。

動作

如要進一步瞭解動作,請參閱「回覆『你的工作台』中的待處理動作」和「執行手動動作」。

分析 EML

使用「分析 EML」動作,透過 Vertex AI 分析 EML 檔案。 這項操作會個別提交每個檔案。

這項操作不會在 Google SecOps 實體上執行。

動作輸入內容

「分析 EML」動作需要下列參數:

參數 說明
Model ID 選用

要使用的模型 ID,例如 gemini-1.5-flash-002

Temperature 選用

這個值可控制選取詞元時的隨機程度。這個參數接受 float 資料類型的值。

如要進一步瞭解溫度值,請參閱「測試不同參數值」。

Files To Analyze 必要

以半形逗號分隔的 EML 檔案清單,用於提交分析。

Max Output Tokens 選用

每個回覆中可生成的輸出內容符記數量上限。

一個符記約為四個字元,100 個符記約為 60 到 80 個字。這項限制適用於每個實體。

詳情請參閱「測試不同參數值」。

預設值為 100

動作輸出內容

「分析 EML」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 可用
輸出訊息 可用
指令碼結果 可用
JSON 結果

以下範例顯示使用「分析 EML」動作時收到的 JSON 結果輸出內容:

[{
   "Entity": "file",
   "EntityResult": {
       "raw": "{\"threat_level\": \"High\", \"threats_found\": [{\"threat\": \"Phishing Links\", \"explanation\": \"Multiple links point",
       "extracted_info": {
           "threat_level": "High",
           "threats_found": [
               {
                   "threat": "Phishing Links",
                   "explanation": "Multiple links point to example.com, a suspicious domain likely used for phishing campaigns.",
                   "example": "URL"
               },
               {
                   "threat": "Social Engineering",
                   "explanation": "The email uses urgency and scarcity tactics, pressuring the recipient to click links quickly.",
                   "example": "Register Now and Save $1,000 on all 2-Day Project Management (Fundamentals)"
               },
               {
                   "threat": "Suspicious Domain",
                   "explanation": "The email uses the domain example.com', which is not commonly associated with legitimate businesses or organizations and may be a newly registered domain for malicious purposes. This should be checked for validity and legitimacy. The email also uses the domain pdu-xl.com which may also be suspicious.",
                   "example": "example.com"
               }
           ],
           "verification_steps": [
               "Check the domain reputation of example.com using online tools like VirusTotal or URLVoid.",
               "Analyze email headers to identify the true sender's IP address and location using email analysis tools.",
               "Verify the legitimacy of mentioned products or services by independently contacting the companies mentioned."
           ],
           "protection_measures": [
               "Avoid clicking links in suspicious emails. Hover over links to check the actual URL in a separate tool.",
               "Enable email filtering and anti-phishing features in your email client.",
               "Regularly update your antivirus and anti-malware software.",
               "Educate users about social engineering tactics and phishing schemes."
           ]
       },
       "usageMetadata": {
           "promptTokenCount": 12,
           "candidatesTokenCount": 778,
           "totalTokenCount": 790
       }
   }
}]
輸出訊息

「分析 EML」動作可能會傳回下列輸出訊息:

輸出訊息 訊息說明
Successfully analysed the following EML files using Vertex AI: FILE_PATHS 動作成功。
Error executing action "Analyze EML". Reason: ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「分析 EML」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

描述實體

使用「描述實體」動作,透過 Vertex AI 摘要說明實體相關資訊。

這項操作會對所有 Google SecOps 實體執行,並個別提交每個實體。

動作輸入內容

「描述實體」動作需要下列參數:

參數 說明
Model ID 選用

要使用的模型 ID,例如 gemini-1.5-flash-002

Temperature 選用

這個值可控制選取詞元時的隨機程度。這個參數接受 float 資料類型的值。

如要進一步瞭解溫度值,請參閱「測試不同參數值」。

Exclude Fields 選用

以半形逗號分隔的 Google SecOps 實體中繼資料欄位清單,可在產生實體摘要時排除這些欄位。

Force Refresh 選用

如果選取此動作,系統會忽略 Refresh After (Days) 參數和雜湊驗證,並在每次執行動作時重新產生實體摘要。

預設為未選取。

Refresh After (Days) 必要

動作在重新整理實體摘要前等待的天數。

這項動作會根據傳送至 Vertex AI 的所有輸入內容 (不包括 Fields To Ignore 參數中的值) 產生雜湊值。如果雜湊值已變更,這項動作會在設定的天數後重新整理摘要。如果雜湊值沒有變更,即使 Refresh After (Days) parameter value is earlier than the latest summary generation time.

The action validates the hash value of the latest actual generated summary and ignores the cached hash value.

The default value is 30.

Max Output Tokens 選用

每個回覆中可生成的輸出內容符記數量上限。

一個符記約為四個字元,100 個符記約為 60 到 80 個字。這項限制適用於每個實體。

詳情請參閱「測試不同參數值」。

動作輸出內容

「描述實體」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 可用
輸出訊息 可用
指令碼結果 可用
JSON 結果

以下範例顯示使用「描述實體」動作時收到的 JSON 結果輸出內容:

[
    {
        "Entity": "1B16D64CE18772B8F77C74C3D4DC24AA066BB117",
        "EntityResult": {
            "summary": "This is a suspicious, enriched, internal file hash (SHA1: 1B16D64CE18772B8F77C74C3D4DC24AA066BB117) identified as a Microsoft Excel 2007+ file (\"FC090000\") located on a user's desktop.  VirusTotal analysis shows 3 malicious flags out of 65 total engines.  The file contains macros, is potentially obfuscated, and exhibits behaviors like writing to files, running DLLs, and downloading content.  It was last modified on 2024-11-13 and created on 2021-07-07.  The file is linked to a single case (\"potential_apt_doc_files\") which was closed.  The file is flagged as an artifact but not vulnerable or a pivot point.\n",
            "usageMetadata": {
                "promptTokenCount": 12,
                "candidatesTokenCount": 778,
                "totalTokenCount": 790
            }
        }
    }
]
輸出訊息

「描述實體」動作可傳回下列輸出訊息:

輸出訊息 訊息說明
Successfully summarized the entity based on the available information using Vertex AI. 動作成功。
Error executing action "Describe Entity". Reason: ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「描述實體」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

執行提示

使用「執行提示」動作,透過 Vertex AI 執行個別文字提示。

這項操作不會在 Google SecOps 實體上執行。

動作輸入內容

「執行提示」動作需要下列參數:

參數 說明
Model ID 選用

要使用的模型 ID,例如 gemini-1.5-flash-002

Text Prompt 必要

要納入提示的文字指令。

Temperature 選用

這個值可控制選取詞元時的隨機程度。這個參數接受 float 資料類型的值。

如要進一步瞭解溫度值,請參閱「測試不同參數值」。

Candidate Count 選用

每次執行動作時要傳回的回應變體數量。

每次提出要求時,系統會對輸入權杖收費一次,並對所有生成的候選項目輸出權杖收費。

Response MIME Type 選用

生成候選文字的輸出回應媒體 (MIME) 類型。

下列模型提供回應媒體 (MIME) 類型:gemini-1.5-progemini-1.5-flash

可能的值如下:

  • application/json
  • text/plain
  • text/x.enum
預設值為 text/plain
Response Schema 選用

生成的候選文字結構定義如下。

如要使用這項參數,請設定 Response MIME Type 參數。

下列模型提供回應結構定義:gemini-1.5-progemini-1.5-flash

Max Input Tokens 選用

提交的輸入權杖數量上限。

一個符記最多由四個字元組成。100 個符記約為 60 到 80 個字。

如未設定值,動作會執行任何提示。 如果權杖數量超過設定的上限,動作就會失敗。

Max Output Tokens 選用

每個回覆中可生成的輸出內容符記數量上限。

一個符記約為四個字元,100 個符記約為 60 到 80 個字。這項限制適用於每個實體。

詳情請參閱「測試不同參數值」。

動作輸出內容

「執行提示」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 可用
輸出訊息 可用
指令碼結果 可用
JSON 結果

以下範例顯示使用「執行提示」動作時收到的 JSON 結果輸出內容:

{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Responding to a malicious email requires a layered approach.  Here's a breakdown of remediation steps, prioritizing actions based on urgency:\n\n**Immediate Actions (within minutes):**\n\n1. **Do NOT click any links or open any attachments.** This is paramount.  Malicious links can download malware, and attachments can contain viruses or exploits.\n\n2. **Disconnect from the internet (if possible).** This limits the damage the malware can do if it's already on your system.  Unplug your ethernet cable or turn off Wi-Fi.\n\n3. **Close the email immediately.** Don't even hover over links or attachments; the preview might be enough to trigger some malware.\n\n**Investigative Actions (within hours):**\n\n4. **Check your email account for unauthorized access.**  Look for unfamiliar sent emails, changed settings (like forwarding rules), or new accounts added.\n\n5. **Run a full system scan with your antivirus software.**  Ensure your antivirus definitions are up-to-date before running the scan.  Consider a second opinion scan with a different reputable antivirus program.\n\n6. **Review your computer's processes (Task Manager on Windows, Activity Monitor on macOS).** Look for unfamiliar processes consuming significant resources.  This could indicate malware activity.\n\n7. **Check your network connections.**  See if any unauthorized connections exist.\n\n8. **Change your email password immediately.** Use a strong, unique password.  Consider using a password manager.\n\n9. **If you clicked a link or opened an attachment, consider the potential impact.** Did you enter credentials?  Did you download a file?  The severity of action needed depends on this.\n\n**Remediation Actions (within days):**\n\n10. **Contact your IT department or security professional.**  They can provide expert guidance and assist with more advanced remediation steps.\n\n11. **Consider more advanced malware scanning tools.**  There are specialized tools that can detect malware missed by standard antivirus.\n\n12. **Review your operating system's security settings.**  Ensure firewalls are enabled and that other security features are adequately configured.\n\n13. **Report the malicious email to your email provider.** This helps them remove the email and prevent others from being affected. You can often do this by forwarding the email to an abuse reporting address provided by your provider.  Report it to the appropriate authorities if you suspect the email involves a crime.\n\n14. **Monitor your accounts and financial records for suspicious activity.**  Phishing emails often aim to steal credentials and financial information.\n\n**Preventive Actions (ongoing):**\n\n15. **Implement strong email filtering.** Use spam filters and configure your email provider's security settings to block suspicious emails.\n\n16. **Train yourself and others to identify phishing emails.**  Be wary of emails with unusual addresses, grammatical errors, urgent requests, or suspicious attachments.\n\n17. **Keep your software up to date.** Regularly update your operating system, applications, and antivirus software.\n\n18. **Use strong, unique passwords for all accounts.**  A password manager can assist with this.\n\n19. **Enable two-factor authentication (2FA) wherever possible.** This adds an extra layer of security to your accounts.\n\n\n**If you suspect your personal data or financial information has been compromised:**\n\n* **Contact your bank and credit card companies immediately.**  Report any suspicious transactions and consider placing a fraud alert on your accounts.\n* **Consider credit monitoring services.**  This can help you detect and respond to identity theft.\n\n\nThe severity of the remediation steps depends on the nature of the malicious email and what actions you took in response to it. If you're unsure about any step, err on the side of caution and seek professional help.\n"
          }
        ]
      },
      "finishReason": "STOP",
      "avgLogprobs": -0.4171245741660307
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 12,
    "candidatesTokenCount": 778,
    "totalTokenCount": 790
  },
  "modelVersion": "gemini-1.5-flash-002",
"Text_context": ""
"extracted_info": ""
}
輸出訊息

「執行提示」動作可傳回下列輸出訊息:

輸出訊息 訊息說明
Successfully executed a prompt. 動作成功。
Error executing action "Execute Prompt". Reason: ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「執行提示」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

乒乓

使用「Ping」動作測試與 Vertex AI 的連線。

這項操作不會在 Google SecOps 實體上執行。

動作輸入內容

動作輸出內容

「Ping」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 無法使用
輸出訊息 可用
指令碼結果 可用
輸出訊息

「Ping」動作可能會傳回下列輸出訊息:

輸出訊息 訊息說明
Successfully connected to Vertex AI with the provided connection parameters! 動作成功。

Failed to connect to Vertex AI. The API root that you provided doesn't match the following expected pattern: "https://((\w|-)+)-aiplatform.googleapis.com". Check the spelling.

Failed to connect to Vertex AI! The error is ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「Ping」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

轉換資料

使用「轉換資料」動作,透過 Vertex AI 執行資料轉換。

這項操作不會在 Google SecOps 實體上執行。

動作輸入內容

「轉換資料」動作需要下列參數:

參數 說明
Model ID 選用

要使用的模型 ID,例如 gemini-1.5-flash-002

Text Prompt 必要

要納入提示的文字指令。

Temperature 選用

這個值可控制選取詞元時的隨機程度。這個參數接受 float 資料類型的值。

如要進一步瞭解溫度值,請參閱「測試不同參數值」。

JSON Object 必要

做為動作輸入內容的 JSON 物件。

Max Output Tokens 必要

每個回覆中可生成的輸出內容符記數量上限。

一個符記約為四個字元,100 個符記約為 60 到 80 個字。這項限制適用於每個實體。

詳情請參閱「測試不同參數值」。

預設值為 100

動作輸出內容

「轉換資料」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 可用
輸出訊息 可用
指令碼結果 可用
JSON 結果

以下範例顯示使用「轉換資料」動作時收到的 JSON 結果輸出內容:

{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Respondo it. If you're unsure about any step, err on the side of caution and seek professional help.\n"
          }
        ]
      },
      "finishReason": "STOP",
      "avgLogprobs": -0.4171245741660307
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 12,
    "candidatesTokenCount": 778,
    "totalTokenCount": 790
  },
  "modelVersion": "gemini-1.5-flash-002",
"Text_context": ""
"extracted_info": ""
}
輸出訊息

「轉換資料」動作可傳回下列輸出訊息:

輸出訊息 訊息說明
Successfully transformed provided data. 動作成功。
Error executing action "Transform Data". Reason: ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「轉換資料」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。