使用 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 Thumbs Up
    • 如果查询未返回预期结果,请点击thumb_down图标 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 专业人士那里获得解答。