Integrating Netskope with Tanium

Integration Guide Version 1.0

Overview

Tanium's fundamental endpoint visibility allows you to understand endpoint hygiene in real time, enabling you to make accurate decisions to remediate or mitigate issues across your enterprise.

Netskope is a leading provider of cloud security with its security service edge, single-pass architecture. Using clients to steer traffic to the Internet through the Netskope Security Cloud means that customers can securely enable data moving into and out of the distributed corporate environment.

Background

The integration between Netskope and Tanium enables joint customers to leverage Tanium’s high-fidelity endpoint data and user-friendly natural language search capabilities to determine if an endpoint’s overall posture equates to compliant, safe, or managed. These endpoint posture dispositions, determined either one-time or on a recurring basis, would drive a decision to have Netskope treat that endpoint differently than a non-compliant, risky, or unmanaged device.

Utilizing adaptive policy controls, the user of that non-compliant device may not be able to download or upload files while the device is in a “risky” posture, but can still perform basic functions–such as browsing the web and sending email.

Requirements

Tanium-Netskope Setup for Windows

1. Create the following Saved Questions

Saved Question Name

Tanium Question

Netskope Installed Windows

Get Computer Name from all machines with Installed Applications contains Netskope Client

Netskope Not Installed Windows

Get Computer Name from all machines with ( Is Windows contains true and all Installed Applications not contains Netskope Client )

Netskope Managed Windows

Get Computer Name from all machines with Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Netskope\Provisioning,Managed] contains 1

Netskope Unmanaged Windows

Get Computer Name from all machines with Registry Value Data[HKEY_LOCAL_MACHINE\SOFTWARE\Netskope\Provisioning,Managed] contains 0

Netskope Running Windows

Get Computer Name from all machines with Running Service contains Netskope Client Service

Netskope Stopped Windows

Get Computer Name from all machines with Stopped Service contains Netskope Client Service

These Saved Questions can be organized under a Dashboard and Category for browsing in Interact or Home.

2. Create the following Packages

Package Name

Package Command

Netskope Health - Managed

cmd /c ….TPythonTPython netskope_tanium_3_0_0.py -ns -s enable

Netskope Health - Unmanaged

cmd /c ….TPythonTPython netskope_tanium_3_0_0.py -ns -s disable -v 0

Netskope Installer Windows

cmd /c  msiexec /I NSClient_addon-.goskope.com_###_.msi

Contact your Netskope or Tanium Account Manager for package files.

3. Create Scheduled Actions for Managed and Unmanaged Policies

  1. Using Interact and a targeting Question that results in managed, compliant, or safe, select Deploy Action and pick the package “Netskope Health – Managed”.

  2. Using Interact and a targeting Question that results in unmanaged, non-compliant, or risky, select Deploy Action and pick the package “Netskope Health – Unmanaged”.

See the following Community article for an example targeting Question based on Tanium Patch compliance: Use Tanium Patch data to determine if systems are out of compliance with SLAs.

  1. Optional: Using Interact run a targeting Question for Netskope Agent installation. Select Deploy Action and pick the Netskope Installer package created in step #2

  2. This data can also be visualized in Tanium Trends. Please contact your Technical Account Manager (TAM) for details.

  3. Go into Netskope tenant and navigate to Settings > Manage > Device Classification. Click New Device Classification Rule.

    1. Rule for Windows

      1. Under Classification Criteria, select the registry box.

      2. For HKEY_LOCAL_MACHINE, select the path of \SOFTWARE\Netskope\Provisioning.

      3. Select Reg_SZ, data Managed, value 1.

      4. A match on that registry value constitutes managed.


      netskope1_495x340

      netskope2_445x311
    2. Rule for MacOS

      1. Under Classification Criteria, select the registry box.

      2. Select File Name.

      3. Filepath = /Library/Application Support/Netskope/STAgent/data/managed.json.

      4. A match on this file constitutes managed.

