Splunk
Splunk
and rightly so. Per the Splunk website, they boast that 91 of
the Fortune 100 use Splunk.
Splunk is not only used for security; it's used for data
analysis, DevOps, etc. But before speaking more on Splunk,
what is a SIEM exactly?
Threat detection
Investigation
Time to respond
When you access Splunk, you will see the default home screen
identical to the screenshot below.
Next is the Apps Panel. In this panel, you can see the apps
installed for the Splunk instance.
The Search app is where you will enter your Splunk queries to
search through the data ingested by Splunk. More on Splunk
queries later.
The above image is the navigation for the Search app. Each app
will have its own navigation menu. This menu is different from
the menu/navigation within the Splunk bar, accessible
throughout your entire Splunk session.
Let's draw our attention back to the Splunk Home page. In the
Apps panel, there is a cog icon. By clicking the cog, you will
be redirected to the Manage Apps page. From this page, you can
change various settings (properties) for the installed apps.
Let's look at the properties for the Search & Reporting app by
clicking on Edit properties.
You can change the app's display name, whether the app should
check for updates, and whether the app should be visible in
the Apps panel or not.
Tip: If you want to land into the Search app upon login
automatically, you can do so by editing the user-
prefs.conf file.
Before:
After:
If you wish to install the app manually, click the Install app
from file button.
When we click on the Add Data link (from the Splunk home
screen), we're presented with the following screen.
Looking at the guides, if we click on Operating System, we
should see Windows event logs. But the only option available
is Forward data to Splunk indexers. This is not what we want.
Now it's your turn to add some data to the Splunk instance so
we can start querying them.
Splunk Queries:
Now is the fun part, querying the data that is now residing in
Splunk.
If you have completed the Windows Event Log and Sysmon rooms,
you can remember that you queried the various logs using
either Event Viewer, the command-line, or PowerShell and used
filtering techniques to narrow down the information we're
looking for.
From the above image, we see the names (values) of each source
and the number of events (count), and the percentage value (%)
of all the events for each source.
Let's start our query with Sysmon as the source. The query
will look like this:
source="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
Before:
After:
Some of these fields are specific to Sysmon. Refer to the
Sysmon room if you are not familiar with Sysmon Event IDs.
You can also search by keywords. Using the same event from
above, I'll adjust the query and manually enter
'GoogleUpdate.exe.'
Note: If you click on the icon to the far right for each
choice, it will open the query in a new window.
In the example below, I selected to Add to search.
You can use multiple keywords in your query. Splunk will use
an implicit AND operator between each keyword.
Note: You can try this query in the THM Splunk instance.
The above query will search across all the events (according
to the timeframe specified) and return all the events with
GoogleUpdate.exe AND chrome_installer.exe.
The above query will return any events that contain the exact
phrase.
Note: You can try this query in the THM Splunk instance. (Make
sure you imported tutorialdata.zip into the Splunk instance
first)
Moving along. Let's go back to the Sysmon logs and look at
GoogleUpdate.exe again.
Before:
After:
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Aboutthesearchapp
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Startsearching
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Aboutthetimerangepicker
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Usefieldstosearch
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Usefieldlookups
https://docs.splunk.com/Documentation/Splunk/8.1.2/
SearchTutorial/Searchwithfieldlookups
https://docs.splunk.com/Documentation/Splunk/8.1.2/
Knowledge/AboutSplunkregularexpressions