Using Orbital Queries

Use Orbital’s Investigate page, shown in the figure below, to construct and run ad hoc queries across identified endpoints, in order to gather system information about them.

Orbital’s Query page

There are several avenues you can take to access Orbital’s Investigate page:

If necessary, click Log in with Cisco XDR or Log in with Cisco SecureX to authenticate using your existing Secure Endpoint credentials. Refer to the Cisco Security Cloud Sign On Quick Quick Start Guide for more information on logging in through. Cisco XDR or SecureX.

Endpoints - Choose the Query Target

  1. In the Endpoints field, enter the ID of one or more endpoints in your organization that will be queried for information, as shown in the figure below.

    First endpoint

    To remove an endpoint from the field, click the X at the right end of the endpoint label.

    a. You can add multiple random endpoints. Click Random Endpoints at the right end of the field, as show in the figure below.

    Add Random Endpoints button

    The Add Random Endpoints dialog opens:

    Add Random Endpoints

    Note: The default value for the Endpoints field is 10, it is not the maximum number of endpoints you can include in a query. This value can be changed by either typing in a new number into the field or using the up and down arrows to specify another number.

    b. Type the number of random endpoints you wish to run the query against into the Number field, if you wish to include more or less than ten endpoints.

    c. Click Add. The endpoints are then added to the Endpoints field, as shown in the figure below.

    Selected Endpoints

SQL - Enter a Query

You can type in or paste a SELECT statement in the SQL field, or select one from the Query Catalog.

  1. Click Browse Query Catalog. The Query Catalog dialog opens:

    Query Catalog

    This catalog contains a rich collection of pre-defined queries that have been created by the Orbital engineering team and TRE (Threat Research for Endpoint) to help you get started. This information should help you quickly learn the power of Orbital and osquery for threat hunting.

    A Search field appears at the top of the dialog. The query list will automatically adjust to display only those catalog queries that contain the search term(s).

  2. Click on a query name to view detailed information:

    Query Catalog

  3. Choose a query from the list.

    Query Catalog

    The query detail dialog includes a detailed query description, plus the ID, OS, Categories, ATT&CK™ Techniques and Tactics, information and warning messages, and the SQL SELECT statement. You can copy the SQL by clicking the clipboard icon, or click the + icon to add the SQL statement to your query:

    Query Catalog

    Note: Some catalog queries will require additional parameters once they have been added. These queries will display one or more Parameters fields describing the required information after they’ve been added.

    Query Catalog

Note: The SQL statements of queries added from the Catalog will be hidden by default. To display the SQL, click on the name of the catalog query.

Other useful cataloged queries to start with include:

Note: Any values or parameters you enter into the Investigate page fields will be retained if you move to another page or tab, then return to the Investigate page. However, if you click Clear, refresh your browser, or your Orbital session expires, any values entered into the Investigate page fields will not be retained.

Running a Ad Hoc Query From the Catalog

Follow the steps below to run an ad hoc query

  1. Click Investigate to open the Investigate page shown in the figure below.

    Investigate page

  2. Define the endpoints that the query will be run against.

    a. Enter the ID for one or more of your organization’s endpoints in the Endpoints field, shown in the figure below.

    First endpoint

    or

    a. Click the Add Random Endpoints Icon button located under the lower-right corner of the Endpoints field, as shown in the figure below, to add multiple random endpoints.

    Add Random Endpoints button

    The Add Random Endpoints dialog, shown in the figure below, opens:

    Add Random Endpoints

    b. Select the desired operating system or system(s) from the Add Random Endpoints dialog.

    c. Click Add. The selected endpoints are added to the Endpoints field, as shown in the figure below.

    Selected Endpoints

  3. Define your query by selecting an existing query from the Orbital Catalog.

    a. Click Browse Query Catalog. The Query Catalog popup window opens as shown in the figure below.

    Query Catalog

    b. Type the name of the query you wish to run in the Search field. The query list will automatically adjust to only include the catalog queries that contain the search term(s).

    c. Click on the desired query name to view its detailed information, shown in the figure below.

    Query Catalog

    Review the contents of the query’s detailed information and decide if you wish to use the query or not.

    • If you decide not to use the query, click the Back button, shown in the figure below, located in the top-left of the page to return to the query search list.

    Query Information Window’s Back Button

    d. When you have found the query you wish to run, click Add to Query, shown in the figure below.

    Add to Query Button

    e. Add any required parameters in the Parameters field, shown in the figure below, if the query requires you to specify them.

    Query Catalog

  4. Click Run Query to run the query and view the results. The results will be returned in the right-side pane, shown in the figure below.

    Query Catalog

Saving A Query To the Catalog

To save a custom query to the Orbital catalog:

  1. Navigate to Orbital’s Query page, as shown in the first figure of this topic.

  2. Place your cursor in the Custom SQL field, shown in the figure below.

    Custom SQL Field

  3. Type your SQL statement into the Custom SQL field. You will notice that as you type your SQL statement, the Save Query button is displayed, as shown in the figure below.

    Save Query Button

    • If you need to type a multi-statement query, click the plus located at the right end of the Custom SQL field, shown in the figure below.

      Additional SQL Statements

      This will clear the Custom SQL field and place the previous SQL statement at the bottom of the page.

  4. Click Save Query. This will display the Save Query dialog, shown in the figure below.

    Save Query Dialog

  5. Type the name that the query will be saved under in the catalog in the Query Name field.

  6. Type a description of the query into the Description field.

  7. Select the operating system or operating systems that the query will be run against, using the OS checkboxes. This defaults to no operating systems selected. Once you have selected one or more operating systems, the Save button will be displayed.

  8. Click Save. This will remove the Save Query dialog from the screen and return to the Query page. The newly saved query is listed at the bottom of the page, as shown in the figure below.

    Query Is Saved

Ad Hoc Query

To send the query to the specified endpoints click Run Query. The results will be returned in the right pane:

Query Catalog

Study the results and the SQL statement to learn how to edit catalog queries and write your own SQL to follow your investigation wherever it leads. You can edit the query and click Run Query again; the results will refresh.

Download

The Download function allows you to download the records of all the results of the active ad hoc query. The records retrieved using Download can be either formatted in a Comma Separated Value (CSV) file or a JavaScript Object Notation (JSON) file.

To download the active ad hoc query results:

  1. Click Download. This will display the file type selector, as shown in the figure below.

File Format Dropdown

  1. Select the file type. This will display the Preparing download… message, as shown below.

Preparing download…

When the results file is ready to download, Orbital will display the download is ready message, as shown below.

download is ready

  1. Click download is ready.

    This will download the ad hoc query results in a ZIP file.

More Info

Return to Table of Contents