WEBVTT

1
00:00:00.160 --> 00:00:02.799
<v Speaker 1>Welcome to the deep dive. This time we're putting on

2
00:00:02.839 --> 00:00:07.000
<v Speaker 1>our digital detective hats and going on a deep dive

3
00:00:07.080 --> 00:00:10.439
<v Speaker 1>into the world of malware analysis. Oh yeah, you've shared

4
00:00:10.480 --> 00:00:13.919
<v Speaker 1>some sections from Packed Learning malware analysis, and frankly, some

5
00:00:14.000 --> 00:00:16.280
<v Speaker 1>of this stuff is already blowing my mind right, but

6
00:00:16.359 --> 00:00:17.920
<v Speaker 1>I know with your help, we're going to break down

7
00:00:17.920 --> 00:00:20.039
<v Speaker 1>these crucial insights and techniques.

8
00:00:20.199 --> 00:00:23.399
<v Speaker 2>Absolutely, it's like learning to think like the enemy, a

9
00:00:23.480 --> 00:00:27.280
<v Speaker 2>digital enemy, that is. We'll uncover how malware operates, the

10
00:00:27.320 --> 00:00:31.600
<v Speaker 2>strategies attackers employ, and most importantly, the tools and methods

11
00:00:31.600 --> 00:00:33.719
<v Speaker 2>experts use to thwart their evil plans.

12
00:00:33.759 --> 00:00:37.159
<v Speaker 1>Okay, so before we get into the super secret spy stuff, sure,

13
00:00:37.280 --> 00:00:40.439
<v Speaker 1>let's start with the basics. Okay, what exactly is malware

14
00:00:40.920 --> 00:00:45.439
<v Speaker 1>and why is analyzing it's so crucial? It seems like

15
00:00:45.560 --> 00:00:47.960
<v Speaker 1>every other day there's a new headline about some data

16
00:00:48.000 --> 00:00:49.640
<v Speaker 1>breach or ransomware attack.

17
00:00:49.840 --> 00:00:52.359
<v Speaker 2>You're right, it's a constant battle out there. It is

18
00:00:52.679 --> 00:00:55.560
<v Speaker 2>malware at its core, is any software designed to wreak

19
00:00:55.640 --> 00:01:02.719
<v Speaker 2>havoc on computer systems or steel sensitive information versus worms, trojans, ransomware,

20
00:01:02.840 --> 00:01:06.959
<v Speaker 2>all those digital bad guys. Analyzing it is like gathering intel.

21
00:01:07.319 --> 00:01:10.680
<v Speaker 2>It helps us understand how it spreads, what it targets,

22
00:01:11.000 --> 00:01:12.799
<v Speaker 2>and what kind of damage it can inflict.

23
00:01:12.920 --> 00:01:13.159
<v Speaker 1>Right.

24
00:01:13.480 --> 00:01:16.640
<v Speaker 2>This knowledge then arms cybersecurity professionals with the tools to

25
00:01:16.680 --> 00:01:20.560
<v Speaker 2>fight back, like creating antivirus software and security patches.

26
00:01:20.799 --> 00:01:24.400
<v Speaker 1>So it's like a digital arms race. Malware developers create

27
00:01:24.439 --> 00:01:28.159
<v Speaker 1>new threats, yeah, exact. Security researchers develop new defenses exactly.

28
00:01:28.879 --> 00:01:32.480
<v Speaker 2>But it's not just about protection, okay. Malware analysis also

29
00:01:32.519 --> 00:01:35.000
<v Speaker 2>plays a crucial role in incident response.

30
00:01:35.239 --> 00:01:35.560
<v Speaker 1>Okay.

31
00:01:35.640 --> 00:01:39.439
<v Speaker 2>If a system's been compromised, it's like a digital autopsy.

32
00:01:40.359 --> 00:01:44.040
<v Speaker 2>Analysts dissect the malware to piece together how it got in,

33
00:01:44.120 --> 00:01:46.680
<v Speaker 2>what it did, and how to prevent it from happening again.

34
00:01:47.200 --> 00:01:50.400
<v Speaker 2>It's like learning from our mistakes digitally speaking.

35
00:01:50.239 --> 00:01:53.840
<v Speaker 1>Got it? So knowing your enemy is just as important

36
00:01:53.840 --> 00:01:57.359
<v Speaker 1>in the digital world as it is in the real world. Yeah, Now,

37
00:01:57.480 --> 00:02:01.879
<v Speaker 1>how do experts actually go about analyze these malicious programs? Well,

38
00:02:02.319 --> 00:02:06.840
<v Speaker 1>the book mentions two main approaches, static and dynamic analysis.

39
00:02:06.920 --> 00:02:09.120
<v Speaker 2>Yes, can you walk us through those absolutely?

40
00:02:09.520 --> 00:02:09.840
<v Speaker 1>Okay.

41
00:02:09.840 --> 00:02:14.560
<v Speaker 2>Static analysis is like examining a suspicious package without opening it.

42
00:02:14.759 --> 00:02:15.080
<v Speaker 1>Okay.

43
00:02:15.120 --> 00:02:19.599
<v Speaker 2>We look for clues on the outside, things like markings, labels,

44
00:02:19.919 --> 00:02:24.360
<v Speaker 2>or even the weight to assess potential threats. Okay, in

45
00:02:24.400 --> 00:02:27.919
<v Speaker 2>the digital world, it means examining the malwaar's code without

46
00:02:27.960 --> 00:02:28.919
<v Speaker 2>actually running it.

47
00:02:29.039 --> 00:02:29.360
<v Speaker 1>Got it.

48
00:02:30.000 --> 00:02:33.680
<v Speaker 2>We're looking for red flags and indicators of compromise, so.

49
00:02:33.800 --> 00:02:36.840
<v Speaker 1>We're basically looking for telltale signs that screen this is

50
00:02:36.879 --> 00:02:37.960
<v Speaker 1>malware exactly.

51
00:02:38.400 --> 00:02:40.639
<v Speaker 2>One of the first things we check is the file signature.

52
00:02:40.960 --> 00:02:43.199
<v Speaker 2>This is a unique sequence of bites at the beginning

53
00:02:43.240 --> 00:02:47.719
<v Speaker 2>of a file that identifies its type, like a digital fingerprint.

54
00:02:47.840 --> 00:02:48.199
<v Speaker 1>I see.

55
00:02:48.520 --> 00:02:52.719
<v Speaker 2>Malware often tries to disguise itself with misleading file extensions,

56
00:02:53.360 --> 00:02:57.159
<v Speaker 2>like labeling an executable file as a harmless image, but

57
00:02:57.280 --> 00:02:59.719
<v Speaker 2>checking the file signature lets us see through the disguise.

58
00:03:00.120 --> 00:03:03.680
<v Speaker 1>Clever those malware developers. But it sounds like security researchers

59
00:03:03.719 --> 00:03:06.240
<v Speaker 1>are one step ahead. Yeah, what are their techniques do

60
00:03:06.280 --> 00:03:07.680
<v Speaker 1>they use in static analysis?

61
00:03:07.840 --> 00:03:11.599
<v Speaker 2>Well, there's actual fingerprinting, which takes the digital fingerprint analogy

62
00:03:11.680 --> 00:03:12.319
<v Speaker 2>even further.

63
00:03:12.560 --> 00:03:12.840
<v Speaker 1>Okay.

64
00:03:13.159 --> 00:03:17.479
<v Speaker 2>We use cryptographic hash functions like MD five or SAHA

65
00:03:17.520 --> 00:03:21.319
<v Speaker 2>two five six to create a unique identifier for the

66
00:03:21.360 --> 00:03:25.000
<v Speaker 2>malware based on its content. Ice This helps us track

67
00:03:25.080 --> 00:03:28.159
<v Speaker 2>specific malware samples, even if they try to change their

68
00:03:28.240 --> 00:03:29.240
<v Speaker 2>name or location.

69
00:03:29.479 --> 00:03:33.039
<v Speaker 1>So it's like having a database of known malware fingerprints.

70
00:03:33.080 --> 00:03:33.560
<v Speaker 2>Exactly.

71
00:03:33.680 --> 00:03:34.199
<v Speaker 1>I see.

72
00:03:34.400 --> 00:03:37.439
<v Speaker 2>We can also extrapt strings from the code. Okay, think

73
00:03:37.479 --> 00:03:40.240
<v Speaker 2>of it like searching for clues in a ransom note.

74
00:03:41.039 --> 00:03:44.599
<v Speaker 2>These strings might reveal website addresses, the malware connects to

75
00:03:44.680 --> 00:03:47.919
<v Speaker 2>files that tries to access wo or even hidden functionality.

76
00:03:48.039 --> 00:03:48.400
<v Speaker 1>Okay.

77
00:03:48.639 --> 00:03:52.159
<v Speaker 2>There are even tools like flaws that can decode ob

78
00:03:52.199 --> 00:03:56.199
<v Speaker 2>puscated strings, essentially secret messages hidden within the code.

79
00:03:56.280 --> 00:03:59.759
<v Speaker 1>Ooh, secret messages. It's like we're cracking a code. Yeah.

80
00:04:00.080 --> 00:04:03.039
<v Speaker 1>What about those packers that malware developers use to make

81
00:04:03.080 --> 00:04:05.680
<v Speaker 1>their code harder to analyze? Yeah, I imagine it's like

82
00:04:05.840 --> 00:04:07.840
<v Speaker 1>trying to read a book that's been shrink wrapped.

83
00:04:08.120 --> 00:04:12.159
<v Speaker 2>That's a great analogy. Packers compress an obfuscate malware code,

84
00:04:12.280 --> 00:04:15.280
<v Speaker 2>making it smaller and more difficult to analyze. But just

85
00:04:15.319 --> 00:04:17.399
<v Speaker 2>like with shrink wrap, we have tools to unpack it.

86
00:04:17.800 --> 00:04:21.279
<v Speaker 2>Packer detection tools can identify which packer was used, and

87
00:04:21.319 --> 00:04:25.120
<v Speaker 2>then unpacking tools can reverse the process, revealing the original code.

88
00:04:25.240 --> 00:04:27.839
<v Speaker 1>Okay, so we can get past those pesky packers. Yes,

89
00:04:27.879 --> 00:04:29.439
<v Speaker 1>what about the pe header?

90
00:04:29.560 --> 00:04:29.879
<v Speaker 2>Yes?

91
00:04:30.040 --> 00:04:32.600
<v Speaker 1>Is that another area of interest for static analysis?

92
00:04:32.600 --> 00:04:36.000
<v Speaker 2>Absolutely? The pehader is like the table of contents for

93
00:04:36.040 --> 00:04:40.199
<v Speaker 2>a Windows executable file. It contains essential information about the

94
00:04:40.240 --> 00:04:45.480
<v Speaker 2>program's structure, its dependencies, and even potential anomalies that might

95
00:04:45.519 --> 00:04:47.000
<v Speaker 2>indicate malicious intent.

96
00:04:47.240 --> 00:04:47.519
<v Speaker 1>Okay.

