Author: dystrick

  • Evaluating a Move from VMware to AWS: A Comprehensive Guide

    Evaluating a Move from VMware to AWS: A Comprehensive Guide

    By Jonathan Stephan, Director, AWS East

    The decision to migrate from VMware to Amazon Web Services (AWS) is significant and multifaceted. Whether you are seeking cost savings, improved scalability, or enhanced disaster recovery capabilities, moving to AWS can offer substantial benefits. However, it is essential to evaluate this transition carefully to ensure it aligns with your organization’s goals and infrastructure needs. Here’s a comprehensive guide to help you evaluate a move from VMware to AWS.

    Understanding Your Current VMware Environment

    Before considering the migration, it’s crucial to have a thorough understanding of your existing VMware environment. This involves:

    1. Inventory Assessment**: Conduct an inventory of your virtual machines (VMs), storage, network configurations, and applications running on VMware. This will help you understand what resources need to be migrated.
    2. Performance Metrics**: Gather performance data on your current VMs, including CPU, memory, storage usage, and network traffic. This information is vital to size your AWS instances correctly.
    3. Dependency Mapping**: Identify dependencies between applications and services. Understanding these interdependencies will help in planning the migration phases and avoiding downtime.
    4. Licensing and Contracts**: Review your VMware licensing and existing contracts to understand any potential penalties or obligations.

    Defining Your Objectives

    Clearly define what you aim to achieve with this migration. Common objectives include:

    1. Cost Reduction: Evaluate if moving to AWS will reduce your operational costs in terms of hardware, maintenance, and energy consumption.
    2. Scalability: AWS offers extensive scalability options. Consider if your organization needs to scale up or down based on demand.
    3. Disaster Recovery and Business Continuity: AWS provides robust disaster recovery solutions. Determine if this aligns with your business continuity plans.
    4. Innovation and Agility: Assess whether AWS services can accelerate your ability to innovate and respond to market changes.

    Cost Analysis

    One of the critical factors in moving to AWS is understanding the cost implications. AWS provides a variety of pricing models, including pay-as-you-go, reserved instances, and spot instances. Conduct a detailed cost analysis by:

    1. Using AWS Pricing Calculator: This tool helps estimate the cost of running your VMware workloads on AWS.
    2. Comparing TCO: Compare the Total Cost of Ownership (TCO) of running your infrastructure on VMware versus AWS over a specific period.
    3. Considering Hidden Costs: Account for potential hidden costs such as data transfer fees, training for your IT staff, and any third-party tools needed for migration.

    Migration Strategy

    Selecting the right migration strategy is pivotal. AWS offers several migration paths, including:

    1. Lift and Shift (Rehosting): This involves moving your applications to AWS without any significant changes. It is the quickest method but may not leverage all AWS benefits.
    2. Replatforming: Making a few cloud optimizations without changing the core architecture of your applications. For example, moving from a traditional database to Amazon RDS.
    3. Refactoring (Re-architecting)**: This involves reimagining how your applications are architected and developed, using AWS-native services. It offers the most significant benefits but requires the most effort.
    4. Hybrid Approach: Combining on-premises VMware with AWS cloud solutions, allowing for gradual migration.

    Assessing Risks

    Identify and mitigate potential risks associated with the migration, such as:

    1. Downtime: Plan the migration to minimize downtime. Consider conducting migrations during off-peak hours.
    2. Data Integrity and Security: Ensure data integrity and security during the migration process. Use encryption and secure transfer protocols.
    3. Compliance: Ensure your migration strategy complies with industry regulations and standards.

    Testing and Validation

    Before fully migrating, it’s crucial to conduct thorough testing:

    1. Pilot Migration: Start with a small set of workloads to validate your migration plan.
    2. Performance Testing: Ensure that the migrated workloads meet your performance expectations.
    3. Security Testing: Verify that security measures are effective and that there are no vulnerabilities.

    Training and Support

    Invest in training your IT staff on AWS services and best practices. AWS offers extensive documentation, courses, and certification programs that can be beneficial.

    Conclusion

    Migrating from VMware to AWS is a transformative move that can offer numerous benefits, from cost savings to enhanced scalability and disaster recovery. However, it requires careful planning and evaluation. By thoroughly understanding your current environment, defining clear objectives, analyzing costs, selecting the right migration strategy, assessing risks, conducting thorough testing, and investing in training, you can make an informed decision and achieve a successful migration.

    Remember, the key to a successful migration is not just in the execution but in the detailed planning and evaluation that precedes it. Good luck with your journey to the cloud!

    Feel free to share your experiences or ask questions in the comments section below.

  • Can You See Me Now? Ensure SOAR Playbook Visibility Into Artifact Data Regardless of Scope 

    Can You See Me Now? Ensure SOAR Playbook Visibility Into Artifact Data Regardless of Scope 

    By Marvin Martinez, Team Lead of Security Automation Operations

    Splunk SOAR, formerly known as Phantom, is essentially a canvas on which to build out your automation solutions. One particular aspect of how Splunk SOAR works behind the scenes can sometimes be beneficial, or somewhat of a hindrance, depending your use case. As you know, Splunk SOAR has this notion of “scope” when determining whether an artifact is “visible” to a playbook while it is running. This is not normally an issue if you’re manually executing a playbook and are able to select the scope before executing the playbook, as displayed below.

    SOAR platform UI showing artifact scope dropdown with options for new and all artifacts before running a playbook.

    There are use cases, however, where you may want to be able to repeatedly execute playbooks and ensure that some, or all, artifacts are always visible to the playbook. For example, you may have a workbook attached to the container with playbook references and analysts/users may need to run the same playbook more than once. In cases like this, the only usual option is to ensure you manually set the scope on each playbook block in your playbook to “All Artifacts” as you develop it. Depending on the length of your playbook, this may be unnecessarily tedious, particularly if you’re doing it repeatedly for multiple playbooks!

    A SOAR Hack

    In use cases like this, there is a clever SOAR hack you could employ that will ensure your playbook always has the artifact information available. You can leverage the REST API to retrieve the artifact data using a custom function and then it will be available as output variables in a utility block within your playbook.

    Creating a custom function ensures that you can re-use this piece of code any time you need it and for any artifact that’s in your container. A basic introduction to this custom function is below. In your SOAR environment, go to “Custom Functions” and click to create a new one.

    Inputs

    • artifact_name (item) – This will be the name of artifact in your container that you want to retrieve the values for.
    • container_id (item) – The container id of the container where the desired artifact is. This can easily be referenced by selecting “event” -> “id” in the parameter select screen when populating the inputs for the custom function call.

    Outputs

    • artifact_cef_values (item) – This will be a dictionary field that will contain all of the cef values in the artifact.

    As for the code, insert the following code snippet after the “Write your custom code here…” line in your custom function.

        #Create dictionary for results 
    
        artifact_cef_values_dict = {} 
    
        found_values = False 
        #Generate REST API call with filters to get artifact data 
    
        artifact_url = phantom.build_phantom_rest_url('artifact') 
    
        artifact_url = f'{artifact_url}/?_filter_container_id=
    
    {container_id}&_filter_name='{artifact_name}'' 
    
        response = phantom.requests.get(artifact_url, verify=False) 
    
        content = json.loads(response.text) 
        #Iterate through results and convert fields/values to dictionary keys 
    
        if content['count'] > 0: 
    
            found_values = True 
    
            artifact_cef_values = content['data'][0]['cef'] 
    
            keys = list(artifact_cef_values.keys()) 
    
            values = list(artifact_cef_values.values()) 
    
            counter = 0 
    
            for key in keys: 
    
                value = values[counter] 
    
                artifact_cef_values_dict[key] = value 
    
                counter = counter + 1 
        if not found_values: 
    
            comment = "NOTE: no field values found!" 
    
            phantom.comment(comment=comment) 
    
        else: 
    
            pass 
        #Assign output variable with internal results dictionary 
    
        outputs['artifact_cef_values'] = artifact_cef_values_dict 

    Results

    Once implemented, this custom function can now be called from your playbook (preferably at the top of it as one of your first blocks) and you can then reference the outputs of that block for any fields from your desired artifact, no matter what scope it’s running in. Below is a sample playbook that shows how this custom function could be utilized:

    SOAR playbook diagram highlighting steps to retrieve artifact CEF values, format output, and add a comment.

    The container this playbook will run on has one artifact named “test_artifact” with a few fields, one of which is a “destinationAddress”.

    Artifact metadata panel displaying test artifact details including protocol, destination address, and request URL.

    In the playbook above, the custom function is called as the first block and retrieves all the values for “test_artifact” in the current container. The configuration for the custom function is as shown below:

    Configuration screen for get_artifact_cef_values utility with defined artifact name and container ID variables.

    In the format output block immediately after, select the “artifact_cef_values” output from the custom function block and then just add the desired field at the end in object notation (i.e. add “destinationAddress” like get_artifact_cef_values_26:custom_function_result.data.artifact_cef_values.destinationAddress). In this case, we are just preparing a quick comment to show how the field retrieval works.

    Playbook format block dynamically referencing destination address from artifact CEF values for visibility.

    Now, just use the output of the format block in the comment block after that to output a comment to the container showing the data. The output of the comment block will display as shown below.

    Playbook result displaying extracted destination address from artifact data with command prompt for user input.

    As you can see, once implemented, it’s that easy to reference any values from your artifact at any point in your playbook with no need to worry about scopes or references at any point. If you have multiple artifacts, you could easily string together various of these blocks and just name them accordingly for use within your playbook.

  • Software That Grows With Your Business

    Software That Grows With Your Business

    Modernizing Applications to Prevent Growing Pains and Increase Resilience

    Traditional application development methods are becoming increasingly obsolete. To stay competitive, you need to develop flexible and adaptable applications that easily integrate emerging technologies, such as AI/GenAI, without requiring a complete overhaul every time, regardless of whether the environment is on-premises, cloud-native or hybrid.

    Modern application development addresses this need for agility. It enables you to build a flexible architecture that scales and evolves as business needs change and new capabilities and functionalities become available. And it provides the necessary framework to adapt swiftly, irrespective of the service delivery model or the development environment.

    Benefits

    What are the major benefits you’ll get from modernizing your applications? Here are the top four benefits that make it best for building your middleware and mission-critical applications.

    Efficient Launch Timing & Market Responsiveness

    The main benefit of the modern app approach is its ability to radically simplify the development process. It is built on agile practices, cloud platforms, microservices architecture and continuous integration and delivery/continuous deployment (CI/CD) to enable faster and more efficient development cycles.

    Modern application development significantly reduces the time from concept to deployment. This rapid development and deployment cycle enables businesses to respond quickly to market changes and user needs, giving you a competitive edge. Leveraging this flexible modality also helps you access and act upon real-time data to make timely decisions and stay responsive to market dynamics.

    Unlike traditional application development practices, where changes can be overwhelming and time-consuming, a modern application practice facilitates rapid deployment and iteration. This makes the development process faster and more flexible.

    Future-proofing & Secure Scalability

    Software security is at the heart of the application modernization methodology. It leverages the latest security practices to deploy software in a safe environment, ensuring that applications are safe from current threats and adaptable to future security challenges. Adopting a modern development process ensures your applications are tailored to current business needs and can accommodate future advancements and scalability. This future-proofing aspect means that applications can evolve alongside the business. By adopting modern application development, especially in cloud-based service delivery models, you can move away from capital-intensive IT investments toward more flexible operational costs.

    Enhancing Flexibility & User Experience

    Applications developed with this approach are inherently flexible and scalable, catering to various user needs and business scenarios. This flexibility is crucial for user-centric and middleware applications, which help connect data sources and facilitate seamless operations within an organization.

    Modern application development enables businesses to adapt quickly to change, whether market trends, customer feedback or technological advancements. This agility is vital to maintaining a competitive edge in a fast-paced digital environment.

    Opening Doors to Advanced Technologies

    Modern applications provide a foundation for integrating advanced technologies like machine learning and the Internet of Things (IoT). By embracing this cloud-first strategy, businesses can easily incorporate new technologies into their applications, unlocking advanced capabilities and insights. This foundation keeps the development doors open for emerging technology.

    Getting Started

    If you know you’d like to explore application modernization, here are some criteria considered to be important when choosing the partner you work with.

    Integrating Advanced Technologies & Best Practices

    Find a partner who operates as a one-stop shop, covering all facets of application development. This includes initial concept, development, deployment and ongoing support, offering a seamless and integrated service experience. We combine our extensive expertise with the latest security and fault tolerance best practices. By integrating advanced technologies like DevOps/CI/CD, Gen AI and no-code/lowcode, we help you design innovative and robust applications.

    Validated Expertise for Your Assurance

    The right partner offers the technical mastery to ensure agile delivery without compromising quality. TekStream demonstrates this approach to help you get significant savings on the total cost of ownership, a crucial factor for any business. The assurance of working with certified experts in AWS serverless, serverless containers and Kubernetes-based applications adds an extra layer of confidence in your project’s success.

    Financial & Strategic Flexibility

    With the capability to access additional funding options like the AWS partner funding program, TekStream offers you access to financially savvy solutions that can bring tens of thousands to hundreds of thousands of dollars to your project. We focus on creating applications that are effective today but scalable and adaptable for tomorrow. This foresight is crucial for maintaining the relevance and efficiency of your applications in the long term.

    The TekStream Advantage

    Our ability to quickly understand an organization’s unique challenges and objectives stands out. This approach is not just about deploying the latest technologies; it involves engaging closely with both technical and business stakeholders, which is part of the TekStream advantage. Such collaboration ensures that each decision made in the development process is strategic and aligned with the long-term vision of the business to develop the best architecture possible. Maintaining this perspective is crucial, especially for organizations that might not have the capacity or expertise to embrace modern app development entirely.

  • Not Enough Space? Rotate Through Your Dashboard Panels Automatically

    Not Enough Space? Rotate Through Your Dashboard Panels Automatically

    By Marvin Martinez, Team Lead, Security Operations

    Splunk dashboards allow for great flexibility and can provide many ways to visualize your data. Sometimes, however, you may need to ensure you can fit everything on one non-scrollable screen. Perhaps you’re in a SOC with a main screen and need some different panes to display at specific intervals? What if you need to cycle through a set of data between different time ranges like the last 24 hrs, 7 days, and 30 days? In these situations, it would be very helpful to be able to have a dashboard that automatically rotates the desired panels on specific time intervals, not unlike a fast food menu screen or those digital billboards you frequently see on the interstate!

    In the example we’ll use for this article, I’ll demonstrate how to configure a dashboard to display an Attack Map in two separate ways. The first view will contain a full screen attack map with all of the different sources in one single map to provide a comprehensive view. The second view is a broken out set of panels that shows each individual source/group in its own panel with a dedicated attack map for added detail. The Missile Map app that contains this attack map visualization used below can be found on Splunkbase.

    View 1

    Cybersecurity attack map showing global data flows and threat origins in a single interactive panel.

    View 2

    Rotated Splunk dashboard displaying four grouped attack maps with segmented threat visualization panels.

    These two views will cycle automatically based on a specified time interval defined within a global search in your dashboard. There are a few tokens to ensure you set up correctly but, once set up as needed, your dashboard will cycle through the two configured views (sets of panels) on its own for use in any monitor on a wall or other constantly monitored screen.

    The snippet of dashboard XML code responsible for the setup is below, with a full detailed explanation below:

       <search> 
    
        <query>| makeresults count=1 
    
    | eval test = IF("global" = "global","individual","global") 
    
        </query> 
    
        <done> 
    
          <eval token="panelView">IF($panelView$ = 
    
    &quot;global&quot;,&quot;individual&quot;,&quot;global&quot;)</eval> 
    
          <set token="form.panelView">$panelView$</set> 
    
          <eval token="refreshCount">$refreshCount$ + 1</eval> 
    
        </done> 
    
        <refresh>15s</refresh> 
    
        <refreshType>interval</refreshType> 
    
      </search> 
    
      <fieldset submitButton="false"> 
    
        <input type="text" token="panelView" depends="$tok_hide$"> 
    
          <label>field1</label> 
    
          <initialValue>global</initialValue> 
    
        <change> 
    
          <condition value="global"> 
    
              <set token="globalView">true</set> 
    
              <unset token="individualView"></unset> 
    
          </condition> 
    
          <condition> 
    
            <unset token="globalView"></unset> 
    
            <set token="individualView">true</set> 
    
          </condition> 
    
        </change> 
    
        </input> 
    
      </fieldset> 

    Components

    The components of this setup are as follows:

    – Search to detect what view is currently being displayed and what the next one will be, as well as to define what the refresh interval will be

    – A hidden input to allow for catching the resulting value and setting the appropriate tokens for view hiding/showing.

    – Setup your rows (or panels) with the appropriate depends settings to leverage the appropriate tokens to ensure they are shown only when desired.

    First, the initial search. Set this search up at the top of your dashboard.

    <search> 
    
        <query>| makeresults count=1 
    
    | eval test = IF("global" = "global","individual","global") 
    
        </query> 
    
        <done> 
    
          <eval token="panelView">IF($panelView$ = &quot;global&quot;,&quot;individual&quot;,&quot;global&quot;)</eval> 
    
          <set token="form.panelView">$panelView$</set> 
    
          <eval token="refreshCount">$refreshCount$ + 1</eval> 
    
        </done> 
    
        <refresh>15s</refresh> 
    
        <refreshType>interval</refreshType> 
    
      </search> 

    The query is just a generic makeresults command to return some output value but it’s being leveraged to set the token value of the hidden input. This is to ensure that you don’t end up with an infinite loop by trying to set the token of an input within itself. Use the done event handler to set the token of the hidden input (“panelView” in my example) (details below) within it. Use an eval to set the token appropriately based on the value of the “panelView” input currently (i.e. if “global” currently, set it to “individual” and vice versa). The refresh property is what defines how often the panels/views will rotate between displaying. You can statically set it here or even define it using a token from an input, if desired, to make that refresh interval easily customizable.

    As far as the input is concerned, create a text box input and set the “depends” property on it to a token you don’t intend on setting so that it is always hidden (i.e. “$tok_hide$”). Add a change condition so you can set, and unset, appropriate tokens based on the value of the input. This is where the magic happens! When the value of the token is “global”, in this case, it sets the globalView token and unsets the individualView token. This will hide the individual panels and display the global one. The default condition after that is executed when the value is anything other than “global”, which is sufficient in our scenario but you may need additional explicit conditions if you have more than two views in your dashboard. Note how the set/unset is just reversed from the first one to ensure only one is set at any given time.

    <fieldset submitButton="false"> 
    
        <input type="text" token="panelView" depends="$tok_hide$"> 
    
          <label>field1</label> 
    
          <initialValue>global</initialValue> 
    
        <change> 
    
          <condition value="global"> 
    
              <set token="globalView">true</set> 
    
              <unset token="individualView"></unset> 
    
          </condition> 
    
          <condition> 
    
            <unset token="globalView"></unset> 
    
            <set token="individualView">true</set> 
    
          </condition> 
    
        </change> 
    
        </input> 
    
      </fieldset> 
    
     

    Finally, it’s time to configure your rows/panels with the appropriate depends property to hide/show panels when necessary, as shown below. Set the value of each to be the token that will show the panel/row.

      <row depends="$globalView$"> 

    Save your dashboard and enjoy the automatic cycling between your panels with no engagement from a human!

  • Announcing Amazon Q – GenAI

    Announcing Amazon Q – GenAI

    By Jay Almers, Senior Solutions Architect

    At AWS re:Invent 2023, Amazon announced the addition of an exciting new service that has been added to their already-impressive AI portfolio called Amazon Q. What makes this service so intriguing, especially in today’s world of GenAI, or Generative Artificial Intelligence, is the data sources the AI models are trained on.

    I asked one of the most notable GenAI systems available to the general public, ChatGPT (the chat-based Generative AI solution developed by OpenAI) to describe the data sources its models were trained on. These data sources include a wide selection of books from numerous genres and time periods, websites that cover topics like news, science, art, culture and forums. It also sourced its data from scientific papers, including technical and scientific information from many different fields and areas of study, as well as “common crawl data” and “other textual sources” which are comprised of newspapers, magazines, articles and other written content available on the Internet. An important thing to note about ChatGPT and similar solutions is that its responses may not include the most accurate or up-to-date data as there is a specific cutoff date for which it has data; as of this post, this cutoff date is April 2023. That’s where Amazon Q enters the conversation.

    Screenshot of ChatGPT explaining the data sources used for training GPT models, including books, websites, scientific papers, Common Crawl data, and other textual sources—highlighting transparency in AI model training for generative AI tools like Amazon Q.

    A first person response from ChatGPT

    So, how is Amazon Q different?

    Much like ChatGPT and other GenAI systems out there, Amazon Q takes a starting question (prompt) and generates and returns a response based on the data sources its models had been trained on. Using natural language processing, the AI solution is usually able to interpret and understand the context and subject matter being asked of it. It also has a concept of tonality, complexity, or if it needs further clarification because the initial prompt was too vague. But this is where Amazon Q seemingly splits away from the other GenAI solutions that are available today. According to AWS, you can use Amazon Q to have conversations, solve problems, generate content, gain insights and take action by connecting to your company’s information repositories, code, data, and enterprise systems. I emphasized this last part because of this major shift how the solution is trained. Rather than OpenAI’s data sources being derived from the “Public Web”, Amazon Q can be connected to an organization’s internal documents, code, and proprietary information so that the information it returns is organization centric.

    Imagine the Human Resources department of your organization needing to sift through countless procedural documents to change a VERY legally problematic occurrence of the word “and” to “or”. Utilizing an AI solution that has been trained on your organization’s documents to do the monotonous task of sifting through that information for you would be a tremendous time saver.

    Now imagine you have lost a couple of key software engineers or application developers and their documentation is not as polished as we’d all like. Having a solution that could be trained on your own proprietary source code could provide you with a deeper understanding of the code as well as provide your current and future developers with the starting point they are looking for where the documentation is lacking.

    If Amazon Q is connected to our data, how do we keep it secure?

    Amazon Q, like every other AWS service, follows a shared security model where AWS is responsible for protecting all the infrastructure that runs the AWS Cloud globally and the customer is responsible for securing and protecting the content that runs within the AWS Cloud. Amazon Q uses “data source connectors” to access and crawl your organization’s data, such as Confluence Wikis, GitHub repositories, and Salesforce instances to name a few, for use in its training and responses. Using these connectors stores credentials in AWS Secrets Manager and IAM policies to control access to these secrets.

    It is important to note that AWS warns users and organizations to follow general security best practices as it pertains to unintentional disclosure of sensitive information:

    “We strongly recommend that you never put confidential or sensitive information, such as your customers’ email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Amazon Q or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server.”

    We are certainly just getting started in the world of Generative AI and with all new technologies, there’s still a lot of refinement that needs to be done as use-cases and enhancements are developed. Artificial Intelligence is here to stay and what will end up setting individuals and organizations apart will be how they choose to approach AI; resist it and be swallowed by the wave or embrace it and use it as a tool to make better use of our most precious and valuable commodity – time.

  • Splunk Index Earliest and Index Latest

    Splunk Index Earliest and Index Latest

    By Jay Young, Senior Splunk Consultant

    In Splunk, _index_earliest and _index_latest are two special time-based SPL and SPL2 search constraints that help you specify a time range based on indexed time and not event time for your search within a specific index. These constraints are useful for limiting the scope of your search to a specific a time and improving the efficiency of your searches. They also help find events they may have been indexed with incorrect event time stamps.

    _index_earliest

    The _index_earliest constraint specifies the earliest time that your search should begin when searching within a specific index.

    You can think of it as setting the starting point in time for your search within the specified index.

    This constraint is particularly useful when you want to focus on a specific time range within an index, allowing you to exclude data that’s outside that range.

    _index_latest

    The _index_latest constraint specifies the latest time that your search should end when searching within a specific index.

    It sets the ending point in time for your search within the specified index.

    Like _index_earliest, _index_latest helps you narrow down your search to a specific time frame, excluding data that falls outside of it.

    Reference materials can be found on the Splunk SPL Search Manual

    Example 1

    Suppose you have an index called “web_logs” and you want to search for events between 10:00 AM and 11:00 AM on a specific day.

    index=web_logs source=”/var/log/access.log” | search

    _index_earliest=”10:00:00″ _index_latest=”11:00:00″

    Example 2

    To search for events in the “security” index that occurred between October 1, 2023, and October 15, 2023, you can use the constraints like this:

    index=security | search _index_earliest=”10/01/2023:00:00:00″

    _index_latest=”10/15/2023:23:59:59″

    Example 3

    You can also use relative time expressions. For instance, to search for events within the last 24 hours in the “application” index:

    index=application | search _index_earliest=-24h _index_latest=now

    Conclusion

    These examples demonstrate how to use _index_earliest and _index_latest to specify time ranges when searching within specific indexes in Splunk. This can help you focus on relevant data and improve efficiency and find events that may have been ingested with an event timestamp that was out of the normal date and time range.

  • How to Dynamically Extract and Set Field Names in Splunk

    How to Dynamically Extract and Set Field Names in Splunk

    By Brent Mckinney, Splunk Team Lead

    This blog demonstrates how to dynamically set field names based on values in your Splunk events, and set them to corresponding field values. This requires a unique configuration, as opposed to doing traditional field extractions with static field names.

    Let’s Get Started

    For this example, let’s say we have the following events with the sourcetype test_sourcetype:

    11/30/2023 01:34:30 field_name=”response_code” field_value=”200″

    11/30/2023 02:30:39 field_name=”response_code” field_value=”200″

    11/30/2023 03:36:47 field_name=”response_code” field_value=”404″

    11/30/2023 04:39:31 field_name=”response_code” field_value=”500″

    11/30/2023 05:34:55 field_name=”response_code” field_value=”200″

    11/30/2023 06:32:21 field_name=”response_code” field_value=”200″

    11/30/2023 07:39:54 field_name=”response_code” field_value=”200″

    11/30/2023 08:38:29 field_name=”response_code” field_value=”200″

    11/30/2023 09:36:34 field_name=”response_code” field_value=”404″

    11/30/2023 10:31:01 field_name=”response_code” field_value=”500″

    By default, Splunk will extract these fields as follows:

    field_name = response_code

    field_value = 200

    But what if we want the fields extracted like this?

    response_code = 200

    Rather than creating a custom, static field name, and extracting a corresponding value, Splunk provides the ability to extract both the field name AND value, and apply them accordingly. This is done using field transformations applied to our sourcetype.

    Field Transformations

    The first thing we need to do is create a regular expression to capture the fields of interest. Our initial regex looks like this:

    field_name=”(?<field_name>w*)”sfield_value=”(?<field_value>w*)”” 

    This regex extracts the desired fields, but by itself, sets them in 2 fields, field_name and field_value respectively. In order to have the value of field_name be our field name, and the value of field_value be the corresponding field value, we need adjust our regex to use specific syntax that Splunk expects for the transformation. This involves using KEY and VAL to extract and correlate the field/value pair.

    Our regex now looks like this:

    field_name=”(?<_KEY_1>w*)\sfield_value=”(?<_VAL_1>w*)”” 

    The value of <string> specified in _KEY_<string> and _VAL_<string> will ensure the field name extracted is set to the field value extracted. In order to implement we can add our transformation:

    Navigate to Settings > Fields > Field transformations and provide the following then Save.

    Name: testing_extraction 

    Type: regex-based 

    Format: leave this blank 

    Regular expression: field_name=”(?<_KEY_1>w*)”sfield_value=”(?<_VAL_1>w*)” 

    Source Key: _raw 

    Next we set our field extraction to the appropriate sourcetype, to use the above transformation. To start, navigate to Fields > Field extractions:

    Name: test_extraction

    Apply to sourcetype named test_sourcetype

    Type: Uses transform

    Extraction/Transform: testing_extraction

    The above values should match the sourcetype of the data you are extracting these fields from. The value of Extraction/Transform MUST match the name of the Field Transformation. Once saved, running a search on the sourcetype will show the field names and values extracted and available to filter on.

    Note, this can NOT be done directly in SPL at search time. It must be done via field transformation. You may also need to check permissions on both the field transformation AND field extraction so that users can use the new fields.

    You should now be able to dynamically set field names based on values in your Splunk events, and set them to corresponding field values. As always, we are available if you have any questions – just fill out the form below:

  • Letter from the CEO 

    Letter from the CEO 

    As the CEO of TekStream, cybersecurity is on my mind every day. And it must be for you as well. It seems we can’t go a day without word of another breach taking place, with the cost to individuals and to corporations rising with each incident. We are fortunate, here, to have a team of the best cybersecurity experts in the business who use Splunk, AWS and other tools to create a safe environment for our employees and our data.

    Not every company has the luxury or the budget for best-in-class digital security. Often, an IT generalist is tasked with the first defense measures against threats, with best of intentions and a set of foundational basics that kick the ball down the field a bit. We ask a lot of our teams in this category, and for every alarming thought we have on the subject, they have two.

    Fatigue and fear of the unknown creep in eventually, though, and with alarming infiltrations and new complexities coming from threat actors our staff can get underwater quickly.

    There are answers out there, though. After a consultation with our security team, we can give you a roadmap to security and a platform for future growth and innovation.

    It starts with our security assessment. This program gives you visibility into your current posture, fidelity measurement of your responses and a strategy and communication plan. Members of your IT, security and C-Suite will take away a clear view of current security gaps and a plan for remediation.

    Next, our team will assess security architecture, tools, and resources, creating a documented incident response process, security policy and related documents. This three-to-five-week engagement builds the foundation for your digital assets. After stakeholder interviews, the collaborative assessment delivers an optimized resource allocation model and remediation roadmaps, prioritized by risk and complexity.

    Some of our clients choose 24/7 coverage by our team, some choose a combination approach and some take the reins fully. With training and tools, the options are limitless.

    With the freedom of security comes innovation. The modern data platform gives way to GenAI, machine learning and other artificial intelligence protocols that can vault your firm into the next level of performance and efficiency.

    Let’s explore the possibilities together.

    Sincerely;
    Rob Jansen
    CEO

  • Cybersecurity Just Got Personal – My County Was Held Hostage

    Cybersecurity Just Got Personal – My County Was Held Hostage

    By Judd Robins, Executive Vice President, Sales & Marketing

    Renewing my car tag should have been quick. But a cyberattack unexpectedly compromised Atlanta, GA’s (Fulton County) digital infrastructure. It paralyzed the local government’s digital systems, making routine tasks like paying water bills, accessing records and renewing a car tag impossible.

    The financial impact was steep, with an estimated $10-15 million cost to restore services plus another $10 million to harden the county’s cybersecurity infrastructure against future attacks (according to WSB Channel 2). As a local resident and cybersecurity executive, this attack hit close to home.

    The Escalating Attack on Public Data

    Cyberattacks, like the one in Fulton County, have become commonplace. Many public sector organizations are particularly vulnerable due to aging IT applications and very tight budgets.

    In 2023, 2,365 reported cyberattacks affected over 343 million victims. This represents a staggering 72% increase in data breaches since 2021, which previously held the record for the most breaches. And there’s more:

    These statistics highlight the escalating scope of cyber threats and the urgent need for enhanced security solutions — solutions that my team at TekStream provides to safeguard private and public organizations, like Fulton County, from debilitating cyberattacks.

    A Call to Action: How Organizations Like Fulton County Can Protect Themselves

    No organization — public or private — is 100% secure. Many struggle to stay ahead of cyber threats, grapple with workforce shortages and often lack the necessary security coverage for their specific environments. At TekStream, we’ve been tackling these challenges for years and have tailored our cybersecurity solutions to address them effectively.

    Using our Visibility, Fidelity and Automation (VFA) framework within a collaborative Splunk security environment, our MDR services assess and enhance clients’ security maturity. This strategic approach allows us to identify critical areas that require immediate attention, ensuring that security measures are precisely aligned with each organization’s unique needs.

    One of the key tools in our solution set of particular interest to government and educational IT departments is our deployment of a Shared Security Operations Center (Shared SOC). This innovative model allows multiple public sector teams to collaborate, sharing resources and intelligence.

    The Shared SOC not only broadens the scope of threat detection but also enhances the collective response capabilities, significantly strengthening the cybersecurity posture across organizations at a reduced cost of operations. Coincident with deploying a Shared SOC is our approach to addressing the significant gap in skilled cybersecurity professionals.

    Our SOC capabilities include providing supervised on-the-job training (OJT) of client personnel by our experienced MDR specialists, rapidly upskilling new entrants and enhancing the abilities of current team members. This initiative helps overcome the severe shortage in skilled cybersecurity talent and prepares teams to effectively counter and manage evolving cyber threats.

    An example of this model in action is the work we have done with Louisiana State University (LSU ) to set up their cybersecurity infrastructure through a Shared SOC. This collaborative effort between LSU, the university system and the state, has allowed LSU to significantly enhance its threat detection and response capabilities while developing the next generation of cybersecurity talent.

    At TekStream, we’re constantly working with clients to deploy creative solutions to enhance public sector cybersecurity cost effectively. Our goal is simple: to enable organizations to respond to threats while proactively anticipating and managing them.

    The results ensure that public entities are well-equipped to protect their critical digital infrastructures and the services provided to the constituents they serve.

    Securing Tomorrow

    Cyberattacks, like the one we experienced in Fulton County, demonstrate the vulnerability of our digital infrastructures. They disrupt essential services and personal safety.

    As part of a team that works hard to thwart these attacks, my car tag nightmare was a reminder of the importance of the work we do. It’s also a call for all public sector entities like Fulton County to aggressively seek solution partners like us to prevent the massive costs and disruptions that all the citizens of Fulton had to endure.

    To learn more about options to secure your cyber assets, read our guide, The Cybersecurity Paradox: Billions Spent but Breaches Boom. Or contact us for an evaluation of how your organization can cost-effectively secure its applications and better serve its constituents with a customized MDR solution.

  • Best Practices for Writing Efficient Splunk SPL Queries

    Best Practices for Writing Efficient Splunk SPL Queries

    By David Allen, Senior Splunk Consultant

    Data is the lifeblood of any organization, and harnessing its insights is paramount for making informed decisions. In the realm of data analytics, Splunk stands out as a powerful tool for searching, monitoring, and analyzing vast datasets.

    However, as datasets grow in size and complexity, the efficiency of your Splunk Search Processing Language (SPL) queries becomes a critical factor in unlocking the true potential of your data.

    In this blog post, we delve into the art of writing efficient SPL queries—strategies and best practices that not only enhance the speed of your searches but also contribute to a more streamlined and effective Splunk experience. Whether you are a seasoned Splunk veteran or just embarking on your data analytics journey, understanding how to optimize your SPL queries is a valuable skill set.

    In Splunk SPL, data is stored in indexes and the index command is used to specify the index or indexes from which you want to retrieve data. It is best practice to start your query with this command unless you are using another generating command. Here are scenarios and use cases where you would use the index command:

    Data Segmentation

    When your Splunk environment contains multiple indexes, you use the index command to segment your search to a specific index or a set of indexes. This is essential for isolating your search to a particular data source.

    index=your_index sourcetype=your_sourcetype

    Efficient Searches Across Indexes

    If you need to search across multiple indexes, you can use the index command to specify a list of indexes. This is useful when your data is distributed across different indexes based on sources or use cases and ensures that Splunk only scans the relevant indexes, improving the efficiency of your queries.

    index=index1 
    OR 
    index=index2

    Remember that the index command is a fundamental component of SPL and is often used in conjunction with other commands and criteria to tailor searches to your specific needs. Whether you’re conducting ad-hoc searches or building complex queries for monitoring and reporting, incorporating the index command allows you to precisely target and retrieve the data you require.

    After using the index command in Splunk SPL to specify a particular index or set of indexes, you can further refine and reduce the dataset using additional SPL commands and criteria. Here are several techniques to narrow down and focus your search:

    Specify Sourcetype or Source

    After filtering by index, you can refine your search by specifying a particular sourcetype or source. This is particularly useful when you want to focus on a specific type of data within the selected index.

    index=your_index sourcetype=your_sourcetype

    Time Range Restriction

    Limit the search to a specific time range using the earliest and latest parameters. This reduces the volume of data processed, enhancing search performance.

    index=your_index sourcetype=your_sourcetype earliest=-24h latest=now

    Field-Based Filtering

    Utilize field-based filtering to narrow down your search results based on specific field values. This is effective when looking for events that match certain criteria.

    index=your_index sourcetype=your_sourcetype field_name=value

    Combining Commands for Further Filtering

    index=your_index sourcetype=your_sourcetype 
    | stats count by field_name 
    | search count>100 
    | table field_name, count
    

    Advanced Field Filtering with eval

    Use the eval command to create calculated fields that meet specific conditions. This is helpful for advanced filtering based on complex expressions.

    index=your_index sourcetype=your_sourcetype 
    | eval new_field=if(old_field > 100, "High", "Low") 
    | search new_field="High"
    

    Regular Expression (Regex) Filtering

    Use regular expressions to filter events based on complex patterns or substrings. This is useful when you need to match events that follow a specific format. You can use a regex command for example to keep only the results that match a valid email address like [email protected].

    index=your_index sourcetype=your_sourcetype 
    | regex email="^([a-z0-9_.-]+)@([da-z.-]+).([a-z.]{2,6})$"
    

    Splunk Architecture Options

    In this next section we will look at the different architectures in Splunk and how we can take advantage of those architectures to write even more efficient SPL. But first, a little background information explaining the differences between a standalone and distributed environments.

    In Splunk, the terms “standalone” and “distributed” refer to different deployment architectures that organizations can adopt based on their data processing and scalability requirements. Let’s explore the key differences between a standalone and distributed environment in Splunk:

    Diagram comparing Splunk standalone vs. distributed environments, with icons illustrating single vs. multiple host configurations.

    Standalone Environment

    Single Instance:

    In a standalone environment, there is a single Splunk instance. This instance performs all functions, including indexing, searching, and serving the user interface.

    Indexing and Searching on the Same Instance:

    In a standalone deployment, the indexing and searching processes take place on the same machine. This simplicity is beneficial for smaller use cases but can be a limiting factor as data volumes increase resulting in slower SPL execution times.

    Distributed Environment

    Multiple Components:

    In a distributed environment, the Splunk deployment is composed of multiple components, each responsible for specific functions. Common components include indexers, search heads, and forwarders.

    Indexing and Searching on many Instances:

    Since every distributed environment contains more than one indexer and possibly more than one search head, searches can be distributed across all the indexers to effectively run your SPL in parallel on the indexers and each indexer runs the same SPL on its dataset. This results in lightning fast execution times compared to running the same SPL on a Single Instance.

    But this potential gain of the distributed environment can only be utilized if the SPL commands are arranged for maximum efficiency. This is because only certain commands can be run on the indexers and other commands can only be run on the search heads and once one of the search head only commands is reached then all subsequent commands must be run on the one search head which reduces efficiency. Unfortunately, search head commands are not distributed across all search heads in search head cluster environments.

    Distributable Streaming Commands

    This type of command can run on the indexers. Here are the most common distributed streaming commands….

    Graphic listing common SPL transformation commands including eval, fields, rename, replace, and regex.

    But as not all Splunk commands are distributable streaming commands, it is important to make sure that all preceding commands are distributable streaming commands. This will keep the SPL running on the indexers.

    Transforming Commands

    This type of command can only be run on search heads;

    Graphic listing SPL aggregation commands including chart, stats, rare, top, and timechart.

    As you can see in order to accomplish one of these commands the instance running this command must have the entire dataset and once one of these commands is reached, then all the results from the indexers are sent to the one search head which from that point on completes the remaining query regardless of the type of command used.

    So it is important as you write your SPL to run as much as you can on the indexers as long as possible before using a transforming command. Because once a transforming command is used all subsequent commands are run on the search head and the benefit of parallel processing is lost.

    Execution Speed Calculation

    You can always check to see how long it takes to run your search by looking at the Job Inspector. Here is how to do that:

    Screenshot of Splunk’s Job menu with the dropdown options to edit, inspect, or delete a job.
    Screenshot showing job inspector summary indicating 0 events scanned and the query completing in 0.067 seconds.

    In conclusion, mastering the art of writing efficient Splunk SPL (Search Processing Language) is pivotal for unlocking the full potential of this powerful analytics platform. Efficient SPL not only accelerates search performance but also enhances the overall user experience, enabling quick and accurate insights into your data.