Additional Notes on the Netskope Script for Tanium (v3.0.0)

The script automatically identifies whether it is running on MAC or Windows. If it is running on MAC or Windows, then the script checks whether Netskope Client is already installed or not using the appropriate method. The following section explains the details of the Tanium script execution by Operating System.

For MAC

Based on provided parameters the script checks if the provided file exists or not. If the file exists, the script deletes the file. Otherwise, the script create a new file. Then, the script executes the enable, disable or restart command for the Netskope Client or Netskope Service. In case of a restart, the script first executes the command to disable Netskope Client/ Netskope Service and after 5 seconds, it executes the command to enable Netskope Client/ Netskope Service.

For Windows

Based on the parameters provided, script updates the windows registry key with the value provided by the user. After that script executes the enable, disable or restart command for the Netskope Client or Netskope Service. In case of the restart, the script first executes the command to disable Netskope Client/ Netskope Service and after 5 seconds, it executes the command to enable Netskope Client/ Netskope Service.

Prerequisites

  • Supported Operating systems: MAC, Windows

  • Netskope Client should be installed

  • Python3

Usage

python netskope_tanium_3_0_0.py [-h] [--use_nsdiag | --use_stagevntsvc] [--set {enable,disable} | --restart] [--filePath FILEPATH] [--key KEY] [--value VALUE] [--debug DEBUG] [--netskope_path NETSKOPE_PATH]

Supported parameters

Parameter

Description

-h, --help

Show this help message and exit.

--use_nsdiag, -nc

Use nsdiag for Netskope Client operations.

--use_stagevntsvc, -ns

Use stagevntsvc for Netskope Service operations. Script must be run as administrator to use stagevntsvc.

--set {enable,disable}, -s {enable,disable}:

Provide 'enable' or 'disable' for nsdiag/stagevntsvc script.

--restart, -r

Restart using nsdiag/stagevntsvc.

--filePath FILEPATH, -fp FILEPATH

Full File Path with filename or Full Registry Path.

--key KEY, -k KEY

Key to add/update. Only for Windows

value VALUE, -v VALUE

Value of the key to be added/updated. Only for Windows

--debug DEBUG, -d DEBUG

[Optional] Full file path for logging. Default path would be the current directory and the file name would be 'netskope_tanium.log'.

--netskope_path NETSKOPE_PATH, -nsp NETSKOPE_PATH

[Optional] Directory where nsdiag/stagevntsvc is located.

Default values

Without providing any parameters the script restarts (--restart(-r)) the Netskope Service(--use_stagevntsvc(-ns)) with the following default values based on the operating system.

For Windows

  • netskope_path(-nsp): C:\Program Files (x86)\Netskope\STAgent\

  • filePath(-fp): computer\HKEY_LOCAL_MACHINE\SOFTWARE\Netskope\Provisioning

  • key(-k): managed

  • value(-v): 1

For MAC

  • netskope_path(-nsp):

  • If executing with --use_nsdiag(-nc): /Library/Application Support/Netskope/STAgent/

  • If executing with --use_stagevntsvc(-ns): /Library/LaunchDaemons/

  • filePath(-fp): /Library/Application Support/Netskope/STAgent/data/managed.json

Examples of the running script with different combinations

Following are some of the parameter combinations that users can use based on their requirements. If the user wants then they can configure the parameters mentioned above.

  • For Netskope Health – Managed: python netskope_tanium_3_0_0.py -ns -s enable

  • For Netskope Health – Unmanaged: python netskope_tanium_3_0_0.py -ns -s disable -v 0

  • For restart stagentsvc with default values: python netskope_tanium_3_0_0.py

  • For enable|disable stagentsvc with default values: python netskope_tanium_3_0_0.py -s enable|disable

  • For restart nsdiag with default values: python netskope_tanium_3_0_0.py -nc

  • For enable|disable nsdiag with default values: python netskope_tanium_3_0_0.py -nc -s enable|disable