Microsoft Security Copilot in advanced hunting

Applies to:

  • Microsoft Defender XDR

Important

The information in this article only applies to the Microsoft Security Copilot Early Access Program, an invite-only paid preview program for commercial customers. Some information in this article relates to prereleased product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Security Copilot in advanced hunting

Microsoft Security Copilot in Microsoft Defender XDR comes with a query assistant capability in advanced hunting.

Threat hunters or security analysts who are not yet familiar with or have yet to learn KQL can make a request or ask a question in natural language (for instance, Get all alerts involving user admin123). Security Copilot then generates a KQL query that corresponds to the request using the advanced hunting data schema.

This feature reduces the time it takes to write a hunting query from scratch so that threat hunters and security analysts can focus on hunting and investigating threats.

Users with access to Security Copilot have access to this capability in advanced hunting.

Try your first request

  1. Open the advanced hunting page from the navigation bar in Microsoft Defender XDR. The Security Copilot side pane for advanced hunting appears at the right hand side.

    Screenshot of Security Copilot pane in advanced hunting.

    You can also reopen Security Copilot by selecting Security Copilot button at the top of the query editor.

  2. In the Security Copilot prompt bar, ask any threat hunting query that you want to run and press Send icon or Enter .

    Screenshot that shows Prompt bar in the Security Copilot for advanced hunting.

  3. Security Copilot generates a KQL query from your text instruction or question. While Security Copilot is generating, you can cancel the query generation by selecting Cancel.

    Screenshot of Security Copilot in advanced hunting generating a response.

  4. Review the generated query. You can then choose to run the query by selecting Add and run.

    Screenshot of Security Copilot button showing Add the query to query editor and run.

    The generated query then appears as the last query in the query editor and runs automatically.

    If you need to make further tweaks, select Add to editor.

    Screenshot of Security Copilot in advanced hunting showing the Add to editor option.

    The generated query appears in the query editor as the last query, where you can edit it before running using the regular Run query above the query editor.

  5. You can provide feedback about the generated response by selecting the feedback smiley icon and choosing Confirm, Off-target, or Report.

Tip

Providing feedback is an important way to let the Microsoft Security Copilot team know how well the query assistant was able to help in generating a useful KQL query. Feel free to articulate what could have made the query better, what adjustments you had to make before running the generated KQL query, or share the KQL query that you eventually used.

Query sessions

You can start your first session anytime by asking a question in the Security Copilot side pane in advanced hunting. Your session contains the requests you made using your user account. Closing the side pane or refreshing the advanced hunting page does not discard the session. You can still access the generated queries should you need them.

Select the trash icon (Clear session) to discard the current session.

Screenshot of Security Copilot in advanced hunting showing the clear session trash icon.

Modify settings

Select the gear icon in the Security Copilot side pane to choose whether or not to automatically add and run the generated query in advanced hunting.

Screenshot of Security Copilot in advanced hunting showing the settings gear icon.

Deselecting the Run generated query automatically setting gives you the option of running the generated query automatically (Add and run) or adding the generated query to the query editor for further modification (Add to editor).