Category: Splunk

  • Creating Splunk Cloud Architecture Diagrams Using Lucidchart

    Creating Splunk Cloud Architecture Diagrams Using Lucidchart

    By Kamal Dorairaj, Senior Splunk Consultant

    Knowledge is valuable, and in the case of the Splunk installation at your firm a visual representation of the platform configuration becomes a key asset. The diagram gives better understanding of the Splunk Cloud Implementation and is useful for internal training as well as documentation needs at your company. In this blog, we will offer a step by step process for creating a Splunk cloud architecture diagram using Lucidchart.

    The architecture diagram is best created in Lucidchart, which has all Splunk shapes, icons and images. It also has a library of shapes for all of the leading products you may be using, like AWS, Google Cloud Platform (GCP), Azure and other security products. You can also import shapes from external sources and use it for the diagram. Lucidchart provides options to export the diagram in various formats including pdf, Visio, jpeg, png and csv.

    Discovery

    In the discovery phase you will gather all the information required for the architecture diagram. Ask yourself these questions to ensure you include the essential materials:

    • Which Splunk systems are being used in the environment? Examples include UF, HF, DS, etc.
    • Where do the UFs forward to? Heavy Forwarders, Indexers, or a mix?
    • What kind of data collection is taking place? Ex: Syslog, HEC, API.
    • What is the list of data sources per HF? This will include the vendor/product lists.
    • Which host has what type of Apps/Data collection?
    • What are the IP, host name, cpu/memory/disk spaces of each HF/UF/DS?
    • Are you using Splunk Premium Products in addition to Splunk Enterprise? These might include enterprise security, UBA or ITSI.

    Diagram Creation Process

    The diagram should be closely associated to the Splunk Validated Architecture based on the environment.

    Architecture Layers
    Login: Users access Splunk Cloud Search Head through ‘https 443’ via the internet.

    Splunk Cloud Search Head Tier and Indexing Tier: The Search Head on the cloud got an Adhoc SH (customer.splunkcloud.com) and SH for the premium product if there is one. Ex: ES SH (escustomer.splunkcloud.com). The SH on the Cloud talks to the Indexing Cluster Tier through port 8089. Splunk does not allow to put any indexers or search head host details in the diagram.

    Getting Data thru HEC and API: Apps or data that send through HEC (http event collector) token-based to Splunk Cloud Platform is a fast and efficient way. The HEC data flows to Splunk Cloud through port ‘https 443’. Getting Data in through APIs to Splunk Indexing layer by configuring the API inputs through an authentication type.

    On-Prem Collection Tier: This part of the architecture lives on the customer network side. We have Heavy Forwarder and Universal Forwarder. The instances could be on unix or windows. Both the HFs and UFs forward the data to the Splunk Indexing tier thru port ‘TCP 9997”.

    On-Prem Management Tier: The DS has all the apps and config files which pushes the changes thru ‘TCP 8089” to the HFs and UFs. Many times, the license master is installed in the same DS server instances.

    Syslog Sources: There could be single or multiple syslog sources that send data thru ‘TCP UDP 514’ in a network load balancer to the UFs or HFs. The syslog can also configure to flows thru SC4S.

    PORT Details:
    TCP 8089 -> Splunk Management Port
    TCP 9997 -> Splunk Data
    HTTPS 443 -> Splunk Web
    TCP UDP 514 -> Syslog
    TCP 8191 -> KV Store Replication
    TCP 9777 -> SHC Replication
    TCP 9887 -> IDX Replication

    This is what a typical Splunk cloud architecture diagram will look like:

    Detailed architecture diagram of a Splunk Cloud deployment created in Lucidchart. The image shows multiple tiers: users connecting via HTTPS, the Splunk Cloud search tier, indexing tier, and on-premises tiers for collection and management. Data flow is represented with color-coded lines for different protocols, such as TCP 9997 for data and HTTPS 443 for web. Components include forwarders, heavy forwarders, syslog sources, SC4S, deployment servers, and AWS CloudTrail.

    Have fun creating diagrams of your own. As always, we are here if you have any questions. Contact us here:

  • Splunk for Monitoring: Pinger APP!

    Splunk for Monitoring: Pinger APP!

    By Bryan Bollou, Splunk Consultant

    One of the many uses for Splunk is monitoring an environment and its assets. This can be done in different ways and this article highlights two of them.

    The first is through monitoring of the logs the machines are supposed to be sending to Splunk. If a log successfully gets to Splunk this shows the log generation, Splunk forwarding and Splunk service are working/running. If a host stops sending logs, it can be an indication that the machine is down. In some environments, however, logs may stop due to system restarts, configuration changes, low traffic times, etc. Here the host is up but is not sending logs (at the moment). This means the simplest way of checking if a machine is up can still be useful – ping. This will be the second method discussed in this blog post to monitor assets reporting a Splunk environment.

    Monitoring Hosts with Logging

    Monitoring hosts with logging involves first understanding what logs are expected and establishing a time threshold for when they are “stopped”. This threshold can differ as some logs are expected to be constantly noisy such as firewalls, while others could be based on user activity and/or time of day such as transaction logs.

    The following SPL searches can be used to get visibility on the current indexes and whether they have received logs after a certain period of time:

    Find and List all Indexes

    | eventcount summarize=false index=* index=_* 
    | dedup index 
    | fields index
    

    Look at indexes in the last 24 hours, if they have not sent logs in the last 5 minutes, list them out.

    | tstats latest(_time) as latest where index=* earliest=-24h by index
    | eval recent = if(latest > relative_time(now(),"-5m"),1,0), realLatest = strftime(latest,"%c")
    | where recent=0
    
    Splunk search interface showing a tstats query that evaluates data activity by index over the past 24 hours. The query flags inactive indexes by checking if their latest event is older than 5 minutes. The table includes index names, timestamps, and activity status.

    The results of this search could be used to make an alert for when an index stops receiving logs. This, however, could be too general if you have multiple hosts sending to a particular index. Thus, splitting the search by host could yield more specific and useful results.

    Look at hosts in the last 24 hours, if they have not sent logs in the last 5 minutes, list them out.

    | tstats latest(_time) as latest where index=* earliest=-24h by host
    | eval recent = if(latest > relative_time(now(),"-5m"),1,0), realLatest = strftime(latest,"%c")
    | where recent=0
    
    Splunk dashboard displaying a tstats search segmented by host, highlighting systems that stopped sending data in the last 24 hours. Hosts are listed with timestamps and an inactivity flag, indicating potential connectivity or service issues.

    This SPL can be saved as an alert with the parameters below to get an alert that tells a customer whenever one of their hosts stops sending logs to Splunk for X amount of time (5 minutes in this example).

    Splunk alert configuration panel for setting up a scheduled alert titled “Host Stopped Sending Alert.” The alert runs every 10 minutes, triggers if result count is greater than zero, and suppresses repeated notifications for the same host within 60 minutes.

    An email alert action would look something like this:

    Email alert from Splunk titled “Host Stopped Sending Alert” showing that a host (10.8.0.6) stopped sending data. Includes event timestamp details and a direct link to view results in Splunk. Attached is a CSV export of the alert result.

    To expand on the above alert, we can use Splunk to find out if machine is up or down based on ping status. For this, I will go over an app I created to ping machines in a lookup file and send the results in an event format to Splunk.

    A prerequisite for this app and the script below to work is for the machine (where the script resides) to be able to ping all other machines it targets. For larger and segregated environments, the script can be deployed to multiple machines that have different “ping access” in order to have more coverage.

    Below is the commented bash script that looks at the lookup tables in the pinger app directory and pings them one by one. Note: depending on if it is a full Splunk install or Splunk Universal forwarder the LOOKUP_LOCATION variable will be different. Line 6 needs to be uncommented for the former (full) and Line 5 for the latter (universal forwarder). Machines that are pinged and respond will print an “up” status log and those that don’t will print a “down” status log.

    Screenshot of a shell script (ping.sh) that loops through CSV lookup files to ping host IPs and echo their status (up or down) with associated Splunk fields like host, index, and sourcetype. The script reads CSV headers and performs a 5-ping test on each IP address.

    The script currently looks for a csv with the headers, “ip”, “host”, “index” and “sourcetype” – in that order. This can be changed by modifying line 20. An example of lookup file this script would work with is here:

    Spreadsheet showing a sample lookup file used by the Pinger app, listing columns for IP address, host, index, and sourcetype. Each row defines a system to be monitored via the script

    Along with the script, an inputs configuration is needed to point to the script above and run it on at an interval. In this example the interval is 240 seconds or 4 minutes. The results of the script will then be forwarded to the index main and have the sourcetype pinger.

    Configuration snippet from inputs.conf that schedules the ping.sh script to run every 240 seconds in Splunk. Specifies the script path, interval, index name (main), and sourcetype (pinger).

    To ensure the logs that are sent to Splunk come in a good format, a props configuration needs to be created. In the below configuration, the sourcetype pinger disables line merging and has the default newline line breaker. The logs do not have a time stamp and will take the time the script is ran on the machine.

    Configuration file (props.conf) defining how events from the Pinger app are parsed in Splunk. Includes settings for line breaking, truncation limit, timestamp lookahead, and placeholders for time prefix and format.

    This props configuration needs to go on the first full instance of Splunk the pinger app’s logs will touch. For example, let’s say the pinger app is on a universal forwarder that forwards its logs to a heavy forwarder before being sent to an indexer in a Splunk Cloud instance. In this case, the props.conf would be needed on the heavy forwarder. If the universal forwarder sent logs straight to Splunk Cloud, the props.conf would need to be on the Splunk Cloud Indexers. If the pinger app is installed directly on a heavy forwarder as opposed to a universal forwarder, the props.conf app needs to be on the heavy forwarder instance.

    Below is an example of the structure of the pinger app. The script goes into the app_name/bin directory. Lookup tables with the hostnames and ip addresses to ping will go under the app_name/lookups directory. The configuration files will go under the app_name/default directory.

    Terminal output showing the directory structure of a custom Splunk app named pingerapp, including subfolders like bin, default, lookups, and metadata, and configuration files like inputs.conf, props.conf, and a ping.sh script.

    The app will reside in the $SPLUNK_HOME/etc/apps, for example:

    Terminal view displaying the path /Applications/Splunk/etc/apps and a list of installed Splunk apps including pingerapp, search, sample_app, and several third-party or custom add-ons.

    To check if the app will work for the machine it is installed on, you can navigate to the $SPLUNK_HOME/etc/apps/pingerapp/bin directory and run the script manually.

    Terminal output from executing the ping.sh script, showing simulated ping results with status (up or down), IP addresses, and hostnames such as local, google, nowhere, and opendns.

    Once the app is properly installed and the Splunk instance is restarted, the script will start generating logs and forwarding them to the appropriate index. The logs would appear like below:

    Splunk event viewer showing log data ingested from the ping.sh script, with fields like status, IP, host, source path to the script, index, and sourcetype indicating the data came from a custom pinger app.

    These logs can be then used to discover the machines with the latest status of “down” (their last ping test did not return results as per the script). This represents a machine that is not currently pingable in an environment.

    Splunk SPL search that filters for status=down events and uses stats, rename, and fields commands to list IP addresses of hosts currently reported as down, based on 25,808 matching events.

    To get the best of both “monitoring” worlds, a combined search can be used. A prerequisite for this to work is that the hostnames and/or ip addresses for the machine sending the logs and how it’s pinged, need to match. A joined search like the one below can then be used to get a list of the hosts that stopped sending logs then feed it into a search looking for hosts that are not pingable.

    Advanced SPL search in Splunk Cloud using a join with tstats to detect hosts that are down and also not sending logs, highlighting one host (10.100.0.4) meeting the condition of “no logs” in the past 24 hours.

    This can be made into an alert like this:

    Splunk “Save As Alert” configuration panel titled “Host Not Pingable and Stopped Sending Logs,” with settings to run every 10 minutes, trigger when results are greater than zero, and send email notifications.
    Splunk alert configuration for email notifications, showing message details including dynamic variables like $name$ in the subject and message body, with options selected to include links and attach CSV results.

    Tools like this alert and the customizable pinger app can be used to enhance the monitoring capabilities of Splunk. For questions on how to make this script more customizable for your environment or how to use Splunk to monitor your assets, ask one of our consultants by filling in the form below. Happy Splunking!

  • Splunk x ChatGPT for Security Teams

    Splunk x ChatGPT for Security Teams

    by Zubair Rauf, Team Lead Professional Services and Bruce Johnson, Sr. Director Enterprise Security

    Splunk is the premier SIEM/Big Data platform in the cybersecurity industry. There are several extensions to the Splunk platform to incorporate machine learning, natural language processing, threat graphing, statistical computing, and Security Orchestration, Automation, and Response (SOAR). They take advantage of the fact that Splunk, as a big data platform, allows for the crunching and correlation of large quantities of data over extended search timeframes in near real-time. The latest obvious trend is to marry this capability with recent advances in AI utilities. Splunk has multiple premium product offerings, two of which are security focused.

    • Splunk Enterprise Security offers additional features over the standard Splunk platform. These include real-time threat identification, advanced analytics, and automated response (with Splunk SOAR).
    • Splunk SOAR is a tool that can be used to automate threat response workflows. These can help with incident response, remediation, and reporting.

    ChatGPT is a generative AI model trained by OpenAI that can generate human-like responses to a wide range of queries by the users. It can also analyze and generate code, allowing users to:

    • Create code faster by generating code snippets based on natural language input.
    • Analyze code snippets for security vulnerabilities by identifying potential security issues in code.
    • Interpret code for better understanding by providing explanations of code logic and behavior.

    In the context of security ChatGPT has been used to attack GitHub repositories, generate malicious code stubs, insertion of proprietary information into the ChatGPT data model, and AI-Generated phishing campaigns (side note: grammar is no longer a prevalent phishing threat indicator as verbiage can be generated). It is only a matter of time until ChatGPT tasking is married together with malicious script libraries and attack techniques to devise batteries of generated, dynamic, morphing threat chains.

    As always with cybersecurity threats, creative uses for utilities and techniques start with hackers and quickly demands a response from blue teamers. As cybersecurity professionals we are on our back feet coming up with ways to leverage AI to defend against AI-generated attacks.

    Entering the fray are Splunk extensions to SIEM and SOAR platforms to enable extension of search and automation to incorporate AI algorithms. It is a rudimentary but important beginning.

    ChatGPT Access

    Analysts can access ChatGPT or the underlying language models using the ChatGPT web interface or by using OpenAI’s API.

    There are also Splunk Technical Add-ons (TAs) that have been developed for ChatGPT/Splunk integration. These TAs let you interact with ChatGPT directly from your Splunk search through custom search commands and other actions. One notable Technical Add-on (TA) was built by Michael Camp Bentley from Splunkable LLC, a TekStream partner, and is available on Github.

    Microsoft Azure OpenAI Service also provides organizations to run OpenAI models in a secure environment. Organizations can use datasets to fine-tune models for more accurate results and tap into more use cases with their data. However before using this service to train and fine-tune models, please read the Data, privacy and security documentation for the service.

    Splunk x ChatGPT Applications

    Creating Splunk searches with ChatGPT

    One of the most used use-cases that I have tested out and have seen other people leverage ChatGPT is to create simple and complex Splunk queries for customized security detections. ChatGPT does a decent job when given the right prompts and can build the underlying logic for an acceptable query. I have seen that you will have to modify the search to filter correctly for your data.

    I have tested ChatGPT to create queries for common detections and while it is not 100% accurate in generating the query that you want (it is an AI after all, and the clarity of your prompt matters!), it provides you with some innovative ideas and a great starting point to play around with your search.

    ChatGPT also interprets the Splunk query to provide users a foundational understanding of how to build out a dynamic query for a detection/correlation search.

    Integrating Splunk Search and ChatGPT

    There are many TAs that the Splunk community has made that integrates ChatGPT with Splunk search. A notable one I already mentioned above, built by Splunkable (available here) enables users to directly send prompts and get responses from ChatGPT through a Splunk search command.

    This opens numerous possibilities for dynamic prompt generation through eval statements based on your use case. Some use cases I can think of are:

    • Based on a detected threat, you can pass MITRE metadata, with the threat to ChatGPT prompt and it can suggest the next potential threat that may come your way
    • ChatGPT can automate responses to users about identified phishing threats to users, encourage them to study security topics based on prompts generated from search results. These responses can be sent to users using Splunk email alerts.

    Creating Splunk SOAR automation scripts with ChatGPT

    ChatGPT can also help Splunk SOAR users create SOAR automation scripts that can be modified to work with the environment and deployed to Splunk SOAR. Splunk SOAR is built on Python, so ChatGPT can be used to generate Python code to perform actions using Splunk SOAR. The generated scripts will provide users with a good starting point and can make modifications before deploying scripts in their environment.

    Analyze Scripts and Code

    Analysts can use ChatGPT to quickly analyze and interpret a script. This can help analysts quickly triage a malicious script and contain the threat. This can be programmatically done using an integration with ChatGPT. You can pass the script to ChatGPT by using the API integration with Splunk (see Splunkable, LLC Splunk TA for OpenAI) and depending on the response you can determine how critical the alert should be so that it can be prioritized accordingly for analysts. ChatGPT can also provide a detailed analysis of what a script/code-snippet is going to do and provide recommendations for remediation.

    Preemptively, ChatGPT can also help security teams running OpenAI in a secure environment determine security vulnerabilities in code before it is deployed to production. This will help ensure that no malicious code is introduced during the development process and identify any security vulnerabilities that need to be addressed.

    Building governance and detections using the MITRE ATT&CK framework

    If you are starting out on your Splunk security journey and want to dive deeper into building detections using the MITRE ATT&CK® framework, you can leverage ChatGPT to understand different MITRE Tactics. ChatGPT is well trained on the MITRE framework and can help you understand the different MITRE tactics and techniques associated with a variety of common and uncommon attacks.

    These techniques/tactics would help a user determine what data would be required for creating detections around the use case and accompanying remediation steps. You can also use this with fine-tuned models through the Azure OpenAI Service to have results tailored to your environment.

    Enhance Purple Team Findings

    ChatGPT can also help compliance teams efficiently understand purple team findings, map them to MITRE framework, and get insights on remediation tactics. ChatGPT can also recommend what indicators of compromise (IOCs) to focus on, data required to monitor these and common Splunk detections that can help address the vulnerabilities.

    Summary

    This is obviously just the tip of the iceberg. TekStream is constantly working on improving the safety and security of our MDR customers and the focus for everyone in the cybersecurity industry is squarely on leveraging AI to enhance cybersecurity posture (or attack it). It’s not quite Terminator vs. Skynet yet, but AI is certainly a powerful and evolving approach to generate and defend against threats. We’d be interested in how you are using AI in the context of cybersecurity. For more information, and to keep the conversation going, contact us below:

    Special thank you to Michael Camp Bentley and Splunkable LLC for their contributions to this article.

    *Just for fun, we created the image on this blog post using ChatGPT’s sister image site Dall-E!

  • Regex v. Rex Commands in Splunk SPL

    Regex v. Rex Commands in Splunk SPL

    by Alex Trejo, Splunk Consultant

    A regular expression is used to capture a pattern of characters in text. This can be become very useful when either filtering data or extracting new fields in Splunk. The SPL commands Splunk provide us with for regular expressions are the ‘regex’ and ‘rex’ commands. They are both regular expression commands but are utilized in different way. When used together, we can make the most out of regular expressions with just the search bar in Splunk.

    Regex

    regex [<field>=<regular expression>]

    The regex command is primarily used for filtering data. The command can filter for both data that does or does not match the regular expression. The regex command can be applied to specified fields otherwise the default is _raw.

    Rex

    rex [field=<field>] [regular expression]

    The rex command can be used for search-time field extractions and string replacement. The rex command can be applied to specified fields otherwise the default is _raw.

    Here we have a set of customer transactions with no predefined field extractions. We will be responsible for pulling in customer IDs, names, transactions, Ips, and statuses.

    Screenshot of a Splunk search displaying results for a regex test index, including timestamps, source file paths, and customer transaction IDs.

    To begin we will want to use the rex command to extract the fields we are looking for. Since we do not have any predefined fields to work off, we will have to use the default _raw field for the rex command. Since we are using the default field of _raw we do not need to define field in the command.

    To extract the CustomerId field we will use the following rex command:

    rex “CustomerId(?<CustomerId>w+_d+)”

    We will follow the same format for the following fields of transaction, IP, and STATUS.

    Splunk search screen illustrating the use of multiple rex commands to extract structured fields like CustomerId, IP address, and STATUS codes from raw event logs, progressing field enrichment using named capture groups.

    Next, we will extract the customers’ names. Since the CustomerId field already contains the customers’ names we will use that field in our rex command instead of the default _raw.

    To extract the CustomerName field we will use the following rex command:

    rex field=CustomerId “(?<CustomerName>w+)_d+”

    We will follow the same format for the CustomerNum field.

    A refined Splunk search leveraging rex field= syntax to extract CustomerName and CustomerNum fields, showing how to apply regex on specific fields rather than the raw event data.

    Next, we will display the fields in table for better visibility.

    Splunk statistics view showing tabular output of extracted fields: CustomerId, CustomerName, transaction, IP, and STATUS. Demonstrates successful field extraction and table formatting after multiple rex applications.

    Now, we will use the regex command to filter out IP addresses that start with 3 digits. Since we are targeting the IP field here, we will have to specify that field within the command to override the default _raw field.

    regex IP!=d{3}.d+.d+.d+
    Splunk SPL search that introduces a regex command to filter results by IP format. The output table shows a narrowed list of customer transactions matching specific regex criteria.

    If we wanted to filter for the IPs that began with 3 digits, we would simply remove the ‘!’ before the ‘=’ in the command.

    regex IP=d{3}.d+.d+.d+
    Search results in Splunk using regex to include only matching IP patterns. The filtered dataset displays customers like Cat and Will whose IP addresses meet the criteria.

    Another interesting feature of the rex command we did not touch on before is its ability to replace strings. Using the mode=sed option, the command can replace strings within a field. Note, this does not change the data in any form. Here we will use the command to mask the beginning of IP addresses that begin with 3 digits.

    rex  field=IP mode=sed "s/(d{3}.)/x./g"
    Splunk SPL using regex with mode=sed to mask portions of IP addresses, replacing the third octet with an “x” (e.g., 197.0.0.2 becomes x.0.0.2), illustrating regex replacement techniques for data redaction.

    There you have it – a short comparison of Regex vs. Rex in Splunk SPL. I hope this was helpful, and am happy to answer any questions using the request here:

  • Smarter Whitelisting for Splunk Deployment Clients

    Smarter Whitelisting for Splunk Deployment Clients

    by Brent McKinney, Senior Splunk Consultant and Team Lead

    This blog will showcase how to use external files to manage whitelisting deployment client hosts, as an alternative to including rules directly in serverclass.conf.

    The following 2 settings in serverclass.conf can be used to reference an external file that can be used for serverclass filtering. These paths can point to text files, or csv files.

    serverclass.conf
    
    [<serverclass_name>]
    whitelist.from_pathname = <pathname>
    blacklist.from_pathname = <pathname>
    

    This is helpful when naming filtering may not be a simple wildcard (like us* for us hosts) or when you want to allow teams to onboard new hosts without giving direct access to the conf files. This can also be used with the values of the clientName field.

    Let’s say we wanted to break out our server classes by country. In this example we have 2 server classes, 1 for hosts in the US, and 1 for hosts in Europe. Notice how we whitelist and blacklist the respective txt files.

    splunk/etc/system/local/serverclass.conf:
    
    [us_hosts]
    whitelist.from_pathname = etc/system/whitelist_files/us_hosts.txt
    blacklist.from_pathname = etc/system/whitelist_files/eu_hosts.txt
    
    [eu_hosts]
    whitelist.from_pathname = etc/system/whitelist_files/eu_hosts.txt
    blacklist.from_pathname = etc/system/whitelist_files/us_hosts.txt
    

    Within etc/system/whitelist_files we have the 2 txt files containing our whitelist rules:

    us_hosts.txt contains the following:
    
    us*
    nixhost1
    mysqlserver1
    
    eu_hosts.txt contains the following:
    
    eu*
    nixhost2
    mysqlserver2
    

    Going forward, instead of making direct changes to serverclass.conf to add a new host whitelist, we can just add the host filter in the respective txt file.

    The relative path to the whitelist file is needed. For example, if the serverclass definition live in an app, rather than etc/system/local, then we would set the us hosts whitelist to the following in serverclass.conf.

    [us_hosts]
    whitelist.from_pathname = etc/apps/<app_name>/whitelist_files/us_hosts.txt
    blacklist.from_pathname = etc/apps/<app_name>/whitelist_files/eu_hosts.txt
    
    

    And include the corresponding txt files in the etc/apps/<app_name>/whitelist_files directory.

    There you have it – a simple way to manage whitelisting your deployment client hosts. Contact us below if you have questions. Happy Splunking!

  • InfoSec App on Splunk Cloud – Part 2: Deep Dive into App Dashboards and Knowledge Objects

    InfoSec App on Splunk Cloud – Part 2: Deep Dive into App Dashboards and Knowledge Objects

    By Khristian Pena, Team Lead, Enterprise Security

    This blog is the 2nd and final half of a two part blog post on the free to use InfoSec security app on Splunk. Catch up with Part 1: Installing and Configuring where we highlight prerequisites for installation, as well as how to install the app. 

    The InfoSec app is a collection of comprehensive, extensible dashboards and alerts that focus on the most common security-oriented technology components within your typical corporate environment. Use this app on Splunk to investigate incidents and automate compliance tasks. You’ll also help protect your network, users and intellectual property from external adversaries and malicious insider threats. Use the app to provide executive-level reporting metrics, trends, and summaries. Assist in completing audits by mapping customizable reports to common compliance frameworks such as NIST, HIPAA, PCI, and ISO.

    After installation, and before any of the dashboards start working, you will need to confirm that your ingested data is normalized and all required data models are accelerated: Authentication, Change, Intrusion Detection, Malware, Network Sessions, Network Traffic, Endpoint, Web.

    Validate data sources that feed the InfoSec app for Splunk data model

    Validate the data sources for each of the data models that are listed on the Health dashboard of the Splunk InfoSec app, even if the Health dashboard reports that data is fed into the data model. If only partial data is fed into the data models, you might need to adjust your configuration to ensure full coverage of your Splunk Platform. Additionally, your data sources might feed more than one data model.

    The following diagram shows some of the data sources that feed into the data models for the InfoSec app, including firewall, LDAP, and antivirus data:

    Diagram of InfoSec App data sources showing how various data models—such as network traffic, authentication, and malware — connect to security infrastructure like firewalls, LDAP, and antivirus tools, with logos of supported vendors including Palo Alto, Cisco, Symantec, and Carbon Black.

    Validate data model configuration

    Follow these steps to validate data model configurations and to check that the data sources feed the data models as expected:

    Step One: Use the following search to identify the indexes and source types that feed each of the InfoSec data models:

    | makeresults | eval datamodels = "Authentication:Change:Endpoint:Intrusion_Detection:Network_Sessions:Network_Traffic:Malware:Endpoint.Processes:Web" | makemv delim=":" datamodels | mvexpand datamodels | map search="| makeresults | eval notfound="*** NO DATA FOUND ***" | append [| tstats count from datamodel=$datamodels$ by index, sourcetype] | eventstats count as events |eval datamodel="$datamodels$", index=coalesce(index,notfound)| search NOT notfound=* OR events=1 | table datamodel, index, sourcetype,count" | sort datamodel, index, sourcetype

    If the results of the search indicate that each of the required data models for the InfoSec app is populated with data, you can accelerate the data models. See Accelerate data models to build InfoSec app dashboards.

    If the results of the search indicate that all the required data models for the InfoSec app are not populated with data, proceed to the next step.

    Step Two: Identify the tagged events to configure the data models that are required by the InfoSec app within your Splunk Platform environment. To identify the tagged events and configure your data models, see Identify tagged events to configure data models.

    Step Three: Repeat the process for each data model.

    Identify tagged events to configure data models

    Follow these steps to identify tagged events and to configure the data models. This example uses the Authentication data model, but you can follow these steps to identify tagged events for any data model:

    1. On the Splunk Platform menu bar, select Configure > Settings > Data models.
    2. Select the Authentication data model from the list of data models.
    3. Use the search bar to identify the events that must feed the Authentication data model. (`cim_Authentication_indexes`) tag=authentication NOT (action=success user=*$) The first part of the search contains a macro called cim_Authentication_indexes. This macro constrains the search to certain indexes. You must restrict a data model to only the indexes that feed it with data. The next part of the search tag=authentication constrains the search to return events that are tagged as authentication events. The last part of the search NOT (action=success user=*$) excludes any event that contains a field with the label action that has the value success AND the field user that has a value that ends with the $ character.
    4. Identify the data sources in Splunk that might fit your search. For more information on identifying data sources, see Identify data sources that feed data models.

    Accelerate data models to build InfoSec app for Splunk dashboards

    Accelerate data models after you confirm that the correct event data is fed into the data models that are required for the Splunk InfoSec app. You must accelerate each of the data models. You can only accelerate the data models after you confirm that they are fed with the correct event data because after acceleration, the data models cannot be edited without first disabling the acceleration.

    Accelerate a data model

    Perform the following steps on all the data models that are fed event data. This example uses the Authentication data model, but you can follow these steps to accelerate any data model. Don’t accelerate a data model that contains no event data.

    1. On the Splunk Platform menu bar, select Configure > Settings > Data models.
    2. Identify the Authentication data model. Do not click on the ”’Authentication”’ data model because you must work within the current web page.
    3. From the Actions column, select Edit > Edit Acceleration.
    4. In the Edit Acceleration dialog box, perform the following actions:
      • Check Accelerate.
      • Set the Summary Range to a suitable time frame.
      • Click Save.
      • When the Splunk platform starts to build the data model accelerations, track the progress of the accelerations from the Health dashboard of the InfoSec app. The InfoSec app is configured to work with your data sources.
    5. View each of the InfoSec app dashboards from the menu bar starting with Security Posture.
    6. Confirm that all the dashboards are populating with data. If you find a dashboard that is not populating, you might not have the required data source within your Splunk platform to feed the dashboard. For more information on troubleshooting, see Troubleshoot the Splunk InfoSec app.

    Identify data sources that feed data models

    Follow these steps to identify the data sources that feed the data models:

    1. Open a new Splunk Platform search window in another tab of your browser.
    2. Click Search & Reporting.
    3. Select Open Link in New Tab.
      Before switching to the new browser tab, highlight and copy the search from the tab you are in and paste it into the search bar in the new browser window.
    4. Run the search in the new tab.
    5. Modify the search to include all the indexes within your Splunk environment.
    6. Run the following search to see if any results are returned: index=* tag=authentication NOT (action=success user=*$) | stats count by index, sourcetype Modify the search macro for the data model if your search results show indexes and data sources. For more information on modifying the search macro, see Modify the search macro for the data model.

    Modify the search macro for the data model

    Take note of the name of the indexes returned by the search in Identify the data sources that feed the data models so that you can update the macro.

    Follow these steps to modify the search macro for the data model. This example uses the Authentication data model which is fed by the demo_oracle and demo_wineventlog indexes, but you can follow these steps to modify the search macro for any data model:

    1. On the Splunk platform menu bar, select Configure > Settings.
    2. Open Advanced Search under the Settings menu.
    3. Open Search Macros.
    4. Search for the cim_Authentication_indexes macro. You might need to adjust the filter to find the macro.
    5. Set the app context to All and type cim_authentication_indexes into the search filter.
      If the definition is set to index=main, the Authentication data model was not fed data.
    6. Click on the macro name to edit the macro.
    7. Change the Indexes Allowlist to include the indexes that were identified in the previous step.
    8. Click Save.
    9. Rerun the following original data model search to verify that the change to the search macro was successful. (`cim_Authentication_indexes`) tag=authentication NOT (action=success user=*$)
    10. Repeat this process for all of the following InfoSec data models: Authentication, Change (for app version 1.6.x and higher) or Change Analysis (for app version 1.5.3 and lower), Intrusion_Detection, Malware, Network_Sessions, Network_Traffic, Endpoint, Web

    Dashboards

    DashboardFunction
    Security PostureProvides a high level view to monitor the security in your Splunk environment.
    For more information to monitor your security posture, see Monitor your security posture using the InfoSec app for Splunk.
    Continuous Monitoring  Comprises of the following dashboards that continuously monitor your Splunk environment:

    Windows Access and Changes dashboard to view events in MS WindowsAll Authentications dashboard to view all authentication actionsMalware dashboard to view antivirus solutionsIntrusion Detection (IDS/IPS) dashboard to view intrusion detection and prevention systemsFirewalls dashboard to view firewall eventsNetwork Traffic dashboard to view firewall data in your networkVPN Access dashboard to view VPN session data

    For more information to continuously monitor your Splunk environment, see Monitor your environment continuously using the InfoSec app for Splunk
    Advanced ThreatComprises of the following dashboards that leverage the power of the Splunk Platform’s search capabilities to highlight security events of interest:   Access Anomalies dashboard to identify security risksNetwork Anomalies dashboard to identify network anomaliesCustom Use Cases dashboard to incorporate custom searches and dashboards   For more information to highlight interesting security events, see Identify advanced threats using the InfoSec app for Splunk
    User & Host InvestigationHelps to investigate user and host-based behaviors and actions
    For more information to investigate user or host behaviors, see Investigate behaviors using the InfoSec app for Splunk
    ComplianceProvides visibility into controls that are required under different compliance frameworks.
    For more information to set up up visibility into compliance requirements, see Set up controls using the InfoSec app for Splunk.  
    Executive ViewProvides a high-level view of certain security metrics and the environment status.
    For more information to report on high level security metrics, see Display high level security metrics using the InfoSec app for Splunk  
    AlertsHelps to investigate and manage alerts
    For more information to investigate and manage alerts, see Manage alerts using the InfoSec app for Splunk  
    Health
    Performs a health-check of your Splunk environment
    For more information to perform a health check, see Perform a health check using the InfoSec app for Splunk  

    I hope this is helpful for when you are ready to begin using Infosec. The tool is a powerful addition to your security suite and will quickly help your organization improve its security posture and overall visibility into your environment.

  • Using Splunk to Search LDAP & Monitor for Last Time Password Was Set by Active Users on Windows OS

    Using Splunk to Search LDAP & Monitor for Last Time Password Was Set by Active Users on Windows OS

    by Patricia Orea-Arebun, Splunk Consultant II

    This use case helps to monitor active user accounts on Windows OS that have not updated their passwords in the client system in more than “n” number of days. The “n” number of days depends on organizational policy. Using your Splunk instance is the best way to search for changes and monitor active updates.

    Risk

    The risk involved in having active user accounts with passwords not changed is that the organization might be susceptible to brute force attacks. A brute force attack is where an attacker will be trying to access a company’s network by trying all possible passwords until they get lucky (dangerous!!!!).

    Control

    Using LDAP can help set monitoring in place for active users whose passwords are yet to be changed or nearing expiration (based on organization policy). LDAP, or Lightweight Directory Access Protocol, is a communication protocol that provides the ability to access and maintain distributed directory information services over a network. LDAP is used in Microsoft’s Active Directory but can also be used in other tools. Querying the LDAP directory requires using the Supporting Add-on for Active Directory (SA-ldapsearch) from Splunkbase in order to use the ldapsearch command. The ldapsearch command will display the users, their respective organizational units, lastLogonTime, created date, pwdLastset and so on.

    SPL Query

    Begin your query like this:

    |ldapsearch domain=<**your company domain**> search="(&(objectClass=user)(!(objectClass=computer)))" 
    | search userAccountControl!=ACCOUNTDISABLE 
    | rex "OU=(?<OU>[a-zA-Zs]+),DC" 
    | eval lasttime=strptime(pwdLastSet,"%Y-%m-%dT%H:%M:%S.%6N")
    |eval diff=round(((now() - lasttime)/86400),2)  
    | eval timediff = n - diff 
    | stats values(whenCreated) as "Created Date" latest(lastLogonTimestamp) as "LastLogonTime" values(OU) as OU values(sAMAccountName) as sAMAccountName values(pwdLastSet) as PWDLastSet values(timediff) as "Time left to change password"  by displayName
    SPL Analysis
    | ldapsearch domain=<**your company domain**>   search="(&(objectClass=user)(!(objectClass=computer)))" 

    This is querying the ldap tree for users, service accounts and not computers.

    | search userAccountControl!=ACCOUNTDISABLE

    This is searching for the active users and service accounts and ignoring disabled accounts

    | rex "OU=(?<OU>[a-zA-Zs]+),DC" 

    This is optional and depends on the use case. This is a field extraction for the list of “Organizational Unit” that each user or service accounts belongs to in the ldap tree.

    | eval lasttime=strptime(pwdLastSet,"%Y-%m-%dT%H:%M:%S.%6N")

    Converts the “pwdLastSet” timestamp field to current Unix epoch time to allows make further comparisons by creating a field “lasttime”.

    |eval diff=round(((now() - lasttime)/86400),2)  

    Converts the “lasttime” (the last time password was set in days) by creating a new field called “diff”.

    | eval timediff = n - diff

    Assuming your organizational policy for password change is “90 days” where n = number of days. This will calculate the “the time left to change password after n days”.

    | stats values(whenCreated) as "Created Date" latest(lastLogonTimestamp) as "LastLogonTime" values(OU) as OU values(sAMAccountName) as sAMAccountName values(pwdLastSet) as PWDLastSet values(timediff) as "Time left to change password" by displayName

    This search will tabulate resulting fields by the User’s displayname.

    Result

    Any user/service account that is non-compliant or has not changed the password within the Organization’s policy will have a negative sign (-) before the accrued number of days, signifying the number of days their password has been not being changed. The user accounts that are compliant will have a positive sign (+) before the number of days, signifying the number of days left to change their password.

    Example of a dashboard panel of an active user accounts list.
    Example: Dashboard Panel of Active User Accounts

    This can be turned into the following knowledge objects.

    Alert
    Splunk will send an email alert to the admin with list of user/service accounts with negative sign (-) to take action and user/service accounts with the number days left to change password.

    Dashboard Panel
    This can form part of a Splunk dashboard that will be constantly monitored by an Admin.

    Report
    Splunk can be set to send a report to the admin on a monthly or quarterly basis with the list of active user accounts and how much time left to change their password.

    That will do it! Now you’ll equip your team with brute force security monitoring for passwords using Splunk. If you would like more details, please contact us using the form below. Happy Splunking!

  • Securing Splunk 8.x.x Deployment Server and Universal Forwarder

    Securing Splunk 8.x.x Deployment Server and Universal Forwarder

    By Jay Young, Senior Splunk Consultant

    The following blog will show how to set up pass4SymmKey authentication between a Splunk Deployment Server and the Universal forwarders in Splunk version 8.x.x. This method will make it more difficult for someone to set up a rogue Universal forwarder that could potentially connect to your Deployment Server.

    Please note: This does not fully protect against the Splunk Deployment Server vulnerability listed in the web link below. As such, you should make sure you have updated your current Deployment Server to versions 8.1.0.1, 8.2.6.1, or 9.0.x

    Check here for Splunk Deployment Server vulnerability information before you get started.

    Setup pass4SymmKey Authentication between the Deployment Server and Universal forwarders

    Step 1: Create a new app for the Deployment Server and Universal Forwarders
    a. pass4Symmkey_auth_app/local/server.conf
    b. In the server.conf file, add the following stanza.
    [deployment]
    pass4SymmKey = password

    Step 2: Add the app to these locations on the Deployment Server
    a. $SPLUNK_HOME/etc/apps/
    b. $SPLUNK_HOME/etc/deployment-apps

    Step 3: Set the new app to restart the Universal forwarder after it pushes it to the clients
    a. Open the Splunk GUI and go to setting>forwarder management
    b. Select the App tab on the forwarder management main screen
    c. Find the newly created app from the list, and under the action column, select “Edit.”
    d. Check the box next to Restart Splunkd.
    e. Click “Save.”

    Step 4: Create a new serverclass on the Deployment Server and push the app to the universal forwarders

    Step 5: Create a restmap.conf file on the Deployment Server. (This turns on the required Authentication)
    a. Create the restmap.conf file in $SPLUNK_HOME/etc/system/local/restmap.conf
    b. Add the following stanza to the restmap.conf
    [broker:broker]
    requireAuthentication = true
    c. Restart the Deployment Server

    Step 6: How to temporarily turn off authentication between the Deployment Server and Universal Forwarders; this will be required to add new universal forwarders.
    a. Set the restmap.conf requireAuthentication attribute to false or comment out the complete stanza.
    b. Restart the Deployment Server.

    After completing these steps, your pass4SymmKey will be authenticated between your Splunk instance and any of your Universal Forwarders. If you have any follow up questions, please reach out below.

    Happy Splunking!

  • Slice And Dice: Comparing Values Over Specific Times With Splunk Dashboards — Part Three

    Slice And Dice: Comparing Values Over Specific Times With Splunk Dashboards — Part Three

    By Marvin Martinez, Team Lead – Security Operations

    Part Three: Specific Hour Over Day Visualization

    Welcome back to our series discussing some unique ways to visualize data across specific points in time with Splunk SPL! Previously, we created a dashboard chart to isolate and compare a specific day from a prior week, and then we isolated and compared it to the same day from the current week to see the percentage change between the two values across the day in a new area chart visualization. In this installment, we will pick a specific hour from one day and chart out those specific values across a prior set of weeks in a straightforward visualization.

    Referring back to our first installment (Figure 1 below), we showed a full day across four weeks, overlayed in one line chart visualization. Then, in our second installment, we isolated one of these specific days to compare to the current week (Figure 2).

    Splunk dashboard line chart comparing total events across four Thursdays, showing consistent trends and a sharp dip after 4 a.m. on December 16.
    Part One: Day Over Week (Figure 1)
    Line graph with shaded green delta area visualizing percent change between current week and three weeks prior by the hour, highlighting early-morning fluctuations.
    Part Two: Isolate and Compare (Figure 2)

    Now, for example, let’s say we noticed that spike at 10 am where the Compared Week is much higher than the Current Week and we want to see if that’s just an anomaly or a consistent trend at that same hour. One thing that would make it easy to visualize this would be a line chart that charts that specific hour for that day of the week across the past 4 weeks.

    Let’s build that very search! Once we’re done, our visualization will look as shown below. In the image below, two dropdown inputs are populated with the specified day of the week and hour to isolate for the past 4 weeks, including the current week. This is just a line chart but it is isolated to just that specific day/hour across the past 4 weeks, which makes it much easier to visualize without any other data points to distract the view.

    Splunk dashboard line chart comparing total sales at 10 a.m. over four weeks, with tooltip showing a drop to 1.99 sales on December 9.
    Visualizing a specific day/hour (Figure 3)

    The complete search consists of various parts and transformation so let’s break it up into the few major steps that comprise it and analyze it to ensure we understand how this cake is baked. The final search is below:

    Index=test…
    | eval Date = strftime(_time,"%m/%d %I %p"), Day = strftime(_time,"%A"), Hour=strftime(_time,"%H"), TotalSales = round(TotalSales,2)
    | fields _time, "TotalSales", Hour, Day, Date 
    | where Day="Thursday" AND Hour = 10
    | sort 0 - _time
    | streamstats dc(Date) as WeekNum current=true
    | eval WeekNum = WeekNum -1, WeeksBefore = WeekNum . CASE(WeekNum = 0, " Current Week",WeekNum = 1, " Wk Prior",1=1," Wks Prior") . " (" . Date . ")"
    | chart values(TotalSales) as "Week Value" by WeeksBefore 
    | sort 0 - WeeksBefore
    | eval WeeksBefore = IF(match(WeeksBefore,"^0s"),substr(WeeksBefore,3),WeeksBefore)
    

    Now let’s break this search down and explain what is going on here. The first four lines are setting up our data. We create fields to store the specific Date, Day and Hour for our values as well as filter out only the information for the specific days and hour we are looking to compare. In this case, Thursday is the selected day and 10 am is the selected hour but this could easily be replaced with a token here to allow dynamic selection of any day of the week (it actually is in our specific dashboard).

    | sort 0 - _time
    | streamstats dc(Date) as WeekNum current=true
    | eval WeekNum = WeekNum -1, WeeksBefore = WeekNum . CASE(WeekNum = 0, " Current Week",WeekNum = 1, " Wk Prior",1=1," Wks Prior") . " (" . Date . ")"
    

    The next three lines of the search allow us to format and prepare the data so that the chart will be easy to understand with descriptive labels on the x-axis. The sort command just sorts our data by descending time order so that the subsequent streamstats command can appropriately categorize the date in terms of how many weeks before the event is in relation to the current week. The eval command after this takes the WeekNum value, adjusts it so it reflects the appropriate relation to current week and then creates a WeeksBefore field that contains text values to better articulate how many weeks before the value presented is from, as well as identifying the current week and labeling it appropriately. We’ll discuss what needs to be further finalized on this field for optimal readability a bit later but we can continue for now.

    | chart values(TotalSales) as "Week Value" by WeeksBefore
    | sort 0 - WeeksBefore
    | eval WeeksBefore = IF(match(WeeksBefore,"^0s"),substr(WeeksBefore,3),WeeksBefore)
    

    Now that we’ve isolated and appropriately categorized and formatted our data, all that is needed is a chart command to group the values by the WeeksBefore field. Then, sort the results in descending order by WeeksBefore to ensure that the values are displayed in chronological order once placed in the visualization/line chart. If you were to run the search at this point, you’d notice that the WeeksBefore field has values like this:

    Splunk table column listing timestamps labeled as “3 Wks Prior,” “2 Wks Prior,” “1 Wk Prior,” and “0 Current Week,” all referencing 7 a.m.
    WeeksBefore field after running search (Figure 4)

    In order to get the field to display the right value for the current week (without the 0), the eval command at the end cleans up the data so that the “Current Week” value for WeeksBefore is labeled appropriately using the match function with some simple regex. Once applied, the values look as follows:

    Similar Splunk table as above, confirming week-based timestamps labeled by relative time and date for 7 a.m.
    WeeksBefore field after eval command removes the “0” on the Current Week label (Figure 5)

    The visualization is now ready! It will display much like a timechart but over a certain time period for only that day/hour data point across multiple weeks and with helpful, dynamic, and descriptive labeling on your x-axis!

    Stay tuned for our fourth and final installment in this series on unique Splunk Dashboard panels, when we will discuss how to pick one single time value from a day (i.e. a specific hour value) and plot that data point back across various weeks, comparing each prior data point to the current week (same hour/day) and showing percentage deltas along the way. A sample image is shown below.

    Area chart comparing hourly percent change for December 9 at 10 a.m., showing a highlighted pink delta area between current and prior week’s values.

    Part Four Sneak Peek: Hour Over Week Percentage Change Timechart (Figure 6)

    Until next time, please contact us for more information on this specific Splunk dashboard tutorial, or any Splunk questions you may have!

  • Linux Servers & Splunk – You Can’t Really Work Splunk Without Linux Commands, Can You?

    Linux Servers & Splunk – You Can’t Really Work Splunk Without Linux Commands, Can You?

    By Tyler Phillips, Splunk Consultant

    Today I will be going over some essential Linux commands to set up Splunk on a Linux server and troubleshoot.

    Once you are in a Linux box we first need to make sure there is an /opt/splunk directory in this server. So, we are going to use the cd (change directory) command to see if it is there.

    cd /opt/splunk

    If you do not go into a Splunk box, then we now move to the mkdir (make directory) command to create it. We also are going to add a sudo before this command to make root perform the action.

    sudo mkdir /opt/splunk

    Now that there is a directory to place Splunk, let’s bring it in! We are going to install wget onto the server before moving to making a Splunk user.

    sudo yum install wget

    Next, we want to have a user to run Splunk so let’s use the adduser command to create a Splunk user and log into it.

    sudo adduser splunk

    sudo su – splunk

    Let’s use that wget command to bring in the Splunk tgz. This command can be found on the Splunk downloads page for the version you would like. For this example, I will list the wget for 9.0.2: wget -O splunk-9.0.2-17e00c557dc1-Linux-x86_64.tgz

    After downloading Splunk to your server there we need to untar the folder in the /opt/splunk/folder. Let’s run this command: sudo tar -xvzf wget -O splunk-9.0.2-17e00c557dc1-Linux-x86_64.tgz

    Now we need to accept Splunk license agreements: cd /opt/splunk/bin

    Then run this command to enable boot start and accept the license: sudo enable boot-start -user splunk –accept-license

    Here you will be asked for the username and password you want to use for Splunk, so fill those in.

    Now you should have a Web UI for Splunk!

    Troubleshooting

    Since this post is about using Linux commands to start and troubleshoot Splunk, let’s move on to some common items you may encounter.

    1. Upgrading vs. Re-Installing: while working on this post I decided to upgrade my local instance and ran into a problem. I used a different install method this time, so it wasn’t a true “upgrade” but instead more like a re-install.
    2. Holding ports: I ran into the problem where my old version of Splunk was still holding on to port 8000. I used the ps -ef | grep splunk command to find the splunk tasks still running. I used the kill command to stop those tasks. Here is my command for example: kill -9 20189. After stopping I was able to start my new version of Splunk with no problems.
    3. Finding available disks: A command recommended to me by a friend that I find helpful finds the available disks and their usage on the server. This command does just that: df -h. Nothing beats a friendly recommendation sometimes!
    4. Decrypting your pass4SymmKey: Another instance you might need a special command for is decrypting your pass4SymmKey. When you have forgotten your pass4SymmKey, copy the value down in the .conf file and go to the bin directory. Run this command with your value to show what you decrypted password is: ./splunk show-decrypted -value
    5. Data doesn’t show up: A command I used often in my training was the btool command. Anytime I had data not show up I would run the ./splunk btool outputs list command on my forwarders and indexers to make sure they were forwarding to the correct IPs. You can also add –debug to the end of the command to show the destination path to each line.
    6. Find your inputs: One more command that may help you is the ./splunk list inputstatus command. This command will help you find your inputs and the STUS where they were ingested. You can see the file size, the position, directory, how much of the file has been processed and its completion status.

    That’s a good round of the basic commands you will need to set up Splunk and troubleshoot with a Linux box. I hope this helps you get started Splunking! You can contact me below for follow up: