06:00 UTC Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Register
Aa · Display
Themes
Type size
Density
Defence & Detection · MyDFIR · · 28:45 runtime

Valdoria Votes: A Political Mystery (Part 2) | KC7 Cyber | Part 1

In the wiki Kusto Query Language
Transcript 4336 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

As a SOC analyst, one of the most popular query languages that you'll come across is KQL, aka Kusto Query Language.

And if you have experience using this, you'll be able to immediately contribute in environments that use it quite heavily. Which is why in today's video, we'll tackle a KC7 case together called Valdoria votes. But before we get started, I do have a free community for aspiring SOC analyst called the Might D for SOC community. So, if you want to be surrounded with like-minded individuals working towards the same goal, I would highly recommend checking it out. Link will be in the description down below. All right, to get started, you want to head over to kc7cyber.com and create an account if you haven't done so already. Once you're logged in, you want to head over to the security analyst tool. And then from here, we are going to head over to the Valdoria votes, a political mystery part two. And from here, let's click into start game and let's take a look at the investigation. It says, "The Valdoria Board of Elections is gearing up for the most critical election in recent memory.

To ensure a smooth voting experience, the board has hired additional poll workers in the past month, preparing them to support operations and assist voters." But if we take a look here, they say, "However, malicious actors are actively working to sow doubt, hoping to make citizens question the validity of their votes. As election day approaches, Valdoria citizens anxiously watch wondering if democracy will withstand these challenges." Now that we know a little bit more about this investigation, let's go ahead and start it. Click into the start investigation and let's begin. We'll go ahead and type in Stand Guard. And let's take a look at our mission, by the way, which is investigate the events leading up to this critical election, analyze the data, uncover any hidden agendas, and help protect the integrity of Valdoria's vote. All right, let's do it. Question number two.

What is the name of the deputy commissioner? So, if you have been following along from my previous KC7 cyber cases, you will likely know that the table of interest is going to be the employees table. Now, again, if you're not sure, you can always click into the about data and select view data tables. On the left-hand side, you'll have all of the data tables that are available to you, and on the right we'll have the description name along with the available columns. So, if we take a look at our questions here, it says, "What is the name of the deputy commissioner?" And just imagine that KC7 did not provide us with a query. From here, we can take a look and see, "Oh, under the employees table, this contains information about the company's employees." And the deputy commissioner sounds like a role. And if we look into the columns, we see that there is an available column name called role. So, that is what we'll use. I'll type in employees, and then let's do where role contains and let's do deputy commissioner.

Whoop, I totally misspelled that. There you go. And we have one employee. The employee's name is Hillary Benton, and I am going to comment that using two forward slashes, and I'll say Hillary

Benton. Source IP address is 10.10.0.30.

The host name is FDA2-desktop,

and the username is H.I. Benton.

And finally, the MFA. Well, I don't think we need to put that into our notes, but here the MFA is false, meaning that Hillary Benton's account does not have MFA. And that is, by the way, a scary situation. So, if this account's credentials were compromised, then pretty much anybody can log in without any extra protection there. Let's go ahead and type in Hillary Binton for the answer. Question number three, the equal equals operator filters for values that are an exact match and is case sensitive. What is Dora Thomas's role? All right. Let's do another employees here where name equal equals Dora Thomas. And Dora's role is polling station

supervisor. Yeah, supervisor. Cool. Let's go ahead and copy that and paste it in. In instances where we don't know an exact value, we can use the contains operator instead, which is exactly what we did right here. For example, we know the temporary staff at Valdoria Board of Elections has a supervisor, but we're not sure their exact title. What is the supervisor's name? All righty. Let's change our deputy commissioner and let's replace it with supervisor. And wow, we have 12 records. Okay, looking at the question again, it is saying what is the supervisor's name? The context is the temporary staff. So,

that tells me that our answer is this

right here, the temp election support. And if we expand this just a bit, yeah. Temp election support staff supervisor. That is a long role. So, let's see. The name is Barry Schmelli. Let's copy that and paste that in there. And you know what? I am actually going to note that down because I feel like we might need that later. 10.10.0.12, the desktop is JCH3, and the username is b a s c h m e l l y.

Hey, look at that. The question is actually looking for Barry Schmellys IP address. So, we have that here. This is why it's a good idea to always take some notes when you're going through this case or any case that is. What is Barry Schmellys host name? That is this one right here, g c h 3 desktop. The next question, what is Barry Schmellys email address? I think it's a good idea to add

this as well. There you go. How many emails did Barry Schmelly receive? Okay, from here we are going to be using the data table called emails. Again, if we don't have the query here, we take a look at the about data, go into view data tables, and then we will find it here. So, I'll use email and we are looking for how many emails did Barry receive. So, this is going to say where recipient equal equals and let's paste in Barry Schmelly's email. And we have a total of 37 records. That

