Build a SOC Lab with Wazuh: Build Your SOC Dashboard (Part 4)
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
Welcome to part four of seven of the Wazuh SOC analyst challenge. In this one, we are going to be taking the telemetry that we generated to help build your first SOC dashboard. And by the end, you'll have a clean three-panel dashboard, which is also going to be your deliverable for the giveaway. Quick heads-up for anyone that is going for the giveaway, we are going to prefix this dashboard with the word my defer. So, do make sure that you do that as well. I will point that out when we do get there. Let's get into it. Let's begin by heading over to our Wazuh dashboard and then clicking into the hamburger icon here. And then you want to select dashboards. From here, we want to click into create new dashboard and select create new. Now, we are going to be creating three panels. The first one is going to be metric, the second is going to be a line chart, and the third is going to be a data table. So, for the first panel, we are going to select metric. And this is going to display a calculation as a single number, as you can see over on the top right corner. From here, I am going to select our Wazuh dash archives, and we can see the total events within a 24-hour time frame, which is 23,518
events. For this particular panel, let's do a failed Windows logon. Now, if you're not entirely sure what a failed Windows logon event ID is, we can simply Google it. What is failed logon event ID? And then
we can see right here, in Windows, the primary failed logon event ID is 4625.
So, knowing that, let's head back over to our Wazuh. And you might be wondering, can we just type in 4625? And yes, we can. Well, at least we hope it is 4625,
as in we hope that these events are accurate, because 4625 can be pretty much anything. I mean, it could be part of a time. So, instead, what we want to do is be a little bit more specific. We want to look for the field name where it can contain the event ID value. And we can do this multiple ways. We can go into the hamburger icon, go into discover, write our query, and go from there. Or, we can click into the add filter, and then we can search for a field that might contain our event ID. So, I can type in something like event ID, and it says doesn't match any options. Okay? Let's go and do our discover method. So, if we type in 4625,
make sure that we are under archives, go ahead and hit enter. We have six hits. So, what is our 4625? So, this right here is under My D for Linux. We definitely do not want that. We're looking for Windows event log. The next event here, ooh, okay, we see a My D for Windows, but this is related to a registry key. And we don't really want that. What about the next one? So, here just seems to be some kind of audit configuration check, but it's not entirely what we're looking for. But, you kind of get the gist of it. From our previous video, we actually had a event ID field, and I am going to find it right here, called data.win.system.eventid.
So, this is what we used earlier in our videos. I'll go ahead and copy that, paste it in, put a colon, and enter. So, we have zero results in the last 24 hours. Why don't we go and, well, create some? I'll go into my virtual machine, and let's just, I don't know, put in some random passwords. So, I did a total of three attempts, and if we were to go back into Wazuh, and let's refresh this. Within the last 24 hours, we get three hits. Beautiful. Now, if I go back into my dashboard, and now that we know the field name, let's go ahead and add that in.
Put in a colon. And there you go. Three count. Now, all we need to do is click into save.
And for the title, we're going to name it as failed Windows logon. Click on
save and return, and there you go. We have a failed Windows logon panel. So, we can drag it, and we can move it around. Now, for this dashboard, the main dashboard, we're going to click on save, and we want to name it as my DFER {dash} your name. So, if you want to participate in the giveaway, you will do something like my DFER {dash} Steven, and then name your dashboard accordingly. So, in this case, let's do my DFER {dash} Steven, and we'll say basic SOC activity overview,
and we'll click on save. There you go. Now, our main dashboard is called my DFER {dash} Steven basic SOC
activity overview. We currently have one panel, which is looking at the failed Windows logon within the past 24 hours, and we have three count. The next panel that we're going to create is a line chart, and this is going to track Windows account changes over time. So, to do this, let's select edit, click into add, and we want to create a new panel. We want to select visualization, and we want to click into line chart, or line in this case. Click into the archives, and now we can start creating our query. Now, I am going to copy a query that I used previously, and I will paste this in the free community as well. That way, you can just simply copy it and go from there. But, essentially, what this is doing, or what this is looking for, are event IDs of 4720, and
let's go and take a look at what that is. Event ID 4720. So, this was the account
successfully created. Now, I'm not going to go through all of them, but you can see that it's looking for 4722, 4723, 24, 25, 26, 32, 33, or 38. Now, you
might be wondering, "Well, I don't really see any data." And there is actually data, but it's a really small dot. So, we do need to configure a little bit of options here over to the right under our data tab. So, we can see that there is metrics with the Y axis as count, and I am going to actually leave that as count, but I am also going to add a bucket, and I'll select the X axis. And then under the aggregation, I am going to select date histogram, and the field is going to be timestamp. And let's click on update. So, at the bottom here, we do have a count of two, and at the top, we have a count of 13. Now, this is within a 30-minute time frame. The next thing I'm going to do is click on add, and let's split this by the event ID.
So, I'll click into terms for the aggregation, and then it will search for data.win. And you might notice, "Wait a second, doesn't match any options." Hm. Okay.
Well, if we go back over to our discover here, and we'll expand the first event from the top, and if we find our event
ID field, so this right here, you might notice that there is an icon, a triangle icon, that says, "No cache mapping for this field. Refresh field list from the dashboards management index patterns page." All right, so let's go do that. We'll click into the hamburger icon, and we'll scroll down to dashboard management and click into dashboards management. From here, I click into the index patterns, select our Wazuh dash archives, and then over on the top right corner right here, we do see a refresh field list. So, let's go and click into that. Click on refresh, and you might have noticed that our fields went from around 600 to 895.
So, now if we were to type in data.win, we would actually see some of these field names. Let's go back over to our discover, make sure we change into our archives index, expand the first event from the top, and
we do not want this one. That was a fail. Go into the agent name, and we wanted to search for Windows. There you go. Now, there is no more icon. Perfect. Now, let's refresh our dashboard, and let's try this one more time. So, I'll click into add, split series, go into aggregation, we want to select terms. For the field, we want to separate it by the event ID. So, that was Oops, I completely reversed that. That was data.win.system.event.ID.
And I'll hit update. So, there you go. Now, it is broken down into the event ID. Now, the last thing I'm going to do is change this to say last 6 hours ago,
and let's see how that looks like. So, we can see that there is a count of one for the event ID of 4733 around 1510, and then 1 hour later around 1615,
we have a count of two for 4733.
Now, out of curiosity, what is a 4733?
That is a member was removed from a security enabled group. Now, of course, you can change this to any kind of visualization you want, but this is just simply an example. But, if you do use something like this, then, you know, you can take a look at the dashboard and if there's a spike in, say, 4720, then you
can immediately see that here. So, now let's go ahead and save it and we'll call this Windows account changes over
time. And let's go back into our dashboard and add our new visualization.
Excellent. All right, the last one that we're going to be building together is a data table. And to do that, we'll click into create new and we want to select the data table. Click into the Wazuh Dash Archives and let's begin with our query. So, for this one, we are going to be tracking failed passwords, specifically towards our Linux server. In other words, this is going to track failed SSH authentication activity. So, let's begin with our filter. I'm going to add in our agent name, which is going
to be the my differ dash Linux, so we
are only looking at our Linux agent. Click on save and now we have 8,691
events. Now, I'm going to simply query failed password in quotes. Go
ahead and hit enter and we have a count of three. Which does make sense because we did fail three times using the fake user account. But, with a data table, we do want to see some additional information. And to do this, we'll include multiple buckets. So, the first bucket that I'm going to add is a re-split by row and the aggregation is going to be terms and we'll look for the agent name. So, we can see my D for dash
Linux. So, that is row number one. Row number two, I am going to put it as a timestamp. So, I'll search for timestamp. And now we can see three events separated by timestamp. The next one,
uh let's do maybe the user. So, we'll go into terms, and let's see if we can find a field called user. So, we do have data.dst user, and there is a data.source user. So, which one do we use? Well, the best way to do this is actually go into the discover, and let's edit our filter to look for Linux, and then we'll type in the failed password query, where we get three hits. Expand the first event from the top, and then let's take a look. So, there is a data.source IP and a data.source user.
So, this was the user that was used to try to log in to our Linux virtual machine. Let's go ahead and add that. That again is the data.source user. Hit
update, and we see it here. Next, let's add in the destination user. dst user. There you go. Hit update, and
we don't see anything. All right, let's go into discovery. Is there any destination user? No, there is none. Okay, then that explains it. That explains why we see a no results found. But, what we can do is click into show missing values, and then there you go. We see it as missing. So, I'll actually just keep it as is, just in case that there is a dest user later on. What else here? Why don't we add in the source IP? Because I think that's pretty important, right? We want to know where this is sourcing from. Click into terms, source IP. Go
ahead and hit update, and we see it right here. Cool. I think this is pretty much it. Now if you wanted to organize the columns, you can actually do so through here through the buckets. So we can just simply drag and drop but I'll leave it as is. The last thing to do is go ahead and click on save and then we want to name this as Linux SSH authentication activity. Uh you know what we should say Linux failed SSH authentication activity.
Click on save and return and there you go. Now we got three panels, the failed Windows log on, Windows account changes over time and Linux failed SSH authentication activity. So at a glance we can see who tried to SSH into Ubuntu
and from where. That's pretty cool, right? So again, this is just a very basic activity overview and I do challenge you to be a little bit creative and think about creating some additional dashboard panels that you deem to be useful and then share in the free community because I would love to see what you come up with. But that is pretty much it when it comes to creating dashboards. Go ahead and save it out.
And again, if you are participating in the giveaway, you do want to make sure that you screenshot this entire dashboard panel. But most importantly, you want to include the my deeper dash your name basic sock activity overview
and that right there is your deliverable number one. Congratulations on building your first sock dashboard in Wazuh. If you are entering the giveaway, this again is deliverable number one. So do take a full screenshot of that dashboard with the my deeper name visible and hang on to it. You will post it along with your other two deliverables at the end. All of the details again for the giveaway are in the free community, which you can find in the description. In the next video, we are going to be setting up file monitoring and you'll also be creating your first custom detection rule. That is it for the video and I hope that you found that informative. If you did, let me know by hitting that like button and subscribe if you want to. Remember to stay curious and do things differently.





