> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-agentix/reference-and-developer-docs/cortex-agentix-xql/build-xql-queries/legacy-query-builder/create-registry-query.md).

# Create registry query

***

From the Query Builder, you can investigate connections between registry activity, processes, and endpoints.

Some examples of registry queries include:

* Modified registry keys on specific endpoints.
* Registry keys related to process activity on specific endpoints.

How to build a registry query

1. From Cortex AgentiX, select **Investigation & Response** → **Search** → **Query Builder**.
2. Select **REGISTRY**.
3. Enter the search criteria for registry events.
   * **Registry action**: Select one or more actions: **Key Create**, **Key Delete**, **Key Rename**, **Value Set**, or **Value Delete**.
   * **Registry attributes**: Define additional registry attributes.

     By default, Cortex AgentiX returns events that match the specified attributes. To exclude a value, change **`=`** to **`=!`**. Available attributes include:

     * **KEY NAME**: Registry key name.

       <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Important</h3><p>Enter an actual registry key name, not a symbolic link. Otherwise, the query returns no results.</p><p>Use <code>HKEY_LOCAL_MACHINE\System\ControlSet001</code> instead of <code>HKEY_LOCAL_MACHINE\System\CurrentControlSet</code>.</p><p>Use <code>HKEY_USERS\&#x3C;SID></code> instead of <code>HKEY_CURRENT_USER</code>. Replace <code>&#x3C;SID></code> with a user SID or <code>*</code>.</p></div>
     * **DATA**: Registry key data value.
     * **KEY PREVIOUS NAME**: Registry key name before modification.
     * **VALUE NAME**: Registry value name.

     To add an exception, select **+** beside the value and enter it.
4. Optional: Limit the scope to a specific source.

   Select **+** beside the value. Then specify one or more source attributes.

   Use a pipe (`|`) to separate values. Use an asterisk (`*`) to match any characters.

   * **NAME**: Parent process name.
   * **PATH**: Parent process path.
   * **CMD**: Process command line, including arguments, up to 128 characters.
   * **MD5**: Process MD5 hash.
   * **SHA256**: Process SHA256 hash.
   * **USER NAME**: User who executed the process.
   * **SIGNATURE**: Parent process signing status.
   * **SIGNER**: Entity that signed the parent process certificate.
   * **PID**: Parent process ID.
   * **Run search for process, Causality, and OS actors**: Applies the criteria to initiating processes. Clear this option to configure different attributes.
5. Optional: Limit the scope to an endpoint or its attributes.

   Use a pipe (`|`) to separate values. Use an asterisk (`*`) to match any characters.

   * **HOST**: **HOST NAME**, **HOST IP** address, **HOST OS**, **HOST MAC ADDRESS**, or **INSTALLATION TYPE**.
   * **INSTALLATION TYPE**: Cortex XDR agent or Data Collector.
   * **PROCESS**: **NAME**, **PATH**, **CMD**, **MD5**, **SHA256**, **USER NAME**, **SIGNATURE**, or **PID**.
6. Specify the event time period.

   Select **Last 24H**, **Last 7D**, **Last 1M**, or **Custom**.
7. Choose when to run the query.

   Select the calendar icon to schedule it. Select **Run** to run it immediately. View results in the **Query Center**.

   You can leave the page while the query runs. You receive a notification when it completes. You can also **Cancel** the query or run a new query.
8. Review the results. See [Review XQL query results](/cortex-agentix/reference-and-developer-docs/cortex-agentix-xql/build-xql-queries/how-to-build-xql-queries/review-xql-query-results.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-agentix/reference-and-developer-docs/cortex-agentix-xql/build-xql-queries/legacy-query-builder/create-registry-query.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
