Tag: Splunk

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

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

    By David Burns, Senior Soar Engineer

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

    Enhancing Visibility with Customizable Tags

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

    Streamlining Workflows with Tagging

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

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

    Driving Insights with Tag-Based Searching and Reporting

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

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

    Visit our Splunk services page to learn more.

    About the Author

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

  • A Quick Way to Find Substrings in Strings

    A Quick Way to Find Substrings in Strings

    By Jon Walthour, Senior Technical Architect

    Back when I was an Oracle database administrator, one function I often used was INSTR(). In Oracle SQL, the INSTR function could look for a substring inside a larger string and return the position of that substring inside the string. It also allowed me to search for the second, third and fourth occurrence of that substring. There are several techniques you can use in SPL to find a substring in a larger string. These include match() and like(). I find sometimes these functions are insufficient where, say, I want to find if a string contains multiple occurrences of a substring. A quick solution I often use is to leverage Splunk’s multivalue functions.

    First, is “split”. split takes a string and creates a multivalue field from it. Second, is “mvcount”. mvcount takes a multivalue field and counts the number of items in it. Taken together, if you split a string by the substring you are looking for, the count of items in the resulting multivalue field would be 2 if it was found; 1 if it wasn’t. Additionally, if the string you’re looking for is found twice, the result of mvcount would be 3.

    A screenshot of a Splunk "New Search" page showing an SPL query that uses eval, split, and mvcount commands to find and count substrings within a defined string, with the result displayed in the statistics tab.

    This is where using split() and mvcount() together can work better than match() or like(). What if I wanted to find the portion of the string after the second match, with this technique, that’s easy:

    A screenshot of a Splunk search page demonstrating an SPL query using split and mvindex commands to extract a specific substring, showing "reekletters" as the result in the statistics tab.

    To get a count of how many times a substring occurs in a string, you’d just use split() and mvcount() – 1, like this:

    A screenshot of a Splunk "New Search" page showing an SPL query utilizing split and mvcount to calculate the number of substrings within a string, with a result of 2.

    Note that this methodology of using split() and mvcount() works as fast or faster than match() and definitely faster than like().

    So, all together, this method would look like this:

    A screenshot of a Splunk "New Search" page showing an SPL query that uses split, mvcount, and a conditional statement to check for substrings, resulting in "found."

    Finally, to show you how all the INSTR() features, can be realized by this technique, returning the position of the matched string, you could do the following:

    A screenshot of a Splunk "New Search" page showing a complex SPL query that uses split, mvindex, and len functions to find the position of a substring, resulting in "found" at position 20.

    I have endeavored to demonstrate here for you how you can quickly and easily find substrings in strings in the context of “eval” and other evaluation functions that has more flexibility and performs just as fast or faster than the traditionally used functions in this use case, match() and like().

    For more in-depth resources, check out our Resource Center.

    About the Author

    Jon Walthour is an experienced IT professional with over 25 years of experience in administering servers, databases and applications, including over five years of experience helping customers discover success with Splunk as a Splunk Certified Consultant and Enterprise Security Administrator. Jon holds a Bachelors in Psychology from Wright State University in Dayton, Ohio, and a Masters in Divinity from Louisville Presbyterian Theological Seminary. Jon currently resides in Lafayette, Indiana. 

  • When Outsourcing a SOC Makes Sense vs. Augmenting SOC Team

    When Outsourcing a SOC Makes Sense vs. Augmenting SOC Team

    By Hermes Ramos, Splunk Consultant II

    The decision to establish or even augment an internal Security Operations Center (SOC) versus outsourcing SOC services involves various factors, including costs, expertise, control, and specific organizational needs as well as strategic objectives. Here are some considerations for when outsourcing a SOC makes sense versus establishing or augmenting an existing SOC team:

    Cost

    Limited Budget: With budgetary constraints, economic challenges, staff salaries, training, and benefits organizations will find it challenging to invest in the infrastructure, tools, and personnel required for an in-house SOC.

    Establishing a more comprehensive and mature security posture often involves higher initial and ongoing investments as the choice of security tools and technologies, such as SIEM, intrusion detection systems, and endpoint protection, can impact costs. Advanced solutions often come with higher price tags for augmenting an existing SOC team.

    Outsourcing is a more cost-effective solution with faster adoption with relatively quick deployment of security services without the lead time associated with hiring and training an internal team.

    Expertise and Skill

    The lack of internal expertise required to manage and operate a SOC effectively, or the existing SOC team increasing gaps due to the cost of security tools and technologies as well as the time constraints of mastering such tools can leave your organization vulnerable to security threats.

    Outsourcing provides access to a specialized team of security professionals with the time to maintain the rigorous ongoing training to keep up with the industry and security challenges without compromising the security posture of your organization.

    24/7 Coverage

    In today’s fast-paced and interconnected digital landscape, the importance of robust security operations cannot be overstated. As organizations increasingly rely on technology to drive their operations, the need for comprehensive security measures including: Proactive Threat Detection, Incident Response and Mitigation, Endpoint Security, IDPS, Compliance with Regulations, and others are extremely vital for the security of any organization 24/7/365.

    To ensure the continuous monitoring needs and enforcement of the needed security measures outsourcing often provides 24/7/365 monitoring and response capabilities in comparison to the challenges in maintaining an internal team working around the clock.

    Scalability

    For most organizations the fluctuating security needs can be very challenging on the business goals and engineer workforce, where outsourcing allows for scalable services. By outsourcing your SOC, you can adjust resources based on growth-demand, ensure compliance with industry regulations and standards effortlessly, and provide flexibility that may be challenging for an in-house team.

    An in-house SOC team might be able to provide some control and customization, knowledge of internal systems, and integration with business operations. In reality, after working on a few In-house SOC teams and outsourcing SOC, I have found even these benefits can be challenging as the control is often limited to be effective and the internal systems knowledge is often siloed between system owners and organizational departments.

    By outsourcing the cybersecurity functions, organizations can benefit from a cost-effective solution that eliminates the need for substantial upfront investment, scalable services allowing you to adapt to the dynamic nature of cybersecurity challenges, the expertise of security professionals, access advanced security technologies, and ensure a proactive and responsive approach to emerging threats, ensuring that your organization remains secure and compliant with industry regulations.

    Read more about Security and SOC topics here.

    About the Author

    Hermes Ramos is a highly motivated and detail-oriented technology professional with over twelve years of experience in Security Vulnerability Management and SIEM. His expertise spans Splunk Enterprise On-Prem Architecture, Splunk ITSI, Splunk ES, and Cloud Security Architecture, along with a solid foundation in Security Compliance, Networking Security, and PCI-DSS Risk Mitigation. Throughout his career, Hermes has successfully navigated diverse industry landscapes, including Banking, Healthcare, Government, and various Private Corporations. Notably, he optimized the Splunk architecture at GE Corp., reducing costs associated with AWS cloud services while supporting their Enterprise Security Deployment and ITSI implementation. 

    Currently, Hermes is focused on ensuring the successful architecture and deployment of Splunk ES for TekStream customers, emphasizing Security Compliance and vulnerability management. His work includes enhancing the cybersecurity posture of Austin Independent School District in Austin Texas and San Jacinto College in Houston, Texas. Dedicated to continuous improvement and innovation, Hermes stays current with the latest Cybersecurity/SIEM developments and integrates cutting-edge advancements. Recognized for his exceptional expertise, he was invited to speak at the Splunk Conference in Las Vegas in June 2024 about SPL2 and the Splunk Edge Processor. 

  • Threat Intelligence Framework functions in Splunk ES

    Threat Intelligence Framework functions in Splunk ES

    By Kamal Dorairaj, Senior Splunk Consultant

    Overall Framework

    In the Splunk Enterprise Security App, navigate to Configure -> Data Enrichment -> Threat Intelligence Management. Here, you’ll find a variety of out-of-the-box threat intelligence sources. Enabling any of these sources triggers a process where a Modular Input downloads and integrates them into the KV Store. Subsequently, various searches extract this data for use in threat lookups, which are then utilized in threat intelligence correlation searches and threat intelligence dashboards.

    Enabling Threat Source and Threat Matching

    To activate threat intelligence, go to ES -> Configure -> Data Enrichment -> Threat Intelligence Management. Enable relevant threat sources for your organization. Next, navigate to the “Threat Matching” tab.

    Within Threat Matching, you can view CIM fields from data models that are checked for matches against IOCs from the threat intel lookups. When a match is found, an event is written in the threat_activity index which also populates the Threat_Intelligence data model. The `Threat Activity Detected` Correlation search will then trigger a notable.

    Threat Intel Collections

    All data onboarded from Threat Intel feeds in Step 1 flows into the nine supported threat intel collections in ES. To view these collections, navigate to Settings -> Advanced Search -> Search Macros and search for “all_threat_intel”:

    `email_intel` | `file_intel` | `process_intel` | `registry_intel` | `service_intel` | `user_intel` | `http_intel` | `ip_intel` | `certificate_intel`

    These macros represent the IOC collections. You can inspect the contents of each collection using commands like:

    | inputlookup ip_intel

    or

    | inputlookup file_intel | stats count by threat_key

    For details on the fields supported by each collection, visit Settings -> Lookups -> Lookup Definitions and search for the respective collection (or search for *_intel). Only the supported fields defined for each collection will be utilized in the framework.

    For details on the fields supported by each collection, visit Settings -> Lookups -> Lookup Definitions and search for the respective collection (or search for *_intel). Only the supported fields defined for each collection will be utilized in the framework.

    To enable the out-of-the-box threat intelligence correlation search, navigate to Configure -> Content -> Content Management. Select “Correlation Search” from the “type” dropdown menu and filter for “Threat Activity Detected”.

    Once this search is enabled, any identified IOCs will automatically trigger a notable event. To review the resulting incidents, proceed to Incident Review and filter for “Threat Activity Detected” to display a list of alerts generated by the correlation search. Expand any specific incident alert and click on “Contributing Events” located on the right side to access detailed information.

    Threat Dashboards

    Threat Activity and Threat Artifacts are two essential threat intelligence dashboards in ES. To access these dashboards navigate to Security Intelligence -> Threat Intelligence and chose either `Threat Activity` or `Threat Artifacts`.

    Note that these dashboards utilize the Threat_Intelligence data model, which is populated by the threat_activity index.

    Custom Threat Source

    You can also upload custom threat sources into the framework. Ensure that the fields in your CSV file correspond with those in the nine collections; any mismatches will be ignored.

    When debugging threat intelligence, two log sources found with the following query are particularly useful:

    index=_internal source=”*threat*”

    The logs of interest are threatmatch.log, which monitors the state of threat matching work, and threatlist.log, which tracks the onboarding of threat lists. When reviewing these logs, the status field will display their respective phases.

    There are threat match lookup generating searches that separate out the data in the nine collections into match lookups. We can see those lookups here. 

    Settings -> Lookups -> lookup definitions 

    Clear the filters and search for threatintell_by 

    These lookups are used with the threat match searches that we looked at the Step3. 

    This completes the overview of the data flow of threat framework in Splunk ES.

    Threat Intelligence Framework:

    https://dev.splunk.com/enterprise/docs/devtools/enterprisesecurity/threatintelligenceframework

    MISP Integration:

    https://conf.splunk.com/files/2020/slides/SEC1579C.pdf

    https://www.splunk.com/en_us/blog/security/integrating-covid-or-any-threat-indicators-with-misp-and-enterprise-security.html

    Reference Upload (#2):

    https://lantern.splunk.com/Security/Product_Tips/Enterprise_Security/Using_threat_intelligence_in_Splunk_Enterprise_Security

    Use Cases:

    https://research.splunk.com/detections

    Threat Intel API Reference:

    https://docs.splunk.com/Special:SpecialLatestDoc?t=Documentation/ES/latest/API/ThreatIntelligenceAPIreference

    Adding threat intel:

    https://docs.splunk.com/Documentation/ES/7.0.1/Admin/Addthreatintel

    Add threat intel from events:

    https://docs.splunk.com/Documentation/ES/7.0.1/Admin/Addthreatintelfromevents

    Change Threat intel:

    https://docs.splunk.com/Documentation/ES/7.0.1/Admin/Changethreatintel

    Customize/Create Threat Matching:

    https://docs.splunk.com/Documentation/ES/7.1.0/Admin/Createthreatmatchspecs

    Add-ons and conf links:

    https://www.splunk.com/en_us/blog/security/integrating-covid-or-any-threat-indicators-with-misp-and-enterprise-security.html

    https://www.splunk.com/en_us/blog/security/how-do-i-add-covid-threat-intelligence-from-the-internet-to-enterprise-security.html

    https://splunkbase.splunk.com/app/4335

    https://conf.splunk.com/files/2020/slides/SEC1579C.pdf

    https://www.splunk.com/en_us/blog/security/threat-intel-and-splunk-enterprise-security-part-1-what-s-the-point-of-threat-intel-in-es.html

    Mission Control:

    https://www.youtube.com/watch?v=K9D2_Ar9biA

    https://docs.splunk.com/Documentation/MC/Current/Detect/Intelligence

    Learn more about our Splunk managed services.

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

    I welcome opportunities for new challenges and creative thinking. I am a lifetime learner, continue to learn new technology and skills quickly, and apply them to solve real problems and drive to innovate. 

  • Splunk Users Beware: How Small Sourcetype Errors Cause Big Data Problems!

    Splunk Users Beware: How Small Sourcetype Errors Cause Big Data Problems!

    By David Allen, Senior Splunk Consultant

    Splunk excels in processing provided information effectively, yet incorrect settings can lead to significant complications. Splunk users must proceed cautiously, considering long-term implications, particularly when configuring sourcetype settings.

    In this blog I will show what happens when what appears to be “very” small REGEX issue can cause one quarter of the events to disappear and flagging many timestamp parsing issues.

    Date Configuration Issues

    This issue manifested itself as a Data Quality / Timestamp Parsing Issue. The Timestamp Parsing issue showed up at the beginning of every month and lasted until the 10th of the month and corresponded with a significant drop in the number of events at the beginning of each month.

    Notice in the graph to follow that there are approximately 200,000 events per hour on Sunday, March 31. Then the count dropped to less than 5000 per hour at the beginning of April 1.

    Splunk event timeline showing drop-off in data ingestion on April 1 due to sourcetype misconfiguration.

    Now you might be thinking “What is the big deal – this could be real data” and that is true. But it is suspicious, and it did also flag many Timestamp Parsing issues. So first, let’s look at the LINE_BREAKER and see if it is setup correctly.

    Here are the events on March 31 where the LINE_BREAKER is working correctly….

    DHCP log events from March 31 with missing or default values, highlighting inconsistent data patterns.

    Here is 1 event on April 1 since the LINE_BREAKER does not work for these events.

    April 1 Splunk log entries showing malformed and duplicated log formatting due to sourcetype errors.

    Here is the original LINE_BREAKER regex. See how it does not work for events on April 4 but works just fine for March 31. Why is this? Look closely at the regex and see if you can figure it out.

    Splunk regular expression test failing to match inconsistent timestamps from malformed log events.

    Did you catch the error? The error is with the whitespace “s” as shown below…

    Highlighted regex pattern with incorrect whitespace matching, causing sourcetype parsing failures.

    This whitespace regex only allows for ONE whitespace character in front of the date which is correct when there are two digits in the date of the month (10-31). However, when there is only 1 digit for the date of the month then this REGEX does not work for the LINE_BREAKER setting.

    By allowing for more than 1 whitespace character in the REGEX below we can see the issue is fixed.

    Updated regular expression successfully matching all intended log entries across multiple dates.

    Now we have a valid LINE_BREAKER REGEX. Let’s look at why the Timestamp parsing issue showed up on the Data Quality screen.

    The Splunk time format documentation shows that there are two settings for the date.

    Reference table comparing %d and %e for parsing day of month in timestamp formats.

    In our example, the setting was mistakenly set to %d instead of %e. One might think such an error would be obvious upon reviewing the data. However, it’s important to consider that the initial date setting might have been chosen during a mid-month period with a limited dataset where everything appeared to function correctly during ingestion. This assumption typically holds true in most cases, around 99% of the time. Waiting until the start of the month to observe date behavior might not always be practical, but analyzing events spanning an entire month should provide sufficient data to select the correct setting.

    Putting it all together…. Here is the original sourcetype definition with the incorrect LINE_BREAKER and TIME_FORMAT….

    Incorrect Splunk props.conf configuration using %d in TIME_FORMAT, leading to timestamp mismatch.

    Here is the corrected sourcetype definition. Notice the %d was changed to %e and the whitespace REGEX in front of the date has been changed to allow for more than 1 character.

    Updated props.conf using %e and fixed whitespace in LINE_BREAKER for accurate event parsing.

    The above changes were implemented on April 3rd, and you can see below the event count returning back to the 200,000 per day count.

    Splunk event timeline showing recovered data visibility starting April 3 after sourcetype correction.

    Remember the April 1 event that many events all clumped together? Here is what the events look like on April 4th.

    Log data showing timestamp formatting with inconsistent spacing in Splunk event logs.

    Hour Configuration

    Similarly, incorrect configuration of the hour setting can impact the LINE_BREAKER if the hour is part of the LINE_BREAKER regex. Even if events are correctly segmented, an incorrect hour setting in the TIME_FORMAT can prevent Splunk from identifying the timestamp within the event, resulting in a timestamp parsing error. Splunk will then resort to alternative methods to calculate the timestamp.

    To setup the hour correctly for the TIME_FORMAT setting, Splunk has the following setting options available…

    Table comparing timestamp format specifiers %H, %I, and %k for 24-hour and 12-hour clocks in Splunk.

    You will notice that the %H and the %k for the hour are like the %d and %e for the date. So ingesting events in the afternoon (hours 12 – 23) and not checking what the AM hours are set at could be a problem.

    The %I is always a 12-hour clock which can optionally take either a leading 0 but never a leading space. This setting always uses the %p to signify am or pm.  Never use a %H or a %k with a %p.

    Conclusion

    This blog has illuminated the significant repercussions of minor configuration errors within Splunk, particularly in relation to sourcetype settings. The example provided vividly illustrates how overlooking nuances in the LINE_BREAKER regex and TIME_FORMAT settings can lead to substantial disruptions in data interpretation and analysis. This was evident from the drastic reduction in event counts at the beginning of each month, directly linked to erroneous configurations. By promptly addressing these issues, such as adjusting the LINE_BREAKER regex to accommodate varying date formats and correcting the TIME_FORMAT setting the integrity of data processing was swiftly restored. This scenario underscores the critical importance of meticulous configuration management in Splunk deployments, emphasizing the need for thorough testing and validation to ensure consistent and reliable data insights.

    Learn about our Splunk managed services.

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

  • The Elephant in the Room: Cybersecurity Can be Expensive

    The Elephant in the Room: Cybersecurity Can be Expensive

    By Rob Jansen, Chief Executive Officer

    8 Steps to Evaluate New Cybersecurity Proposals 

    It is time to address the elephant in the room: cybersecurity can be expensive. Choosing new or expanded coverage will always include decisions on platform, product & scope selection, the price of the program and the company you trust to implement. This article outlines eight key considerations to a confident and informed decision on the next iteration of your cybersecurity program.  

    Alignment with Business Objectives 

    Consider the threat landscape in your industry and the sensitivity of the data your firm will protect. Vulnerability analysis (the current state of your security program), pen testing, remediation priorities and overall resilience round out a comprehensive risk assessment framework. With this clarity, validation will ensure that protection materializes as designed and other assets that maintain or re-establish operations are in place.  

    Technology Stack Compatibility 

    Ensure the new program is compatible with your current technology stack, including network infrastructure, cloud services and ERP. Leverage technologies like SIEM and SOAR to streamline processes and reduce manual workload. Automation and orchestration decisions at inception will save time later, so consider their ability to integrate with your stack. 

    Incident Response Planning 

    In the event of a breach, successful recovery is dependent upon adhering to well-designed plans that invoke validated backups. Ensure the new program includes playbooks with detailed incident response plans for use cases like ransomware, insider threats and the like. Regular tests and simulated breaches can ensure the team is prepared. And a post-incident review protocol ensure learning and improvement will occur. This ongoing planning and refinement is practice for the event you hope never happens. 

    Monitoring and Threat Intelligence 

    How does the new cybersecurity program implement tools and processes for real-time detection of suspicious activities? Chiefly, actionable intelligence is collected to stay ahead of emerging threats and refine defenses proactively. Managing a cybersecurity portfolio to deliver point-in-time resilience requires clear policies, plans, processes and capabilities that protect against the most recent evolution of threats. The managed services provider you choose will be key to your threat intelligence success. 

    Program Metrics and Continuous Improvement 

    Metrics matter. Track KPI’s such as incident response time, mean time to detect (MTTD), and mean time to resolve (MTTR) for performance clues. Use the metrics in feedback loops among the team and use the lessons learned to continuously refine processes, policies and technologies. Equipping the team with success metrics and enabling them to improve and enhance in real time builds stability and loyalty. 

    Ask potential MSPs about their shift left focus, as this will indicate the value they place on speed, preparation and early detection. By shifting efforts earlier in development to find “pre-attack behaviors” using the MITRE ATT&CK matrix, your cybersecurity will be proactive and not reactive. Advanced providers view this as a vital investment up front. Your DevOps team will be glad to integrate this posture into their new and developing applications.  

    Future-Proofing 

    Stay informed about advancements in cybersecurity, such as zero-trust architectures, AI-driven threat detection and quantum-resistant encryption. Emerging technology can help your security team adapt to new trends and challenges, such as remote work or edge computing. Your cybersecurity program must have a view of the future to be successful in the present, and the ability to modernize in step with technological advancements insures for changes in the future. 

    Vendor and Partner Relationships 

    An advanced-skill managed service provider will implement any cybersecurity program on time and within budget. That skill is earned over time, and often not about any relationship with the sales team. A record of successful deployments and proven technical expertise will be demonstrated in their approach to data ingestion, configuration time, ready-to-use correlation searches and automated playbooks.

    A true partner will show willingness to collaborate with your team using clear communication protocols established at onset. Training, shared workloads and resource allocation will be flexible and will meet your needs, not theirs. The best MSP’s share the workload with your experienced team, and train to match. Look for the best implementation partner in the industry, and make sure their credentials are validated with the software firm in consideration.  

    Cost Management 

    And that brings us back to the elephant in the room. Your firm will incur license and ingest expenses. The combination of platform and partner will influence total cost of ownership significantly. Best in class cybersecurity can be affordable when the MSP effectively and efficiently configures your data and your protocols. Cheap programs beget cheap security; knowing where gaps exist and weighing low data security against the risks your firm is willing to take can aid in your provider selection.  

    Breaches will happen. The ability to quickly detect, respond and remediate them is the difference between successful cybersecurity and a costly, public incident. Repairing your systems and your reputation will be more expensive if your cybersecurity program isn’t properly implemented. The investment you make in your cybersecurity platform will determine how expensive any breach will be. 

    Cybersecurity is an expense on your income statement, but it doesn’t have to be burdensome. Your firm can afford best-in-class security when coupled with detection/response/remediation work from the most experienced MSP you can find. The categories presented here will help you determine if their combined experience and capabilities are a true fit for your firm. 

    Read more about TekStream Security Services.

    About the Author

    As Chief Executive Officer and President, Rob leads daily business operations and oversees the development and execution of the Company’s growth strategy and initiatives. Rob has been in the information technology sector for nearly 15 years providing leadership, consulting and implementation services to leading Fortune 1000 clients. Working with his team of industry-leading executives, Rob oversees all TekStream practice areas and functional disciplines including sales, solution development, and client delivery.  

    Prior to founding TekStream, Rob was Vice President of Sales for Enterpulse/Idhasoft and responsible for forging and managing the strategic alliances of the company, including Oracle, and for selling the solutions which Enterpulse/Idhasoft implemented for its clients. In addition, Rob was responsible for managing and maintaining the company’s sales forecast and serving on an executive team to manage the company’s strategic decisions for sales growth, resource investments, and operational strategy including the profit and loss report. In this capacity, Rob’s leadership allowed Idhasoft to grow revenues at over 220% from 2009-2010 and increased profitability to allow for the continued investment in people, systems and processes to support the organization’s growth. Prior to joining Enterpulse/Idhasoft, Rob spent over 7 years with Plumtree Software and BEA Systems, Inc. (acquired by Oracle, Inc.) in a variety of roles including Southeast Area Sales Manager, Sales Engineering Lead and Implementation Manager, where he provided license sales, process and technical consulting services for the design, development, and implementation of business solutions. During this time, Rob had the opportunity to work with startup, regional and global companies including the American Cancer Society, ExxonMobil and Proctor and Gamble.  

    In addition, Rob was part of the Management Consulting practice of PriceWaterhouseCoopers, where he helped global organizations design and develop Enterprise Resource Planning (ERP) solutions using SAP. Rob received a Bachelor of Science in Systems Engineering with a minor in Management Information Systems (MIS) from the University of Virginia. Rob currently resides in Atlanta with his family. 

  • Running Searches Using Splunk’s REST API: Part Two 

    Running Searches Using Splunk’s REST API: Part Two 

    By Jon Walthour, Senior Technical Architect

    In Part One of this blog, I discussed Splunk’s REST API interface and how it can be used to run searches against Splunk event data. In Part One, I demonstrated how to interact with the Splunk REST API to run searches using the Linux cURL app. In Part Two, I’ll take a dive into how to run searches via the REST API utilizing Python.

    For interacting with Splunk through Python, Splunk provides a SDK to abstract some of the more basic methods for Splunk interaction. Mind you, the SDK is not necessary to successfully interact with Splunk via REST and Python, but it does make that interaction much easier. 

    Setting Up Your Development Environment

    So, let’s first set up our development environment. Using your git tool of choice, clone the Splunk Python SDK from here: https://github.com/splunk/splunk-sdk-python.git. As of the current 2.0.1 release, you’ll also need to install into your Python libraries if you don’t already have it the Python deprecation modules. Once you’ve done those two things, you can cp the “splunklib” directory and contents out of the “splunk-sdk-python” folder as that is all you need from it. What I do on a Linux host is to run the following in an empty directory: 

    git clone https://github.com/splunk/splunk-sdk-python.git 
    cp -R splunk-sdk-python/splunklib . 
    pip install deprecation 

    and I’m ready to go.

    Now, in our new development context, open new Python (.py) file. We’ll need to start by importing two modules in the Splunk Python SDK “splunklib”, client and results.

    import sys 
    import splunklib.client as client 
    import splunklib.results as results 
    from time import sleep 

    The “client” module provides objects and collections for authenticating to and interacting with a Splunk instance over its management port (default port 8089). The “results” module provides a reader for streaming results in CSV, JSON or XML to a client’s environment from the Splunk search head. For running adhoc searches, these are the only two modules we’ll need. 

    Once we’ve got all the Python, we’ll need imported, we start by authenticating to our Splunk search head by creating a “service” object using the “client” module. As we did when using curl in Part 1 of this blog, we can authenticate with either a username and password or with an Oauth token. The username/password formulation of the “service” object creation looks like this: 

    service = client.connect(host='{Splunk search head}', port={management port}, username='{username}', password='{password}') 

    For OAuth token authenticataion, we utilize the parameter “splunkToken” like this: 

    service = client.connect(host='{Splunk search head}', port={management port},  splunkToken='{OAuth token}') 

    Going forward, this service object will be our portal into the Splunk search head. Next, we want to instantiate an instance of the “job” class in the “client” module, create A variable to hold the contents of our search string and a couple of dictionaries to pass in parameters for our search and for retrieving the output of the search like so: 

    jobs = service.jobs 
    search = 'search index=_internal sourcetype=splunkd | head 5' 
    kwargs_search = {'exec_mode': 'normal'} 
    kwargs_results = {'output_mode': 'json', 
      'count': 0 
      } 

    Executing A Search In Splunk

    As we discussed in Part 1, there 4 modes for executing a search in Splunk–normal, blocking, oneshot and export. A “normal” search is one that gets submitted to Splunk for execution by the Scheduler, the search is run asynchronously by Splunk and the results are stored on the search head for our later retrieval labelled by a “search ID” or “SID”. So, when coding for a “normal” search, we submit the job and are returned a SID by Splunk. This SID is stored in our instance of the job class. As with our curl example in Part 1, our code polls Splunk regularly waiting for the job to be in a “DONE” state so we can retrieve the results. While the search job is being completed, our code sits in a “while” loop. When the job is done, our code continues to retrieve the results. That would all look like this: 

    job = jobs.create(search, **kwargs_search) 
    
    print("nWaiting for the search to finish...") 
    
    while True: 
      while not job.is_ready(): 
        pass 
      if job["isDone"] == "1": 
        print("nDone!n") 
        break 
      sleep(2) 

    Once the search has completed, we can retrieve the results, in either XML, JSON or CSV formats. For JSON output, which is my personal preference for its ease of use, we instantiate a special class in the results module called “JSONNResultsReader” like this: 

    result_stream = job.results(**kwargs_results) 
    for result in results.JSONResultsReader(result_stream): 
        print(result) 

    To output results in XML or CSV, we utilize the read function in the results module: 

    kwargs_results = {'output_mode': 'xml', 
      'count': 0 
      } 
    
    result_stream = job.results(**kwargs_results) 
    print(result_stream.read()) 

    or 

    kwargs_results = {'output_mode': 'csv', 
      'count': 0 
      } 
    
    result_stream = job.results(**kwargs_results) 
    print(result_stream.read()) 

    That’s the basic flow of running a Splunk search in Python and returning results. There are a couple of helpful caveats to consider, though. We’ve only talked about the “normal” execution mode so far, but for most circumstances, the “blocking” mode or “oneshot” mode can prove a better choice as the “job.create” call won’t return until the job has completed. The “oneshot” approach can be more efficient here, since it only makes one roundtrip to the server to run the search and return the results. By contrast, once a “blocking” search you still have to retrieve the results. However, with a “blocking” search, the results are stored on the search head and can be retrieved again and again for the life of the search. If a oneshot search fails, you have to resubmit it. It also doesn’t handle large resultsets well due to its only making one trip. Therefore, use a “blocking” search for searches that could return a larger resultset and use oneshot only when you’re going to be returning a few results. A oneshot search would look like this: 

    search = 'search index=_internal sourcetype=splunkd | head 5' 
    kwargs_results = {'output_mode': 'json', 
      'count': 0 
      } 
    
    results = results.JSONResultsReader(service.jobs.oneshot(search, **kwargs_results)) 
    for result in results: 
        print(result) 

    For searches you expect to return more than a few results, I’d recommend using a blocking search, where the job created doesn’t return until the job has been scheduled and run. That would look like this: 

    import sys 
    import splunklib.client as client 
    import splunklib.results as results 
    from time import sleep 
    service = client.connect(host='{Splunk search head}', port={management port}, username='{username}', 
    password='{password}') 
    # or use an Oauth token like this: 
    # service = client.connect(host='{Splunk search head}', port={management port},  splunkToken='{OAuth 
    token}') 
    jobs = service.jobs 
    search = 'search index=_internal sourcetype=splunkd | head 5' 
    kwargs_search = {'exec_mode': 'blocking'} 
    kwargs_results = {'output_mode': 'json', 
      'count': 0 
      } 
    job = jobs.create(search, **kwargs_search) 
    result_stream = job.results(**kwargs_results) 
    for result in results.JSONResultsReader(result_stream): 
        print(result) 

    Using Pagination for Large Result Sets

    One final technique to review: pagination. Sometimes you want to run a search and retrieve the results in batches. This is especially useful for very large result sets where you want to avoid filling up buffers. To do this in the results retrieval portion or a normal or blocking search, you would add an offset to the results parameters dictionary like this: 

    numResults = int(job["resultCount"]) 
    offset = 0 
    count = 10 
    while offset < numResults: 
      kwargs_results = {'output_mode': 'json', 
       'count': count, 
       'offset': offset 
       } 
    
      result_stream = job.results(**kwargs_results) 
       for result in results.JSONResultsReader(result_stream): 
       print(result) 
    
    # Increase offset by count 
    offset += count 

    Here you have it: How to interact with Splunk’s REST API to run searches through the Linux command line and cURL and via Python and the Splunk SDK for Python. These are by no means the only ways to intersect with Splunk in code. There are also the Splunk SDKs for Java, JavaScript, Go, Node JS, C#, php, Ruby and iOS and Android Xamarin for Splunk Mint (mobile intelligence). If you have any questions, comments or suggestions, I’d love to hear from you at jwalthour@tekstream. If my words here have helped you to see the expertise the whole TekStream team brings to Splunk, reach out to us at the form provided below. 

    Read more about TekStream Splunk services.

    Missed Part 1? Read Running Searches Using Splunk’s REST API: Part One.

    About the Author

    Jon Walthour is an experienced IT professional with over 25 years of experience in administering servers, databases and applications, including over five years of experience helping customers discover success with Splunk as a Splunk Certified Consultant and Enterprise Security Administrator. 

    Jon holds a Bachelors in Psychology from Wright State University in Dayton, Ohio, and a Masters Divinity from Louisville Presbyterian Theological Seminary. Jon currently resides in Lafayette, Indiana. 

  • Running Searches Using Splunk’s REST API: Part One

    Running Searches Using Splunk’s REST API: Part One

    By Jon Walthour, Senior Technical Architect

    One of the best things I like about Splunk is its flexibility. Splunk is like Legos; you can build just about anything you want with it. What comes with that flexibility is the ability to do just about anything in Splunk outside the web UI and command-line interfaces via Splunk’s REST API. Via the REST API, I can do anything I want in Splunk. If I cannot do it natively, I can always write a custom endpoint in Splunk to make it possible. Today, let me show you a common and straightforward way to use Splunk’s REST API to run a search and retrieve the results. I’ll show you two approaches to doing this–via cURL, Linux’s command-line tool for sending and receiving data with remote systems via URLs, and via Python, using Splunk Python SDK.

    Generally, we will hit the Splunk REST endpoint for running search jobs, “/services/search/v2/jobs”. You could also use “/services/search/jobs,” but this endpoint is deprecated and will eventually no longer work. We’ll pass in some credentials, either a username and password or an OAuth token created in Splunk via “Settings” > “Tokens” (note, this is not a HEC token). Finally, we’ll pass in our search via a POST to the REST endpoint. 

    Four Modes

    There are four modes in which we can execute these searches. The first three are called an “execution mode,” and the fourth is an appendage to our endpoint. They are “normal” mode, “blocking” mode, “one-shot” mode, and “export” mode. A normal search runs asynchronously. It returns a search job immediately. Poll the job to determine its status. You can retrieve the results when the search has finished. You can also preview the results if “preview” is enabled. Normal mode works with real-time searches. A blocking search runs synchronously. It returns a search job once the search has finished, so there is no need to poll for status. Blocking mode doesn’t work with real-time searches. A one-shot search is a blocking search that is scheduled to run immediately. Instead of returning a search job, this mode returns the search results once completed. Because this is a blocking search, the results are available once the search has finished. Normal and blocking searches work with the search job scheduler, create search IDs (SIDs), and save results on the search head that can be retrieved later upon request. Oneshot searches run immediately without the job scheduler and stream the results back immediately, meaning they are not saved on the search head, and if the stream is interrupted for any reason, the results are not recoverable without rerunning the search. 

    Export Mode

    The fourth mode, “export” mode, is a mode of running a one-shot search so its output is formatted for easy use in other contexts. What I mean is that a normal, blocking, or one-shot search returns extra fields along with the results to detail such things as the indexer and index bucket the event came from, the time the event was received by that indexer, and the subseconds of the event’s timestamp. Export search results do not have these extra metadata fields, only the result’s serial number (order in the result set), the time of the event, the event’s host, source and sourcetype, the index, and indexer from which the event came along with the event itself. Not all these fields would be present in a transforming search, like one that uses the “stats” command. 

    So, let’s start with a basic search run via curl–but first, a few notes on the structure of these REST calls. 

    You must authenticate to a Splunk search head to use these REST endpoints. This will either be a username and password or a Splunk Oauth token. While you can technically run a search on an indexer, you will only get results from the index buckets stored on that indexer. So, you authenticate to a search head connected to several indexers to get complete results. Finally, you authenticate to Splunk’s management port, port 8089 by default. This is the port Splunk listens on for these sorts of communications. Don’t try to use the web UI port, which is usually port 8000; it won’t work. 

    curl -s -k -u {username}:{password} https://{Splunk search head}:{management 
    port}/services/search/v2/jobs  
        -d search="search index=_internal sourcetype=splunkd | head 5"  
        -d earliest_time="-7d"  
        -d earliest_time="-7d"  
        -d namespace="search"  
        -X POST 
        

    Now, let’s deconstruct our curl command. All these elements will be present in any approach you use to run a search on Splunk. Note that all these elements are passed as data elements in the HTTP request. To learn more about any of them, consult Splunk’s online documentation. 

    – “search” – the content of the search to be run by Splunk 

    – “earliest_time” – the earliest time a search can look back to retrieve event data. If this is not included, Splunk defaults to the beginning of Epoch time, January 1, 1970, 12:00:00 AM UTC. 

    – “latest_time” – the latest time a search can look to retrieve event data. If this parameter is not included, Splunk defaults to “now,” which is the time the search is run. 

    – “namespace” – the app context in which the search is to be run 

    This curl command would submit the search to Splunk and return a search ID (sid). To get the search results, we’d run a second curl command hitting the same REST endpoint with the SID appended to it. This will return details about the search along with its status, whether done or not, in a field called “dispatchState.” 

    curl -s -k -u {username}:{password} https://{Splunk search head}:{management 
    port}/services/search/v2/jobs/{search id} | grep dispatchState 

    The value of “dispatchState” will be one of the following: QUEUED, PARSING, RUNNING, FINALIZING, DONE, PAUSE, INTERNAL_CANCEL, USER_CANCEL, BAD_INPUT_CANCEL, QUIT, FAILED. We’re looking for “DONE”. Once in that “DONE” state, we run a third curl command to retrieve the results stored on the search head. 

    curl -s -k -u {username}:{password} https://{Splunk search head}:{management 
    port}/services/search/v2/jobs/{search id}/results  
    -d output_mode="json" 

    The “output_mode” parameter tells Splunk how to display the output. It can be either “xml” (the default), “json,” or “csv.” 

    When the results stream back, they are in one long stream of structured json. If the layout of these results matters to you, this is where “export” mode comes in. Again, “export” is not a data parameter. With the “export” endpoint, results are outputted in a layout of one event per line. Especially with “json” and “csv” output modes, utilizing this “export” mode layout can be handy. Additionally, I usually run these “export” searches with the “oneshot” exec mode. This runs the search immediately, outside the Splunk Scheduler. However, this also means no results are stored on the search head. So, if something happens to interrupt the search, it will need to be rerun. 

    curl -s -k -u {username}:{password} https://{Splunk search head}:{management 
    port}/services/search/v2/jobs/export  
        -d search="search index=_internal sourcetype=splunkd | head 5"  
        -d exec_mode="oneshot"  
        -d earliest_time="-7d"   
        -d latest_time="now"  
        -d output_mode="json"   
        -X POST 
         

    Finally, let me cover Splunk’s OAuth tokens in this first part of this blog. There are circumstances where you don’t want to store a password in clear text, which could be used by a bad actor to log into Splunk UI. You could instead use a token. Creating and managing Splunk OAuth tokens are topics beyond the scope of this blog article, but you can use them in place of the username and password when constructing the curl command. The token also goes in the header of the HTTP request. Using a token, called a “Bearer” token, our example search would look like this: 

    curl -s -k https://{Splunk search head}:{management port}/services/search/v2/jobs  
        -H "Authentication: Bearer {OAuth token}"  
        -d search="search index=_internal sourcetype=splunkd | head 5"  
        -d earliest_time="-7d"  
        -d namespace="search"  
        -X POST
        

    Notice that we no longer pass in the username/password with the “-u” option. Rather, we have a new header parameter passing in the Bearer token, that long 442-character string, to Splunk for authentication. With Splunk’s REST API, you can always use OAuth Bearer tokens instead of username/password combinations. 

    That’s it for this month. In the coming months, Part 2 of this blog article will explain how to use Splunk’s Python SDK to do all this and more with the Splunk REST API. 

    Read more about TekStream Splunk services.

    About the Author

    Jon Walthour is an experienced IT professional with over 25 years of experience in administering servers, databases and applications, including over five years of experience helping customers discover success with Splunk as a Splunk Certified Consultant and Enterprise Security Administrator. 

    Jon holds a Bachelors in Psychology from Wright State University in Dayton, Ohio, and a Masters in Divinity from Louisville Presbyterian Theological Seminary. Jon currently resides in Lafayette, Indiana. 

  • What is a SOC and Why Is It Essential for Proactive Threat Detection and Response?

    What is a SOC and Why Is It Essential for Proactive Threat Detection and Response?

    A command center overseeing security issues is at the heart of an organization’s operations. This security operations center (SOC) employs a team of cybersecurity experts, technology, and processes to protect a company from cyber attacks.

    But what is a SOC in cybersecurity? Like a gatekeeper, this centralized unit monitors an organization’s networks, servers, and endpoints 24/7, gathers threat intelligence, deals with incidents, minimizes damage, and provides security reports for compliance. In short, the SOC detects, responds, and protects an organization from cyber threats that can curtail business continuity.

    Cyberattacks constantly evolve and have become serious threats to businesses, plaguing all sectors. Any organization’s security relies on a strong SOC, meaning business leaders need to prioritize this approach to improve their cybersecurity posture and manage security incidents. Keep reading to learn more.

    Core Functions of a Security Operations Center

    As it becomes increasingly challenging to keep data safe, a security operation center helps you stay vigilant by detecting, assessing, and managing cyberattacks through data analysis. The SOC team collects data from firewalls, intrusion prevention and detection systems, and SIEM systems. If it detects suspicious activity, it alerts the team, who then responds.

    Let’s look at each function in more detail.

    Monitoring and Detection

    The SOC operates around the clock, utilizing various advanced tools to monitor networks, servers, endpoints, devices, and applications for signs of unusual activity or breaches. It analyzes logs and real-time data from firewalls and SIEM systems. Through SIEM, the SOC gathers data from different sources and analyzes security activities, which expedites detection.

    Incident Response

    The incident response process begins by identifying a potential threat. Security analysts get alerts and assess the nature and severity of the incident, identifying indicators of compromise to confirm whether the event qualifies as a security incident.

    Once they confirm it’s a real threat, they quickly isolate affected systems to prevent further damage. The isolation may involve stopping the intrusion and disconnecting compromised devices from the network.

    Analysts use Security Orchestration, Automation, and Response (SOAR) tools to automate repetitive tasks such as alert triaging and incident response. This helps to both reduce response times and ensure the process has no human error. SOAR tools integrate various security tools into a single console, from which security teams manage alerts and incidents without switching between different systems. The centralization reduces the time they spend on manual processes, speeding up response.

    The next step is removing the threat, such as malware or unauthorized access, from the environment by applying patches or updates to secure vulnerabilities. Once the threat is neutralized, the analysts restore systems to normal operations using backups to recover lost data while ensuring that the backups have no remnants of the threat.

    It doesn’t stop there. The analysts conduct a thorough investigation to understand how the incident occurred, gathering forensic evidence that helps in preventing future incidents.

    SOC Team Structure and Roles

    As a centralized function in an organization, SOCs have a team structure and different roles. The team must have cyber SOC expertise and collaborate to monitor, detect, analyze, and respond to cybersecurity threats.

    Key SOC Roles

    These are the critical roles that make up the SOC team:

    • SOC Manager: The SOC manager has a senior position overseeing an organization’s security operations. They’re responsible for evaluating, hiring, training, motivating, and guiding team members. They access incident reports, establish policies and procedures, manage resources and audits, and report to the Chief Information Security Officer (CISO).
    • Security Analysts:
      • Tier 1 analysts perform the initial monitoring and triage of alerts identifying potential threats.
      • Tier 2 analysts conduct deeper investigations into incoming threats, analyzing logs and network traffic to determine the severity and impact.
      • Tier 3 analysts are senior SOC cybersecurity experts who engage in threat hunting and severe incident analysis, providing insights for improving security measures.
    • Threat Hunters: Unlike typical SOC analysts who react to alerts, threat hunters actively search for threats that could easily go undetected. They utilize advanced techniques and tools to uncover hidden malware, vulnerabilities, and potential breaches before they can cause harm. They wade through system logs and network traffic, analyzing patterns of behavior to identify deviations, and then share the threat intelligence with stakeholders.
    • Incident Responders: Incident responders are cybersecurity experts who respond to incidents that require investigation and in-depth analysis. They use tools to determine an attack’s scope, cause, and impact. They’re also responsible for mitigating the damage and, when necessary, they may shut down specific systems or applications to contain the threat and protect sensitive data.

    The SOC team is a comprehensive group of experts who collaborate to manage a company’s cybersecurity operations. They monitor, detect, analyze, respond to, and investigate incidents in real time to protect an organization’s assets and information from cyber threats.

    Collaboration and Reporting

    The SOC must collaborate with other departments, including IT, legal, and compliance, to take a unified approach to cybersecurity. This collaboration ensures effective incident management and regulatory adherence.

    For example, working with the IT team helps implement security measures and integrate security tools such as security information and event management (SIEM) software. The IT department ensures the SIEM has the right resources to monitor and analyze security events. This includes maintaining servers, networks, and security tools essential for SOC operations.

    The legal team reports to risk management about threats, impacts, and what constitutes a data breach. Their role is to inform stakeholders about their legal obligations. The legal team also guides a company in adhering to data protection laws and regulations by providing legal insights on data handling practices and compliance requirements.

    The SOC also collaborates with compliance departments to ensure security practices meet industry regulations such as GDPR, HIPAA, etc. This partnership helps with the auditing processes and maintains documentation that demonstrates adherence to legal standards. At the end of the day, the SOC reports to the CISO to ensure that cybersecurity strategies align with organizational goals, providing critical insights into threat landscapes, incident management, and security posture.

    Benefits of a SOC

    A SOC can benefit an organization in many ways, but for most companies, the primary role is protection against costly data breaches. The financial impact of cybercrime is enormous, costing the global economy trillions of dollars in losses annually. Moreover, threats are growing faster than the global economy and can leave a company in limbo. SOCs provide a dedicated team tasked with protecting you in this shifting landscape.

    Asset Protection and Business Continuity

    When you close your business at the end of the day or during the weekend, cyber attackers don’t clock out. That’s why a SOC operates 24/7, even after business hours, to monitor your organization’s IT infrastructure and ensure no unauthorized access to the system or network. It allows for the early detection of suspicious activities and potential threats and establishes incident response plans for identifying, containing, and mitigating security incidents.

    The SOC collaborates with IT to enforce strict access controls and authentication measures so that only authorized personnel can access intellectual, sensitive data, and systems. Even insider threats stand no chance of accessing what they shouldn’t.

    In case of a threat, the SOC helps to contain it, eradicate malware or vulnerabilities from the environment, and restore affected systems to normal operations. This step ensures that the same attack cannot recur and lets business operations continue without disruptions.

    Regulatory Compliance

    Non-compliance with industry regulations can cost your organization in legal consequences and even its reputation. A SOC helps you stay compliant by documenting and regularly reporting on your security posture.

    Your SOC prevents data breaches by dealing with threats before they happen. When they do happen, SOC plans to mitigate damage and restore operations are put into effect. It also conducts thorough documentation that details the nature of incidents, response actions taken, and outcomes. This documentation helps with regulatory compliance and provides a record that can be referenced in future audits or investigations.

    A SOC’s data privacy plans, through the implementation of data protection measures, ensure sensitive information doesn’t fall into the wrong hands, which would cause compliance issues. By working with compliance teams that ensure security policies align with legal requirements, the SOC facilitates a comprehensive approach to maintaining regulatory compliance in an organization.

    Cost Savings and Customer Trust

    Data breaches are costly to recover from, not just in terms of money but also your organization’s reputation. Customer trust may decrease, which can impact your bottom line.

    Through an effective SOC, you demonstrate a strong cybersecurity posture. This enhances customer confidence in your organization’s ability to protect sensitive data, ultimately fostering loyalty and potentially increasing market share. With a well-functioning SOC, you don’t need to hire additional personnel or hardware.

    Types of SOCs

    Organizations can choose from various models of security operations centers based on their specific needs, resources, and goals. The model you choose may have long-term effects on your cybersecurity posture.

    In-House SOCs

    If you wish to run your security operations as an organization, you can set up an in-house SOC. It means having a team within your organization to handle all cybersecurity matters with your own technology and security personnel.

    This model gives you greater control and customization, allowing you to tailor security measures to your needs. However, it requires significant upfront investment in technology and personnel, who must be cybersecurity experts, as well as ongoing operational costs. 

    Virtual SOCs

    Virtual Security Operations Centers (vSOCs) operate in the cloud, offering a flexible and scalable solution. They are ideal for smaller organizations seeking cost-effective cybersecurity measures. They eliminate the high costs associated with building and maintaining a traditional on-premise SOC, including expenses related to hardware and staffing. For smaller organizations with limited budgets, vSOCs provide access to advanced security capabilities at a fraction of the cost.

    As a business continues growing or facing fluctuating security demands, vSOCs can easily scale resources without the logistical complexities of physical expansion. With AI and machine learning integration, vSOCs can automate security tasks and enhance real-time threat detection capabilities.

    Global SOCs

    If your organization has a large geographical footprint that requires continuous monitoring, a global SOC (gSOC) is ideal. A gSOC operates across multiple geographic locations, providing round-the-clock coverage by leveraging teams in different time zones. Additionally, it oversees multiple regional SOCs by coordinating their activities and standardizing security protocols. Global SOCs can efficiently manage incidents on a larger scale and offer diverse expertise from different markets.

    Co-Managed SOCs

    You can partner with a co-managed SOC to get in-depth analysis and expertise. A co-managed SOC is a third-party security platform that combines in-house and managed SOCs. You can maintain your internal security team that collaborates with an external provider to enhance capabilities. This hybrid approach allows for greater flexibility, enabling you to gain external expertise for specific tasks such as 24/7 monitoring or incident response while retaining control over critical functions.

    Let your in-house IT team join TekStream SOC for advanced technologies, including Splunk for Security Information and Event Management (SIEM) and CrowdStrike for endpoint protection, to deliver managed detection and response services.

    Best Practices for Setting Up a Security Operations Center

    Your SOC team is only as good as the security strategies it implements. The following steps can help you get the most out of your team.

    Aligning SOC Operations with Business Goals

    For a SOC to be successful, objectives must align with your organization’s goals.

    When SOC initiatives are directly linked to business priorities, such as protecting customer data, ensuring compliance, and supporting operational continuity, the SOC demonstrates its value in mitigating risks that could impact the organization’s reputation and bottom line.

    Strong executive support that prioritizes cybersecurity fosters a culture of security awareness and encourages collaboration across departments.

    Moreover, long-term planning establishes a sustainable SOC. Organizations must anticipate future threats and evolving technologies, which requires adequate budgeting and resource allocation. Sufficient funding makes the SOC successful, enabling the unit to invest in the latest tools, skilled personnel, and ongoing training programs.

    Investing in People and Automation

    Skilled personnel in a SOC are some of your greatest defenses against threats. Integrating automation enhances efficiency by streamlining repetitive tasks such as alert triaging, data collection, and incident response. By investing in advanced automation tools, organizations can reduce the workload on SOC staff and let them focus on higher-level security tasks that require human expertise and strategic thinking.

    Keep your  SOC personnel sharp with continuous training on up-to-date cybersecurity trends and technologies. This investment empowers analysts to leverage automated systems effectively and improves job satisfaction by alleviating the burden of mundane tasks.

    Enhance Your Security Operations with TekStream

    As cyberattacks escalate and devastate organizations, a well-functioning security operations center is not just a strategic advantage. It cushions you from advanced cyber threats by continuously monitoring your network and systems. The team comprises IT and legal experts who provide your organization with updated technology and guidance to strengthen its cybersecurity posture.

    Staying compliant with industry requirements doesn’t have to be challenging, as SOC helps by maintaining rigorous monitoring and reporting practices. Investing in your SOC keeps your data and intellectual assets safe from hackers. No data breach means compliance; hence, there are no legal battles. Your business continuity is uninterrupted, and customers and stakeholders stay happy.

    Keep your security more resilient with the help of TekStream’s security experts. Outsourcing security operations to an MDR provider gives you access to advanced threat detection capabilities without the high costs of an in-house security team.

    Learn more about our integrated MDR solution and the technologies we use to keep you ahead of threats or contact us to speak with our team!

  • Troubleshooting Guide: Assets & Identities in Splunk Enterprise Security

    Troubleshooting Guide: Assets & Identities in Splunk Enterprise Security

    By Kamal Dorairaj, Senior Splunk Consultant

    Splunk Enterprise Security (ES) uses an asset and identity (A&I) information management system to correlate asset and identity information with events to provide context and enrich data. There are many docs and discussions on how to populate these A&I in Splunk ES but not many on how to troubleshoot A&I issues and validate the framework. This blog covers various actions as well as steps to assess and validate the A&I framework in Splunk ES.

    1. Validate Search Preview

    In Splunk ES, Navigate to Configure -> Data Enrichment -> Assets and Identity Management-> Search Preview. 
    All three search in this page run periodically to make sure that the ES framework is using the latest and updated assets and identities. For example: When we expand the “Identity_lookup_expanded” SPL, there will be two macros which are merged into identity and updated into the identity lookup file. Ideally when we open the search preview SPL, it should return zero events. Returning zero events means the KV store committed all the changes to the collections. It commits changes every 300 seconds which is configured under “Time” in the Miscellaneous Settings -> Global Settings.  

    2. Validate the Macros

    Run the “identity_lookup_expanded” SPL in a separate search. Below is an example of the SPL. 

    Splunk SPL search string showing identity correlation logic using eval and inputlookup.

    In this `add_entity_source(“TS Identities”,”TS Identities”)` is the macro that pulling the Identity details. Open this macro in a separate search window and expand it. Here we can see all the lookup files the search references.  

    Splunk Enterprise Security interface showing inputlookup and fillnull for TS Identities.

    Navigate to Settings -> “Searches, Reports and Alerts” -> Search for the “TS Identities”. Click the Report -> Review the SPL -> The search in this report is populating the above file. The SPL can be run over 7 days or 30days to check when it’s being populated. 

    3. Validate Correlation Setup

    Go to “Correlation Setup” under Asset and Identity Management -> Select “Enable for all sourcetypes” as in screenshot below. 

    Correlation setup options in Splunk Enterprise Security for asset and identity mapping.

    By enabling this option, every single search run on ES goes thru the identity lookup expanded and asset lookup expanded.  
    Let’s say for example, you have user=bob then correlation will try check to if identity=bob then try to pull all the information from the identity and details found and use it to enrich the events. So, this setting is very important for the ES framework. 

    4. Validate Enforce Props

    The “Enforce props” setting should be enabled under the Global Settings. If we do not enable this option, then the framework will be using stale lookups and not receiving the enrichments on ES searches. This setting is a must for RBA.  

    Enabling this option would bring more risk fields into the automatic lookups. If not enabled, then we are not running the latest version of the automatic lookups. Also, if there are any custom fields in the identity fields, those won’t be available in the automatic lookup. Basically, custom fields won’t be enriched in all the searches. Go to “Searches, Reports, and Alerts” -> Search for “SA-IdentityManagement” -> All the lookups for src, dest, user, src_user. On the backend, Splunk uses props to provide the enrichments for all these fields. 

    Splunk enforcement settings for props, macros, transforms and identity lookup.

    5. Validate Lookup Files

    Permissions of all the lookup files needs to be reviewed. Go to Lookups -> Lookup definition -> search for the lookup -> make sure permissions looks accurate. If correct, then take note of the csv file name and navigate to Lookups -> Lookup files -> check permissions and confirm it also looks correct.  

    The permissions should be scoped as global.  
    If all permissions appear accurate in the UI then directly ssh into the server.  

    Navigate to cd /opt/splunk and search for the lookup file by executing the following command: 

    Bash terminal command to locate assets_network.csv file for troubleshooting.

    Next run this: 

    ls -al <path of the file name returns from the above> and less the file name. 

    Terminal command to search for assets_network configuration in inputs.conf.

    Basically, looking for the csv files defined in any inputs.conf stanzas. 

    Next, check If any transforms are using it with the following: 

    Command-line search for assets_network references in transforms.conf file.

    6. Validate Thru Logs

    To look for any errors or issues in the log file, run the below SPL: 

    index=_internal source=*entity*  

    Check the source field for a list of used sources. We can see ‘identity manager log’, ‘entity merge log’ and ‘identity correlation rest handler log’. All these logs are related to the assets& identity framework logs. 

    For Example: A customer experienced WLM blocking their searches. Using the above SPL, we were able to further troubleshoot our issue. 

    When the identity manager runs it sends logs for everything into identity manager log. 

    Index=_internal source=*identity_manager.log 

    In the source field narrow your SPL to investigate the splunkd_access log. All rest calls executed are written in this log file. Make sure all the values for the filed status are “200”. 

    Splunk ES runs *Audit -* scheduled searches every day, which are it’s all-health check searches.

    Now, you can populate A&I in Splunk ES, but you also have a guide for troubleshooting issues and validating the framework. Splunk Enterprise Security is considered the most robust security platform out there, and with this set of steps you can ensure you’re getting the most from your instance.

    Our team is available if you have additional questions, just inquire using the form below. Find more Splunk Technical Blogs here, and learn more about TekStream Splunk Services here. Happy Splunking!