97
00:04:47.839 --> 00:04:50.279
<v Speaker 2>Analyzing this header it can tell us a lot about

98
00:04:50.279 --> 00:04:53.399
<v Speaker 2>how the malware is organized and what it might try

99
00:04:53.439 --> 00:04:53.680
<v Speaker 2>to do.

100
00:04:54.000 --> 00:04:56.639
<v Speaker 1>It's like getting a sneak peek at the malware's blueprint

101
00:04:56.639 --> 00:04:57.759
<v Speaker 1>before we even try to run.

102
00:04:57.639 --> 00:05:02.040
<v Speaker 2>It exactly okay, And speaking of organismation, analyzing the different

103
00:05:02.040 --> 00:05:06.560
<v Speaker 2>sections within the executable is another key part of static analysis, Okay.

104
00:05:06.600 --> 00:05:10.040
<v Speaker 2>I think of it like dissecting a frog and biology class.

105
00:05:10.319 --> 00:05:14.199
<v Speaker 2>Each section has a specific purpose, either containing code to

106
00:05:14.240 --> 00:05:18.040
<v Speaker 2>be executed or data to be used. Got it. By

107
00:05:18.079 --> 00:05:21.000
<v Speaker 2>examining these sections, we can understand how the malware is

108
00:05:21.000 --> 00:05:23.920
<v Speaker 2>structured and identify potential areas of interest.

109
00:05:24.160 --> 00:05:29.040
<v Speaker 1>Fascinating. So static analysis gives us a pretty comprehensive understanding

110
00:05:29.319 --> 00:05:32.600
<v Speaker 1>of the malware's anatomy and potential behavior. Yeah, but can

111
00:05:32.639 --> 00:05:36.240
<v Speaker 1>we identify which family it belongs to? Just from static analysis?

112
00:05:37.199 --> 00:05:39.199
<v Speaker 1>It seems like there must be tons of different malware

113
00:05:39.199 --> 00:05:39.879
<v Speaker 1>strains out there.

114
00:05:39.920 --> 00:05:43.319
<v Speaker 2>You're right, yeh. The malware world is vast and diverse, right,

115
00:05:43.439 --> 00:05:46.079
<v Speaker 2>But we can use a technique called fuzzy hashing to

116
00:05:46.240 --> 00:05:50.560
<v Speaker 2>identify similarities between different malware samples. Oh okay, it's like

117
00:05:50.600 --> 00:05:53.480
<v Speaker 2>finding those long lost relatives in your family tree, but

118
00:05:53.560 --> 00:05:57.079
<v Speaker 2>for malware. Interesting tools like steep can compare the fuzzy

119
00:05:57.120 --> 00:06:00.519
<v Speaker 2>hashes of different samples and group them into family based

120
00:06:00.560 --> 00:06:02.439
<v Speaker 2>on shared code or characteristics.

121
00:06:02.560 --> 00:06:05.439
<v Speaker 1>So even if the malware tries to change its appearance

122
00:06:05.480 --> 00:06:08.519
<v Speaker 1>slightly exactly, we can still link it to its nefarious

123
00:06:08.519 --> 00:06:09.720
<v Speaker 1>family members exactly.

124
00:06:09.759 --> 00:06:13.680
<v Speaker 2>Of course, there are limitations. Even closely related samples might

125
00:06:13.759 --> 00:06:17.920
<v Speaker 2>have different hash values if they were compiled differently or

126
00:06:18.040 --> 00:06:22.560
<v Speaker 2>slightly modified. But fuzzy hashing gives us a powerful tool

127
00:06:22.680 --> 00:06:25.879
<v Speaker 2>for tracking malware and understanding its evolution sense.

128
00:06:26.000 --> 00:06:29.120
<v Speaker 1>Yeah, and what about Yaiira rules? Ah, those were mentioned

129
00:06:29.120 --> 00:06:29.439
<v Speaker 1>in the book.

130
00:06:29.720 --> 00:06:33.319
<v Speaker 2>Our rules are a malware analyst's best friend. They're like

131
00:06:33.439 --> 00:06:37.399
<v Speaker 2>custom made malware detectors. Think of it like creating a

132
00:06:37.439 --> 00:06:41.480
<v Speaker 2>wanted poster for a specific type of malware. You define

133
00:06:41.480 --> 00:06:45.480
<v Speaker 2>a set of rules based on unique characteristics like specific strings,

134
00:06:45.560 --> 00:06:48.959
<v Speaker 2>bite patterns, or even file sizes. Okay, then you can

135
00:06:49.000 --> 00:06:52.600
<v Speaker 2>scan files against these rules to quickly identify potential threats.

136
00:06:52.959 --> 00:06:55.680
<v Speaker 1>So it's like having a personalized security guard for your

137
00:06:55.720 --> 00:06:59.759
<v Speaker 1>system on the lookout for specific types of malware precisely. Wow.

138
00:07:00.000 --> 00:07:03.040
<v Speaker 2>It helps automate threat detection and makes it much easier

139
00:07:03.079 --> 00:07:04.800
<v Speaker 2>to find known malware families.

140
00:07:04.959 --> 00:07:05.120
<v Speaker 1>Right.

141
00:07:05.519 --> 00:07:10.199
<v Speaker 2>However, yrray rules do have limitations. If a malwaur author

142
00:07:10.319 --> 00:07:13.759
<v Speaker 2>knows about a particular rule, they might modify their code

143
00:07:13.800 --> 00:07:16.839
<v Speaker 2>to evade detection. It's a constant game of cat and mouse.

144
00:07:17.000 --> 00:07:20.040
<v Speaker 1>So it's a constant battle of wits between the malware

145
00:07:20.120 --> 00:07:22.240
<v Speaker 1>developers and the security researchers.

146
00:07:22.319 --> 00:07:24.600
<v Speaker 2>Absolutely, it's one of the things that makes this field

147
00:07:24.639 --> 00:07:27.839
<v Speaker 2>so challenging and exciting it is. But with tools like

148
00:07:27.959 --> 00:07:31.759
<v Speaker 2>Yarra rules, we can stay one step ahead of those

149
00:07:31.839 --> 00:07:32.800
<v Speaker 2>digital bad guys.

150
00:07:33.000 --> 00:07:37.319
<v Speaker 1>Okay, so we've explored static analysis examining the malware without

151
00:07:37.399 --> 00:07:40.319
<v Speaker 1>running it. Yes, now it's time to get our hands

152
00:07:40.360 --> 00:07:43.279
<v Speaker 1>dirty and see this thing in action. Yeah, but before

153
00:07:43.319 --> 00:07:45.720
<v Speaker 1>we unleash the beast, we need to talk about the

154
00:07:45.800 --> 00:07:50.079
<v Speaker 1>lab environment. We don't want to accidentally unleash this malware

155
00:07:50.120 --> 00:07:50.639
<v Speaker 1>on the world.

156
00:07:50.720 --> 00:07:55.199
<v Speaker 2>You're absolutely right. Dynamic analysis involves actually running the malware,

157
00:07:55.639 --> 00:07:59.079
<v Speaker 2>so we need a secure and isolated environment to contain

158
00:07:59.160 --> 00:08:00.480
<v Speaker 2>it and observe its behavior.

159
00:08:00.639 --> 00:08:01.160
<v Speaker 1>Makes sense.

160
00:08:01.439 --> 00:08:04.720
<v Speaker 2>The book recommends a setup with multiple virtual machines.

161
00:08:04.839 --> 00:08:05.079
<v Speaker 1>Okay.

162
00:08:05.399 --> 00:08:10.120
<v Speaker 2>One Windows VM, completely isolated from the network, acts as

163
00:08:10.160 --> 00:08:12.399
<v Speaker 2>our digital sandbox to run the malware.

164
00:08:12.519 --> 00:08:12.839
<v Speaker 1>Got it.

165
00:08:13.160 --> 00:08:16.439
<v Speaker 2>A separate Linux VM serves as a gateway to simulate

166
00:08:16.519 --> 00:08:21.160
<v Speaker 2>Internet services, allowing us to analyze the malware's network communications

167
00:08:21.439 --> 00:08:23.439
<v Speaker 2>without any risk to the outside world.

168
00:08:23.600 --> 00:08:25.720
<v Speaker 1>So it's like setting up a digital Petri dish to

169
00:08:25.800 --> 00:08:28.800
<v Speaker 1>observe the malwaar's behavior precisely. I like it.

170
00:08:28.879 --> 00:08:32.360
<v Speaker 2>This controlled environment allows us to see what the malware

171
00:08:32.480 --> 00:08:36.240
<v Speaker 2>does in real time and gather valuable insights into its

172
00:08:36.240 --> 00:08:37.759
<v Speaker 2>capabilities and intentions.

173
00:08:37.960 --> 00:08:40.279
<v Speaker 1>Okay, our digital lab is all set up. Yeah, we've

174
00:08:40.320 --> 00:08:42.879
<v Speaker 1>got our safety goggles on and we're ready to release

175
00:08:42.919 --> 00:08:44.720
<v Speaker 1>the malware. Okay, what happens next?

176
00:08:44.960 --> 00:08:47.720
<v Speaker 2>First, we always start with a clean snapshot of our

177
00:08:47.799 --> 00:08:52.080
<v Speaker 2>virtual machines, ensuring a pristine system for each analysis.

178
00:08:52.399 --> 00:08:52.799
<v Speaker 1>Okay.

179
00:08:53.159 --> 00:08:56.720
<v Speaker 2>Then before executing the malware, Yeah, we fire up our

180
00:08:56.759 --> 00:09:00.320
<v Speaker 2>monitoring tools at it. These are like our surveillance cameras, right,

181
00:09:00.600 --> 00:09:03.600
<v Speaker 2>capturing the malwares every move I see. We want to

182
00:09:03.639 --> 00:09:07.879
<v Speaker 2>see what files it touches, what registry keys it modifies,

183
00:09:08.000 --> 00:09:09.639
<v Speaker 2>and what processes it spawns.

184
00:09:09.759 --> 00:09:12.519
<v Speaker 1>I'm picturing a whole team of digital detectives huddled around

185
00:09:12.519 --> 00:09:17.120
<v Speaker 1>their screens. Yeah, monitoring the malwares every move. Right. What

186
00:09:17.279 --> 00:09:18.679
<v Speaker 1>kind of tools are in their arsenal?

187
00:09:19.000 --> 00:09:21.759
<v Speaker 2>We have a whole suite of powerful tools at our disposal.

188
00:09:22.360 --> 00:09:25.919
<v Speaker 2>Process monitor is a personal favorite. It captures real time

189
00:09:25.960 --> 00:09:29.960
<v Speaker 2>information about virtually everything the malware does on the system. Wow,

190
00:09:30.000 --> 00:09:32.799
<v Speaker 2>giving us a detailed timeline of its actions.

191
00:09:33.519 --> 00:09:34.320
<v Speaker 1>That's amazing.

