Managing packages for platform actions

Packages overview

A platform package configuration includes a command, a script, and any related files that are needed to orchestrate a platform action on an endpoint managed using Tanium Client. For example, the Restart Service package includes a Windows command-line command that executes a script to restart a service on Windows endpoints. You deploy packages through the action deployment workflow to apply changes on endpoints. Tanium provides predefined packages to address numerous endpoint change scenarios and you can create custom packages for additional scenarios.

For more information, see Deploying actions and playbooks in Console and Interact.

Important:

Windows endpoints require certain configurations to enable some Tanium sensors and packages that rely on Windows Management Instrumentation (WMI) queries, VBScript, and PowerShell. For more information, see Prepare for deployment to Windows endpoints.

When you choose a scripting engine for custom packages, note that Microsoft has announced the deprecation of VBScript. For more information, see Tanium Community article: VBScript Retirement in a future Windows Release (sign in required).

An endpoint requires free disk space that is twice the size of the package that the Tanium Client is downloading for the download to succeed. To check the package size, see View package details.

Note: For the role permissions that are required to manage package configurations, see Manage packages.
Note: Endpoints managed using an entity provider do not have a Tanium Client installed. Only certain packages can be applied to these endpoints. Package functionality depends on the entity provider type.

Manage client applications through packages

The Tanium Client service can perform almost any command line instruction available to an Administrator user who is signed in to the endpoint because the service runs with the permissions of the LocalSystem account (Windows) or root account (non-Windows). Consequently, even if signed-in users do not have administrative rights, a Tanium Console user can deploy actions to the endpoint that install, update, or remove client applications as long as those applications meet the following conditions:

  • The applications are installed from a command line using the permissions of the LocalSystem account or root.

  • The applications are configured to suppress any interaction with an end user who is signed in to a target endpoint at installation time.

  • The applications can be dynamically customized at installation if necessary through options, switches, or input files passed to the application installer.

If the required executables, scripts, and configuration files do not natively have these characteristics, you might be able to use a commercial software packaging tool such as InstallShield or an open-sourced application like Nullsoft Scriptable Install System to create a new version of the installer.

You can use the Tanium Core Platform to track the count of installed applications, as well as whether those applications are running on endpoints. Therefore, before installing new software or upgrading versions of existing software, verify that your organization owns the required number of licenses or meets the Acceptable-Use criteria to centrally distribute and install the commercial or open-sourced software to endpoints within your organization.

Package files

A package might include files that are required to run an action, such as a script file. The files might be bundled with the package or reside on an internet location, such as content.tanium.com or other remote sources. If the Tanium Content Distribution Network (CDN) is enabled for your environment, Tanium Cloud downloads remote package files from their sources and sends the files to the CDN. For more information about downloading from remote sources, see Enabling authentication between Tanium Cloud and remote systems. Tanium Clients then download the package files from the CDN if it is available or from other Tanium Cloud servers otherwise. For more information, see Throttling bandwidth and connections to Tanium Clients.

Tanium might deliver package files from third-party providers. For more information on each package, see the README.txt file that is referenced with the package.

For examples of package files, see Example: Package files.

Scheduled action with parameterized package

A scheduled action is an action that is configured to deploy in the future or at recurring intervals (see Managing scheduled actions and action history). A parameterized package requires input (parameters) from users before the package can run on endpoints (see Example: Parameterized packages). When you configure a scheduled action to use a parameterized package, Tanium Cloud saves the package definition, including the user-entered parameter values, in an object called a temporary package without altering the configuration of the original package. On the endpoint, the Tanium Client runs the temporary package when it has a directive to run the scheduled action that uses the package. A scheduled action continues to use the temporary package even if the original package configuration is updated. Therefore, if a package configuration is updated and you want the scheduled action to use the updated package, you must re-issue or edit the scheduled action and click the Update Source Package option for the Deployment Package setting. For more information, see Update action packages. Alternatively, you can re-create the scheduled action to use the updated version of the package. For more information, see Deploying actions and playbooks in Console and Interact.

Running a package command within a process group

In a package configuration, the Launch this package in a process group setting controls whether the package command runs within a process group. If the setting is enabled, the process group and any remaining descendant processes are killed when the command completes or times out.

By default, you cannot change this setting and its default state depends on how the package was added:

  • You created the package through Tanium Console: The checkbox is selected by default.

  • Tanium Cloud automatically imported the package: When you view the configurations of Tanium-defined packages, the checkbox is selected for most packages but deselected for those that must run processes outside of a process group

