Fixit
Last updated
Last updated
In this challenge room, you will act as John, who has recently cleared his third screening interview for the SOC-L2 position at MSSP Cybertees Ltd, and a final challenge is ready to test your knowledge, where you will be required to apply the knowledge to FIX the problems in Splunk. You are presented with a Splunk Instance and the network logs being ingested from an unknown device.
Pre-requisites This challenge is based on the knowledge covered in the following rooms:
This challenge is divided into three levels:
Fix the Event Boundaries in Splunk. As the image below shows, Splunk cannot determine the Event boundaries, as the events are coming from an unknown device.
Once the event boundaries are defined, it is time to extract the custom fields to make the events searchable.
Username
Country
Source_IP
Department
Domain
To create regex patterns, sample Network logs are shown below:
Once the custom fields are parsed, we can use those fields to analyze the Event logs. Examine the events and answer the questions.
Now our first task is to fix the event boundaries in Splunk because Splunk cannot determine the Event boundaries, as the events are coming from an unknown device.
In order to fix this issue, we can use different stanzas
in the props.conf
file. If we run the script a few times to observe the output, we can see that each event starts with the term [Network-log]
, indicating the start of the event. We can use this as the regex pattern with the stanza BREAK_ONLY_BEFORE
and see if it could fix this problem.
Let’s restart Splunk to apply the changes.
Great. See, now Splunk is able to break the event exactly how it was intended.
1) What is the full path of the FIXIT app directory?
Answer: /opt/splunk/etc/apps/fixit
2) What Stanza will we use to define Event Boundary in this multi-line Event case?
Answer: BREAK_ONLY_BEFORE
3) In the inputs.conf, what is the full path of the network-logs script?
Answer: /opt/splunk/etc/apps/fixit/bin/network-logs
4) What regex pattern will help us define the Event's start?
Answer: [Network-log]
Let’s proceed to extract fields such as Username, Country, Source IP, Department, and Domain.
Now, let’s create a transforms.conf
in the default folder of the DataApp directory, and put the following configurations in it as it is.
We need to update the props.conf to mention the recent updates we did in transforms.conf.
The next step would be to create fields.conf and mention the field we are going to extract from the logs.
That’s all we need in order to extract the custom fields. Now, restart the Splunk instance so that the changes we have made are committed.
5) What is the captured domain?
Answer: Cybertees.THM
6) How many countries are captured in the logs?
Answer: 12
7) How many departments are captured in the logs?
Answer: 6
8) How many usernames are captured in the logs?
Answer: 28
9) How many source IPs are captured in the logs?
Answer: 52
10) Which configuration files were used to fix our problem? [Alphabetic order: File1, file2, file3]
Answer: fields.conf, props.conf, transforms.conf
11) What are the TOP two countries the user Robert tried to access the domain from? [Answer in comma-separated and in Alphabetic Order][Format: Country1, Country2]
Answer: Canada, United States
12) Which user accessed the secret-document.pdf on the website?
Answer: Sarah Hall