192
00:09:34.399 --> 00:09:36.519
<v Speaker 2>It's like having a security camera with X ray vision.

193
00:09:36.720 --> 00:09:40.720
<v Speaker 1>Wow. That sounds incredibly comprehensive. It is, But I imagine

194
00:09:40.759 --> 00:09:44.279
<v Speaker 1>sifting through all that data must be overwhelming. You're right,

195
00:09:44.519 --> 00:09:46.159
<v Speaker 1>like trying to find a needle in a haystack.

196
00:09:46.279 --> 00:09:49.759
<v Speaker 2>You're right. Process monitor can generate a lot of data.

197
00:09:49.879 --> 00:09:52.679
<v Speaker 2>That's where a tool like norabin comes in. The Python

198
00:09:52.720 --> 00:09:57.360
<v Speaker 2>script that works alongside process monitor, applying predefined filters to

199
00:09:57.440 --> 00:10:00.840
<v Speaker 2>highlight the most suspicious events I see. It helps us

200
00:10:00.879 --> 00:10:03.200
<v Speaker 2>separate the signal from the noise and focus on the

201
00:10:03.240 --> 00:10:04.360
<v Speaker 2>malware's footprints.

202
00:10:04.639 --> 00:10:08.039
<v Speaker 1>Love it like a digital magnifying glass. Yes, what other

203
00:10:08.159 --> 00:10:10.600
<v Speaker 1>tools are in our digital detective kit?

204
00:10:11.039 --> 00:10:14.320
<v Speaker 2>Process hacker is another essential tool. It lets us peek

205
00:10:14.320 --> 00:10:19.440
<v Speaker 2>into the system's running processes, examine their attributes, and even

206
00:10:19.559 --> 00:10:21.120
<v Speaker 2>terminate them if necessary.

207
00:10:21.240 --> 00:10:21.600
<v Speaker 1>Got it.

208
00:10:21.600 --> 00:10:23.679
<v Speaker 2>It's like having a direct line to the brain of

209
00:10:23.720 --> 00:10:24.759
<v Speaker 2>the operating system.

210
00:10:25.039 --> 00:10:27.840
<v Speaker 1>And what about the malwaar's attempts to communicate with the

211
00:10:27.879 --> 00:10:30.559
<v Speaker 1>outside world. I imagine we need to keep a close

212
00:10:30.559 --> 00:10:31.840
<v Speaker 1>eye on its network traffic.

213
00:10:31.960 --> 00:10:34.919
<v Speaker 2>Absolutely, Wireshark is our go to tool for that. It

214
00:10:35.120 --> 00:10:38.879
<v Speaker 2>captures packets traveling over the network, allowing us to dissect

215
00:10:38.919 --> 00:10:42.840
<v Speaker 2>the malwar's communications in detail. We can see which servers

216
00:10:42.879 --> 00:10:46.240
<v Speaker 2>it tries to connect to, what data it sends or receives,

217
00:10:46.639 --> 00:10:48.360
<v Speaker 2>and even what protocols it uses.

218
00:10:48.480 --> 00:10:50.840
<v Speaker 1>So even though we've isolated the malware in a virtual

219
00:10:50.960 --> 00:10:53.960
<v Speaker 1>environment exactly, we can still see its attempts to phone

220
00:10:53.960 --> 00:10:55.120
<v Speaker 1>home exactly.

221
00:10:55.279 --> 00:11:01.039
<v Speaker 2>And to make that simulated environment even more realistic, we usetsim.

222
00:11:01.440 --> 00:11:05.279
<v Speaker 2>It runs on our Linux VM and simulates various Internet

223
00:11:05.320 --> 00:11:10.840
<v Speaker 2>services like web servers, DNS servers, and email servers. This way,

224
00:11:10.879 --> 00:11:14.120
<v Speaker 2>the malware thinks it's communicating with the real world, but

225
00:11:14.200 --> 00:11:17.960
<v Speaker 2>we can intercept and analyze its traffic safely within our lab.

226
00:11:18.200 --> 00:11:20.200
<v Speaker 1>So it's like setting a chap and then watching the

227
00:11:20.240 --> 00:11:24.000
<v Speaker 1>malware walk right into it exactly. Okay, our monitoring tools

228
00:11:24.000 --> 00:11:27.840
<v Speaker 1>are running, the malware is executed we're gathering data. What

229
00:11:27.960 --> 00:11:28.720
<v Speaker 1>happens next?

230
00:11:29.120 --> 00:11:32.080
<v Speaker 2>We let the malware run for a specific period, depending

231
00:11:32.120 --> 00:11:35.279
<v Speaker 2>on its nature and our goals. Then we stop the

232
00:11:35.360 --> 00:11:39.399
<v Speaker 2>monitoring tools and begin the most exciting part, analyzing the results.

233
00:11:39.840 --> 00:11:43.679
<v Speaker 2>We sift through the logs, reports, and captured network traffic,

234
00:11:44.240 --> 00:11:46.159
<v Speaker 2>piecing together the malware story.

235
00:11:46.679 --> 00:11:49.919
<v Speaker 1>It's like solving a digital puzzle. Yes, connecting the dots,

236
00:11:50.039 --> 00:11:52.320
<v Speaker 1>finding patterns, and figuring out what it all means.

237
00:11:52.840 --> 00:11:58.720
<v Speaker 2>Precisely. By correlating data from different tools, we can reconstruct

238
00:11:58.759 --> 00:12:03.759
<v Speaker 2>the malware's actions, understand its goals okay, and identify potential

239
00:12:03.840 --> 00:12:07.360
<v Speaker 2>vulnerabilities it exploits got it. For instance, if we see

240
00:12:07.600 --> 00:12:11.759
<v Speaker 2>process monitor flagging, file system changes, and wire sharks showing

241
00:12:11.840 --> 00:12:15.039
<v Speaker 2>data being sent to a specific server, we can infer

242
00:12:15.159 --> 00:12:17.600
<v Speaker 2>that the malware is stealing information.

243
00:12:18.200 --> 00:12:21.679
<v Speaker 1>Amazing, So we can track the malwares every move and

244
00:12:21.759 --> 00:12:26.039
<v Speaker 1>piece together its modis exactly, but to understand them how

245
00:12:26.120 --> 00:12:29.120
<v Speaker 1>it actually accomplishes these tasks, we need to go even

246
00:12:29.240 --> 00:12:31.799
<v Speaker 1>deeper into the world of assembly code.

247
00:12:31.879 --> 00:12:33.840
<v Speaker 2>You're absolutely right, Okay.

248
00:12:33.600 --> 00:12:36.320
<v Speaker 1>I'm ready to level up our analysis skills. Okay, but

249
00:12:36.399 --> 00:12:39.360
<v Speaker 1>before we dive into that world, maybe you can give

250
00:12:39.399 --> 00:12:42.440
<v Speaker 1>me a crash course in assembly code and what it

251
00:12:42.480 --> 00:12:42.960
<v Speaker 1>all means.

252
00:12:43.159 --> 00:12:45.759
<v Speaker 2>Imagine you have a program written in a language like

253
00:12:45.919 --> 00:12:50.759
<v Speaker 2>C plus plus, something that's relatively easy for humans to

254
00:12:50.799 --> 00:12:52.120
<v Speaker 2>read and understand.

255
00:12:52.399 --> 00:12:54.879
<v Speaker 1>Right, I vaguely remember something about that from my computer

256
00:12:54.919 --> 00:12:55.600
<v Speaker 1>science dasee.

257
00:12:55.639 --> 00:12:59.480
<v Speaker 2>Well, assembly language sits between those two extremes. Okay, it's

258
00:12:59.559 --> 00:13:04.240
<v Speaker 2>a human readable representation of that machine code, using knemonics

259
00:13:04.360 --> 00:13:09.000
<v Speaker 2>or short codes to represent different instructions. Disassemblers like IDA

260
00:13:09.159 --> 00:13:13.279
<v Speaker 2>pro translate machine code back into this assembly language, making

261
00:13:13.279 --> 00:13:15.759
<v Speaker 2>it easier for us to understand what the program is doing.

262
00:13:15.840 --> 00:13:18.519
<v Speaker 1>So it's like translating a secret code into something we

263
00:13:18.559 --> 00:13:19.799
<v Speaker 1>can decipher exactly.

264
00:13:20.000 --> 00:13:24.000
<v Speaker 2>And then debuggers like by sixty forty BG allow us

265
00:13:24.039 --> 00:13:27.720
<v Speaker 2>to step through the program's execution, one instruction at a time.

266
00:13:28.200 --> 00:13:31.799
<v Speaker 2>We can watch how the data changes in memory, identify

267
00:13:31.840 --> 00:13:34.919
<v Speaker 2>which functions are called, and even modify the program's behavior

268
00:13:35.000 --> 00:13:35.960
<v Speaker 2>to see how it reacts.

269
00:13:36.039 --> 00:13:39.480
<v Speaker 1>So we're like digital puppeteers controlling the malware's strings.

270
00:13:39.639 --> 00:13:41.600
<v Speaker 2>That's one way to put it. I like it, But

271
00:13:41.759 --> 00:13:44.480
<v Speaker 2>of course, to be effective puppeteers, we need to understand

272
00:13:44.519 --> 00:13:48.440
<v Speaker 2>the language the malware speaks. A solid grasp of assembly

273
00:13:48.519 --> 00:13:52.879
<v Speaker 2>language and the by eighty six architecture, the instruction set

274
00:13:52.960 --> 00:13:56.240
<v Speaker 2>used by most processors is crucial for this type of analysis.

275
00:13:56.480 --> 00:14:00.360
<v Speaker 1>It sounds challenging, but incredibly rewarding. It is learned how

276
00:14:00.399 --> 00:14:03.360
<v Speaker 1>to analyze malware from a high level with static and

277
00:14:03.440 --> 00:14:06.000
<v Speaker 1>dynamic analysis. Yes, and now we're ready to go deep

278
00:14:06.000 --> 00:14:08.840
<v Speaker 1>into the code itself. We've unlocked a whole new level

279
00:14:08.960 --> 00:14:11.679
<v Speaker 1>of malware analysis expertise.

280
00:14:11.279 --> 00:14:14.519
<v Speaker 2>Exactly, and with these skills we can start to uncover

281
00:14:14.600 --> 00:14:18.320
<v Speaker 2>the advanced techniques that malware authors use to evade detection

282
00:14:18.559 --> 00:14:21.399
<v Speaker 2>and achieve their nefarious goals. We can learn how they

283
00:14:21.519 --> 00:14:25.519
<v Speaker 2>hide themselves, yeah, spread to other systems, and steal sensitive information.

284
00:14:25.639 --> 00:14:26.000
<v Speaker 1>Wow.

285
00:14:26.440 --> 00:14:29.600
<v Speaker 2>It's a fascinating and constantly evolving field, it is.

286
00:14:29.799 --> 00:14:33.480
<v Speaker 1>Yeah, welcome back to the deep dive. We're still neck

287
00:14:33.600 --> 00:14:36.080
<v Speaker 1>deep in the world of malware analysis, and last time

