Author: dystrick

  • 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. 

  • Top NASCIO 2025 Takeaway? The Need for a Workforce Playbook.

    Top NASCIO 2025 Takeaway? The Need for a Workforce Playbook.

    By Judd Robins, Executive Vice President

    It’s not surprising that AI dominated the majority of the conversations at NASCIO 2025. Whether you’re in the public sector or private, everyone is scrambling to figure out how they can best leverage the promise of AI to drive efficiency, innovation and growth at scale.  

    Budget constraints, cybersecurity and modernization were also areas of top priority. But the main through line between all of these discussions was the continued need for skilled talent. Yet a report by Govern for America mentioned that the problem isn’t a lack of talent, it’s matching talent to roles that is.  

    I disagree.  

    Reframing the Talent Question  

    When discussing this issue with my peers between sessions and networking lunches, the need for talent was less about volume or pipeline and more about budgets. It’s a common pain point I hear as a cybersecurity consultant at TekStream when establish security operations centers (SOCs) for public sector agencies. 

    There simply isn’t enough budget to outcompete private sector salaries when looking to woo top talent, even more so when considering the cost of setting up a SOC with best-in-class technologies. The issue with this line of thinking is that it assumes the talent shortage problem is only a public sector one. It’s not.  

    Recent estimates place the global cybersecurity talent shortage at more than 4 million and growing. Sure, AI can provide cover for more entry-level needs, but keeping up with the increasing sophistication of AI-driven cyberattacks still requires skilled human talent. 

    Just last year, Microsoft detected more than 600 million cyberattacks targeting its clients, with the majority aimed at public sector agencies. And by 2027, IDC predicts that AI will be behind the majority of cyberattacks experienced by 95% of nation states worldwide. 

    But if these points aren’t salient enough to highlight the systemic talent shortage we’re all facing, consider a recent industry letter penned by 250 CEOs. In it, they emphasize how requiring computer science and AI education in today’s curricula could unlock $600 billion in economic potential each year. 

    Paving the Path Forward With a Whole-of-State Approach 

    Public sector leaders know they must get creative with attracting and retaining talent. There was no shortage of conversations around this fact, particularly related to finding AI talent. However, my biggest takeaway was the need for a workforce development playbook. 

    One that secures the next generation of talent that also solves for the 10 priorities outlined by NASCIO. 

    For me, that solution is taking a whole-of-state approach. Rather than operating in siloes, public and private sector entities can come together to solve their top challenges — sharing resources to present a unified front against cybercriminals while developing the next generation of talent.  

    Higher education institutions can provide the talent and sandbox to power a shared SOC model. Federal and state agencies supply the funding and connectivity to enable shared threat response across all participating entities. And the private sector provides the framework and technology to make it work.    

    At TekStream, we believe this model is a viable solution to our industry’s top challenges. It inherently addresses the growing financial, time and resource barriers that typically hold public sector leaders back while enabling private sector and state leaders to build centers of excellence with a growing talent base.  

    Not Just a Concept, a Model That Actually Works 

    For the past three years, my team and I have seen the benefits of this approach firsthand. 

    We piloted our whole-of-state model in public-private partnership with Louisiana State University (LSU), New Jersey Institute of Technology (NJIT), and our technology partners Splunk and AWS. The framework we created pairs workforce development with a unique cost-deferment model. 

    In the case of higher ed, we enhance the traditional tiered curriculum by providing students with just-in-time training via our co-managed SOC service. Students gain credit hours and a dashboard of activities that help them to enter the workforce faster as mid-level cyber analysts with AI technical skills upon graduation. 

    Higher ed institutions, in turn, benefit from lowering costs and long-term ownership as students become proficient in mitigating threats. Meaning our involvement decreases as student proficiency increases. Our model enables additional cost reduction by reducing the number of required licenses to power the SOC. 

    Graph showing TekStream MDR coverage and institutional participation over two years.

    Another benefit of participating in the model is access to a growing library of shared assets. This enables public sector leaders to collaborate across state lines, empowering them to further enhance the protection of their digital assets by leveraging best practices, insights and peer research. 

    Innovation Without People Is a Non-Starter 

    Whether it’s modernizing applications by moving legacy Oracle systems to the cloud, setting up an AI task force, or looking for ways to optimize spend, skilled talent is the key to meeting all of the priorities on NASCIO’s 2025 list. 

    Not focusing on developing tomorrow’s workforce today will likely result in continued brain drain, increased costs and a slower pace of innovation — sentiments from the Govern for America report that I do agree with. But first we have to agree that the talent shortage challenge is not a public or private sector issue. It’s ours.  

    Therefore, it stands that working together is a mutually beneficial way to move forward.  

    Contact us to learn more.

    About the Author

    As Executive Vice President, Sales and Marketing, Judd drives the overall strategy and revenue growth for TekStream consulting services. He leads territory campaigns to boost customer awareness and solution delivery quality, helping TekStream become a top partner in the cybersecurity and cloud industry.  Judd has extensive experience in increasing market share in competitive technology industries, working in the Fortune 1000 and Public Sector space. He holds a Bachelor’s in Management Information Systems from Virginia Tech and lives in Atlanta with his family. 

  • Taming Your AWS Costs with Automation 

    Taming Your AWS Costs with Automation 

    By Jay Almers, Senior Solutions Cloud Architect

    We’ve all been there. You open your AWS bill, and your heart skips a beat. “How did it get this high?” you wonder. Managing cloud costs can feel like chasing a moving target—just when you think you’ve got a handle on it, something changes. 

    At TekStream, we’ve heard this story quite a few times, and we’ve helped clients understand and tame their overall cloud spend. If you’re feeling overwhelmed by unpredictable AWS expenses, you’re not alone. Let’s talk about how automation can help you regain control and even find opportunities to save. 

    The Cloud Cost Conundrum 

    AWS offers incredible flexibility and scalability, which is fantastic for innovation and development but can be a double-edged sword when it comes to costs. It is so easy to spin up resources, oftentimes over-provisioned, and then become forgotten or for usage patterns to change without anyone noticing—until the bill arrives. 

    Maybe you’ve tried setting up spreadsheets to track costs, or you’ve tasked team members with monitoring usage manually. But let’s be honest, these methods are time-consuming and often ineffective in the fast-paced cloud environment.  The fact of the matter is that from time to time, humans can be a little less than consistent. 

    Why Automation Could Be the Solution You’ve Been Looking For 

    Imagine having a system that watches your AWS usage like a hawk, sends you alerts before things get out of hand, and even suggests ways to optimize spending. It never sleeps and follows the same steps and/or rules every single time.  That’s the power of automation in cost management. 

    Here’s what automation can do for you: 

    • Provide Visibility: Get real-time insights into where your money is going. 
    • Set Up Alerts: Receive notifications when spending approaching, meets, and exceeds certain thresholds. 
    • Optimize Resources: Identify underutilized resources that can be downsized, turned off outside of business hours, or terminated if no longer needed. 
    • Forecast Costs: Predict future spending based on current usage trends. 

    But, as with all automation, setting this up effectively requires more than just enabling a few services, systems, or scripts. It needs a strategic approach. 

    How TekStream Can Help You Master AWS Cost Management 

    We know that every organization’s needs are different. Here’s how we can work together to build and implement systems to get a grasp on your AWS costs: 
     

    1. Understanding Your Current Landscape 
      We’ll start by digging into your current AWS usage and billing. What’s driving your costs? Are there any glaring inefficiencies? This will help you get a clear picture of the width, depth, and breadth of your environments. 
    1. Developing a Tailored Strategy 
      Based on our findings, we’ll craft a cost optimization plan that makes sense for your business and operational needs. This might involve setting up AWS Budgets for proactive monitoring, using AWS Cost Explorer for detailed analysis, or implementing AWS Cost Anomaly Detection to catch unexpected spikes. 
    1. Implementing Solutions 
      Our team will handle the technical architecture and implementation, ensuring that automation tools are configured correctly and integrated with your existing workflows. We can also customize reports and dashboards, so you get the information that matters most to you and your organization. 
    1. Empowering Your Team 
      We believe in sharing knowledge, equipping you with the tools and understanding to get the most out of the solution. We’ll train your team on how to use these tools effectively, interpret the data, and make informed decisions that guide action. 
    1. Ongoing Optimization 
      Cost management isn’t a one-and-done process. TekStream can provide ongoing support to help you adjust and maintain settings, adapt to changes in usage or organizational requirement, and continue searching for savings over time. 

    Success Stories Speak Volumes 

    One of our clients, a growing tech company, was struggling with skyrocketing AWS costs that were eating into their profits. After partnering with us, they were able to substantially reduce their monthly AWS spend by simply by identifying and addressing inefficiencies through automation.  What’s more, beyond the cost savings, the biggest benefit was the confidence they gained in their ability to manage expenses proactively. 

    Ready to Take Control of Your AWS Costs? 

    We get it—cloud cost management can feel like a never-ending battle. But you don’t have to go it alone, and you don’t have to accept unpredictability as the norm. 

    At TekStream, we’re passionate about helping businesses like yours make the most of AWS without breaking the bank. Let’s connect and explore how automation can bring clarity, control, and savings to your cloud spending. 

    Ready to take control of your AWS costs? Discover how TekStream’s Cloud Optimization Solutions can help you identify inefficiencies and implement automation strategies to reduce your monthly spend. Learn more about our services here.

  • 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. 

  • Conjunction Junction… Boost Your Functions 

    Conjunction Junction… Boost Your Functions 

    William Phelps, Senior Technical Architect 

    Anyone who has seen the 1970’s cartoon “Schoolhouse Rock” learning skits should now have that little song going through their head. 

    For everyone else, this article will show a different way to express and consume “functions” in an Oracle database. Conceptually, this concept would be database-agnostic, but the focus in this article is Oracle. 

    A “function” in Oracle is a piece of PL/SQL code that, given no inputs or multiple inputs, performs work and returns a singular output value. This is different when contrasted to a “procedure” where the procedure can have multiple outputs. Typically, each input’s and output’s data is “typed”, such as “string”, “integer”, “boolean”, etc.   

    In most cases these data types are sufficient. Sometimes though, it’s not enough. Sometimes a table with rows and columns would be nice. 

    Consider the following simple example function which is being created using a WITH block for simplicity. This simple function doesn’t do very much. It just takes the numeric input parameter and echoes it back to the screen when called as a “select” as shown. 

    PL/SQL function demonstrating precision with number type and query output showing rounded result.

    There are scenarios where it is desirable to pass in a delimited “list” of integers or other values. The most likely scenario is the use case of wanting to conduct a query operation within the function or procedure that needs to use an “IN” type of statement like the following examples for performance reasons. 

    SQL snippet selecting and deleting employees by ID using hardcoded values in an IN clause.

    One approach in this use case may be to create a temporary table and insert all target values into the table, and then use a select as the IN clause like the following:  

    SQL query selecting employee names using a subquery from a temporary table.

     It may be though, that the necessary permission to create such a temporary table doesn’t exist, or there now exists a multitude of one-off tables for a host of “no-one-knows-what-this-table-is-used-for” situations.   

    Back to the previous ultra simplistic example, if three values are provided, the sample function fails with a “wrong number of arguments” message. 

    PL/SQL function error caused by passing multiple arguments to a function expecting one parameter.

    Let’s just look at an alternative approach to attack the problem. 

    Today’s approach is to create a function that can take a string, split it, and then “pipeline” the output results back as a table-like object.   

    For compactness, a package is created that has the basic setup with the following code. 

    Oracle package declaration defining a pipelined function returning a table type of varchar2 strings.
    Full Oracle package body using SQL logic to split comma-separated strings into rows via pipelined function.

    The short explanation of the package code is as follows: 

    • Line 2 in the package signature declares a single columned table of strings. 
    • Line 5 in the package signature defines a function with the “pipelined” keyword, returning the single columned “table” defined in line 2. 

    The package body from line 17 through line 24 simply takes a comma separated string and basically pivots the data from a single delimited row into a single column with multiple rows. This is accomplished using the analytics function “lag” and a connect-by level. Reading-wise it’s the hardest part, but the code can be followed reasonably well. 

    Lines 28 through 31 then simply flush the rows back to the client. 

    Executing this function takes the form of:

    Query execution displaying output from pipelined function splitting '1,2,3' into individual rows.

    This complete sample can be found online at SQL Fiddle: 
    https://sqlfiddle.com/oracle/online-compiler?&id=1ca57192-514d-4c17-a726-583913f8a42d 

    Ultimately, going back to the specific use case of SELECTING or DELETING as “IN”, those calls now look like the following, keeping in mind that the column name that is returned by default is named “column_value”. 

    SQL queries using pipelined function to dynamically select and delete employees based on ID string input.

    There are caveats to this approach, depending on your environment. 

    • The sample is not production-ready code but solely intended as informational. Proper checks for nulls, whitespace, etc. should be implemented.   
    • The VARCHAR limit of characters in the source string will be the limiting driver. Let’s assume that each desired “value” is 4 characters, plus an additional 1 character for the comma “delimiter”, which then results in a cap of 800 values. However, multiple invocations could be UNIONED to create whatever size “table” ultimately needed.   
    • This example uses values extracted from a string as numbers, but the returned values actually and technically are strings. To be clear, if numbers are required in your output, cast the output to the appropriate type.  
    • This approach could also be implemented using standalone types and functions. For source code control and general maintenance, such a specific use case is better suited to be created in a package. 
    • If passing in strings that within themselves contain the delimiter, the spurious delimiter will cause the results to be incorrect. Know your data or cleanse it appropriately. 

    The concept of “conjunction” in today’s post allows us to tie together multiple values in a loose way to avoid the need of creating more disposable database objects. Let us know what other loose items that we can help tie up for you…that’s OUR function! 

    Want to learn more about Oracle services? Click here.

  • How AWS Automation Can Elevate Your Cloud Security 

    How AWS Automation Can Elevate Your Cloud Security 

    By Jay Almers, Senior Cloud Solutions Architect

    Have you ever found yourself lost in the maze of AWS security configurations, wondering if there’s a better way to keep your cloud environment secure without drowning in manual tasks? Trust me, you’re not alone. Many organizations grapple with the complexities of cloud security, especially as they scale. But here’s the good news: automation can be a game-changer. 

    At TekStream, we’ve walked alongside businesses of all sizes, helping them navigate the intricate world of AWS security. We’ve seen the relief on clients’ faces when they realize that they don’t have to tackle this alone—that with the right strategies, tools, and training, they can enhance their security posture while simplifying their workload. 

    The Struggle Is Real 

    Let’s set the scene. Imagine you’re managing a growing AWS environment. Every day, new resources are spun up, configurations change, and keeping track of it all feels like trying to catch water with your hands. You’re worried about compliance, potential security gaps, and the sheer amount of time your team spends on manual monitoring. It’s a common scenario, and it’s one that can lead to sleepless nights and constant anxiety about what might slip through the cracks. 

    Why Automation Might Be Your New Best Friend 

    So, what’s the alternative? Automation. Think of it as having an assistant who never sleeps, remains focused on their tasks, and always follows the rules to the letter. By automating key aspects of your AWS security, you can: 

    • Reduce Human Error: Let’s face it, we’re all human, and mistakes happen. Automation ensures that tasks are performed consistently every time. 
    • Save Time: Free up your team from repetitive tasks so they can focus on strategic initiatives that drive your business forward. 
    • Stay Compliant: Automatically enforce compliance standards across your environment without the need for constant manual checks. 

    But here’s the thing—setting up effective automation isn’t as simple as flipping a switch. It requires a thoughtful approach, a deep understanding of AWS services, and a strategy tailored to your unique needs. 

    Our Approach at TekStream 

    We believe in partnering with you, not just providing a one-size-fits-all solution. Here’s how we typically work with our clients: 

    1. Getting to Know You 

    We start by sitting down with you (virtually or in person) to understand your current environment and security setup, challenges, and goals. What’s keeping you up at night? What would success look like for your team? 

    1. Crafting a Customized Plan 

    Based on our conversations, we develop a tailored plan that outlines how automation can address your specific pain points. This might involve leveraging tools like AWS Config for configuration management, AWS Security Hub for centralized security visibility, and IAM Access Analyzer for permissions management. 

    1. Implementation and Training 

    Our team assists with the implementation, ensuring that automated systems and processes are set up correctly and integrated smoothly into your existing workflows. But that’s only part of the battle. Administering, maintaining, and adjusting these systems and processes is arguably just as important as the initial setup and configuration.  It is our goal to help you be as hands-on as you want to be, providing training along the way or simply managing it for you. 

    1. Ongoing Support 

    Your cloud-based infrastructure and workloads are dynamic, and so are security threats. We offer various ongoing support services to help you adapt to changes, fine-tune automation processes, and stay ahead of potential risks.  From monitoring and alerting to remediation, TekStream has you covered! 

    Real Results, Real Peace of Mind 

    One of our clients, a mid-sized tech company in the healthcare payments space, was overwhelmed by the constant manual monitoring and patching of the servers and services within their organization.  They were worried about compliance and feared something critical might slip through the cracks, opening themselves to compromise.  TekStream performed an intensive audit of their architecture, systems, and workloads.  The outcome of that audit identified these (and many more) pain points and highlighted areas where automation could increase efficiency and reliability in keeping their compute services patched and up to date.  After partnering with TekStream to implement automation processes, they saw a significant reduction in manual workload, increased compliance adherence, and more importantly, peace of mind allowing them to focus on maturing other areas of their business. 

    Let’s Start the Conversation 

    We know that the idea of overhauling your security processes can be daunting. But remember, you’re not in this alone. At TekStream, we’re passionate about helping businesses like yours unlock the benefits of AWS automation without the headache. 

    So, are you ready to explore how automation can improve your security posture? Let’s chat. We’d love to hear about your challenges and discuss how we can help. 

    Learn more here!

    About the Author

    Jay Almers is an AWS Certified Solutions Architect Professional with over 9 years of hands-on experience designing, implementing, and maintaining highly available and fault tolerant cloud-based environments. Additionally, Jay brings over 23 years of Information Technology and Multimedia Design experience across public, private, and higher education sectors. His areas of expertise span the spectrum of the Software Development Lifecycle and include branding and corporate identity, web and application development, server and systems administration, development operations, and automation. His passion for growth and development is apparent in his ability and desire to learn new technologies as needed to accomplish his tasks and finds great satisfaction in architecting solutions that make the lives of others easier and more enjoyable. 

    Jay resides in central North Carolina. He enjoys spending time with his daughters, working with his hands, and using his creativity in photography and videography. 

    Jay has been instrumental in several TekStream client engagements including Rogers Communications, Amazon, Georgia Technology Authority, Rectangle Health, and Chick-fil-a. Additionally, Jay has authored several blog posts on the topic of automation with a focus on simplifying the life of the administrator. 

  • 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.