Questions, Questions, Questions...

Overview

This article is the first in a series discussing the creation of Tanium Questions, Saved Questions, Interact Dashboards, deploying Actions to modify your endpoints, and more.

Asking practical questions in Tanium is a practiced skill, but new users are often overwhelmed with the scope of possible questions. This article focuses on tips to ask good questions quickly, allowing novice users to gain more skill in getting the data they need to make decisions.

So Many Possibilities!

It is often cited that someone so close to a product –having inside knowledge – can struggle to convey essential concepts to someone new and not knowledgeable about the given product.

Sometimes, this is referred to as “Too close to the code,” referring to a programmer who has trouble explaining what the program does or even recognizing it is not working as intended.

I am an Instructor for Tanium, and I teach new and experienced people what Tanium is, how it works, and how to use it, troubleshoot it, and get the most out of their investment. I often find myself “Too close to the code” when describing concepts about how new users can best use Tanium. Tanium 101, if you will.

To the point of this article - I had a learning moment when one of my students asked me:

“We have all these sensors that get information and display it to us. I understand that. What I don’t understand is how do I decide WHAT to ask?”

Frankly, this is a brilliant question from a student, and it made me wonder, in all the classes that I have taught – how many students walked away with the same confusion: Where do I start with asking the right question, and what follow-up questions should I ask to get the information that I need?

This article series aims to provide a starting place and a strategy for asking questions of Tanium to accomplish your data gathering and analysis needs, then saving questions for easy access later. Let’s get started.

A Simplified Strategy

Generally, there are two main user types of Tanium and Tanium data:

  1. Operational or Administrative roles – those people tasked with managing endpoints, software, and hardware deployed in their infrastructure

  2. Management, Business Units, Computer Owners – this group consumes data that the other group gathers, typically a report or visualizations

This article is intended for the first group, the day-to-day users of Tanium. The article could be helpful to the causal user, too. Once the concept of asking the right question is understood, drilling into that initial returned data meeting the requirements of the second group is easy – it's a matter of exporting your resulting data or creating a report.

Reports – that’s a big topic on its own. But you can take a free Web-Based class that is excellent for learning how to gather data, create a report, and save a dashboard. Search for Tanium Reporting at https://learn.tanium.com

Pro Tip One: As an operator or administrator, you are rarely interested in the endpoints that are working correctly. Our main job in Information Technology (IT) is fixing what’s broken. Ignore the working systems unless you need to compare a broken computer to a known good working one. Focus on the endpoints outside your defined ‘healthy’ baselines. For example, except for comparison purposes, studying computers without malicious content won’t provide helpful information if you're a Security Researcher.

Pro Tip Two: Stay in your lane. While some of us are truly diverse in our responsibilities (these tips will still apply – focus on one role at a time), most have defined responsibilities. Consider the example of someone who handles patching Windows, keeping Windows applications up-to-date, and knowing which applications are deployed and the usage statistics. We’ve just reduced the possible questions from infinite possibilities down to those that deal with the Patch, Deploy, and Asset modules.

Note: Make no mistake, I’m not suggesting that you should not explore. You should - but do it after your daily, weekly, and monthly tasks are out of the way.

Pro Tip Three: Build Interact Dashboards using Saved Questions to gather all your data on what you need to do and launch the dashboard in the morning to get your data for what’s broken, missing updates, or out of compliance. By doing this, you accomplish two things: practice building great questions and have them available to gather information to focus your actions quickly. (Interact Dashboards and Saved Questions are covered in the next article in this series.)

Question and Filter Basics

While this is Tanium Sensors and Questions 101, it bears repeating:

Questions are made up of one or more sensors on the left and right side of the clause "from all machines". Given the following:

Get Online from all machines with Operating System contains Windows

The left side is asking for attributes that make up your endpoints. For example:

  • Get Online (Returns True)

  • Get Is Virtual (Returns Yes or No)

  • Get RAM (Returns a number, e.g. 2048MB)

  • Get CPU (Returns a string with the name of the manufacturer and model of CPU)

  • Get Applicable Patches (Returns a listing of all patches that the endpoint needs)

On the right side of “from all machines” we specify which endpoints should answer. Again, it’s one or more sensors that use attributes of the endpoint to determine which endpoints should answer. For example:

  • Operating system contains windows (Define that only Windows endpoints should answer)

  • Windows OS Type contains server (Only Windows Server endpoints)

  • Is Linux contains true (Only Linux endpoints)

  • RAM is less than 2048 (Returns endpoints that resolve to RAM < 2048)

I will be the first to admit that sometimes the only way to know what a sensor will return is to simply run it. Take the questions in the examples above: “Get Online” and “Get Is Virtual.” How did I know that the data returned would be “true” and “yes” or “no,” respectively? (Hint: I try them to see what data the sensor returns. Also, if you have access to the Sensors under Administration > Sensors, descriptions will often describe the expected return data.)

Questions can be specific and make use of Regular Expressions, such as this example that checks Maintenance Window details Operating System, Patch Maintenance Windows, ID, Status, Reason, OS Type, and Version:

Get Computer Name and Operating System and Patch - Maintenance Windows matches ".*\|4\|.*\|.*\|.*\|[^2].*?" from all machines with (Is Windows equals True and ((Patch - Supported Scan Types matches ".*(Repo|Tanium|CAB|Online).*" and Is Mac equals False) and Patch - Supported Scan Types matches "windows\|[^None].*") and Patch - Maintenance Windows matches ".*\|4\|.*\|.*\|.*\|[^2].*?")

Extra Credit: Analyze the above question and figure out what the sensors, row, and column filters, and the target devices are looking for and what endpoints would answer.