288
00:14:36.159 --> 00:14:39.399
<v Speaker 1>things got pretty intense. With static and dynamic analysis techniques,

289
00:14:39.840 --> 00:14:41.679
<v Speaker 1>we even took a peek at the inner workings of

290
00:14:41.679 --> 00:14:43.960
<v Speaker 1>malware through the lens of the assembly code.

291
00:14:44.159 --> 00:14:46.799
<v Speaker 2>That's right. We laid a solid foundation for understanding how

292
00:14:46.799 --> 00:14:49.120
<v Speaker 2>malware behaves and how experts analyze it.

293
00:14:49.240 --> 00:14:51.480
<v Speaker 1>But today we're going even deeper into a realm that

294
00:14:51.639 --> 00:14:55.600
<v Speaker 1>sounds straight out of a crime procedural memory forensics.

295
00:14:55.840 --> 00:14:58.759
<v Speaker 2>It's exactly like a digital crime scene investigation, but instead

296
00:14:58.759 --> 00:15:01.879
<v Speaker 2>of dusting for fingerprints, we're digging into a computer's RAM,

297
00:15:02.360 --> 00:15:05.240
<v Speaker 2>that Voldel memory that holds the system's current state to

298
00:15:05.320 --> 00:15:07.159
<v Speaker 2>find those crucial bits of evidence.

299
00:15:07.279 --> 00:15:09.440
<v Speaker 1>So even if the malware tries to cover its tracks,

300
00:15:09.480 --> 00:15:13.440
<v Speaker 1>erase files, or cleanup registry entries, we might still find

301
00:15:13.480 --> 00:15:16.039
<v Speaker 1>its digital footprints and memory precisely.

302
00:15:17.000 --> 00:15:19.759
<v Speaker 2>Think of it like finding a discarded cigarette butt or

303
00:15:19.759 --> 00:15:22.960
<v Speaker 2>a muddy footprint at a crime scene. The culprint might

304
00:15:23.039 --> 00:15:25.799
<v Speaker 2>have vanished, but they've left behind traces of their presence.

305
00:15:26.679 --> 00:15:30.399
<v Speaker 2>Memory forensics helps us uncover these digital remnants and reconstruct

306
00:15:30.399 --> 00:15:31.000
<v Speaker 2>what happened.

307
00:15:31.120 --> 00:15:34.240
<v Speaker 1>Okay, that's a powerful image. So memory forensics is our

308
00:15:34.279 --> 00:15:37.519
<v Speaker 1>secret weapon, our digital magnifying glass for catching those sneaky

309
00:15:37.519 --> 00:15:40.440
<v Speaker 1>malware actors. But how do we actually get access to

310
00:15:40.480 --> 00:15:42.320
<v Speaker 1>this memory. It's not like we could just crack open

311
00:15:42.320 --> 00:15:43.720
<v Speaker 1>a computer and peer inside.

312
00:15:43.960 --> 00:15:46.879
<v Speaker 2>You're right. Accessing RAM directly is tricky, but we can

313
00:15:46.919 --> 00:15:49.159
<v Speaker 2>capture a snapshot of it a memory gump, at a

314
00:15:49.159 --> 00:15:52.360
<v Speaker 2>specific moment in time. This dump is saved to a

315
00:15:52.399 --> 00:15:54.919
<v Speaker 2>file on disc, which we can then analyze in detail.

316
00:15:55.120 --> 00:15:58.320
<v Speaker 2>It's like freezing the crime scene and then meticulously examining

317
00:15:58.399 --> 00:15:59.240
<v Speaker 2>every detail.

318
00:15:59.360 --> 00:16:02.960
<v Speaker 1>But memory is volatile, right, meaning its contents disappear when

319
00:16:02.960 --> 00:16:05.240
<v Speaker 1>the computer shuts down. So we need to act fast

320
00:16:05.240 --> 00:16:07.200
<v Speaker 1>and use the right tools to capture this memory dump

321
00:16:07.200 --> 00:16:08.000
<v Speaker 1>before it vanishes.

322
00:16:08.320 --> 00:16:11.840
<v Speaker 2>Exactly. We need to be quick on the draw. Digitally speaking,

323
00:16:12.360 --> 00:16:14.679
<v Speaker 2>The book mentions a tool called dump it, which is

324
00:16:14.759 --> 00:16:17.759
<v Speaker 2>part of the Comy toolkit. It's incredibly easy to use.

325
00:16:17.840 --> 00:16:20.720
<v Speaker 2>Run it with administrator privileges, and it'll create a memory

326
00:16:20.799 --> 00:16:23.360
<v Speaker 2>dump file for you. It's like having a digital camera

327
00:16:23.440 --> 00:16:25.440
<v Speaker 2>that can capture the state of the entire system in.

328
00:16:25.399 --> 00:16:28.840
<v Speaker 1>An instant snapshot taken. Now, when we have this memory

329
00:16:28.919 --> 00:16:30.639
<v Speaker 1>dumb file, what do we do with it?

330
00:16:31.000 --> 00:16:33.799
<v Speaker 2>That's where the real fund begins the analysis. We use

331
00:16:33.799 --> 00:16:37.559
<v Speaker 2>a powerful open source framework called volatility to extract all

332
00:16:37.600 --> 00:16:40.600
<v Speaker 2>sorts of valuable information from these memory dumps. It's like

333
00:16:40.679 --> 00:16:43.720
<v Speaker 2>having a Swiss Army knife for memory analysis. It's packed

334
00:16:43.720 --> 00:16:47.279
<v Speaker 2>with plugins that allow us to examine processes, loaded modules,

335
00:16:47.320 --> 00:16:50.840
<v Speaker 2>network connections, and even user activity all from that snapshot

336
00:16:50.879 --> 00:16:51.279
<v Speaker 2>of ram.

337
00:16:51.399 --> 00:16:54.559
<v Speaker 1>Wow, it sounds incredibly versatile. What kind of insights can

338
00:16:54.559 --> 00:16:57.039
<v Speaker 1>we actually gain from this memory analysis? What are we

339
00:16:57.080 --> 00:16:57.559
<v Speaker 1>looking for.

340
00:16:57.919 --> 00:16:59.600
<v Speaker 2>Well, one of the first things we do is check

341
00:16:59.639 --> 00:17:01.879
<v Speaker 2>which processes we're running at the time of the dump.

342
00:17:02.080 --> 00:17:04.640
<v Speaker 2>Volatility has a plug in called slist that essentially gives

343
00:17:04.720 --> 00:17:07.000
<v Speaker 2>us a task manager for the memory dump. We can

344
00:17:07.039 --> 00:17:10.359
<v Speaker 2>see all the running processes, their process IDs, parent processes,

345
00:17:10.440 --> 00:17:11.880
<v Speaker 2>the whole family tree.

346
00:17:11.640 --> 00:17:13.519
<v Speaker 1>So we can see what was running, who started it,

347
00:17:13.559 --> 00:17:16.240
<v Speaker 1>and when. But how does this help us identify malware?

348
00:17:16.759 --> 00:17:19.640
<v Speaker 2>Often malware tries to hide in plain sight by mimicking

349
00:17:19.720 --> 00:17:23.160
<v Speaker 2>legitimate processes. It might use a slightly altered name or

350
00:17:23.200 --> 00:17:26.359
<v Speaker 2>masquerade as a system process. But with slist we can

351
00:17:26.440 --> 00:17:29.519
<v Speaker 2>scrutinize the process lists and look for those subtle discrepancies

352
00:17:29.559 --> 00:17:31.319
<v Speaker 2>that might betray a malicious actor.

353
00:17:31.599 --> 00:17:34.079
<v Speaker 1>It's like spotting a counterfeit bill amongst the stack of

354
00:17:34.119 --> 00:17:37.680
<v Speaker 1>real ones. You need a keen eye for detail exactly.

355
00:17:38.240 --> 00:17:40.640
<v Speaker 2>The book actually gives a great example of this. In

356
00:17:40.680 --> 00:17:44.000
<v Speaker 2>a memory image infected with the Presese malware. The slist

357
00:17:44.039 --> 00:17:49.240
<v Speaker 2>output revealed two suspicious processes, svose dot ex and such

358
00:17:49.279 --> 00:17:50.119
<v Speaker 2>chos dot ex.

359
00:17:50.400 --> 00:17:53.039
<v Speaker 1>With those look almost identical to the legitimate sv cos

360
00:17:53.079 --> 00:17:56.319
<v Speaker 1>dot exx process, which I know handles a bunch of

361
00:17:56.319 --> 00:17:59.359
<v Speaker 1>system services. It's like they just added an extra dot precisely.

362
00:17:59.559 --> 00:18:01.759
<v Speaker 2>That's a classic tactic for malware trying to blend in

363
00:18:01.799 --> 00:18:04.880
<v Speaker 2>by mimicking the names of legitimate processes. But even a

364
00:18:04.880 --> 00:18:07.319
<v Speaker 2>single extra character can be a dead giveaway for a

365
00:18:07.359 --> 00:18:07.839
<v Speaker 2>trained eye.

366
00:18:08.200 --> 00:18:11.799
<v Speaker 1>So SLISS helps us spot those subtle differences and identify

367
00:18:12.079 --> 00:18:15.240
<v Speaker 1>potential malware lurking in the process list. But what if

368
00:18:15.240 --> 00:18:17.839
<v Speaker 1>the malware is even more clever and tries to hide

369
00:18:17.880 --> 00:18:22.240
<v Speaker 1>its processes altogether, like a digital ninja disappearing into the shadows.

370
00:18:22.960 --> 00:18:23.880
<v Speaker 1>Can we still catch it?

371
00:18:23.960 --> 00:18:27.720
<v Speaker 2>Absolutely? Attackers might use a technique called direct kernel object

372
00:18:27.799 --> 00:18:32.160
<v Speaker 2>manipulation or DKM for short, to make their processes invisible

373
00:18:32.200 --> 00:18:33.839
<v Speaker 2>to traditional detection methods.

374
00:18:34.160 --> 00:18:36.920
<v Speaker 1>DKM that sounds serious, what's going on there?

375
00:18:37.440 --> 00:18:40.240
<v Speaker 2>Imagine a puppet master controlling the strings of a puppet show.

376
00:18:40.559 --> 00:18:44.720
<v Speaker 2>With DKM, malware can essentially manipulate the operating system's kernel

377
00:18:44.759 --> 00:18:47.519
<v Speaker 2>its core to hide processes from view. It's like cutting

378
00:18:47.519 --> 00:18:50.079
<v Speaker 2>the strings, so the puppet disappears from the stage, so it's.

379
00:18:49.960 --> 00:18:52.480
<v Speaker 1>Like the malware is tampering with the operating system itself.

380
00:18:52.480 --> 00:18:55.200
<v Speaker 1>That's some next level stuff. But if SLISS relies on

381
00:18:55.240 --> 00:18:57.920
<v Speaker 1>the kernel to provide the process list, how can we