For most packages that you create, running processes within a process group is the best practice. Some exceptions are:

  • Packages that initiate an installation process that must be able to run beyond the command completion or timeout.

  • A process that must run constantly. For example, some Tanium modules have predefined packages that initiate long-running indexing processes.

To change the Launch this package in a process group setting while you are creating or editing the package, first make the setting editable as follows:

  1. From the Main menu, go to Administration > Configuration > Settings > Platform Settings.
  2. Set Run Commands in Process Group to ON and click Save All.

Package verification

You can add verification exit codes or a verification query to a package to confirm whether it ran successfully during action deployment. For the steps to add the verification, see Create a package.

Note: You can use Tanium Console to configure verification exit codes or a verification query, but not both.

Verification Exit Codes

An exit code is a number that indicates the outcome of a package script or command. Specifying exit codes enables Tanium Clients to return Action states that confirm success status, not just completion status:

  • Verified status indicates that the package finished running and returned an exit code for success.

  • Failed Verification status indicates that the package finished running but returned an exit code that does not mean success.

Verification Query

A verification query is a preview question that indicates whether an action that used the package produced the expected results on endpoints. For example, if the package is intended to restrict permissions for the Tanium Client installation directory on Windows endpoints, you can specify the query Tanium Client Directory Permissions contains "restricted". After the action runs, the Action Status page shows the verification states (see Action states) and the Client Status Details section shows the endpoints for which the action is verified. You require the Sensor read permission on the Reserved content set to issue the Verification Query.

Note: The Client executes all the sensors in the Verification Query instead of reading from the sensor cache, regardless of the Max Sensor Age setting for those sensors.

View package details

Viewing package attributes can help you to determine if new packages are necessary and to manage or troubleshoot existing packages. For example, you might check the Command and script files of a package to diagnose unexpected results for actions that deploy the package.

  1. From the Main menu, go to Administration > Content > Packages.

    The Packages grid displays most of the attributes that are described in Create a package.

    Note: The Size column indicates the total size of all the files that are associated with the package. The value Not available indicates that the package has no associated files. The value Pending indicates that Tanium Cloud has not finished downloading and caching the files. To see the size of individual files in a package, select the package and click Status.
    Note: The Provider column identifies packages that came from an entity provider such as Tanium Connector for Microsoft Intune. You can filter packages by Provider using the attribute filter. Packages from entity providers are read-only. You cannot edit or create packages for Tanium Connector for Microsoft Intune or other entity providers. Applying a package to an entity ingested by an entity provider requires Tanium Server 7.8.1.3033 or later and Tanium Data Service (TDS) 4.1.112.0000 or later.
  2. (Optional) To display attributes that the grid hides by default, click Customize Columns Customize columns and select the attributes.
  3. (Optional) Use the filters to find specific packages:
    • Filter by text: Enter a text string in the Filter items field to filter the grid by package Name, Display Name, or Command.
    • Filter by attribute: Expand Expand the Filters section, select a package attribute (such as Content Set assignment), select an operator (such as contains), enter a text string that contains all or part of the attribute value, and click Apply Apply. For each additional filter, click Add, select Add Row, and configure the filter. Boolean AND logic applies if you configure multiple filters.
  4. To view the download status of package files, select the package and click Status. You can Re-download package files if necessary.
  5. To see all the attributes of a particular package, click the package Display Name. For information about the attributes, see Create a package.
Note:

When you open the details of a package from an entity provider such as Tanium Connector for Microsoft Intune, the package details page differs from a standard platform package:

  • A Provider field shows the entity provider name.

  • The page is read-only. The Edit Mode button is not available.

  • The Ignore action lock setting is not available.

  • The Command and Files sections do not appear.

  • The Supported Action Classes section lists the action classes that the package supports.

Re-download package files

Tanium Cloud caches package files. If updated file versions are available, or re-downloading the current file versions is necessary for troubleshooting, you can manually re-download to Tanium Cloud. Re-downloading ensures that the package deploys the correct files to endpoints.

Note: Tanium Cloud automatically retries downloading every few minutes if the initial download failed for a package.
Tip: To download the package files that are associated with a specific action, go to Administration > Actions > Scheduled Actions, select the action, and click Show Status.
  1. From the Main menu, go to Administration > Content > Packages.

  2. Select the package for which you want to download files and click Status.

    Figure 1. Package Status page
    package_status
  3. (Optional) Filter by Status (such as Needs Attention or Error) if the list is long.

  4. Re-download Download an individual file or click Re-Download All to re-download all the files.

Tip: If you want Tanium Cloud to automatically check for, and download, updated versions of remote package, set a Check for update interval in the package configuration. For more information, see Create a package.

Clone a package