Hint: The conditional operator matches is typically used with Regular Expressions. Regular Expressions (often called regex) are a way to do pattern matching on strings. Hence, the use of the operator “matches.”

Getting the Data You Need

Asking the right question is sometimes elusive. Even the best Tanium Admins need to ‘poke’ around a bit. One suggestion – Use the Question Builder. Most Advanced Tanium Admins use it because it gives them the latitude to ask a question, see the results, refine the question, and add filters until they have what they need. The Question Builder is NOT a crutch for the new user. It’s a productivity tool for anyone using Tanium.

Tanium has many sensors, and choosing which will get you the correct data is much easier if you don’t have to recall all the sensor names. Tanium has approximately 1,225 sensors for a system with all modules and content (and it is constantly growing). The point is – don't try to remember them all. Use the Question Builder. Make sure you look at the Browse All Sensors when adding a sensor. It’s there to help you find what you need. You’ll need it less when you become more proficient.

Recall Pro Tips One and Two: Focus on the endpoints that need work and stay in your role. We will focus on Patch Management, but it applies to any role.

Important! Avoid starting questions like:Get Computer Name <followed by anything>

You want to avoid this question for many reasons, especially if you have tens of thousands of endpoints. The primary reason is it will return a unique value for each result and a unique string. Strings stay in the memory of the Tanium Server for a while after you ask the question. This advice goes for IP Address, MAC, or any other sensor that is assured unique to each endpoint. Second, with thousands of endpoints, your next question is much more complicated. You know each computer has a name, but that’s not what we’re looking for - yet. Remember, you’re looking for endpoints that need attention. Let’s narrow down our search first.

Finding Endpoints for Analysis and Action

We’re going to start with a question that returns a single number. The starting question would be (assuming you are interested in Windows-based endpoints):

Get Online from all machines with Operating System contains Windows

Or, if you manage only the Windows Servers or Workstations, you use the following:

Get Online from all machines with Windows OS type contains Server

(replace ‘Server’ with ‘Workstation’ if you need to target Windows workstations)


A screenshot of a computer program Description automatically generated

You get back a response – a count of all online endpoints running Windows Server (this question is known in Tanium terms as a ‘counting question’ because it returns a simple number that is a count of objects, in this case, endpoints that are online right now).

We are going to narrow down our endpoints using the following question:

Get Applicable Patches from all machines

However, looking for Applicable Patches in the drill-down menu you won’t find one for Applicable Patches. Not a problem! You can Create a Question or Build a Question if what you need is not available in the pick list. If you use Build a Question (the Question Builder), the options for refining what you want to retrieve are broad but concise. Let us assume that you’re most interested in Critical patches. And you need to know the name of the computers. Applicable ‘critical’ patches will generally reduce the number of endpoints so that Computer Name is much less of a problem (plus, it’s now more important to know which computers need which patch, rather than having a massive list of computer names that may or may not need a patch).

Do the following:

  1. Select the checkbox next to on the left of True in Online.

  2. Click the Drill Down button, then select Build a Question.

  3. Click Add under Get the following data, type Applicable Patches, and select it.

  4. Click Add a filter under Applicable Patches.

You are filtering on a column returned by Applicable Patches (not a row, but that is also an option here).

  1. You should see a dropdown with Tanium UID currently selected. Click the dropdown and select the Severity column

  2. Next, decide on the filter action. For Severity, you are looking for Critical patches. Drop down the operator and note the possible selections. Select ‘contains’ as the filter action and type Critical into the final box.

  3. Click the Apply button for the Applicable Patches sensor.


    A screenshot of a computer Description automatically generated
  4. Click Add again under Get the following data and type in Computer Name (there will be more than one sensor containing Computer Name – be sure to select the sensor that is exactly Computer Name)


    A screenshot of a questionnaire Description automatically generated
  5. Make sure you have clicked Apply for each sensor, then click Drill Down.


    A screenshot of a computer Description automatically generated
  6. Well done. You now have a grouping question (as compared to Get Online – a counting question) that returns a list of critical patches for each computer. If you see [no results], no Critical patches apply to that endpoint. If you don’t like having the [no results] in your data, add Applicable Patches: severity contains critical to the right side – the targeting side - of your question.


    A screenshot of a computer Description automatically generated

And the final output, rearranged columns with some deselected columns – information that is unnecessary for understanding what patches need to be installed.


A screenshot of a computer Description automatically generated

You end up with data that is actionable and relevant to the purpose of understanding which patches need to be deployed.

Optional tip, but often helpful: reorder the columns of the results grid to put the computer name first. Do this by finding the columns control (three vertical lines to the top right of the display grid) and move the Computer Name column to the top of the listing. While here, test selecting and deselecting other columns to understand this powerful control element. Note also that there is a control that looks like three horizontal lines. This control activates word wrap and could be useful with the names of applicable patches.


Questions_Questions_Questions_6

Summary

Given the number of sensors, administrators and operators just starting with Tanium can find it overwhelming. Start with broad questions like Get online from all machines that return a count. Drill down to ask a refining question, eliminating (for example) endpoints that don’t need patches. Filter to limit the endpoints to a specific operating system, low disk space, high CPU utilization, and the like. Most importantly – Use the Question Builder. All sensors and filtering possibilities are there, making it much easier to craft questions to get what you want. And don’t forget that Tanium has some of the best documentation I’ve seen (which comes from someone who has been a professional Tech Writer). It’s easy to get to: https://help.tanium.com/ It’s designed for you to make the best of your Tanium experience.

The best advice: Know what you are looking for before you start.

Look for the next part in this series on Saved Questions and Interact Dashboards.