382
00:18:58.000 --> 00:19:00.640
<v Speaker 1>find those hidden processes. Is it even possible?

383
00:19:00.920 --> 00:19:04.519
<v Speaker 2>It is. Thankfully Volatility has another plug in called Scan.

384
00:19:05.440 --> 00:19:09.400
<v Speaker 2>Unlike slist, Scan doesn't solely rely on the kernel's process list.

385
00:19:09.880 --> 00:19:12.960
<v Speaker 2>It uses a technique called pool tag scanning, which is

386
00:19:13.000 --> 00:19:15.319
<v Speaker 2>like having a bloodhound that can sniff out those hidden

387
00:19:15.359 --> 00:19:17.160
<v Speaker 2>processes even if they've gone off the grid.

388
00:19:17.279 --> 00:19:20.480
<v Speaker 1>Okay, I'm intrigued. How does this pool tag scanning work.

389
00:19:20.880 --> 00:19:24.880
<v Speaker 2>The Windows kernel manages memory in chunks called pools. Think

390
00:19:24.880 --> 00:19:28.039
<v Speaker 2>of them like containers for data, and each pool is

391
00:19:28.119 --> 00:19:31.319
<v Speaker 2>tagged with a unique identifier, a pool tag like a

392
00:19:31.400 --> 00:19:35.440
<v Speaker 2>label on a container. Certain kernel objects, including processes, are

393
00:19:35.480 --> 00:19:38.599
<v Speaker 2>always allocated from pools with specific pool tags.

394
00:19:38.599 --> 00:19:40.519
<v Speaker 1>So it's like knowing that all the bananas are stored

395
00:19:40.519 --> 00:19:42.759
<v Speaker 1>in containers labeled B and all the apples are in

396
00:19:42.799 --> 00:19:43.960
<v Speaker 1>containers labeled.

397
00:19:43.640 --> 00:19:46.640
<v Speaker 2>A exactly, and scan can look for those containers with

398
00:19:46.720 --> 00:19:49.880
<v Speaker 2>specific pool tags to find processes even if they've been

399
00:19:49.960 --> 00:19:53.240
<v Speaker 2>unlinked from the main process list. It's like knowing where

400
00:19:53.240 --> 00:19:55.400
<v Speaker 2>to look for the evidence, even if someone has tried

401
00:19:55.400 --> 00:19:55.839
<v Speaker 2>to hide it.

402
00:19:56.079 --> 00:19:59.759
<v Speaker 1>That's brilliant. So even if malware uses dkom to go

403
00:20:00.000 --> 00:20:04.160
<v Speaker 1>stealth mode, scan can still track it down. But you

404
00:20:04.279 --> 00:20:07.200
<v Speaker 1>mentioned that pool tags themselves can be manipulated. Right, it

405
00:20:07.200 --> 00:20:09.519
<v Speaker 1>seems like it's a constant back and forth, attackers trying

406
00:20:09.519 --> 00:20:11.759
<v Speaker 1>to hide an analyst developing tools to find them.

407
00:20:11.759 --> 00:20:14.720
<v Speaker 2>You're absolutely right, it's a constant arms race. But we

408
00:20:14.799 --> 00:20:18.079
<v Speaker 2>have even more tools in our arsenal. Volatility has a

409
00:20:18.119 --> 00:20:22.200
<v Speaker 2>plug in called Sexview, which is like the ultimate processed detective.

410
00:20:22.680 --> 00:20:26.000
<v Speaker 2>It uses seven, yes, seven different methods to enumerate processes.

411
00:20:26.119 --> 00:20:28.839
<v Speaker 1>Seven methods. That's overkill, isn't it not at all?

412
00:20:29.160 --> 00:20:31.799
<v Speaker 2>By comparing the results from these different sources, peace View

413
00:20:31.880 --> 00:20:35.599
<v Speaker 2>can detect discrepancies that might indicate manipulation. It's like having

414
00:20:35.680 --> 00:20:38.400
<v Speaker 2>seven witnesses to a crime. If their stories don't match up,

415
00:20:38.640 --> 00:20:40.000
<v Speaker 2>you know something fishy is going on.

416
00:20:40.160 --> 00:20:42.480
<v Speaker 1>So if one method shows a process but another doesn't,

417
00:20:42.559 --> 00:20:43.480
<v Speaker 1>that's a big red flag.

418
00:20:43.559 --> 00:20:47.680
<v Speaker 2>Precisely, it's a powerful way to expose hidden or manipulated processes,

419
00:20:47.759 --> 00:20:49.680
<v Speaker 2>even if attackers have gone to great links to cover

420
00:20:49.720 --> 00:20:50.240
<v Speaker 2>their tracks.

421
00:20:50.440 --> 00:20:54.680
<v Speaker 1>Okay, Volatility is officially blowing my mind. It's like having

422
00:20:54.680 --> 00:20:57.119
<v Speaker 1>a superpower that lets us see through the matrix of

423
00:20:57.160 --> 00:21:01.839
<v Speaker 1>a computer system. We've learned how to enumerate processes, identify

424
00:21:01.880 --> 00:21:04.960
<v Speaker 1>suspicious activity, and even uncover those processes that have gone

425
00:21:04.960 --> 00:21:08.599
<v Speaker 1>into hiding. But we've been talking about processes as these

426
00:21:08.640 --> 00:21:11.680
<v Speaker 1>sort of abstract entities. Can we peek inside them and

427
00:21:11.680 --> 00:21:12.799
<v Speaker 1>see what they're actually doing?

428
00:21:13.079 --> 00:21:17.079
<v Speaker 2>Absolutely, each process has its own private memory space, kind

429
00:21:17.079 --> 00:21:19.759
<v Speaker 2>of like its own apartment in the computer's memory building,

430
00:21:20.519 --> 00:21:23.400
<v Speaker 2>And inside this memory space we can find all sorts

431
00:21:23.440 --> 00:21:27.359
<v Speaker 2>of interesting artifacts. The executable code, the data the process

432
00:21:27.519 --> 00:21:30.160
<v Speaker 2>is working with, the stack used for function calls, and

433
00:21:30.240 --> 00:21:32.160
<v Speaker 2>the heap for dynamic memory allocation.

434
00:21:32.440 --> 00:21:35.079
<v Speaker 1>So we can see what files the process is accessing,

435
00:21:35.079 --> 00:21:37.640
<v Speaker 1>what data it's dealing, and even what code it might

436
00:21:37.680 --> 00:21:38.240
<v Speaker 1>be injecting.

437
00:21:38.319 --> 00:21:41.640
<v Speaker 2>Precisely, it's like having x ray vision to the malwares operations.

438
00:21:41.720 --> 00:21:43.680
<v Speaker 2>We can see what it's doing step by step.

439
00:21:43.720 --> 00:21:45.599
<v Speaker 1>Okay, I'm ready to put on those x ray goggles.

440
00:21:45.640 --> 00:21:46.440
<v Speaker 1>Where do we start?

441
00:21:46.640 --> 00:21:49.839
<v Speaker 2>Analyzing loaded modules? Is a good place to begin. Remember

442
00:21:49.880 --> 00:21:52.440
<v Speaker 2>those deal wells we talked about, those libraries of shared

443
00:21:52.480 --> 00:21:56.440
<v Speaker 2>code that programs use. Well, by examining which modules are

444
00:21:56.480 --> 00:21:59.400
<v Speaker 2>loaded into a process as memory space, we can get

445
00:21:59.480 --> 00:22:01.279
<v Speaker 2>valuable in sites into its behavior.

446
00:22:01.599 --> 00:22:03.799
<v Speaker 1>So if we see a process loading a module that's

447
00:22:03.839 --> 00:22:07.720
<v Speaker 1>known to be malicious, bingo, we've got our culprit exactly.

448
00:22:07.839 --> 00:22:10.559
<v Speaker 2>Volatility has a plug in called DLI list that lists

449
00:22:10.599 --> 00:22:13.480
<v Speaker 2>all the modules loaded by a specific process. It's like

450
00:22:13.559 --> 00:22:17.000
<v Speaker 2>taking inventory of the tools in a suspects toolbox.

451
00:22:17.160 --> 00:22:20.200
<v Speaker 1>Makes sense, But what if the malware is trying to

452
00:22:20.240 --> 00:22:23.240
<v Speaker 1>be sneaky and hides those malicious modules? Can we still

453
00:22:23.279 --> 00:22:23.759
<v Speaker 1>find them?

454
00:22:23.960 --> 00:22:26.880
<v Speaker 2>Of course, remember how we talked about the PE the

455
00:22:26.960 --> 00:22:29.799
<v Speaker 2>process environment block. It's like a processes ID card that,

456
00:22:29.839 --> 00:22:33.079
<v Speaker 2>among other things, lists its loaded modules. Well, malware can

457
00:22:33.119 --> 00:22:35.880
<v Speaker 2>try to manipulate this ID card, removing the malicious modules

458
00:22:35.880 --> 00:22:36.400
<v Speaker 2>from the list.

459
00:22:36.519 --> 00:22:38.279
<v Speaker 1>So it's like the malware is trying to forge its

460
00:22:38.279 --> 00:22:41.640
<v Speaker 1>own documents. But surely we can see through this deception.

461
00:22:41.400 --> 00:22:44.799
<v Speaker 2>Right absolutely. Volatility has another plug in called Elder Modules

462
00:22:44.839 --> 00:22:47.640
<v Speaker 2>that doesn't just rely on the PB's list of modules.

463
00:22:47.920 --> 00:22:51.359
<v Speaker 2>It digs deeper, analyzing the processes memory space using something

464
00:22:51.400 --> 00:22:54.720
<v Speaker 2>called virtual address descriptors or VADs VADs.

465
00:22:55.279 --> 00:22:57.240
<v Speaker 1>Those sound familiar, but refresh my memory.

466
00:22:57.400 --> 00:22:59.920
<v Speaker 2>Think of VADs as a detailed map of a process's

467
00:23:00.079 --> 00:23:04.160
<v Speaker 2>memory space. Each VAD describes a specific region of memory,

468
00:23:04.240 --> 00:23:08.599
<v Speaker 2>whether it's code, data, or something else. By analyzing these VADs,

469
00:23:08.680 --> 00:23:13.039
<v Speaker 2>alger modules can identify discrepancies between the actual memory usage

470
00:23:13.359 --> 00:23:16.359
<v Speaker 2>and the modules listed in the PEB. It's like comparing

471
00:23:16.359 --> 00:23:18.839
<v Speaker 2>the blueprint of a house to the actual structure and

472
00:23:18.920 --> 00:23:21.039
<v Speaker 2>finding a hidden room that wasn't on the plan.

473
00:23:21.240 --> 00:23:23.720
<v Speaker 1>So even if the malware tries to forge its ID card,

474
00:23:23.960 --> 00:23:26.200
<v Speaker 1>we can still find those hidden modules by looking at

475
00:23:26.200 --> 00:23:28.359
<v Speaker 1>the actual memory layout correctly.