is going to be our answer to question number eight. The next question, how many distinct commands were run on Barry Schmellys machine? So, the table of interest in this case is going to be process events where the host name is going to equal to

the g c h 3.

And we want to know distinct commands. I'll put in distinct and we'll point it over to the column name of process command line. The total is 173.

Taking a look at the next question, how many distinct URLs did employees with the first name William visit? Hmm, that's a really good question. What we can do here is take a look at the sample query that Casey 7 had provided it They're using what is called a let statement. And they actually provide you with a description of what a let statement is. It says, "A let statement allows you to save values in a variable that you can then access easily by calling the variable in your query." So, if we are looking for any kind of employees with the first name of William, we want to take a look into the employees table. So, in this example, let's go ahead and use the same query that Casey7 had provided us.

I'll say let wills_ips equals employees, because we want to look into the employee data table where the name has William. And then we are going to do a distinct IP address,

because we want to deduplicate all of the values within the IP address column. Make sure we add in a semicolon. And now we're going to tack on another table so we can answer our question, which by the way again is how many distinct URLs did the employee with the first name William visit. So, what that means is that the table of interest is going to be the outbound network events. And we'll put in the where our source IP address is in

and we'll surround it in a parenthesis, wills_ips. Now, if we go ahead and run the query, we get a total of 220 records. But,

let's go and distinct the URL. That way

it will again deduplicate all of the values within this column and we're left with 217. So, that is how many distinct, aka unique, URLs that were visited with the first name William.

Now, we get to try it on our own. How many authentication attempts did we see to the accounts of employees with the first name William? All right. Let's do a let username equals employees

and we're going to be looking for where the name has William and let's go ahead

and distinct the actual username itself.

Make sure we add in a semicolon and the table of interest is going to be authentication events. Where the username is in

open up a parenthesis username. And actually before I hit enter, just in case there's some conflict here, let's do William_username and then we'll add in the William_username.

Beautiful. I think this is okay. And yeah, this looks pretty good. We have a total of 183 and that is going to be the

answer to question number 11.

Next, do a take 10 on any table and enter cast your vote to continue. By the way, for those that don't know, take 10 is essentially just grabbing the first 10 events and displaying it to you. This is something that I typically do whenever I want to know what kind of data exist within a table. So, the take 10 is definitely something that you should always do before you start building your queries. And actually, you know what? Let me show you. So, our process events table, if we run that, we have a total of 173 records. But if we

say take 10, we should have 10 records. Now, if we do take five, guess what's going to happen? Well, if you said it's going to show us five records, you're absolutely correct. Let's go ahead and type in cast your vote and hit submit. Sweet. We are now in section two. Now, we should try to understand how to use the data available to us to conduct our investigation. Here are the available data tables and let's figure out how we can use these. Now, by the way, again, we can find this under the about data and click into the view data tables. But, for now, let's just use the screenshot that KC7 had provided us.

Looking at the question, which table would tell us if Barry Schmelly received a suspicious email? Mm, that is going to be our email table. Looking at the description, it says, "Email sent and received by employees." That right there is going to be the reason why the email table is the one that we want to look at. Which table would tell us if he went to his bank website to see how much money he had? Mm, looking at the table here, the outbound network events, internet activity going out from the company network. So, that is going to be our table of interest. Next, we have which table would tell us if Barry Schmelly saved a malicious file on his computer. Okay, malicious file.

That is going to be our file creation events. "Files created on employee devices." And actually, look at the example. "When someone saves a new document on their computer." And that's exactly what this question is asking for. Type in file creation events. The next question is, which table would tell us if Barry Schmelly opened that malicious file that was saved on his computer? That would be our process events table. The description says, "Programs that start running on employee devices." Process events. And the next one is, which table would you look into see if that malicious file was detected? Oh, that is going to be the security alerts, for sure.

Looking at the description, "Security warnings from devices or email systems." And the example, "when antivirus software detects a virus on a computer." Sweet. Now, we are on section three, and I think this is where it gets kind of interesting. What is this screenshot here? >> [laughter] >> This is an output of Nmap. And for those that don't know, Nmap is something that you can use to identify open ports and also devices on your network. All right, let's type in who done it and begin answering question number two. What IP address did they forget to hide in the poster? Oh, okay. Let's go back to the screenshot. What IP did they forget to hide? This. They forgot to hide

this IP address of 55.49.227.170.

And that is going to be our answer to question number two. 55.49.227.170.