Cloning is useful when you need to:

  • Create a modified version of a predefined package from a Tanium content-only solution such as Default Content.

    Note: Do not modify a predefined package.
  • Create a new package with settings that differ only slightly from an existing package. This is often easier than creating a new package from scratch.

Perform the following steps to clone a package:

  1. From the Main menu, go to Administration > Content > Packages.

  2. Use the search and column sorting features to find the package that you want to clone.

  3. Select the package and click Clone.

  4. Configure the settings as described in Package details and click Save.

Create a package

Create a custom package for endpoint change scenarios that Tanium-defined packages do not address. For example, you might create a package to activate the key for a product that is specific to your organization. As another example, you might create a package that is similar to an existing package except for the content set assignment to ensure that only certain users can deploy the package through actions.

Tip: Instead of creating a new package from scratch, cloning is usually easier if the package settings differ only slightly from an existing package. For more information, see Clone a package.

Review Custom content development before you perform the following steps to create a custom package.

  1. From the Main menu, go to Administration > Content > Packages and click New Package.
  2. Configure the package Details.
    Table 1. Package details

    Detail

    Description

    Package Name

    Enter a name of up to 255 characters to identify the package.

    For sensor-sourced packages, you have the option to use a sensor variable in the package name. For more information, see Configure settings for a sensor-sourced package.

    Display Name

    (Optional) Specify a name to display for the package in the Packages page and Action Deployment page. If you do not enter a value, the Package Name is the default Display Name.

    Description

    Enter a description to help other users understand the purpose of the package, what it does, and any special requirements. For example, you can note the parameters for a sensor-sourced package. You can also enter text that helps users to distinguish the package from other packages with similar names.

    Content Set

    Assign the package to a content set. The list displays all content sets for which you have Package write permission. If you do not select a content set, the Default set is assigned.

    Command

    Specify the command to run on the endpoint. The syntax must include all the appropriate command-line switches to ensure silent execution when that is required. For example, you can enter setup.exe /S, msiexec.exe /i installme.msi /qn, installme.exe /S /D=DIR, or ipconfig /flushdns.

    For more information about commands and examples of their usage, see:

    Command Timeout and Download Timeout

    These timeouts affect the state (Completed, Expired, or Failed) of an action that uses the package. The Download Timeout is the amount of time available to download packages files. The Command Timeout is the amount of time available for the command to run. For more information, see View status for simple actions.

    Ignore action lock

    Enable endpoints to execute actions that include this package regardless of whether action locks are on for those endpoints. Use this option in packages that are critical for the health and security of a network. For more information, see Locking down actions on endpoints.

    Launch this package in a process group

    Run the package command within a process group. When the command completes or times out, the process group and any remaining descendant processes are killed. For more information, see Running a package command within a process group.

  3. Specify the Files that are required to run the package, such as a script file. You do not have to specify files that are already present on endpoints. Each package can have up to 100 files. To select files, select an option in the Add dropdown list:
    • Local Files: Upload one or more files from your local host computer by drag-and-dropping them or by clicking Browse for Files. When you upload it, Tanium Cloud generates a SHA-256 hash.

    • Remote File: Specify the following settings:

      • File Address: Enter the file address, including the protocol. The supported protocols are HTTPS, HTTP, FTPS, and FTP. For example, enter:

        https://content.tanium.com/files/published/emerging-issues-content/2023-10-16_17-46-22_1.2.31.0000/cve-2023-36884_mitigation/cve-2023-36884-Mitigation.bat

      • Name: For example, enter cve-2023-36884-Mitigation.bat.

      • Check for update: Select the interval at which Tanium Cloud checks for an updated version of the file.

      • SHA-256: Enter the SHA-256 hash of the file.

    To view or edit file settings for an existing package, select the file name in the list. You can filter the list by entering a search string in the Filter by File Name field.

    For more information about script files and examples of their usage, see:

  4. Configure the Parameters if this is a parameterized package. For more information, see Configure parameter inputs for a package.
  5. (Optional) Add a Verfication query that indicates whether an action that used the package produced the expected results on endpoints. For more information, see Verification Query.
    Note: You can use Tanium Console to configure a verification query or verification exit codes, but not both.
    1. Click Add, use the Filter Bar, Filter Builder, or Manual Group tab to build the filter part of the question, and then click Confirm.
    2. Specify a verification failure timeout. The clock begins when the action finishes, which is when verification starts. The Tanium Client periodically reissues the verification question throughout the timeout period. If the Client does not return a Verified state within that period, the Client returns Failed Verification as the action state.
  6. (Optional) Add Verfication exit codes to enable Tanium Clients to return Action states that confirm success status, not just completion status. For more information, see Verification Exit Codes.
    1. Click Add Exit Codes and enter a code or range of codes that indicates the package ran successfully. For example, the value -1 - 5 specifies that any exit code from -1 to 5 indicates success.
    2. For each additional exit code, click + Add Code and enter the code.
  7. Click Save to save the configuration.