476
00:23:28.640 --> 00:23:32.000
<v Speaker 2>And this technique is particularly effective for uncovering rootkits, which

477
00:23:32.039 --> 00:23:34.279
<v Speaker 2>often go to great lengths to hide their presence in

478
00:23:34.279 --> 00:23:34.759
<v Speaker 2>the system.

479
00:23:35.240 --> 00:23:38.920
<v Speaker 1>Root kits those sound like the ultimate malware ninjas. We'll

480
00:23:38.960 --> 00:23:41.079
<v Speaker 1>definitely need to dive into those later, but for now,

481
00:23:41.119 --> 00:23:44.079
<v Speaker 1>we've talked about processes and loaded modules. What about services?

482
00:23:44.400 --> 00:23:47.079
<v Speaker 1>Those background programs that run on Windows. Can malware abuse

483
00:23:47.119 --> 00:23:47.680
<v Speaker 1>them as well?

484
00:23:47.839 --> 00:23:52.039
<v Speaker 2>Absolutely, malware can create its own malicious services or hijack

485
00:23:52.119 --> 00:23:54.480
<v Speaker 2>existing ones to gain a foothold in the system and

486
00:23:54.599 --> 00:23:59.000
<v Speaker 2>stay hidden. Analyzing services is crucial for understanding how malwur

487
00:23:59.119 --> 00:24:02.440
<v Speaker 2>might be achieving PERC systems its ability to stick around

488
00:24:02.519 --> 00:24:03.640
<v Speaker 2>even after reboots.

489
00:24:03.960 --> 00:24:06.119
<v Speaker 1>So if the malware is like a squatter trying to

490
00:24:06.119 --> 00:24:09.200
<v Speaker 1>stay in a house, services are its way of getting

491
00:24:09.200 --> 00:24:11.519
<v Speaker 1>the utilities turned on and making itself at home.

492
00:24:11.720 --> 00:24:14.720
<v Speaker 2>That's a great analogy, and Volatility has a plug in

493
00:24:14.759 --> 00:24:18.160
<v Speaker 2>called SVC scam that can help us identify these squatters.

494
00:24:18.680 --> 00:24:20.680
<v Speaker 2>It lists all the services running in the system, their

495
00:24:20.680 --> 00:24:23.759
<v Speaker 2>configuration settings, and the processes that are hosting them. We

496
00:24:23.799 --> 00:24:26.400
<v Speaker 2>can see which services are running, how they're configured, and

497
00:24:26.440 --> 00:24:28.200
<v Speaker 2>who's responsible for them, so.

498
00:24:28.160 --> 00:24:30.920
<v Speaker 1>We can see if any services are behaving suspiciously, like

499
00:24:30.920 --> 00:24:33.839
<v Speaker 1>starting automatically when they shouldn't, or running from an unusual

500
00:24:33.880 --> 00:24:35.000
<v Speaker 1>location exactly.

501
00:24:35.000 --> 00:24:38.039
<v Speaker 2>Those are all red flags that weren't further investigation, and

502
00:24:38.119 --> 00:24:41.319
<v Speaker 2>the book gives some great examples of malware abusing services.

503
00:24:41.440 --> 00:24:44.519
<v Speaker 2>One is win thirty two share process, which uses a

504
00:24:44.559 --> 00:24:47.680
<v Speaker 2>technique called service DLL injection to hide itself within the

505
00:24:48.079 --> 00:24:52.160
<v Speaker 2>SVHOS dot exx process. That process responsible for hosting multiple

506
00:24:52.160 --> 00:24:53.720
<v Speaker 2>system services, so it's.

507
00:24:53.599 --> 00:24:56.240
<v Speaker 1>Like hiding in a crowd, making it harder to stand out.

508
00:24:56.400 --> 00:24:59.680
<v Speaker 2>Precisely. An SBC scan can help us spot these hidden

509
00:24:59.720 --> 00:25:03.599
<v Speaker 2>and true by analyzing the service's configuration settings. If we

510
00:25:03.640 --> 00:25:06.799
<v Speaker 2>see a service that's loading a DLL from a suspicious location,

511
00:25:07.200 --> 00:25:09.559
<v Speaker 2>that's a strong indicator of malicious activity.

512
00:25:10.039 --> 00:25:14.640
<v Speaker 1>Clever malware, but even clever analysts and the book mentioned

513
00:25:14.720 --> 00:25:17.519
<v Speaker 1>another malware, Black Energy, that uses a different tactic to

514
00:25:17.599 --> 00:25:18.480
<v Speaker 1>hijack services.

515
00:25:18.519 --> 00:25:20.880
<v Speaker 2>Right, that's right, Black energy is a bit more stealthy.

516
00:25:21.160 --> 00:25:24.039
<v Speaker 2>Instead of creating a new service, it replaces the legitimate

517
00:25:24.119 --> 00:25:29.319
<v Speaker 2>driver associated with an existing service with its own malicious driver. Remember,

518
00:25:29.440 --> 00:25:32.240
<v Speaker 2>drivers are those low level programs that allow the operating

519
00:25:32.240 --> 00:25:34.400
<v Speaker 2>system to interact with hardware devices.

520
00:25:34.559 --> 00:25:36.400
<v Speaker 1>So it's like swapping out the engine of a car

521
00:25:36.440 --> 00:25:38.640
<v Speaker 1>with a different one. The car still looks the same

522
00:25:38.680 --> 00:25:40.480
<v Speaker 1>on the outside, but it's now running on a completely

523
00:25:40.559 --> 00:25:41.839
<v Speaker 1>different system exactly.

524
00:25:42.359 --> 00:25:45.640
<v Speaker 2>And this type of driver manipulation can be incredibly difficult

525
00:25:45.680 --> 00:25:46.200
<v Speaker 2>to detect.

526
00:25:46.680 --> 00:25:49.240
<v Speaker 1>So how do we catch these sneaky driver swappers?

527
00:25:49.400 --> 00:25:52.079
<v Speaker 2>One method is to compare the services and drivers from

528
00:25:52.079 --> 00:25:55.359
<v Speaker 2>a clean memory image to those in a suspect image.

529
00:25:55.440 --> 00:25:57.880
<v Speaker 2>If we see a driver that's different from what we expect,

530
00:25:57.960 --> 00:26:00.160
<v Speaker 2>that's a strong indicator of tampering.

531
00:26:00.559 --> 00:26:03.480
<v Speaker 1>Makes sense. It's like having a reference manual for a

532
00:26:03.519 --> 00:26:06.440
<v Speaker 1>car engine and then comparing it to the actual engine

533
00:26:06.519 --> 00:26:08.240
<v Speaker 1>to see if any parts have been modified.

534
00:26:08.319 --> 00:26:11.519
<v Speaker 2>That's a great analogy. Having a baseline of known good

535
00:26:11.519 --> 00:26:15.079
<v Speaker 2>configurations is essential for identifying these subtle deviations.

536
00:26:15.279 --> 00:26:18.599
<v Speaker 1>We've talked about processes, loaded modules, and services. What other

537
00:26:18.680 --> 00:26:21.240
<v Speaker 1>clues can we uncover in memory? It seems like a

538
00:26:21.279 --> 00:26:22.599
<v Speaker 1>treasure troll of information.

539
00:26:22.920 --> 00:26:26.680
<v Speaker 2>Let's talk about handles. Remember, handles are those pointers that

540
00:26:26.720 --> 00:26:31.200
<v Speaker 2>programs use to interact with system resources like files, registry keys,

541
00:26:31.240 --> 00:26:32.599
<v Speaker 2>and even other processes.

542
00:26:32.680 --> 00:26:35.440
<v Speaker 1>Right. They're like keys that give programs access to different

543
00:26:35.440 --> 00:26:36.680
<v Speaker 1>parts of the system exactly.

544
00:26:36.799 --> 00:26:39.599
<v Speaker 2>And by analyzing handles, we can see what resources a

545
00:26:39.640 --> 00:26:43.279
<v Speaker 2>process is accessing and how it's interacting with them. Volatility

546
00:26:43.359 --> 00:26:46.720
<v Speaker 2>has a plugin called appropriately enough Handles, which can list

547
00:26:46.720 --> 00:26:49.400
<v Speaker 2>all the handles held by a process. It's like looking

548
00:26:49.440 --> 00:26:52.680
<v Speaker 2>at a suspect's keyring and seeing which keys they're carrying.

549
00:26:52.519 --> 00:26:55.319
<v Speaker 1>So we can see if a process is opening suspicious files,

550
00:26:55.680 --> 00:27:00.079
<v Speaker 1>accessing sensitive registry keys, or even manipulating other processes.

551
00:26:59.480 --> 00:27:03.960
<v Speaker 2>Precise It's a powerful way to understand a process's interactions

552
00:27:04.000 --> 00:27:08.000
<v Speaker 2>with the operating system and identify potentially malicious activities.

553
00:27:08.599 --> 00:27:11.559
<v Speaker 1>This is all incredibly insightful. It's amazing how much information

554
00:27:11.599 --> 00:27:14.720
<v Speaker 1>we can extract from a computer's RAM. It's like having

555
00:27:14.720 --> 00:27:17.200
<v Speaker 1>a time machine that lets us rewind and see exactly

556
00:27:17.279 --> 00:27:19.279
<v Speaker 1>what was happening at a specific moment in time.

557
00:27:19.519 --> 00:27:23.039
<v Speaker 2>It's a powerful tool for incident response and malware analysis.

558
00:27:23.319 --> 00:27:26.240
<v Speaker 2>And we've only just scratched the surface of what's possible

559
00:27:26.279 --> 00:27:27.440
<v Speaker 2>with memory. Forensics.

560
00:27:27.559 --> 00:27:30.880
<v Speaker 1>Well, my mind is officially blown. We've gone from analyzing

561
00:27:30.960 --> 00:27:34.720
<v Speaker 1>suspicious files to dissecting the very memory of a computer system.

562
00:27:35.000 --> 00:27:37.359
<v Speaker 1>It's clear that memory forensics is a crucial weapon in

563
00:27:37.400 --> 00:27:38.480
<v Speaker 1>the fight against malware.

564
00:27:38.640 --> 00:27:41.359
<v Speaker 2>Absolutely, and in the next part of our deep dive,

565
00:27:41.400 --> 00:27:44.680
<v Speaker 2>we'll explore even more advanced techniques like root kit analysis

566
00:27:44.720 --> 00:27:47.319
<v Speaker 2>and wrap up our exploration of this fascinating field.

567
00:27:47.519 --> 00:27:50.240
<v Speaker 1>Welcome back to the deep Dive. We've been on this

568
00:27:50.319 --> 00:27:54.440
<v Speaker 1>incredible journey exploring the world of malware analysis, learning how

569
00:27:54.440 --> 00:27:57.839
<v Speaker 1>to think like both the malware developers and the security

570
00:27:57.880 --> 00:27:59.000
<v Speaker 1>experts who hunt them down.

571
00:27:59.119 --> 00:28:01.839
<v Speaker 2>That's right. We've covered a lot of ground, from examining