Is there any evidence of traffic from this IP address to our network? So, we're trying to look for any connections that were sourcing from the 55 IP going

towards our network. If we go into the available tables, that is going to be the inbound network events table that we want because look at the description. Records inbound network events including browsing activity from the internet to devices within the company network. I'll type in inbound network events where our

source IP, whoops, IP, yep, is going to

equal to this was 55.49.227.170.

And there is no events. Is that correct? Well, let's rerun this again and yeah, there's no events. Okay, I'm going to say no and submit. Cool. How many domains resolved to the IP? That we are going to be using the passive DNS table. And I'll just go ahead and copy this, paste it in here. Notice how the source underscore IP is red or at least it has a red underline, that means there's something wrong with this particular field. It is very likely that source _ip

does not exist in the passive DNS table. So, what we'll do instead is remove it and we'll take a look at what kind of field names or column names do exist under the passive DNS. And we can see that there is a domain, there is an IP and a timestamp. So, let's click into IP and hit enter. We got two domains. So, that is going to be our answer to question number four. What is the Valdoria related domain resolving to that IP? The Valdoria domain is this one

right here where it says valdoriavotes.gov.com.

What is the legitimate domain for the Valdoria Elections Board? Well, to find this, we can actually take a look at the email domain. So, if we scroll back up here, take a look at the email. And I am just going to use Barry Smelly since I have it here. Look at the domain at the end. valdoriavotes.gov. So, this right here is going to be the legitimate domain for the Valdoria Elections Board. Paste that in and we're good. How many IP addresses did the fraudulent Valdoria government domain resolve to? All right, scrolling back down under our passive DNS, let's do where domain and replace the IP address

with our domain of interest. It is not valdoriavotes.gov. It is actually valdoriavotes.gov.com.

And we have one, two and three. So, we got three IP addresses. Which table should we be looking at for records of that kind of activity again? What kind of table? Hmm, okay, let's read this here. It says, "Great, we've uncovered some additional IP addresses that the threat actor was using. It's always important to be thorough in an investigation. So, let's check if there's any browsing activity from these IPs to our network. Okay, the keyword here is two. So, that means we're looking for IPs that are sourcing from either of these three IPs towards our network. That is going to be our inbound network events. So, this table right here.

How many requests do we see to our network from those IP addresses? Well, we can use the passive DNS and where the domain is the votes gov.com. And I am going to do a distinct IP.

And this is going to just list out the three IP addresses here. But, I am going to also include the whoops.

The let statement and say, let's just do

unique. Equals passive DNS. And make sure that we add in a semicolon. And we want to know how many requests are we seeing to our network.

So, we want the inbound network events. Where, take a look at the available columns. We want the source IP in

surrounded in parentheses and say unique. And let's go ahead and run the query. Perfect. We have 26 records. So, that is

likely our answer to question number nine. Cool. The next question is, which phase of the cyber kill chain is this called? And if we take a look here, it looks like the actor started with researching employees at the elections board. Anytime somebody is gathering information, this phase is actually called the reconnaissance phase under the minor attack enterprise framework. And if you want to learn more about it, I would recommend searching up minor attack and then select the enterprise. From here, you want to click into reconnaissance, and then here, just take a look at what it is, so you understand the objective and also the techniques.

And actually, I am going to copy this because I cannot spell. >> [laughter] >> Let's go ahead and hit submit. Okay, question number 11. What group were they specifically interested in? What group? It is likely we will find that in the URL. So, let's do distinct

URL and take a look. What group were they

specifically interested in? Oh, there is new hires. Complete list of new hires for 2024 election. There is There is

additional staff. Yeah, I believe that's about it. Internal communications to new staff. They're trying to obtain what Valdoria votes sends to the new staff. Onboarding documents for seasonal poll workers. Maybe, but I am going to go with new hires, simply because it is the first request. So, let's type that in. Cool. Next question is, what specific area of our prevention measures were the threat actors interested in? Prevention measures. What are we looking for? Oh,

literally says it right here. Prevention measures. So, our answer is going to be election interference. Election interference. Cool, I just reached level 17. Let's go ahead and click on keep playing and take a look. What important machines were the hackers trying to get into? They were trying to get into the Okay, we have types of voting machines, so it's very likely the voting machines. Yeah, it is is to be voting machines. So, I'll type in voting machines. Which documents were the hackers looking for? And if we look at the first sentence here, the hackers even tried to locate a specific document that would reveal exactly how the machine operates. Based off of that, we're looking for some kind of manual, or at least I would assume.

