使用 Gemini 生成搜尋查詢

支援的國家/地區:

本文說明如何使用 Gemini,從 Gemini 窗格或 Google Security Operations 搜尋功能生成搜尋查詢。

為獲得最佳結果,建議使用 Gemini 窗格生成搜尋查詢。

使用 Gemini 窗格生成搜尋查詢

  1. 登入 Google SecOps。
  2. 按一下 Gemini 標誌,開啟 Gemini 窗格。
  3. 輸入自然語言提示,然後按下 Enter 鍵。自然語言提示必須以英文輸入。

    開啟 Gemini 窗格並輸入提示

    圖 1. 開啟 Gemini 窗格並輸入提示。

  4. 查看生成的搜尋查詢。搜尋查詢使用 YARA-L 2.0 語法。 如果生成的搜尋查詢符合需求,請按一下「執行搜尋」。 Gemini 會產生結果摘要,並提供建議動作。

搜尋提示和後續問題範例

  • Show me all failed logins for the last 3 days
    • Generate a rule to help detect that behavior in the future
  • Show me events associated with the principle user izumi.n
    • Who is this user?
  • Search for all of the events associated with the IP 198.51.100.121 in the last 3 hours
    • List all of the domains in the results set
    • What types of events were returned?
  • Show me events from my firewall in the last 24 hours
    • What were the 16 unique hostnames in the results set?
    • What were the 9 unique IPs associated with the results set?

使用自然語言生成搜尋查詢

使用 Google SecOps 搜尋功能時,您可以輸入有關資料的自然語言查詢,Gemini 會將其轉換為搜尋查詢,對 UDM 事件執行查詢。

為獲得更準確的結果,建議使用 Gemini 窗格生成搜尋查詢

如要使用自然語言搜尋建立搜尋查詢,請完成下列步驟:

  1. 登入 Google SecOps。
  2. 依序前往「調查」> SIEM 搜尋」
  3. 在自然語言查詢列中輸入搜尋陳述式,然後按一下「產生查詢」。搜尋時必須使用英文。

    輸入自然語言搜尋查詢,然後按一下「產生查詢」

    圖 2:輸入自然語言搜尋查詢,然後按一下「產生查詢」

    以下列舉幾個可能產生實用搜尋結果的陳述句:

    • network connections from 10.5.4.3 to google.com
    • failed user logins over the last 3 days
    • emails with file attachments sent to john@example.com or jane@example.com
    • all Cloud service accounts created yesterday
    • outbound network traffic from 10.16.16.16 or 10.17.17.17
    • all network connections to facebook.com or tiktok.com
    • service accounts created in Google Cloud yesterday
    • Windows executables modified between 8 AM and 1 PM on May 1, 2023
    • all activity from winword.exe on lab-pc
    • scheduled tasks created or modified on exchange01 during the last week
    • email messages that contain PDF attachments
    • emails sent by or sent from admin@acme.com on September 1
    • any files with the hash 44d88612fea8a8f36de82e1278abb02f
    • all activity associated with user "sam@acme.com"
  4. 如果搜尋陳述式包含時間相關字詞,時間挑選器會自動調整以符合條件。舉例來說,這項政策適用於下列搜尋:

    • yesterday
    • within the last 5 days
    • on Jan 1, 2023

    如果系統無法解讀搜尋陳述式,會顯示以下訊息:
    「很抱歉,無法產生有效查詢。請試著換一種問法。」

  5. 查看生成的搜尋查詢。語法為 YARA-L 2.0

  6. 選用:調整搜尋時間範圍。

  7. 按一下「執行搜尋」

  8. 瀏覽搜尋結果,確認是否有該活動。視需要使用搜尋篩選器縮小結果清單範圍。

  9. 使用「生成的查詢」意見回饋圖示,對查詢提供意見。請選取下列其中一個選項:

    • 如果查詢傳回預期結果,請按一下「thumb_up」thumb_up「喜歡」
    • 如果查詢未傳回預期結果,請按一下「不喜歡」圖示 thumb_down
    • 選用:在「意見回饋」欄位中加入其他詳細資料。
  10. 如要提交有助於改善結果的修訂搜尋查詢,請按照下列步驟操作:

    1. 編輯系統產生的搜尋查詢。
    2. 按一下「提交」
      • 如果沒有重寫查詢,系統會提示你編輯查詢。
      • 如果您重寫查詢,系統會清除修訂後的搜尋查詢中的私密資料,並用於改善結果。

刪除對話工作階段

你可以刪除對話工作階段或所有對話工作階段。 Gemini 會以私密方式保存所有使用者對話記錄,並遵守 Google Cloud的負責任 AI 做法。使用者記錄絕不會用於訓練模型。

  1. 在 Gemini 窗格中,選取右上角選單中的「刪除對話」
  2. 按一下右下方的「刪除對話」,即可刪除目前的對話工作階段。
  3. 選用:如要刪除所有對話工作階段,請選取「刪除所有對話工作階段」 ,然後按一下「刪除所有對話」

提供意見回饋

您可以對 Gemini AI 偵查助理生成的內容提供意見回饋。你的意見有助於 Google 改善這項功能和 Gemini 生成的內容。

  1. 在 Gemini 窗格中,按一下「喜歡」圖示 「喜歡」或「不喜歡」圖示 「不喜歡」
  2. 選用:按一下「不喜歡」圖示 thumb_down「不喜歡」,然後提供意見回饋。
  3. 按一下 [傳送意見]

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