572
00:28:01.920 --> 00:28:05.039
<v Speaker 2>suspicious files without even running them to dissecting the very

573
00:28:05.119 --> 00:28:07.279
<v Speaker 2>memory of a compromised computer.

574
00:28:07.640 --> 00:28:10.240
<v Speaker 1>And last time we left off talking about memory forensics,

575
00:28:10.759 --> 00:28:14.319
<v Speaker 1>which blew my mind. We learned how to extract all

576
00:28:14.359 --> 00:28:17.519
<v Speaker 1>sorts of valuable evidence from a computer's ram, even if

577
00:28:17.519 --> 00:28:19.200
<v Speaker 1>the malware tried to cover its tracks.

578
00:28:19.400 --> 00:28:22.759
<v Speaker 2>Memory forensics is a powerful tool. But today we're going

579
00:28:22.799 --> 00:28:26.119
<v Speaker 2>even deeper into the trenches of malware analysis to tackle

580
00:28:26.119 --> 00:28:29.359
<v Speaker 2>a particularly stealthy and dangerous type.

581
00:28:29.079 --> 00:28:30.759
<v Speaker 1>Of threat, root kits.

582
00:28:31.200 --> 00:28:33.200
<v Speaker 2>Root kits they sound like something straight out of a

583
00:28:33.240 --> 00:28:35.759
<v Speaker 2>spy movie. What makes them so different from other types

584
00:28:35.799 --> 00:28:36.359
<v Speaker 2>of malware.

585
00:28:36.839 --> 00:28:40.200
<v Speaker 1>Rootkits are the ultimate stealth weapon in the malware arsenal.

586
00:28:40.240 --> 00:28:43.000
<v Speaker 1>They're designed to burrow deep into the operating system's core,

587
00:28:43.440 --> 00:28:46.440
<v Speaker 1>the kernel, and operate in the shadows the kernel. That's

588
00:28:46.480 --> 00:28:48.799
<v Speaker 1>like the control center for the entire operating system, right

589
00:28:48.839 --> 00:28:50.599
<v Speaker 1>the place where all the important decisions.

590
00:28:50.240 --> 00:28:53.559
<v Speaker 2>Are made exactly, And if malware can gain control of

591
00:28:53.559 --> 00:28:57.480
<v Speaker 2>the kernel, it can essentially control the entire system. Wow,

592
00:28:57.559 --> 00:29:00.200
<v Speaker 2>it's like having a mole inside a top secret them

593
00:29:00.240 --> 00:29:04.839
<v Speaker 2>an agency. They can manipulate information, sabotage operations, and stay

594
00:29:04.960 --> 00:29:05.880
<v Speaker 2>hidden from view.

595
00:29:06.400 --> 00:29:09.480
<v Speaker 1>So root kits are basically the elite hackers of the

596
00:29:09.519 --> 00:29:12.359
<v Speaker 1>malware world. Yeah, those who can bypass all the normal

597
00:29:12.440 --> 00:29:15.119
<v Speaker 1>security measures and operate with complete control.

598
00:29:15.240 --> 00:29:17.799
<v Speaker 2>That's a good way to put it. They're incredibly difficult

599
00:29:17.839 --> 00:29:19.759
<v Speaker 2>to detect and even harder to remove.

600
00:29:20.039 --> 00:29:20.839
<v Speaker 1>Wow.

601
00:29:20.880 --> 00:29:23.680
<v Speaker 2>Traditional security tools might not even be able to see

602
00:29:23.680 --> 00:29:25.960
<v Speaker 2>them because they operate at such a low level.

603
00:29:26.519 --> 00:29:29.240
<v Speaker 1>Okay, now I'm starting to get a little nervous. How

604
00:29:29.279 --> 00:29:32.039
<v Speaker 1>do they actually manage to gain access to this kernel

605
00:29:32.079 --> 00:29:34.039
<v Speaker 1>space and remain undetected.

606
00:29:34.759 --> 00:29:38.240
<v Speaker 2>Well, they use some incredibly clever techniques.

607
00:29:38.599 --> 00:29:38.960
<v Speaker 1>Okay.

608
00:29:39.119 --> 00:29:41.640
<v Speaker 2>One common method is to hook kernel functions.

609
00:29:41.839 --> 00:29:44.319
<v Speaker 1>Wait hooking. We talked about that before with user level hooking.

610
00:29:44.960 --> 00:29:47.319
<v Speaker 1>But you're saying root kits can hook functions within the

611
00:29:47.400 --> 00:29:48.160
<v Speaker 1>kernel itself.

612
00:29:48.559 --> 00:29:53.480
<v Speaker 2>Exactly. Remember how hooking lets malware intercept function calls and

613
00:29:53.519 --> 00:29:56.799
<v Speaker 2>redirect them right well in the kernel. This gives them

614
00:29:56.799 --> 00:30:00.440
<v Speaker 2>the power to manipulate the operating system's core FI functions.

615
00:30:00.519 --> 00:30:05.559
<v Speaker 2>Oh wow, hide processes, make files invisible, even conceal network connections.

616
00:30:06.000 --> 00:30:09.759
<v Speaker 2>It's like rewiring the control panel of a spaceship. They

617
00:30:09.759 --> 00:30:11.720
<v Speaker 2>can make the instruments show whatever.

618
00:30:11.440 --> 00:30:14.240
<v Speaker 1>They want, so they're basically rewriting the rules of the

619
00:30:14.240 --> 00:30:14.720
<v Speaker 1>game to.

620
00:30:14.680 --> 00:30:19.200
<v Speaker 2>Their advantage exactly. They can also directly modify kernel data

621
00:30:19.240 --> 00:30:21.599
<v Speaker 2>structures like the process list and the handle table we

622
00:30:21.640 --> 00:30:23.039
<v Speaker 2>talked about earlier, Those.

623
00:30:22.839 --> 00:30:25.440
<v Speaker 1>Lists that tell us what's running and what resources are

624
00:30:25.480 --> 00:30:29.599
<v Speaker 1>being accessed. So they're essentially forging documents to hide their presence.

625
00:30:29.720 --> 00:30:33.519
<v Speaker 2>Precisely, they can make themselves and their malicious activities disappear

626
00:30:33.599 --> 00:30:35.799
<v Speaker 2>from the system's logs and monitoring tools.

627
00:30:35.880 --> 00:30:36.440
<v Speaker 1>That's scary.

628
00:30:36.519 --> 00:30:38.400
<v Speaker 2>And if that's not enough, they can even patch the

629
00:30:38.480 --> 00:30:39.480
<v Speaker 2>kernel code itself.

630
00:30:39.720 --> 00:30:43.680
<v Speaker 1>Patching the kernel code isn't incredibly risky. What if they

631
00:30:43.720 --> 00:30:44.480
<v Speaker 1>mess something up?

632
00:30:44.640 --> 00:30:48.359
<v Speaker 2>It is risky both for the attacker and for the system.

633
00:30:48.559 --> 00:30:51.640
<v Speaker 2>But skilled rootkit developers know exactly which parts of the

634
00:30:51.680 --> 00:30:54.640
<v Speaker 2>code to modify to achieve their goals without causing a

635
00:30:54.680 --> 00:30:57.680
<v Speaker 2>system crash. It's like performing open heart surgery on the

636
00:30:57.720 --> 00:30:59.640
<v Speaker 2>operating system while it's still running.

637
00:31:00.480 --> 00:31:02.759
<v Speaker 1>I'm starting to understand why root kits are considered such

638
00:31:02.759 --> 00:31:05.839
<v Speaker 1>a serious threat. But if they're so stealthy and operate

639
00:31:05.839 --> 00:31:08.799
<v Speaker 1>at such a low level, how does security experts even

640
00:31:08.799 --> 00:31:10.000
<v Speaker 1>begin to analyze them?

641
00:31:10.200 --> 00:31:13.359
<v Speaker 2>Root kit analysis is incredibly challenging, but it's essential for

642
00:31:13.480 --> 00:31:17.880
<v Speaker 2>understanding how they work and developing countermeasures. The book emphasizes

643
00:31:17.920 --> 00:31:20.720
<v Speaker 2>that analyzing drivers is a crucial starting point.

644
00:31:20.920 --> 00:31:24.640
<v Speaker 1>Drivers, right, those pieces of software that allow the operating

645
00:31:24.680 --> 00:31:28.079
<v Speaker 1>system to talk to hardware devices. But how are drivers

646
00:31:28.079 --> 00:31:29.240
<v Speaker 1>connected to root kits.

647
00:31:29.519 --> 00:31:32.359
<v Speaker 2>Root kits often install their own malicious drivers to gain

648
00:31:32.400 --> 00:31:35.519
<v Speaker 2>that low level access to the system. By examining these drivers,

649
00:31:35.519 --> 00:31:38.039
<v Speaker 2>we can uncover the root kit's functionality and how it

650
00:31:38.079 --> 00:31:41.279
<v Speaker 2>interacts with the system. It's like finding the blueprints for

651
00:31:41.319 --> 00:31:45.279
<v Speaker 2>the root kit's secret layer hidden within the operating system's infrastructure.

652
00:31:45.519 --> 00:31:49.039
<v Speaker 1>Interesting analogy, So we need to understand how drivers work

653
00:31:49.440 --> 00:31:52.920
<v Speaker 1>to understand how root kits use them for their nefarious purposes.

654
00:31:53.759 --> 00:31:56.799
<v Speaker 1>Where do we even begin with driver analysis?

655
00:31:56.880 --> 00:31:59.640
<v Speaker 2>One key concept is the IO request flow. The journey

656
00:32:00.119 --> 00:32:02.839
<v Speaker 2>US takes from a user level application through the kernel

657
00:32:02.880 --> 00:32:05.039
<v Speaker 2>to the device driver, and finally to the hardware.

658
00:32:05.319 --> 00:32:07.519
<v Speaker 1>So it's like tracking a package from the sender through

659
00:32:07.519 --> 00:32:10.359
<v Speaker 1>all the sorting centers and delivery trucks to its final

660
00:32:10.440 --> 00:32:11.799
<v Speaker 1>destination exactly.

661
00:32:12.039 --> 00:32:15.279
<v Speaker 2>And by understanding this flow, we can identify potential points

662
00:32:15.319 --> 00:32:18.519
<v Speaker 2>where a routkit might be intercepting or manipulating requests to

663
00:32:18.640 --> 00:32:21.519
<v Speaker 2>hide data, steel information, or even control devices.

664
00:32:21.640 --> 00:32:24.160
<v Speaker 1>It's like setting up roadblocks along the delivery route to

665
00:32:24.200 --> 00:32:27.440
<v Speaker 1>catch the package thief. The book also mentioned that examining

666
00:32:27.440 --> 00:32:31.319
<v Speaker 1>specific kernel structures is important, right, things like the driver objects. Right.

667
00:32:31.359 --> 00:32:34.400
<v Speaker 2>The driver object is a data structure that holds all