Yeah, look at that, technical manual for voting machines. That right there is what they are looking for. Technical manual. Question number 15, let's check if there's any traffic to it. Has any of our employees visited that domain for any reason? And right above it, let's look for evidence in our data. Remember there was a suspicious-looking Valdoria domain registered by the adversaries. What that tells me is that we'll need to look at the Valdoria votes.gov.com and look into the outbound network events. Because the question is looking for any traffic to it. So, I'll say where URL

Now, let's just do contains. Paste that in there. Yeah, two records. And it's from the same IP address. Yeah, who owns that forum? I'm kind of curious now. Let's do where is it IP? Yeah, where IP adder equal equals 10.10.0.4, Anderson Snooper. Okay, let's put that into a comment. 10.10 Oops. 10.10.0.4 The host name is this right here. The username is A.N. Snooper.

And the role, temp election support staff lead. This user likely has quite a bit of permissions. So, if this user account gets compromised, well, we're in for a fun day. So, the answer to question number 15 is yes, there was definitely traffic to it. When did someone first browse to that domain? Okay, let's rerun this. They first browsed right here. 10:46:45 back on October 7th, 2024.

The page appears to be some sort of login page. Could it be a phishing page? Well, welcome to the new Valdoria online gateway. Yeah, it could definitely be a phishing page, especially since this domain is incorrect. The correct domain is this right here. Valdoriavotes.gov.

And if we see a Valdoriavotesgov.com, that is quite suspicious. Looking at our second event here for the URL, our poor Anderson Snooper entered in their password. That is quite unfortunate. Did anyone enter their credentials on that phishing page, yes or no? Yes, they did.

When did they enter in their credentials? About 2 seconds after visiting the page. By the way, this is a good reminder that whenever you click on a link and it's asking you to enter in your credentials, take longer than 2 seconds before you enter in your credentials. Because you never know, it could be a phishing page, so it's better to be safe than sorry. What is the username of the employee that entered their credentials? That is A.N. Snooper. What is the name of the employee who entered their credentials? Well, it's good thing we took a look. That is Anderson Snooper. What is Snooper's role? That is the temp election support staff lead.

Luckily, we have pretty strict guidance and Snooper should have enabled multi-factor authentication. Oh, that's actually a good idea to check. Do we have multi-factor authentication? And of course, of course we do not. Oh, man. Did Snooper have multi-factor enabled? No.

Quite unfortunate. >> [laughter] >> Pretty much. What table would we find this login activity in? That's going to be under the authentication events table, I believe. Yes. Authentication events. So, let's type in authentication events. Or actually, we don't even need to look into the data yet. The question is just asking us what table would we find this log on activity in. Type in authentication events.

Cool. After successfully capturing Snooper's credentials on the fishing page, the threat actor didn't waste any time and quickly attempted to access his account using one of their own IP addresses. This is a classic example of credential theft leading straight to unauthorized access and why multi-factor authentication is so important. That is absolutely true. But, just know that multi-factor authentication is not the end all be all. It is very possible for attackers to still compromise your account and log in even if you have multi-factor authentication. They can do this by stealing what is called a session cookie. And if you want to learn more about it, I would highly recommend you search up adversary in the middle attacks and or info stealers. That said,

let's go ahead and answer this question here. When did the threat actor log in? And we do see a timestamp, so I'm just going to copy this and let's replace my query and

click on run. There are a total of 17 records. And when did the threat actor log in? Well, we do see a IP address here, an external IP, which is 220.

There is a 10.10. This is our internal IP. And then we see a 157 external IP. So, how do we know which one is which? Well, let's go back over to our outbound network events. And remember, Anderson Snooper entered in their credentials on on October 7th, 2024 at 10:46:47.

Now, if we were to rerun this authentication events table, anything before 10:46 is pretty much irrelevant for now. So, these two, we don't care because it's before 10:46. That tells me the IP address of 220 and the internal starting with 10, we want to exclude it for now. And if we do that, we are left with this one right here, the 157.100.244.104.

So, this is highly likely our threat actor's IP address. Now, another thing that you can do is take a look at the user agent. If we were to expand this a bit, take a look. All of these are consistent except for one, which is the one that we have highlighted. This right here is an anomaly. So, we should actually pay a little bit closer attention to this. And I am going to click into the time and let's copy that

and paste it in. And actually, before I hit submit, let's put in a comment, first log on from TA, which is short for threat actor. Click on submit and there you go. We are now in section four. That is part one of today's lab. And if you are following along, please feel free to continue on and try to complete the entire lab by yourself. If you ever get stuck, feel free to join KC7's Discord or our free SOC community and then ask your questions there. Or, you can wait for the next part of the series. That is it for today's 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.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

The freshest blend of security news delivered to you. Text and HTML, one-click unsubscribe. Free.

How often
Your desks