Tag: Splunk

Splunk: How to Write a Query to Monitor Multiple Sources and Send Alert if they Stop Coming
Splunk: How to Write a Query to Monitor Multiple Sources and Send Alert if they Stop Coming

Step 1:Write a Query to Monitor Multiple Sources Identify the log sources you want to monitor. Create a Splunk search query that checks for events from those sources within a specific timeframe. Example query: Query without additional fields Query with additional fields “message” For example, on the screenshot, I set two hosts to monitor and […]

Read More
Fields Aren’t Always Faster, Keyword Searches to Speed Up Splunk
Fields Aren’t Always Faster, Keyword Searches to Speed Up Splunk

When possible, use datamodels, they are generally your best bet for speed. However, not everything in your Splunk will be in a datamodel, and you may require a good-old-fashioned index based search. This may come as a surprise, as it is counter intuitive but often using a token in an index based search will absolutely […]

Read More
Making Use of Fillnull and Values() to Increase Rule Resiliency in Splunk
Making Use of Fillnull and Values() to Increase Rule Resiliency in Splunk

Within splunk we use “stats” and “tstats” a bunch as threat hunters. However, these useful operations can cause interesting events to be dropped unexpectedly. For instance: index=windows sourcetype=*winevent* AND EventCode=4688 AND NewProcessName=*Evil.exe| stats count by ComputerName, ParentProcessName, NewProcessName, CommandLine CommandLine is a field in 4688 events that needs to be enabled via “group policy”. So, […]

Read More
Creating Macros for Code Reuse in Splunk
Creating Macros for Code Reuse in Splunk

When you find yourself constantly reusing certain strings of Splunk commands, it can be a lot easier to represent those commands as a single line of code that can accept positional arguments and serve the same functions as a set of commands you find yourself using often. This is the purpose of a Splunk macro […]

Read More
Extracting fields in SPL
Extracting fields in SPL

Sometimes when working with new log sources or unfamiliar event records being shipped to Splunk, you’ll encounter logs with important details that could be more useful if you had them captured in a field. The entirety of the text in an event can be found in the _raw field but specific details found in the […]

Read More
Splunk: How to Make Lookup Based on Wildcards
Splunk: How to Make Lookup Based on Wildcards

1) Add to transforms.conf stanza: 2) Create field_from_sourcetype.csv file with wildcards and put it to lookups folder: As result – field_name will be populated based on list with wildcards:

Read More
Splunk: How to Output Nested json as One Field
Splunk: How to Output Nested json as One Field

Often, especially when providing context to analysts who are responsible for triaging alerts, it is useful to provide all of the context that a cloud provider nests in a big json blob as just a single field. You can use the splunk operation “spath” to accomplish this goal. Note: if you have trouble manipulating the […]

Read More
Splunk. How to make color table rows based on conditions.
Splunk. How to make color table rows based on conditions.

In the previous article I have demonstrated how to create a simple dashboard that monitors accessibility of sources in Splunk. Today I want to demonstrate you how to make any table in the dashboard more obvious and convenient. Let’s look at my last article and continue to improve the functionality of the table that I […]

Read More
Creating a simple dashboard that monitors accessibility of sources in Splunk
Creating a simple dashboard that monitors accessibility of sources in Splunk

In the previous article, we have examined using depends panel for creating convenient visualizations in dashboards. If you missed it, follow the link: https://socprime.com/blog/using-depends-panels-in-splunk-for-creating-convenient-drilldowns/ Many people who begin to study Splunk have questions about monitoring the availability of incoming data: when the last time the data came from a particular source, when the data ceased […]

Read More
Using depends panels in Splunk for creating convenient drilldowns
Using depends panels in Splunk for creating convenient drilldowns

In the previous article, we have examined simple integration with external web resources using drilldowns. If you missed it, follow the link: https://socprime.com/en/blog/simple-virus-total-integration-with-splunk-dashboards/ Today we will get acquainted with one more interesting variant of drilldowns in Splunk: using depends panels. Depends panels in Splunk: an interesting way to use drilldowns in dashboards Very often there is […]

Read More