668
00:32:34.440 --> 00:32:38.720
<v Speaker 2>sorts of essential information about a loaded driver. It's entry point,

669
00:32:38.880 --> 00:32:42.359
<v Speaker 2>its dispatch routines, basically everything we need to understand how

670
00:32:42.359 --> 00:32:45.200
<v Speaker 2>it works. So it's like the driver's ID card exactly,

671
00:32:45.440 --> 00:32:48.359
<v Speaker 2>and by analyzing this ID card we can learn a

672
00:32:48.359 --> 00:32:51.839
<v Speaker 2>lot about the driver's capabilities and potential for malicious activity.

673
00:32:52.400 --> 00:32:55.880
<v Speaker 2>And then there are devite objects which represent physical or

674
00:32:55.960 --> 00:32:58.839
<v Speaker 2>virtual devices connected to the system.

675
00:32:58.839 --> 00:33:01.240
<v Speaker 1>Like hard drive network that sort of thing.

676
00:33:01.039 --> 00:33:04.480
<v Speaker 2>Exactly, and drivers create and manage these device objects to

677
00:33:04.640 --> 00:33:08.279
<v Speaker 2>communicate with the corresponding hardware. But root kits can also

678
00:33:08.400 --> 00:33:12.799
<v Speaker 2>manipulate these device objects to hide their presence or intercept

679
00:33:12.839 --> 00:33:13.640
<v Speaker 2>io requests.

680
00:33:14.079 --> 00:33:16.519
<v Speaker 1>It's like the root kit is creating fake devices to

681
00:33:16.599 --> 00:33:18.000
<v Speaker 1>deceive the operating system.

682
00:33:18.160 --> 00:33:19.680
<v Speaker 2>That's a great way to think about it. It's all

683
00:33:19.720 --> 00:33:22.319
<v Speaker 2>about deception and manipulation at the kernel level.

684
00:33:22.440 --> 00:33:25.079
<v Speaker 1>Okay, I'm starting to see how complex and challenging root

685
00:33:25.160 --> 00:33:28.000
<v Speaker 1>kit analysis can be. It's like trying to solve a

686
00:33:28.000 --> 00:33:30.880
<v Speaker 1>puzzle where pieces are constantly shifting and changing.

687
00:33:31.240 --> 00:33:34.279
<v Speaker 2>It definitely requires a deep understanding of the operating system

688
00:33:34.319 --> 00:33:35.920
<v Speaker 2>and a specialized set of tools.

689
00:33:36.119 --> 00:33:36.400
<v Speaker 1>Yeah.

690
00:33:36.440 --> 00:33:39.200
<v Speaker 2>One of the most powerful tools in our arsenal is

691
00:33:39.319 --> 00:33:42.279
<v Speaker 2>wind abig Oh, a debugger from Microsoft.

692
00:33:42.319 --> 00:33:44.759
<v Speaker 1>Windabig That sounds familiar. We talked about debuggers before, but

693
00:33:44.799 --> 00:33:47.279
<v Speaker 1>I thought those were for analyzing user level programs.

694
00:33:47.480 --> 00:33:50.480
<v Speaker 2>You're right, but wind abig is special. It allows us

695
00:33:50.480 --> 00:33:51.960
<v Speaker 2>to debug the kernel itself.

696
00:33:52.279 --> 00:33:52.599
<v Speaker 1>Wow.

697
00:33:52.759 --> 00:33:56.359
<v Speaker 2>We can examine kernel structures, set breakpoints on kernel functions,

698
00:33:56.680 --> 00:34:00.079
<v Speaker 2>and essentially step through the execution of kernel code, so.

699
00:34:00.119 --> 00:34:02.440
<v Speaker 1>It's like having a backstage pass to the entire operating

700
00:34:02.480 --> 00:34:03.240
<v Speaker 1>system exactly.

701
00:34:03.279 --> 00:34:07.240
<v Speaker 2>It's an indispensable tool for reverse engineering drivers, analyzing rootkit

702
00:34:07.319 --> 00:34:10.519
<v Speaker 2>behavior and understanding how they manipulate the system at such

703
00:34:10.519 --> 00:34:11.239
<v Speaker 2>a low level.

704
00:34:11.440 --> 00:34:14.800
<v Speaker 1>Wow, wind to being sounds incredibly powerful. The book also

705
00:34:14.840 --> 00:34:18.320
<v Speaker 1>mentioned something called the object Manager name space. What's that

706
00:34:18.400 --> 00:34:18.840
<v Speaker 1>all about?

707
00:34:19.239 --> 00:34:21.880
<v Speaker 2>The object manager is a core component of the Windows

708
00:34:21.920 --> 00:34:25.760
<v Speaker 2>kernel that manages all the objects in the system, processes, files, devices,

709
00:34:25.840 --> 00:34:28.159
<v Speaker 2>you name it. The name space is like a hierarchical

710
00:34:28.199 --> 00:34:31.079
<v Speaker 2>file system for these objects, organizing them in a tree

711
00:34:31.239 --> 00:34:31.800
<v Speaker 2>like structure.

712
00:34:31.920 --> 00:34:33.960
<v Speaker 1>So it's like the Dewey decimal system for the operating

713
00:34:34.000 --> 00:34:34.960
<v Speaker 1>system exactly.

714
00:34:35.039 --> 00:34:38.880
<v Speaker 2>And root kits can manipulate this name space to hide objects,

715
00:34:38.960 --> 00:34:42.360
<v Speaker 2>redirect access, and generally make it difficult to understand what's

716
00:34:42.400 --> 00:34:45.159
<v Speaker 2>really going on. It's like a digital magician performing sleight

717
00:34:45.199 --> 00:34:48.119
<v Speaker 2>of hand tricks. Things appear and disappear as they manipulate

718
00:34:48.159 --> 00:34:49.159
<v Speaker 2>this invisible structure.

719
00:34:49.440 --> 00:34:52.559
<v Speaker 1>Rootkit analysis definitely sounds like it requires a high level

720
00:34:52.559 --> 00:34:53.239
<v Speaker 1>of expertise.

721
00:34:53.440 --> 00:34:56.519
<v Speaker 2>It does, but thankfully, tools like Volatility and wind a

722
00:34:56.559 --> 00:35:00.320
<v Speaker 2>Big give us the power to analyze these complex interactions

723
00:35:00.440 --> 00:35:03.800
<v Speaker 2>and uncover the root kit secrets. The book even gives

724
00:35:03.840 --> 00:35:07.239
<v Speaker 2>an example of extracting a hidden zero access rootkit driver

725
00:35:07.480 --> 00:35:08.239
<v Speaker 2>from memory.

726
00:35:08.599 --> 00:35:11.239
<v Speaker 1>Hold on hidden drivers. Yeah, so, even if a driver

727
00:35:11.280 --> 00:35:13.159
<v Speaker 1>doesn't show up in the list of loaded drivers, we

728
00:35:13.159 --> 00:35:14.559
<v Speaker 1>can still find it exactly.

729
00:35:15.000 --> 00:35:19.239
<v Speaker 2>Skilled analysts can use various techniques like analyzing memory patterns

730
00:35:19.320 --> 00:35:23.119
<v Speaker 2>or examining kernel structures to uncover these hidden drivers. Okay,

731
00:35:23.239 --> 00:35:25.880
<v Speaker 2>once they know the driver's location and memory, they can

732
00:35:25.960 --> 00:35:29.360
<v Speaker 2>use Volatility's modemp plug in to extract it and analyze

733
00:35:29.360 --> 00:35:29.960
<v Speaker 2>its code.

734
00:35:30.119 --> 00:35:32.199
<v Speaker 1>So it's like those scenes in crime shows where they

735
00:35:32.480 --> 00:35:35.679
<v Speaker 1>enhance a blurry photo to reveal the suspect's face, except

736
00:35:35.760 --> 00:35:38.880
<v Speaker 1>here we're enhancing the memory dump to reveal the hidden driver.

737
00:35:39.039 --> 00:35:43.239
<v Speaker 2>That's a perfect analogy. Memory forensics can be incredibly powerful

738
00:35:43.239 --> 00:35:46.639
<v Speaker 2>for analyzing even the most stealthy root kits. It's like

739
00:35:46.679 --> 00:35:49.320
<v Speaker 2>shining a light into the darkest corners of the operating

740
00:35:49.360 --> 00:35:51.840
<v Speaker 2>system to expose those who are trying to hide.

741
00:35:51.960 --> 00:35:54.800
<v Speaker 1>This entire deep dive into malware analysis has been an

742
00:35:54.800 --> 00:35:58.880
<v Speaker 1>incredible journey. We've gone from basic static analysis to reverse

743
00:35:58.920 --> 00:36:02.280
<v Speaker 1>engineering assembly code to delving into the depths of memory

744
00:36:02.280 --> 00:36:06.440
<v Speaker 1>forensics and rootkit analysis. It's clear that it's a constantly

745
00:36:06.440 --> 00:36:09.039
<v Speaker 1>evolving field full of challenges and rewards.

746
00:36:09.239 --> 00:36:11.679
<v Speaker 2>It's a fascinating area of research and it's crucial for

747
00:36:11.719 --> 00:36:14.360
<v Speaker 2>protecting our systems and data from those who would seek

748
00:36:14.400 --> 00:36:15.159
<v Speaker 2>to exploit them.

749
00:36:15.239 --> 00:36:19.440
<v Speaker 1>Absolutely, by understanding how malware works, how it hides, and

750
00:36:19.480 --> 00:36:22.320
<v Speaker 1>how to analyze it, we could build better defenses and

751
00:36:22.360 --> 00:36:23.960
<v Speaker 1>stay one step ahead of the attackers.

752
00:36:24.039 --> 00:36:27.280
<v Speaker 2>That's the ultimate goal, to create more secure digital world

753
00:36:27.320 --> 00:36:31.400
<v Speaker 2>where users can competently navigate the online landscape without fear

754
00:36:31.440 --> 00:36:32.679
<v Speaker 2>of these malicious threats.

755
00:36:32.880 --> 00:36:34.880
<v Speaker 1>Well, thank you for guiding me through this deep dive.

756
00:36:35.039 --> 00:36:37.840
<v Speaker 1>It's been an eye opening experience and for our listeners,

757
00:36:37.840 --> 00:36:40.400
<v Speaker 1>if you're intrigued by the world of malware analysis, I

758
00:36:40.480 --> 00:36:44.639
<v Speaker 1>highly recommend checking out Packed Learning Malware Analysis. It's packed

759
00:36:44.639 --> 00:36:47.119
<v Speaker 1>with even more detail and insights than we could cover here.

760
00:36:47.159 --> 00:36:49.440
<v Speaker 2>It's a great resource for anyone interested in learning more

761
00:36:49.480 --> 00:36:50.599
<v Speaker 2>about this crucial field.

762
00:36:50.880 --> 00:36:54.079
<v Speaker 1>So keep exploring, stay curious, and stay safe in the

763
00:36:54.119 --> 00:36:56.000
<v Speaker 1>digital world. Until next time.
