Category: Splunk

  • Identifying Logon Anomalies with Splunk Mltk 

    Identifying Logon Anomalies with Splunk Mltk 

    By Kamal Dorairaj, Senior Splunk Consultant

    Goal: 

    The goal of this deep dive is to identify, when there are unusual volumes of failed logons as compared to the historical volume of failed logins in an environment. Increase in failed logins can indicate potentially malicious activity, such as brute force or password spraying attacks. Alternatively, these failed logins can also identify potential misconfigurations in service account permissions or misconfigured organizational unit (OU) groups for standard users. 

    Data Sources: 
    The following are data sources used for monitoring failed logins in this deep dive: okta. 
    The deep dive leverages the “oktaim2:log” source type. 

    Algorithm: 
    DensityFunction algorithm. 

    Model Creation: 
    Run the actual search for the last 30 days in the ‘search’ section of the MLTK app.  
    It gives us the understanding of our available dataset. The more the data, the better for the model. 

    Splunk query visualizing failed Okta logins by user and time interval.

    Add the fit statement to use DensityFunction algorithm and save into a model, as shown below: 

    Logon anomaly detection using Splunk MLTK DensityFunction model and outlier results.

    The above search counts the number of failed logons per host over 5-minute time intervals, enriches the data with the hour of day, and then trains an anomaly detection model to detect unusual numbers of failed logons by the hour of day. It will now show up under the ‘Model’ section in the MLTK app. 

    List of outlier detection models in Splunk Machine Learning Toolkit.

    Report Creation: 
    After you run this search and are confident that it is generating results, save it as a report and schedule the report to periodically retrain the model. As a best practice, train the model every week, and schedule training for a time when your Splunk platform instance has low utilization. 

    Note: Model training with MLTK can use a high volume of resources. 

    Saved alerts and reports for logon anomaly detection in Splunk MLTK.

    The above training model currently scheduled to run every month. Please change the scheduling in the future, based on the volume of data that coming in. 

    Make sure that the permissions for the model are correct. By default, models are private to the user who has trained them, but since you have used the app: prefix in your search, the model is visible to all users who have access to the app the model was trained in. 

    Apply the Model: 
    Now that you have set up the model training cycle and have an accessible model, you can start applying the model to data as it is coming into the Splunk platform. Use the following search to apply the model to data. This search can be used to populate a dashboard panel or can be used to generate an alert. 

    When looking to flag outliers as alerts, you can append | search outlier=1 to the search, to filter your results to show only those that have been identified as outliers. You can save this search as an alert that triggers when the number of results is greater than 0, which can be run on a scheduled basis such as hourly. 

    Splunk report applying outlier model to detect brute force login anomalies.

    When training and applying your model, you might find that the number of outliers being identified is not proportionate to the data: that the model is either flagging too many or too few outliers. The DensityFunction algorithm has several parameters that can be tuned to your data, creating a more manageable set of alerts. 

    The DensityFunction algorithm has a threshold option that is set at 0.01 by default, which means it will identify the least likely 1% of the data as an outlier. You can increase or decrease this threshold configuration at the apply stage, depending on the tolerance for outliers, as shown in the search. 

    Alert: 

    The Model is now saved as an Alert to run every one hour.  

    Setting up an alert in Splunk for detecting Okta brute force login attempts.
    Configuring email alerts for detected logon anomalies in Splunk.
    Overview of a scheduled alert detecting Okta brute force login anomalies.

    Note: if you got very few data points, there is going to be many false positive alerts. So kindly review it and ingest more data till you are positive on the outlier detection.  

    Need help building ML-based security detections in Splunk? Talk to TekStream’s experts.

    About the Author

    Kamal Dorairaj has over 22 years of diverse IT experience with full cycle development of various Applications and Systems. In his first 10 years; he worked as a CRM Consultant at the client locations includes Middle East, India, US; in various domains includes Retail, Telecom, eCommerce. Later he worked as a Lead SRE at Stubhub (was eBay company) for 7 years as a SME in Splunk, GCP. He is a PMP certified, ITIL certified, CompTia Security+ certified and Splunk Architect, Splunk ES Admin, Splunk Developer certified.  He also completed Cybersecurity for Managers, Business Analytics from MIT Sloan and MBA in Technology Management. His core interest area has been, ‘Get more business value out of Big data’.

  • Migrating a Splunk Deployment Server to New Hardware 

    Migrating a Splunk Deployment Server to New Hardware 

    By Kyle Moreau, Cybersecurity Engineer II 

    The first step in migrating your deployment server is to review your environment. Take note of the version of Splunk Enterprise that is running. Review local apps, deployment apps, server classes, and any custom configurations. Create a backup of your configurations. 

    The next step is to install and configure Splunk on the new host. Take into consideration the version of Splunk that is currently being used. If you are not using the most up to date version, review the official Splunk documentation for any major changes. After you install and configure Splunk, validate the web UI and ensure there are no errors that need to be addressed before configuring it as a deployment server. At this step, you will also want to add any custom apps or configurations that are not deployment server related (such as configuring ldap authentication).  

    After Splunk is configured and running on the new server, you can configure it as a deployment server. Copy over the deployment of apps and the server classes configuration. Modify the deployment client app configuration file to point to the new deployment server.  

    If a deployment client app does not already exist in your environment, it is highly recommended you modify your configurations before proceeding with this process. A common issue is that the deployment client configuration is created on the universal forwarder under $SPLUNK_HOME/etc/system/local. This is an issue because the deployment server cannot make changes to configurations outside of $SPLUNK_HOME/etc/apps. If you proceed without fixing this issue, you will have to manage your forwarders locally one by one. 

    You may need to restart Splunk to be able to view the configurations after they are copied over. Compare the configurations between the two servers to verify that they match.  

    Once the configurations are complete, all that is left is to update the forwarders to communicate with the new host. If your environment is following Splunk best practices, this is a simple task.  

    Update the deployment client app on the original deployment server to point to the new server. Make sure that the app is set to reload the Splunk service. Reload the deployment server and wait about 15 minutes; you should see the forwarders check in to the new deployment server and stop checking into the old deployment server.  

    If the change is not successful, there are likely configurations on the forwarder that conflict with the app or networking issues with the new server. If you are running into issues or want to learn more about migrating Splunk servers, please reach out to us using the form below.  

    Need expert help with your Splunk migration? Contact TekStream today →

    About the Author

    Kyle Moreau has over eight years of information technology experience, six of which are within information security. As a security engineer, he leads projects for various security tools including SIEM and Endpoint. Maintained and developed solutions to improve the security posture of a fortune 500 organization. Kyle has successfully completed full ES implementations for multiple organizations. Previous experience as a security analyst, focused on incident response and investigation as well as keeping current in the latest attack methods. 

  • Building a Bulletproof Splunk Environment with STIG Controls 

    Building a Bulletproof Splunk Environment with STIG Controls 

    David Cheever, Team Lead, MDR Advanced Services

    What are STIGs? 

    Security Technical Implementation Guides (STIGs) are standardized guidelines developed by the Defense Information Systems Agency (DISA) to enhance the cybersecurity posture of various technologies. These guidelines prescribe specific technical controls and configuration settings designed to minimize security risks. While initially developed for Department of Defense (DoD) systems, STIGs have become a valuable resource across industries, offering a practical, prescriptive approach to hardening IT environments. STIGs offer a set of security configuration controls for Splunk that help administrators harden their deployments against vulnerabilities and improve overall security posture. 

    Why Use STIGs to Secure Splunk? 

    Given that Splunk often handles critical security and operational data, it becomes a prime target for attackers. Applying STIGs to Splunk deployments offers several key advantages: 

    • Enhanced Security Posture: Aligning Splunk with STIG guidelines helps reduce risk and minimize potential attack surfaces. 
    • Operational Efficiency: Hardened Splunk environments are less vulnerable to disruptions from misconfigurations or exploits, ensuring reliable performance and proactive risk mitigation.  
    • Proven Best Practices: STIGs are based on industry-recognized security standards, designed to provide a robust defense against evolving cyber threats. 
    • Regulatory Compliance: For organizations in highly regulated industries such as government and the defense sector, applying STIGs ensures Splunk configurations meet strict compliance standards. 

    Overview of Key STIG Controls 

    The STIGs for Splunk provide a robust framework for securing your deployment, addressing key areas crucial for maintaining a strong security posture. These guidelines cover a wide range of configurations, including: 

    • Access Controls: Implementing role-based access and robust authentication mechanisms to safeguard against unauthorized access to sensitive data. 
    • Audit Trails: Configuring detailed audit logs to ensure traceability of all activities, with proactive alerts for any disruptions in communication.
    • Backup and Recovery: Conducting routine backups of Splunk configurations and logs, validating these backups to guarantee data integrity and compliance with organizational standards. 
    • Data Encryption: Encrypting sensitive data both at rest and in transit, providing a strong defense against potential data breaches. 
    • Safeguarding Data: Ensuring the reliability of log data stored in indexes by preventing unauthorized alterations and maintaining the authenticity of stored information. 
    • System Integrity: Enforcing regular patching schedules, secure logging practices, and continuous monitoring for any unauthorized system changes. 

    Applying STIGs to Your Splunk Deployment 

    The following steps will help you assess, maintain, and continuously improve your Splunk deployment’s security posture in alignment with STIG requirements. 

    • Baseline Assessment: Start by evaluating your current Splunk deployment against the relevant STIG checklists. This will help identify gaps and prioritize remediation efforts. 
    • Continuous Monitoring: STIG compliance is not a one-time effort. Regularly audit configurations and update settings in response to new threats or updates to the STIG guidelines. 
    • Leverage Splunk: Use Splunk itself to monitor the security of the deployment, creating alerts for deviations from STIG compliance. 
    • Review the STIG Documentation: Familiarize yourself with the full STIG documentation for Splunk Enterprise, which is available on STIG Viewer and DoD Cyber Exchange. 

    Conclusion  

    Implementing STIGs for Splunk deployments is an essential step in ensuring the security and reliability of your infrastructure. By following these comprehensive guidelines, organizations can build a robust security foundation that not only protects sensitive data but also supports seamless operational performance. If you need assistance implementing STIGs for your Splunk environment, don’t hesitate to reach out to us at TekStream – we’re here to help! 

    Read more about our Splunk services here!

    About the Author

    Dave Cheever is an experienced IT professional with nearly a decade of industry experience working primarily in cybersecurity. He also serves part-time with the Air Force National Guard, supporting various government entities such as the National Security Agency and USCYBERCOM. 

    Dave recently obtained his master’s degree in Cybersecurity from the University of Massachusetts Lowell. He also holds various industry certifications such as CISSP and has also acquired various Splunk certifications to include Splunk Core Consultant certification and Accredited ES Implementation. Dave resides near Plymouth Massachusetts, America’s hometown.                

  • Debugging Splunk SOAR Actions Using PUDB 

    Debugging Splunk SOAR Actions Using PUDB 

    Nathan Holloway, Security Automation Engineer

    Introduction 

    Splunk SOAR is a powerful tool for orchestrating and automating security workflows. However, debugging actions within SOAR can be challenging without the right tools. This blog will guide you through using PUDB, a Python debugger, to debug actions step by step. We’ll use the whois ip action from the WHOIS RDAP App as an example. 

    Step 1: Access the Server

    1. SSH into the server: Use your terminal to connect to the server hosting Splunk SOAR. 
    2. Switch to the phantom user: Ensure you’re operating as the phantom user by running: sudo su – phantom 

    Step 2: Locate the Action Scripts

    1. Navigate to the bin directory of your Splunk SOAR installation: cd <Phantom Home>/bin 
    2. Run the action on an event and note down the action name (e.g., whois ip). 
    3. Execute the following command to generate a debug file: phenv python create_tj.pyc ‘whois ip’ 

    Example Command Output:

    [phantom@phantom bin]$ sudo /opt/phantom/bin/phenv python /opt/phantom/bin/create_tj.pyc 'whois ip' 

    Matched 2 lines, will pick up the last line 

    IPC json added to file:

    '/tmp/whoisrdap-whois_ip.json' 

    Step 3: Inspect the Debug File

    Open the JSON file created in the /tmp directory to understand its structure: 

    cat /tmp/whoisrdap-whois_ip.json 

    Sample JSON Content:

    { 
    
        "action": "whois ip", 
    
        "action_run_id": 106, 
    
        "app_config": null, 
    
        "asset_id": "11", 
    
        "config": { 
    
            "_reserved_environment_variables": {}, 
    
            "app_version": "2.1.2", 
    
            "appname": "-", 
    
            "directory": "whoisrdap_7241ecbd-4a79-4a86-99eb-b2ed8f3e7686", 
    
            "main_module": "whois_rdap_connector.py" 
    
        }, 
    
        "parameters": [ 
    
            { 
    
                "context": { 
    
                    "artifact_id": 0, 
    
                    "guid": "80ccfee0-aee8-4aaa-8c42-b308be6c71f3" 
    
                }, 
    
                "ip": "4.2.2.2" 
    
            } 
    
        ] 
    
    }

    Step 4: Prepare for Debugging

    Locate the app folder in the apps directory. The directory name corresponds to the app’s UUID: (e.g., whoisrdap_7241ecbd-4a79-4a86-99eb-b2ed8f3e7686). cd <Phantom Home>/apps 

    Run the app’s main module with the debug JSON file:

    phenv python /opt/phantom/apps/whoisrdap_7241ecbd-4a79-4a86-99eb- b2ed8f3e7686/whois_rdap_connector.py /tmp/whoisrdap-whois_ip.json 
    Terminal output showing a list of installed Phantom apps in the /opt/phantom/apps/ directory, with app names and UUIDs organized in columns.

    Learn more about TekStream’s Splunk managed security here.

    About the Author

    Nathan Holloway is an accomplished IT professional with over 20 years of experience spanning data center operations, virtualization, automation, and security orchestration. 

    Beginning his career in data centers, Nathan honed his expertise in hardware and Linux systems administration during the first five years of his journey. Transitioning into virtualization, he spent the next five years working with VMware, where he served as a Tier 2 and Tier 3 engineer. During this time, he mastered Ruby and PowerShell, implemented Puppet to manage configurations for over 5,000 virtual machines, and developed a variety of automation solutions. 

    In the last six years, Nathan has focused on Splunk SOAR (Security Orchestration, Automation, and Response) at VMware and now TekStream. He has been instrumental in developing new actions and applications for Splunk SOAR and Splunk, driving innovation and efficiency in security and operational workflows. 

    With a proven track record in automation, scripting, and application development, Nathan brings a unique combination of technical acumen and practical problem-solving to every project. 

  • Use Case Testing to Validate Your Notables 

    Use Case Testing to Validate Your Notables 

    By Kyle Moreau, Cybersecurity Engineer II

    You are in charge of maintaining notables in Splunk Enterprise Security and are tasked with validating all of the notables. This task will test the accuracy of the notable and how efficient the search is.  When searching back through your correlation searches, you notice a few of them have never triggered a notable. You need to determine if this is because the activity is rare and hasn’t occurred yet (and hopefully never) or if there is something wrong with the search. You’ll need to find a way to test these notables and validate they will work if/when the activity occurs.  

    The first and most important step is to start by reviewing the search logic.  
     
    1. Determine if the index, source type, and fields exist in your logs.

    2. Make modifications to match the search criteria with the logs in your environment.  
     
    3. Go into ES and review the correlation search settings. 

    Validate the search schedule: 

    Splunk time range settings showing earliest time set to -20m, latest to now, and a cron schedule of */20 * * * * for recurring search execution.

    Make sure it is set up to trigger a notable when the criteria is met: 

    Splunk interface highlighting the Adaptive Response Actions panel with a Notable action selected for triggered alerts.

    Once you have determined the correlation search is set up properly and main components of the SPL are accurate, you can start testing the logic:

    Review Historical data 

    Search further back than you normally would to trigger the notable. The simplest way to validate the SPL is by matching logs that are already in Splunk. If the search is broken up into bucks or defines earliest/latest, comment these out and run your search back.  

    For example, you find logs that match your search criteria from 30 days ago, you can modify your correlation search to look back to that day: 

    Splunk time range configuration using relative modifiers from -30d to -29d, showing how to define a one-day testing window.

    Modify the search 

    The historical search couldn’t exactly match your SPL; you might have success by making small changes to the search. Modifying thresholds, changing field values, adding to lookup tables are all methods that can help generate a match without completely losing the search integrity.  

    In this example we are looking for a count of over 10 IP Addresses user per user: 

    Splunk search results showing a query using stats and where count > 10, with no matching events and a prompt to adjust the time range.

    Within this time range and threshold, we get 0 results. For testing we can expand the time range, or change the threshold to get results:

    Splunk search output showing one user result (jsmith) with an IP count of 6 after lowering the threshold to count > 5.

    Perform live testing 

    Generating activity from the source of your logs might not always be realistic, but it is likely the most accurate way to test a notable search. One of the best examples of this is a red team engagement with an internal team or 3rd party vendor hired by your organization.  

    In some cases, you can test generating logs necessary to trigger a notable by performing activity with the help of a product admin or network engineer. For example, you want to test a notable that fires when a user is added to a specific group in active directory. With appropriate permission/authorization, an admin can perform this action with a test user to generate the traffic.  

    Effective testing of notable searches not only enhances your Splunk environment’s reliability but also minimizes the risk of missing critical alerts. Whether you use historical data, make temporary changes to your search, or simulate events, each approach plays a valid role in building robust and actionable searches.  

    Want to optimize your Splunk environment further? Reach out here to learn about our extensive Splunk services and how we can support your goals. 

    About the Author

    Kyle Moreau has over 8 years of information technology experience, 6 of which are within information security. As a security engineer, he leads projects for various security tools including SIEM and Endpoint. Maintained and developed solutions to improve the security posture of a fortune 500 organization. Kyle has successfully completed full ES implementations for multiple organizations. Previous experience as a security analyst, focused on incident response and investigation as well as keeping current in the latest attack methods. 

  • What is Splunk? 

    What is Splunk? 

    By David Allen, Senior Splunk Consultant

    Splunk is a powerful software platform designed for searching, analyzing and most importantly, visualizing machine generated data in real time. It is used mostly for monitoring, troubleshooting and securing IT systems, as well as deriving business insights from data. Splunk collects and stores data from various sources such as log files, metrics, events and other machine data. By analyzing this stored data users can gain actionable insights never realized before. 
     

    Key Features of Splunk: 
     
    1. Data indexing: This is the term used for how Splunk stores the data. Splunk saves the human readable data (TEXT, CSV or JSON etc.) in a folder structure which they call indexes. Binary or compressed or otherwise non-human readable data is not allowed in Splunk.  
     
    This is an example of a binary or compressed file.. 

    Hexadecimal data output showing raw machine-level information used for Splunk data ingestion.

     

    This is an example of human readable JSON data… 

    Example of structured JSON data commonly indexed and searched in Splunk.

    Splunk can ingest data from a wide variety of sources including:  

    Log files: System logs, application logs, server logs, database logs etc. 

    Streaming Data: Real-time data from IoT devices, APIs etc.. 

    Network Data: Events from Firewalls, routers and network traffic analyzers. 

    Metrics: Time sensitive data such as CPU usage, memory consumption and API response times. 

    Here are a few of the benefits of Splunk’s Data Indexing.. 

    • Consolidates data from multiple sources into a single searchable platform 
    • Optimized for fast queries even on massive datasets. 
    • Handles structured, semi-structured and unstructured data without requiring pre-configuration. 
    • Supports long term retention policies and auditing requirements. 
    • Grows with organizational needs, accommodating increasing data volumes effortlessly. 
       

    2. Search and Analytics: Data is indexed from multiple sources and is stored in a way that it can be easily searched using Splunk’s query language (SPL – Splunk Processing Language) to analyze and visualize data. 

    Splunk’s SPL provides flexibility for both basic and advanced queries with these features.. 

    Keyword Search: Locate log os events simply using simple key words 

    Command-Based Queries: Use command to sort, filter, aggregate and transform data.  

    Pipelines: Chain multiple commands together to build complex queries in a readable format.  

    Time-Based Filters: Perform searches within specific time ranges. Below are the Splunk preset query time ranges.  

    List of relative and fixed time filters available in Splunk for querying data.

     

    You can also set custom time ranges.. 

    Custom time range selection using Splunk’s time picker interface for precise data queries.

    The benefits of Splunk search and analytics is that it makes it easy to understand complex data relationships across systems, real-time searching also reduces the time to identify and act on insights. 

    3. Dashboards and Visualizations: Dashboards are designed to have many visualizations. Each visualization displays the results of a particular query. The most popular Splunk visualizations are itemized in the image below, namely… Line Chart, Area Chart, Column  chart, Bar Chart, Pie Chart, Scatter Chart, Bubble Chart, Single Value, Radial Gauge, Filler Gauge, Marker Gauge, Cluster Map and Choropleth Map. 

    Splunk dashboard visualizations including bar charts, pie charts, maps and gauges.

     
    4. Real-Time Monitoring: This feature of Splunk monitors continuous data feeds for alerts and critical systems. Data is continuously indexed making it instantly searchable and available for analysis as it arrives. This is critical for detecting time-sensitive issues like security breaches, system failures or unusual network activity. 
     
    Splunk uses historical data and machine learning to recognize patterns and detect anomalies in real-time. Anomalies could include unusual traffic spikes, unexpected error code, or deviations in user behavior. Proactive detection allows teams to identify potential issues before they escalate. 
     
    Splunk’s real-time monitoring empowers teams to stay ahead of problems, ensuring systems remain operational, secure and optimized. 

    5. Multisite deployment – Splunk can be installed in a distributed manor allowing many locations in duplicated index clusters which ensures high availability and disaster recovery. In this scenario, data is replicated across multiple sites for redundancy in case one site goes down. 

    In conclusion, Splunk stands as a powerful platform for turning raw machine data into actionable insights, enabling organizations to monitor analyze and secure their systems with unparalleled efficiency. From its robust data indexing and real-time monitoring capabilities to advanced search, analytics and multisite deployment options, Splunk empowers businesses to harness the full potential of their data. 

    Whether you’re addressing operational challenges, enhancing security posture, or driving data-driven decision-making, Splunk provides the scalability, flexibility, and intelligence required in today’s dynamic digital environments. By simplifying complexity and offering deep visibility across IT and business landscapes, Splunk helps organizations stay resilient, competitive and future-ready. 

    In a world where data drives innovation, Splunk is more than a tool – it’s a strategic ally for success. 

    Click here to learn more!

    About the Author

    David Allen has over 35 years of experience in the information technology industry, including hardware design, software development, and entrepreneurship. He has extensive experience in various programming languages, development tools and Splunk. David exhibited his entrepreneurship skills when he founded his own AV company and ran it successfully for over 15 years using Splunk as its main data analytics software. As a Senior Splunk Consultant he works to assist others with their Splunk issues and is constantly learning new technology and especially everything Splunk. David holds both a Bachelor of Science in Electrical Engineering and a Bachelor of Science in Computer Science Engineering from LeTourneau University in Longview, Texas as well as two United States Patents. David currently resides in Richardson Texas with his family. 

  • From Chaos to Control: Harnessing the Power of Asset Tagging in Splunk SOAR

    From Chaos to Control: Harnessing the Power of Asset Tagging in Splunk SOAR

    By David Burns, Senior Soar Engineer

    In the realm of cybersecurity, effective asset management is paramount. Splunk SOAR offers robust features for asset management via tagging. Let’s explore the transformative power of asset tagging within Splunk SOAR, focusing on its ability to enhance visibility, streamline workflows, and bolster security operations.

    Enhancing Visibility with Customizable Tags

    Splunk SOAR empowers organizations to create custom tags to annotate assets with additional metadata or attributes. These tags provide contextual information about assets, allowing security teams to categorize and prioritize assets based on their unique characteristics. For example, tags can denote asset type, ownership, criticality, compliance status, or any other relevant information. By leveraging customizable tags, organizations gain unparalleled visibility into their IT infrastructure, enabling more informed decision-making and proactive risk management.

    Streamlining Workflows with Tagging

    Whether tags have been assigned automatically to assets, or manually, it allows for actions to be executed in bulk. This automation ensures consistency and accuracy across asset management workflows. By automating actions with tags, security teams can focus their efforts on strategic initiatives rather than manual administrative chores, thereby increasing operational efficiency and agility. For instance, let’s have a playbook that stores backups of a server configuration in git. Instead of having each server have its own playbook, you run the action on a tag. Then adding a new server to the workflow becomes a matter of creating the new asset with appropriate tag. No duplicating or updating of playbooks.

    ExtraHop Reveal(x) integration screen in Splunk SOAR showing configured assets with custom tags like inside_network and outside_network.
    Splunk SOAR playbook flow and Python code block using asset tagging to call get devices action from ExtraHop.

    Driving Insights with Tag-Based Searching and Reporting

    Tags play a pivotal role in enabling advanced searching and reporting within Splunk SOAR. Security analysts can leverage tags to perform targeted searches and generate custom reports tailored to their specific requirements. For instance, security analysts could use tags to filter assets based on their compliance status, allowing them to generate reports specifically focused on non-compliant assets. This provides valuable insights into areas that require immediate attention and helps organizations maintain regulatory compliance more effectively. By harnessing tag-based searching and reporting capabilities, organizations can uncover hidden patterns, mitigate emerging risks, and optimize their security posture effectively.

    Asset tagging within Splunk SOAR offers a transformative solution for cybersecurity and IT asset management. By leveraging customizable tags, automated tagging, and tag-based searching and reporting, organizations can shift from disorder to mastery in their security operations. Embrace asset tagging in Splunk SOAR to safeguard digital assets and defend against emerging threats effectively.

    Visit our Splunk services page to learn more.

    About the Author

    David Burns is a security engineer with experience working with Splunk Enterprise Security and Splunk SOAR (formerly Phantom) for a large fortune 200 bank. Before that he was a System Security Engineer working on the automation of security testing of OT systems. He brings his 20+ years programming background to use SDLC in rapid development of playbooks, custom functions, and more leading to modularity, re-use in design, and better long-term maintenance. For example, creating deeper integration for escalation through Slack and creating EDL management for multiple clients. At TekStream, he developed the slack escalation methodology that notifies customers of events that need their attention as well as a way of process for generating and updating EDLs within Splunk. 

  • Now You See It, Now You Don’t! Creating Drilldowns That Toggle In Your Splunk Dashboards 

    Now You See It, Now You Don’t! Creating Drilldowns That Toggle In Your Splunk Dashboards 

    By Marvin Martinez, Team Lead, Security Automation

    Splunk dashboards are admittedly amazing! You can display data in different contexts and levels of granularity as you see fit. One classic combination is having a single-value panel to display a high-level roll-up metric in the form of a single number and then allowing the user to click on the value to display the events/data that make up that value in a separate drilldown that usually displays in one of two ways: 

    • A separate tab that is either just the straight raw search in a search window in Splunk or a dashboard built to display that search with the additional detail, OR 
    • A separate panel underneath that is revealed to display the additional data as needed. 

    The first option is the simplest one and may usually suffice for simple or personal use cases. The second option is definitely nicer, more robust, and can be a great visual for users that like to have all of their data in one place. That being said, there’s one flaw with having an inline panel that opens up to display the context like that: if you have an already robust dashboard with various panels for other data, the newly revealed panel is usually a visual hindrance on the rest of the dashboard. Wouldn’t it be easy to just be able to toggle the drilldown panel on and off from the same panel that generates the drilldown? That’s what this blog is for! 

    On to the setup!  Let’s start with a quick synopsis of what’s needed.  At a high level, you’ll need the following: 

    • A single-value panel (or any other panel that you want to use as a drilldown origin) 
    • A defined token that will be used to hide/display the drilldown panel as needed 
    • A drilldown panel ready to display the necessary data with a depends leveraging the token defined above. 

    Let’s start with a sample dashboard. Below you will see a test dashboard with a few single-value panels in the first row. The “Green Number” panel has a drilldown configured to display all the 1,438 events that led to that number. Notice how the dashboard is already quite full of information as it is so another panel displaying many lines of context, while useful, wouldn’t exactly make this dashboard prettier. 

    Splunk dashboard displaying key SLA metrics with bar charts and drilldown options by time to assignment, escalation and resolution.

    After clicking the “Green Number” value, the drilldown panel shows up underneath (as shown below).  This is great! The user can see the context behind the 1,431 single value directly underneath the panel without having to click away to a new tab.  However, that panel now makes the dashboard that much busies and a user using the dashboard may want to be able to re-hide that panel to continue viewing other data in the dashboard.  This is where the toggle capability can come in handy and be a great feature to add into your dashboard! 

    Expanded Splunk dashboard view showing drilldown into SLA details alongside summary charts and filters.

    In order to be able to hide/display your drilldown panel, you need to add a “depends” attribute to your panel node, as shown below: 

    <row> 
    
        <panel depends="$tok_show_drilldown$"> 
    
          <table> 
    
            <title>Details</title> 
    
            <search base="base_metrics_filtered"> 
    
              <query>…DRILLDOWN QUERY…</query> 
    
            </search> 
    
            <option name="drilldown">cell</option> 
    
            <option name="refresh.display">progressbar</option>         
    
          </table> 
    
        </panel> 
    
      </row> 

    The token used to display the drilldown panel is “tok_show_drilldown”.  This is the token we will use to toggle the panel on and off from the single-value panel. Let’s set that up now. 

    <panel> 
    
          <single> 
    
            <title>Green Number</title> 
    
            <search base="base_metrics_filtered"> 
    
              <query>…ORIGINAL SEARCH | stats countquery> 
    
            </search> 
    
            <option name="colorMode">block</option> 
    
            <option name="drilldown">all</option> 
    
            <option name="rangeColors">["0x53a051","0x53a051"]</option> 
    
            <option name="rangeValues">[0]</option> 
    
            <option name="refresh.display">progressbar</option> 
    
            <option name="useColors">1</option> 
    
            <drilldown> 
    
              <condition match="len($tok_show_drilldown$) = 4"> 
    
                <set token="comp_message"></set> 
    
                <unset token="tok_show_drilldown"></unset> 
    
              </condition> 
    
              <condition match="1=1"> 
    
                <set token="tok_show_drilldown">true</set> 
    
                <set token="comp_message">(click again to close drilldown)</set> 
    
              </condition> 
    
            </drilldown> 
    
          </single> 
    
        </panel> 

    Setting up the toggle, as you can see, stems from setting up a careful conditional on your drilldown! In your drilldown configuration, add two condition nodes.  The first one will be driven by a match rule to check if the tok_show_drilldown token is already set and has a value of “true” (length = 4, in this case). If so, it will unset the token and also set a token named comp_message to have an empty string (more on this in a bit). The second condition will be the “default” case (1=1). It will set the drilldown to true so that the drilldown panel displays and set the comp_message token to contain the string “(click again to close drilldown)”.  

    This setup allows the user to click the same panel to toggle the drilldown on or off as needed. Additionally, because of how we set up the comp_message token, we can use that in the title of the panel as shown below so that, when the user clicks to display the drilldown, the panel will also include a message informing the user that they can click the panel again to hide it back. 

    Splunk dashboard panels showing green and red number tiles with token-driven message variable for dynamic drilldowns.

    This is how it looks once saved: 

    Splunk dashboard in collapsed drilldown mode displaying green and red number tiles summarizing incident counts.

    Once you click again and the drilldown disappears, so, too, will the message as well because of how we set up the conditions on our panel!  

    Now, you can enable your users to open and hide useful drilldown panels as they see fit without hindering the user experience on the rest of the dashboard and your dashboard presents as that much smarter! 

    Need help optimizing Splunk for your team? See how TekStream can help.

    About the Author

    Marvin Martinez has nearly 20 years of combined experience in software and workflow development and nearly 5 years as a Splunk Core Certified Consultant and certified SOAR developer, most recently operating as a team lead on the MDR (Managed Detection and Recovery) team and leading a team of SOAR developers to architect, administer, design, develop and enhance automation playbooks and activities as part of the incident resolution process with Splunk SOAR.  

    For the first 15 years of his career, he was primarily focused on Inspyrus Invoice Automation installation, design and configuration, including PL/SQL, Workflow Forms Recognition (WFR), Oracle Enterprise Capture, EBS/JDE/Fusion integration, and BPEL/BPM development, as well as working within and managing Oracle Cloud Infrastructure (OCI) and ancillary BPEL/BPM development and becoming a certified OCI Architect Associate and AWS Developer Associate.   

    Marvin has a proven track record of being motivated, technologically agile, quick and eager to learn, efficiently productive, and an effective communicator, able to work proficiently as part of a team as well as independently/remotely. 

  • Extracting Nested JSON Fields in Splunk

    Extracting Nested JSON Fields in Splunk

    By Aaron Dobrzeniecki, Senior Splunk Consultant

    Splunk, as we all know, is an analytical tool used to collect and evaluate data from different types of sources, helping organizations monitor their systems in real-time. One very common data format used is JSON. The data is structured in such a way that allows Splunk to extract the fields natively, granted you are working with perfect JSON. Nested JSON fields are a little trickier. To work with nested JSON fields in Splunk, you can easily extract them using props.conf and transforms.conf. This is a solution oriented blog post! 
     
    Please see an example event I will be using for this blog. 
     
    2024-12-10 17:57:16.998 INFO C2P { “id”: “1001”, “type”: “Regular” }, { “id”: “1002”, “type”: “Chocolate” }, { “id”: “1003”, “type”: “Blueberry” }, { “id”: “1004”, “type”: “Devil’s Food” } { “id”: “5001”, “type”: “None” }, { “id”: “5002”, “type”: “Glazed” }, { “id”: “5005”, “type”: “Sugar” }, { “id”: “5007”, “type”: “Powdered Sugar” }, { “id”: “5006”, “type”: “Chocolate with Sprinkles” }, { “id”: “5003”, “type”: “Chocolate” }, { “id”: “5004”, “type”: “Maple” }  

    When ingesting this data into Splunk JUST by using the Great 8 props.conf settings as well as KV_MODE=JSON, I do not get my nested JSON fields extracted. Please see my testing below: 
     
    [test] 
    LINE_BREAKER = ([rn]+) 
    TIME_PREFIX = ^ 
    TIME_FORMAT = %Y-%m-%d %H:%M:%S.%3Q 
    MAX_TIMESTAMP_LOOKAHEAD = 23 
    TRUNCATE = 9999 
    SHOULD_LINEMERGE = FALSE 
    EVENT_BREAKER_ENABLE = TRUE 
    EVENT_BREAKER = ([rn]+)[d-]+ 
    KV_MODE = JSON

    Splunk search interface displaying JSON-formatted event data with selected and interesting fields on the sidebar.

    After adding in a REPORT to my props.conf and adding a transforms.conf with this setting, my fields extracted accordingly. Please see my configuration below: 
     
    props.conf 
     
    [aaron_test] 
    LINE_BREAKER = ([rn]+)[d-]+ 
    TIME_PREFIX = ^ 
    TIME_FORMAT = %Y-%m-%d %H:%M:%S.%3Q 
    MAX_TIMESTAMP_LOOKAHEAD = 23 
    TRUNCATE = 9999 
    SHOULD_LINEMERGE = FALSE 
    EVENT_BREAKER_ENABLE = TRUE 
    EVENT_BREAKER = ([rn]+)[d-]+ 
    REPORT-nested = aaron_nested 
     
    transforms.conf 
     
    [aaron_nested] 
    REGEX = “(w+)”:[nrs]*”*([^”,]+) 
    FORMAT = $1::$2 
    MV_ADD = true 

    Splunk search results showing expanded nested JSON fields including multiple id and type values for donut toppings.

    The MV_ADD in the transforms.conf extracts the fields as multivalue fields so we can capture all values! NOTE! MV_ADD is only valid for search-time field extractions! The FORMAT setting specifies the format of the event, including any field names or values you want to add. If the REGEX setting does not have any capture groups, the matching fails.  

    As you can see, both the id and type fields get pulled out when I run my search. Instead of having to create field extractions for each and every value, you can do the field=value formula using props.conf and transforms.conf. Please see the regex used in the screenshot below:

    Regular expression tool highlighting key-value pairs from nested JSON structure in Splunk event logs.

    In conclusion, extracting nested JSON fields in Splunk is essential for extracting valuable insights form complex data structures. By using props.conf and transforms.conf you can easily and efficiently extract nested JSON fields in your complex data. This capability allows for greater flexibility and precision when working with data. By using the REPORT in props.conf associated with a transforms.conf, we are able to modify our extractions WITHOUT modifying the indexed data. 

    Learn more here!

    About the Author

    Aaron Dobrzeniecki has just over 7.5 years of experience with Information Technology. He first worked for an MSP broadening his skills with Tier 1 and Tier 2 Help Desk support for just over 40 small companies. Aaron has been working with Splunk for 7 years starting on the apps and add-ons team troubleshooting issues with Splunk apps and add-ons. He then worked on the Admin on Demand team creating content, assisting with Splunk core issues or task, as well as providing Splunk Best Practices. He has provided excellent service to the Splunk customers he has worked with and continues to get praise from his customers. Aaron was also a Customer Success Manager for 14 companies working with their Splunk teams to better their environments. As a Certified Splunk Consultant, Aaron continues to increase his knowledge and follow the Splunk Best Practices while maintaining an excellence in communication. Aaron graduated with his Bachelors’ majoring in Security Informatics from Indiana University in 2015. 

  • Splunk Cloud ACS Series – Part 1 – A Simplified Setup Guide

    Splunk Cloud ACS Series – Part 1 – A Simplified Setup Guide

    By Nate Hufnagel, Senior Splunk Consultant

    When businesses first began moving to the cloud, skilled system admins and engineers everywhere lamented at the loss of control, which was native to their on-premise infrastructure and self-hosted applications.  In recent years, cloud-native technologies like Splunk Cloud have matured enough to allow those same admins and engineers to regain some of the control they lost.  One of those key features is our topic today: Splunk Cloud’s Admin Config Service, or ACS for short.

    This guide will cover Splunk Cloud ACS installation and initial setup for commercial and FedRAMP environments. There are a few ways to setup up ACS in the latest version (including deprecated features), however this guide will walk through the latest supported approach.  Before proceeding, make sure you have an account for splunk.com (same credentials you use for splunkbase.com).

    Install ACS CLI – Mac & Linux

    Method 1: Homebrew

    The easiest way to install ACS is through installed Homebrew, one of the more popular package managers for Unix systems.

    First, verify that Homebrew is installed on your machine:

    brew doctor

    If installed, you should see a response like this: “Your system is ready to brew”.

    If not, install Homebrew with the following command:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Next, install acs with the following commands:       

    brew tap splunk/tap
    
    brew install acs

    Method 2: Manual Install

    If you’re more technically inclined, you can also get latest compatible tar ball from GitHub and install manually. You can also use wget, which comes out-of-the-box with most Linux distros:

    wget https://github.com/splunk/acs-cli/releases/download/v2.17.0/acs_v2.17.0_linux_amd64.tar.gz

    Install ACS CLI – Windows

    Method 1: Windows Installer

    Get latest version installer from GitHub

    Follow the installation wizard instructions.

    Method 2: winget

    Use Windows Package Manager (winget).  Download the latest version from GitHub, or the Microsoft Store.

    Once winget is installed, run the following command to install ACS:

    winget install acs-cli

    Create ACS account and token

    Create an ACS service account (with the sc_admin role) and token if you don’t have them already:

    Settings>Users>New User

    Settings>Tokens>New Token

    Set environment variables:

    Next, setup the environment variables.  There are some considerations at this step:

    1. If the account you want to use with ACS authenticates via SAML, a STACK_TOKEN is required. 
    2. Tokens are optional for local Splunk accounts, so only username and password are required. 
    3. You do not need to set the ACS_SERVER variable for non-FedRAMP environments. For FedRAMP environments, use the URL specified in the table below.
    Table listing required environment variables for Splunk ACS setup, including usernames, passwords, token and server URL with brief descriptions.

    For Mac/Linux users:

    Use the “export” command to set environment variables:

    export ACS_SERVER=<value>…
    export STACK_TOKEN=eyJ…

    Check that the values are set correctly:

    echo $STACK_TOKEN

    For Windows users:

    Use the “set” command

    set ACS_SERVER=<value>…
    
    setSTACK_TOKEN=eyJ…

    Check that the values are set correctly:

    Cmd prompt

    echo %SPLUNK_USERNAME%

    PowerShell

    echo $Env:SPLUNK_USERNAME

    Reminder: You don’t have to set the ACS_SERVER variable for non-FedRAMP environments.

    Complete ACS setup

    All that’s left is to test the configuration and specify your Splunk Cloud stack.  As of version 2.6.0 we can do this with one command:

    acs setup <stack_name>

    …where the <stack_name> is the first segment of your SplunkCloud URL (https://<stack_name>.splunkcloud.com OR https://<stack_name>.splunkcloudgc.com).

    Get Success message:

    Terminal screenshot showing successful ACS setup and current stack status, displaying stack name, type, version and readiness confirmation.

    Verify you’re ready to start using ACS:

    acs status current-stack

    Once you’ve received the successful status message, that’s it! You’re ready to start using ACS to manage your Splunk Cloud stack.  In Part 2 of this series, we’ll dive deeper into some ACS features, allowing us to automate the administration of our Splunk Cloud stack.

    Reference Links:

    How to Set Environment Variable in Windows

    Administer Splunk Cloud Platform using the ACS CLI

    Install Homebrew

    Using Admin Config Service (ACS) in Splunk Cloud Platform FedRAMP environments

    Learn more about TekStream’s Splunk Cloud services here.

    About the Author

    Nate is a former student athlete and skilled professional with a background in technology and sales. His 3+ years of Splunk consulting has added a depth of technical knowledge and a wide variety of soft skills.  Security engineering and cloud architecture has been his primary technical focus, while continuing to sharpen his client-facing skills through pre-sales opportunities.  He hopes to continue developing both skillsets for the rest of his career. He has an insatiable appetite for learning, a strong work ethic, and is eager to apply his knowledge.