Edit a package

Important: For more information about the impact on scheduled actions when a parameterized package configuration is edited, see Scheduled action with parameterized package.
Note: As a best practice, do not edit a predefined package that is provided through a Tanium solution. Contact Tanium Support if editing a Tanium-provided package is necessary. Alternatively, you can Clone a package that is predefined and edit the copy. You can also edit custom packages that you created from scratch.
Tip: To change the content set assignment in bulk for multiple packages that must belong to the same set, see Move packages between content sets.
  1. From the Main menu, go to Administration > Content > Packages.
  2. (Optional) Use the search and column sorting features to find the package you want to edit.
  3. Click the package Display Name.
  4. Click Edit Mode, configure the settings described in Package details, and click Save.

Move packages between content sets

You can move packages in bulk between content sets to accommodate RBAC changes in your organization. For example, you might want to move certain packages to a content set that only highly privileged users can access.

  1. From the Main menu, go to Administration > Content > Packages.
  2. Select the packages and click Move to Content Set.
  3. Select a content set and click Confirm.

Export packages

Export packages as a file in one of the following formats based on your objective:

  • CSV

    You can use any application that supports CSV format to display the same package attributes (columns) as the Console Packages grid shows and then customize the display. For example, you can use Microsoft Excel to create charts based on package attributes.

  • JSON

    You can export multiple package configurations as a JSON file. Exporting configurations is useful if you want to review them outside Console in an application that supports JSON. You must be assigned a role with the Export Content permission to export a JSON file. The Admin reserved role has export permissions.

Perform the following steps to export packages:

  1. From the Main menu, go to Administration > Content > Packages.
  2. (Optional, CSV exports only) To add or remove attributes (columns) for the CSV file, click Customize Columns Customize Columns in the grid and select the attributes.
  3. Select rows in the grid to export only specific packages. If you want to export all packages, skip this step.
  4. Click Export Export.
  5. (Optional) Edit the default export File Name.
    Note: The file suffix (.csv or .json) changes automatically based on the Format selection.
  6. Select an Export Data option: All packages in the grid or just the Selected packages.
  7. Select the file Format:
    • List of Packages - CSV
    • Package Definitions - JSON (requires Export Content permission)
  8. Click Export.

    Tanium Cloud exports the file to the downloads folder on the system that you use to access Tanium Console.

Copy package configuration details

Copy information from the Packages page to your clipboard to paste the information into a message, text file, or spreadsheet. Each row in the grid is a comma-separated value string in the copy.

  1. From the Main menu, go to Administration > Content > Packages.
  2. Perform one of the following steps:
    • Copy row information: Select one or more rows and click Copy Copy.
    • Copy cell information: Hover over the cell, click Options Options, and click Copy Copy.

Deploy actions from the Packages page

You can configure an action to deploy any package from the Packages page except for sensor-sourced packages. You can deploy actions for sensor-sourced packages only from the Question Results page. For more information, see Example: Sensor-sourced packages and Deploying actions and playbooks in Console and Interact.

Note: For the role permissions that you require to deploy actions, see Deploy an action.
  1. From the Main menu, go to Administration > Content > Packages.
  2. Select a package, click Deploy Action, and complete the action deployment workflow as described in Configure action settings.

Delete packages

Important: Do not delete the predefined packages that Tanium solutions provide. When Tanium Cloud imports solution updates, the update process restores any deleted predefined packages.
Note: Instead of deleting custom packages, instruct users not to use them.

Deleting a custom package might be warranted in certain scenarios. For example, the package might not be needed for actions anymore, the package might not run successfully on endpoints, or another package might use fewer endpoint resources to perform the same change.

Perform the following steps before you delete a package:

  1. Determine if any scheduled actions use the package and assess the impact of deleting the action. You cannot change the package for an action after you save the action configuration. For more information, see Manage scheduled actions.
  2. Decide which package is a suitable replacement or create a replacement if necessary. This step is required only if you must recreate the actions that use the package you plan to delete. For more information, see View package details and Create a package.
  3. (Optional) Recreate the action with the replacement package. For more information, see Deploying actions and playbooks in Console and Interact.

Perform the following steps to delete a package:

  1. From the Main menu, go to Administration > Content > Packages.

  2. Select the package and click Delete Delete sensor.