1 00:00:02,320 --> 00:00:03,840 okay 2 00:00:03,840 --> 00:00:04,880 so 3 00:00:04,880 --> 00:00:06,720 this talk 4 00:00:06,720 --> 00:00:09,280 is about the importance of sysmon for 5 00:00:09,280 --> 00:00:13,519 investigations i'm extreme paper clip 6 00:00:13,519 --> 00:00:15,679 who am i exactly 7 00:00:15,679 --> 00:00:18,800 uh digital forensics nerd linux geek 8 00:00:18,800 --> 00:00:21,680 infosec dork lifelong student of 9 00:00:21,680 --> 00:00:23,039 everything 10 00:00:23,039 --> 00:00:25,199 amateur history buff 11 00:00:25,199 --> 00:00:26,880 spice fanatic 12 00:00:26,880 --> 00:00:29,519 loads of fun 13 00:00:29,519 --> 00:00:31,760 can follow me on the twitters but i'm 14 00:00:31,760 --> 00:00:33,760 probably not that interesting 15 00:00:33,760 --> 00:00:36,079 okay 16 00:00:36,880 --> 00:00:39,920 what this talk is and is not about this 17 00:00:39,920 --> 00:00:40,800 talk 18 00:00:40,800 --> 00:00:45,200 is not an advanced guide to sysmod 19 00:00:45,200 --> 00:00:48,079 what it is is basically just a simple 20 00:00:48,079 --> 00:00:51,600 intro to sysmon 21 00:00:52,160 --> 00:00:53,360 here are a few things we're going to 22 00:00:53,360 --> 00:00:55,840 talk about we'll talk about what is 23 00:00:55,840 --> 00:00:57,440 sysmon 24 00:00:57,440 --> 00:01:00,480 an overview of the sysmon events 25 00:01:00,480 --> 00:01:03,359 what is the sysmond config 26 00:01:03,359 --> 00:01:06,479 we'll go over installing sysmon 27 00:01:06,479 --> 00:01:07,360 and 28 00:01:07,360 --> 00:01:09,600 some examples of my favorite sysmon 29 00:01:09,600 --> 00:01:11,680 events 30 00:01:11,680 --> 00:01:14,320 and some sysmon examples 31 00:01:14,320 --> 00:01:17,439 for an investigation 32 00:01:17,840 --> 00:01:18,799 okay 33 00:01:18,799 --> 00:01:19,920 so 34 00:01:19,920 --> 00:01:22,240 you're probably asking 35 00:01:22,240 --> 00:01:25,520 really just cut to the chase and tell me 36 00:01:25,520 --> 00:01:27,040 what is sysmon 37 00:01:27,040 --> 00:01:30,560 okay here's the tldr sysmond creates the 38 00:01:30,560 --> 00:01:34,240 logs that should exist in windows event 39 00:01:34,240 --> 00:01:37,840 logs by default but do not 40 00:01:37,840 --> 00:01:41,119 sysmon creates very unique 41 00:01:41,119 --> 00:01:42,960 event logs 42 00:01:42,960 --> 00:01:44,399 specific 43 00:01:44,399 --> 00:01:46,720 for security 44 00:01:46,720 --> 00:01:49,520 think of it that way 45 00:01:49,520 --> 00:01:51,920 here are some more facts about sysmont 46 00:01:51,920 --> 00:01:53,920 so sysmon was created by mark 47 00:01:53,920 --> 00:01:55,840 versinofiche and 48 00:01:55,840 --> 00:01:59,200 thomas garnier 49 00:01:59,200 --> 00:02:03,119 sysmon is short for system monitor 50 00:02:03,119 --> 00:02:06,240 it's a part of the windows sys internal 51 00:02:06,240 --> 00:02:08,080 suite 52 00:02:08,080 --> 00:02:12,000 sysmon was released in 2014 53 00:02:12,000 --> 00:02:13,440 it's 54 00:02:13,440 --> 00:02:16,959 both a device driver and a service 55 00:02:16,959 --> 00:02:20,400 and it creates logs specifically for 56 00:02:20,400 --> 00:02:23,840 security you could say 57 00:02:24,400 --> 00:02:27,599 a very brief history of susman so it was 58 00:02:27,599 --> 00:02:30,560 first released in 2014 59 00:02:30,560 --> 00:02:33,040 and it initially only had three event 60 00:02:33,040 --> 00:02:34,480 ids 61 00:02:34,480 --> 00:02:38,800 event id 1 which shows a process created 62 00:02:38,800 --> 00:02:42,959 event id 2 a process changed a file 63 00:02:42,959 --> 00:02:44,800 creation time 64 00:02:44,800 --> 00:02:47,440 and event id 3 65 00:02:47,440 --> 00:02:49,280 network connection 66 00:02:49,280 --> 00:02:50,879 this little snippet right here i took 67 00:02:50,879 --> 00:02:54,319 from web archive 68 00:02:55,680 --> 00:02:56,640 so 69 00:02:56,640 --> 00:02:59,120 let's do it an overview here of the 70 00:02:59,120 --> 00:03:01,840 sysmon events 71 00:03:01,840 --> 00:03:05,360 the latest version of cisvan has 26 72 00:03:05,360 --> 00:03:07,599 event ids 73 00:03:07,599 --> 00:03:10,800 it's version 1334 74 00:03:10,800 --> 00:03:12,319 and you can see there that it was 75 00:03:12,319 --> 00:03:13,920 released in may 76 00:03:13,920 --> 00:03:17,119 of 2022 77 00:03:17,519 --> 00:03:20,879 note also there's also a version 78 00:03:20,879 --> 00:03:23,440 for linux this is a recent thing 79 00:03:23,440 --> 00:03:25,519 uh i'm not gonna go into it on this talk 80 00:03:25,519 --> 00:03:28,879 but it's something you should check out 81 00:03:29,360 --> 00:03:31,519 okay let's go over all the events don't 82 00:03:31,519 --> 00:03:33,360 worry we're not gonna 83 00:03:33,360 --> 00:03:35,599 deep dive into these 84 00:03:35,599 --> 00:03:37,040 uh so 85 00:03:37,040 --> 00:03:38,720 let's do an overview of these events 86 00:03:38,720 --> 00:03:40,400 event id one 87 00:03:40,400 --> 00:03:42,959 uh like like i said earlier is process 88 00:03:42,959 --> 00:03:44,840 creation 89 00:03:44,840 --> 00:03:47,599 um some of the things that are really 90 00:03:47,599 --> 00:03:50,239 interesting about event id one uh of 91 00:03:50,239 --> 00:03:51,840 course 92 00:03:51,840 --> 00:03:54,080 two things in my opinion 93 00:03:54,080 --> 00:03:56,799 uh you're gonna see the command line 94 00:03:56,799 --> 00:03:59,040 and you're gonna get a hash 95 00:03:59,040 --> 00:04:00,480 of the process 96 00:04:00,480 --> 00:04:02,480 it's very useful 97 00:04:02,480 --> 00:04:04,159 uh i'm going to go a little quicker here 98 00:04:04,159 --> 00:04:07,200 so event id 2 the process change the 99 00:04:07,200 --> 00:04:10,319 file creation time 100 00:04:10,480 --> 00:04:13,439 event id 3 network connection 101 00:04:13,439 --> 00:04:15,439 very useful 102 00:04:15,439 --> 00:04:18,478 uh event id4 sysmont service state 103 00:04:18,478 --> 00:04:21,440 changed you can see in the logs if 104 00:04:21,440 --> 00:04:24,160 sysmon was stopped 105 00:04:24,160 --> 00:04:26,639 and of course event id5 the process was 106 00:04:26,639 --> 00:04:29,639 terminated 107 00:04:30,080 --> 00:04:33,840 event id 6 a driver was loaded 108 00:04:33,840 --> 00:04:36,560 this can be very useful 109 00:04:36,560 --> 00:04:40,000 event id 7 is image loaded now think of 110 00:04:40,000 --> 00:04:43,040 an image not like a picture uh in the 111 00:04:43,040 --> 00:04:46,960 world of cis1 an image is basically 112 00:04:46,960 --> 00:04:49,840 an executable 113 00:04:49,919 --> 00:04:54,840 event id 8 is create remote thread 114 00:04:54,840 --> 00:04:56,639 uh 115 00:04:56,639 --> 00:05:00,720 event id 9 raw access read 116 00:05:00,720 --> 00:05:04,560 event id 10 process access now event id 117 00:05:04,560 --> 00:05:06,800 10 can be very useful 118 00:05:06,800 --> 00:05:09,360 uh for example at 119 00:05:09,360 --> 00:05:12,080 finding evidence of 120 00:05:12,080 --> 00:05:14,560 mimikats 121 00:05:14,560 --> 00:05:17,600 event id 11 file create 122 00:05:17,600 --> 00:05:20,240 also very useful you can see something 123 00:05:20,240 --> 00:05:22,160 like if a 124 00:05:22,160 --> 00:05:23,759 somebody ran 125 00:05:23,759 --> 00:05:26,720 a query to 126 00:05:26,880 --> 00:05:28,360 spit out 127 00:05:28,360 --> 00:05:30,639 bloodhound.zip you're going to see that 128 00:05:30,639 --> 00:05:33,680 that file was created 129 00:05:33,919 --> 00:05:36,639 event id 12 these are you could think of 130 00:05:36,639 --> 00:05:41,039 these as the the registry events here 131 00:05:41,039 --> 00:05:43,600 this one event id 12 talks about an 132 00:05:43,600 --> 00:05:46,800 object was created or deleted 133 00:05:46,800 --> 00:05:48,720 in the registry 134 00:05:48,720 --> 00:05:51,120 event id 13 135 00:05:51,120 --> 00:05:53,600 shows you the value that was set 136 00:05:53,600 --> 00:05:58,080 for that registry event and event id 14. 137 00:05:58,080 --> 00:06:02,880 it talks about the key and value rename 138 00:06:03,600 --> 00:06:05,840 event id 15 139 00:06:05,840 --> 00:06:07,759 create stream hash 140 00:06:07,759 --> 00:06:10,240 um i'll be honest 141 00:06:10,240 --> 00:06:13,520 this one hasn't really rocked my world 142 00:06:13,520 --> 00:06:15,360 um 143 00:06:15,360 --> 00:06:21,240 event id 16 service configuration change 144 00:06:22,080 --> 00:06:25,360 and these two below are the pipe 145 00:06:25,360 --> 00:06:26,639 events 146 00:06:26,639 --> 00:06:28,800 so you can see a pipe created event id 147 00:06:28,800 --> 00:06:34,680 17 and event id 18 pipe connected 148 00:06:34,720 --> 00:06:37,440 this can be very useful in malware 149 00:06:37,440 --> 00:06:39,840 hunting 150 00:06:40,000 --> 00:06:42,800 event id 19 wmi event these are you 151 00:06:42,800 --> 00:06:44,960 could think of these as the wmi events 152 00:06:44,960 --> 00:06:46,240 here 153 00:06:46,240 --> 00:06:49,840 you can show event id 19 shows activity 154 00:06:49,840 --> 00:06:51,039 detected 155 00:06:51,039 --> 00:06:52,720 event id 20 156 00:06:52,720 --> 00:06:55,360 shows uh 157 00:06:56,240 --> 00:06:57,039 the 158 00:06:57,039 --> 00:06:59,440 consumer 159 00:06:59,440 --> 00:07:00,840 event id 160 00:07:00,840 --> 00:07:02,400 21 161 00:07:02,400 --> 00:07:05,120 consumer to filter 162 00:07:05,120 --> 00:07:06,880 fun stuff 163 00:07:06,880 --> 00:07:11,039 okay event id 22 dns event very cool i 164 00:07:11,039 --> 00:07:12,720 love that one 165 00:07:12,720 --> 00:07:16,080 event id 23 file deleted 166 00:07:16,080 --> 00:07:17,360 uh 167 00:07:17,360 --> 00:07:18,479 can be 168 00:07:18,479 --> 00:07:21,199 useful it can also be noisy 169 00:07:21,199 --> 00:07:24,960 uh event id 24 clipboard change 170 00:07:24,960 --> 00:07:28,000 uh i'll be honest this one 171 00:07:28,000 --> 00:07:31,360 kind of baffles me uh event id 25 172 00:07:31,360 --> 00:07:33,520 process tampering 173 00:07:33,520 --> 00:07:35,520 a good example of that is 174 00:07:35,520 --> 00:07:36,639 if you 175 00:07:36,639 --> 00:07:38,720 hollow 176 00:07:38,720 --> 00:07:40,880 an executable 177 00:07:40,880 --> 00:07:43,599 let's see there's a tool called shelter 178 00:07:43,599 --> 00:07:45,599 that can help you do that where you can 179 00:07:45,599 --> 00:07:50,160 insert a payload for a shell code 180 00:07:50,160 --> 00:07:53,599 event id 26 file delete detected it 181 00:07:53,599 --> 00:07:55,599 could be good and it could be bad 182 00:07:55,599 --> 00:07:58,879 because it can be very noisy 183 00:07:58,879 --> 00:08:02,080 okay those are the events so 184 00:08:02,080 --> 00:08:03,599 let's talk about 185 00:08:03,599 --> 00:08:05,680 the sysmon config 186 00:08:05,680 --> 00:08:09,039 the sysfont config here's the tldr the 187 00:08:09,039 --> 00:08:10,800 syswan config 188 00:08:10,800 --> 00:08:14,960 is an xml file that defines what gets 189 00:08:14,960 --> 00:08:19,360 included or excluded in the sysmon logs 190 00:08:19,360 --> 00:08:22,800 it's a big deal 191 00:08:22,800 --> 00:08:24,080 why 192 00:08:24,080 --> 00:08:27,800 why is it a big deal 193 00:08:28,000 --> 00:08:30,720 well okay so it's a big deal because if 194 00:08:30,720 --> 00:08:33,360 your sysmon config is configured to be 195 00:08:33,360 --> 00:08:35,120 over inclusive 196 00:08:35,120 --> 00:08:36,958 you could end up with a lot of garbage 197 00:08:36,958 --> 00:08:38,479 data 198 00:08:38,479 --> 00:08:40,958 that can make it hard to analyze and and 199 00:08:40,958 --> 00:08:43,518 sift through 200 00:08:44,800 --> 00:08:47,600 and uh on the other hand if you exclude 201 00:08:47,600 --> 00:08:48,720 too much 202 00:08:48,720 --> 00:08:50,959 in your sysmond config then you're 203 00:08:50,959 --> 00:08:52,640 probably going to be missing valuable 204 00:08:52,640 --> 00:08:54,959 log data that could potentially contain 205 00:08:54,959 --> 00:08:58,560 evidence of malicious activity 206 00:08:59,120 --> 00:08:59,920 so 207 00:08:59,920 --> 00:09:01,519 here's 208 00:09:01,519 --> 00:09:04,080 a few facts about the sysmond config 209 00:09:04,080 --> 00:09:08,399 here's a little example um 210 00:09:08,399 --> 00:09:09,600 so in 211 00:09:09,600 --> 00:09:11,680 right here you can see in the xml file 212 00:09:11,680 --> 00:09:13,440 some things i'll just point them out uh 213 00:09:13,440 --> 00:09:15,920 the rule group is like a simple way you 214 00:09:15,920 --> 00:09:17,680 can group the rules 215 00:09:17,680 --> 00:09:20,399 for a specific event id 216 00:09:20,399 --> 00:09:23,120 uh and note the way that the in this 217 00:09:23,120 --> 00:09:26,240 case the group relation uses the and to 218 00:09:26,240 --> 00:09:29,279 define how the rules are used an 219 00:09:29,279 --> 00:09:32,399 alternative to this would be an or 220 00:09:32,399 --> 00:09:35,519 um okay process create 221 00:09:35,519 --> 00:09:37,839 let's see is an example of 222 00:09:37,839 --> 00:09:40,399 basically event id one 223 00:09:40,399 --> 00:09:42,959 and this rule right here is going to 224 00:09:42,959 --> 00:09:46,640 match on include 225 00:09:46,959 --> 00:09:49,120 image like i said is is the word used 226 00:09:49,120 --> 00:09:51,600 for an executable in this example the 227 00:09:51,600 --> 00:09:55,160 image is timeout.exe 228 00:09:55,440 --> 00:09:57,440 command line 229 00:09:57,440 --> 00:09:59,519 uh is one of the fields 230 00:09:59,519 --> 00:10:02,240 in event id1 and in this example it 231 00:10:02,240 --> 00:10:04,560 shows us that the command line simply 232 00:10:04,560 --> 00:10:08,319 just contains 100. 233 00:10:10,000 --> 00:10:13,839 a little more about the system on config 234 00:10:14,000 --> 00:10:15,839 as you'll note in the sysmond config 235 00:10:15,839 --> 00:10:18,560 there are conditions you can use you can 236 00:10:18,560 --> 00:10:20,560 see here in this little example that's 237 00:10:20,560 --> 00:10:21,680 uh 238 00:10:21,680 --> 00:10:22,880 and 239 00:10:22,880 --> 00:10:24,480 or condition 240 00:10:24,480 --> 00:10:26,640 equals is 241 00:10:26,640 --> 00:10:28,560 or condition equals 242 00:10:28,560 --> 00:10:30,480 end with 243 00:10:30,480 --> 00:10:33,839 or begin with 244 00:10:34,560 --> 00:10:35,839 so 245 00:10:35,839 --> 00:10:38,800 you might be thinking 246 00:10:38,800 --> 00:10:41,279 where do i get a good 247 00:10:41,279 --> 00:10:42,640 pre-made 248 00:10:42,640 --> 00:10:45,600 sysmond config that i can start with 249 00:10:45,600 --> 00:10:47,920 yeah it's a great question 250 00:10:47,920 --> 00:10:50,160 so 251 00:10:50,399 --> 00:10:52,560 i would say that 252 00:10:52,560 --> 00:10:55,040 olaf hartong has a great system on 253 00:10:55,040 --> 00:10:56,800 config 254 00:10:56,800 --> 00:10:59,519 and he makes a great modular 255 00:10:59,519 --> 00:11:02,160 sysmon config that you can use 256 00:11:02,160 --> 00:11:04,880 to easily customize your rules 257 00:11:04,880 --> 00:11:08,399 for each event id 258 00:11:08,399 --> 00:11:10,480 it makes it very easy to 259 00:11:10,480 --> 00:11:12,880 manage 260 00:11:12,880 --> 00:11:15,200 big thanks to olaf for making such a 261 00:11:15,200 --> 00:11:18,959 great cis1 config 262 00:11:20,399 --> 00:11:23,519 okay let's take a little look here 263 00:11:23,519 --> 00:11:24,320 so 264 00:11:24,320 --> 00:11:26,079 here you can see 265 00:11:26,079 --> 00:11:28,720 a little of what his sysmon config looks 266 00:11:28,720 --> 00:11:29,680 like 267 00:11:29,680 --> 00:11:31,920 um 268 00:11:32,320 --> 00:11:35,120 olaf's sysmont config is pretty darn 269 00:11:35,120 --> 00:11:37,920 great uh but you have to understand you 270 00:11:37,920 --> 00:11:40,079 will need to spend some time getting to 271 00:11:40,079 --> 00:11:43,040 know the sysmon config and adjust it to 272 00:11:43,040 --> 00:11:45,200 your specific environment 273 00:11:45,200 --> 00:11:46,560 it's a 274 00:11:46,560 --> 00:11:49,680 big part of it a big deal 275 00:11:49,680 --> 00:11:51,200 to help you with that 276 00:11:51,200 --> 00:11:54,240 you can go to the trusted sex system 277 00:11:54,240 --> 00:11:56,959 community guide which is 278 00:11:56,959 --> 00:11:58,480 quite wonderful 279 00:11:58,480 --> 00:12:00,240 and written by 280 00:12:00,240 --> 00:12:04,000 carlos perez dark operator 281 00:12:04,000 --> 00:12:06,560 a note about carlos pretty much 282 00:12:06,560 --> 00:12:09,279 anything he writes or creates 283 00:12:09,279 --> 00:12:13,519 is amazing you can learn a lot from him 284 00:12:14,240 --> 00:12:15,279 okay 285 00:12:15,279 --> 00:12:17,120 now let's talk about 286 00:12:17,120 --> 00:12:19,360 installing sysmon 287 00:12:19,360 --> 00:12:21,440 it's quite easy you just follow these 288 00:12:21,440 --> 00:12:25,360 steps you basically download this sysmon 289 00:12:25,360 --> 00:12:27,839 unzip 290 00:12:27,920 --> 00:12:30,800 grab your sysmon config make sure you 291 00:12:30,800 --> 00:12:32,959 save it to the same folder 292 00:12:32,959 --> 00:12:34,240 and then you're going to run this 293 00:12:34,240 --> 00:12:35,600 command 294 00:12:35,600 --> 00:12:38,240 right there 295 00:12:38,240 --> 00:12:40,079 you note you can also do this with the 296 00:12:40,079 --> 00:12:42,079 script of course i'm not going to go 297 00:12:42,079 --> 00:12:44,639 into that for the sake of time but just 298 00:12:44,639 --> 00:12:47,519 know that that's an option 299 00:12:47,519 --> 00:12:50,880 so after sus1 is installed you should 300 00:12:50,880 --> 00:12:53,839 see this 301 00:12:54,160 --> 00:12:58,240 and if you want to go see the cis1 logs 302 00:12:58,240 --> 00:12:59,760 you can open up 303 00:12:59,760 --> 00:13:01,120 event viewer 304 00:13:01,120 --> 00:13:05,120 and go to applications services logs 305 00:13:05,120 --> 00:13:06,480 microsoft 306 00:13:06,480 --> 00:13:07,600 windows 307 00:13:07,600 --> 00:13:10,639 sysfon and click on operational 308 00:13:10,639 --> 00:13:14,160 and then you'll see the logs 309 00:13:14,720 --> 00:13:16,399 okay now what 310 00:13:16,399 --> 00:13:17,920 you might say 311 00:13:17,920 --> 00:13:21,360 okay i have installed this one now what 312 00:13:21,360 --> 00:13:23,279 well now you need to send these cismod 313 00:13:23,279 --> 00:13:26,240 events to a sim 314 00:13:26,240 --> 00:13:28,079 and you might ask 315 00:13:28,079 --> 00:13:30,560 wait what is this in 316 00:13:30,560 --> 00:13:32,480 a sim is basically a security 317 00:13:32,480 --> 00:13:36,480 information and event management system 318 00:13:36,480 --> 00:13:39,040 and it's think of it like a cen it's 319 00:13:39,040 --> 00:13:40,959 basically a central place to send all 320 00:13:40,959 --> 00:13:42,240 your logs 321 00:13:42,240 --> 00:13:45,440 so you can analyze and search the data 322 00:13:45,440 --> 00:13:49,519 and here are a few uh examples 323 00:13:49,519 --> 00:13:51,360 splunk 324 00:13:51,360 --> 00:13:55,360 is they have of course a paid version 325 00:13:55,360 --> 00:13:58,000 and they have a free version but 326 00:13:58,000 --> 00:14:01,199 note that the free version allows up to 327 00:14:01,199 --> 00:14:03,760 500 megabytes per day 328 00:14:03,760 --> 00:14:06,720 which is actually not a lot of data 329 00:14:06,720 --> 00:14:08,399 you might be surprised how quickly you 330 00:14:08,399 --> 00:14:10,480 get to that limit 331 00:14:10,480 --> 00:14:14,000 uh security onion is great it's free 332 00:14:14,000 --> 00:14:16,639 it's a great community but note that 333 00:14:16,639 --> 00:14:18,480 you're on your own to set it up and get 334 00:14:18,480 --> 00:14:19,839 it running 335 00:14:19,839 --> 00:14:22,959 and the same is true with the elk stack 336 00:14:22,959 --> 00:14:25,839 by elastic 337 00:14:27,279 --> 00:14:29,440 so 338 00:14:29,440 --> 00:14:32,639 let's talk a bit about some examples of 339 00:14:32,639 --> 00:14:36,399 my favorite sysmon events 340 00:14:36,800 --> 00:14:39,120 since spawn event like i said event id 341 00:14:39,120 --> 00:14:40,720 one 342 00:14:40,720 --> 00:14:42,399 process creation 343 00:14:42,399 --> 00:14:45,440 is just fabulous 344 00:14:45,440 --> 00:14:47,760 uh sysmon event id3 345 00:14:47,760 --> 00:14:49,360 network connection 346 00:14:49,360 --> 00:14:51,519 also fabulous 347 00:14:51,519 --> 00:14:56,720 sysfon event 22 dns event 348 00:14:57,120 --> 00:14:59,040 fabulous 349 00:14:59,040 --> 00:15:01,120 let's talk about them 350 00:15:01,120 --> 00:15:02,639 so 351 00:15:02,639 --> 00:15:05,519 in sysmon event id 1 352 00:15:05,519 --> 00:15:07,199 i wanted to show you here a little 353 00:15:07,199 --> 00:15:09,360 example of some of the 354 00:15:09,360 --> 00:15:13,040 fields that it captures 355 00:15:13,040 --> 00:15:14,240 uh 356 00:15:14,240 --> 00:15:15,680 so in the field 357 00:15:15,680 --> 00:15:18,639 rule name you can see there i just want 358 00:15:18,639 --> 00:15:22,560 to note uh olaf's sysmon config contains 359 00:15:22,560 --> 00:15:24,880 miter attack ids here and that's very 360 00:15:24,880 --> 00:15:26,560 useful 361 00:15:26,560 --> 00:15:28,560 uh note the image which is the 362 00:15:28,560 --> 00:15:29,759 executable 363 00:15:29,759 --> 00:15:32,880 in this case it's notepad plus plus 364 00:15:32,880 --> 00:15:34,639 uh let's see 365 00:15:34,639 --> 00:15:38,560 also you can see here the command line 366 00:15:38,560 --> 00:15:39,759 that's 367 00:15:39,759 --> 00:15:43,519 the greatest that's wonderful 368 00:15:43,519 --> 00:15:45,839 you can see the user in this case it's 369 00:15:45,839 --> 00:15:48,959 just username is just an example 370 00:15:48,959 --> 00:15:51,519 and this is also very very important 371 00:15:51,519 --> 00:15:53,199 you get hashes 372 00:15:53,199 --> 00:15:56,560 so you can see the sha1 md5 hash 373 00:15:56,560 --> 00:15:58,240 it's cut off but you can't see it but 374 00:15:58,240 --> 00:15:59,600 over on the 375 00:15:59,600 --> 00:16:03,680 right you can also get imp hash 376 00:16:03,920 --> 00:16:06,240 note also at the bottom you can see the 377 00:16:06,240 --> 00:16:08,959 parent image which was the parent 378 00:16:08,959 --> 00:16:10,720 executable 379 00:16:10,720 --> 00:16:13,839 and the parent command line 380 00:16:13,839 --> 00:16:16,000 wonderful 381 00:16:16,000 --> 00:16:17,040 okay 382 00:16:17,040 --> 00:16:21,279 event id 3 network connection 383 00:16:21,279 --> 00:16:23,600 uh here's here i show you an example 384 00:16:23,600 --> 00:16:25,839 here i just included it 385 00:16:25,839 --> 00:16:28,320 note in the rule name you can see right 386 00:16:28,320 --> 00:16:29,279 there 387 00:16:29,279 --> 00:16:31,120 what olaf's 388 00:16:31,120 --> 00:16:33,440 sysmon config has for the rule name you 389 00:16:33,440 --> 00:16:34,560 can see the 390 00:16:34,560 --> 00:16:37,600 miter attack id 391 00:16:37,600 --> 00:16:39,839 wonderful 392 00:16:39,839 --> 00:16:42,240 and in this case let's see you can also 393 00:16:42,240 --> 00:16:44,320 see the user 394 00:16:44,320 --> 00:16:47,120 you can see the protocol 395 00:16:47,120 --> 00:16:48,079 source 396 00:16:48,079 --> 00:16:49,279 ip 397 00:16:49,279 --> 00:16:50,800 source port 398 00:16:50,800 --> 00:16:52,639 destination ip 399 00:16:52,639 --> 00:16:54,399 destination port 400 00:16:54,399 --> 00:16:57,360 absolutely wonderful 401 00:16:57,360 --> 00:16:59,360 so valuable 402 00:16:59,360 --> 00:17:01,600 so 403 00:17:02,560 --> 00:17:05,119 event id 22 404 00:17:05,119 --> 00:17:08,559 dns event dns query 405 00:17:08,559 --> 00:17:13,119 uh this is such a great event uh 406 00:17:13,119 --> 00:17:15,520 one of the greatest parts about this you 407 00:17:15,520 --> 00:17:17,919 can see the query name right there in 408 00:17:17,919 --> 00:17:20,480 the middle in this case it's 409 00:17:20,480 --> 00:17:21,760 some google 410 00:17:21,760 --> 00:17:24,799 telemetry garbage probably 411 00:17:24,799 --> 00:17:27,039 and you can see the image the executable 412 00:17:27,039 --> 00:17:31,960 firefox and it shows you the user 413 00:17:33,440 --> 00:17:36,640 okay let's get to some examples 414 00:17:36,640 --> 00:17:40,240 of sysmon used during an investigation 415 00:17:40,240 --> 00:17:43,039 so in this case you can see sysmon event 416 00:17:43,039 --> 00:17:44,559 id1 417 00:17:44,559 --> 00:17:46,720 and we're doing a query for 418 00:17:46,720 --> 00:17:49,679 uh the command who am i 419 00:17:49,679 --> 00:17:51,360 this can be 420 00:17:51,360 --> 00:17:52,559 either 421 00:17:52,559 --> 00:17:54,640 completely 422 00:17:54,640 --> 00:17:57,039 harmless 423 00:17:57,039 --> 00:17:59,360 event 424 00:17:59,360 --> 00:18:00,400 or 425 00:18:00,400 --> 00:18:02,799 it could be an attacker that ran who am 426 00:18:02,799 --> 00:18:03,840 i 427 00:18:03,840 --> 00:18:06,880 to understand what kind of uh privileges 428 00:18:06,880 --> 00:18:08,960 they have because they had just popped 429 00:18:08,960 --> 00:18:11,360 the box and they're 430 00:18:11,360 --> 00:18:12,720 so 431 00:18:12,720 --> 00:18:15,840 very useful 432 00:18:16,160 --> 00:18:17,760 and here 433 00:18:17,760 --> 00:18:21,039 we're looking at sysmon event id 3. 434 00:18:21,039 --> 00:18:23,280 this is just a general search really to 435 00:18:23,280 --> 00:18:25,678 look at 436 00:18:25,760 --> 00:18:29,440 the processes source ip source port 437 00:18:29,440 --> 00:18:31,200 destination ip 438 00:18:31,200 --> 00:18:33,919 destination port 439 00:18:33,919 --> 00:18:35,200 these can be 440 00:18:35,200 --> 00:18:36,799 very interesting 441 00:18:36,799 --> 00:18:38,480 for example if i was to 442 00:18:38,480 --> 00:18:42,160 specify the destination port as 445 443 00:18:42,160 --> 00:18:43,919 that would be very interesting showing 444 00:18:43,919 --> 00:18:46,480 smb 445 00:18:47,039 --> 00:18:48,080 okay 446 00:18:48,080 --> 00:18:51,200 this is spawn event id 22 this is a 447 00:18:51,200 --> 00:18:53,440 really good one it's really fun uh this 448 00:18:53,440 --> 00:18:54,640 is rare 449 00:18:54,640 --> 00:18:57,200 dns queries 450 00:18:57,200 --> 00:18:59,840 so we're looking basically at one 451 00:18:59,840 --> 00:19:01,840 machine in particular 452 00:19:01,840 --> 00:19:04,559 and we're looking at the rare 453 00:19:04,559 --> 00:19:08,080 dns queries that it ran 454 00:19:08,080 --> 00:19:09,919 this can be very interesting very 455 00:19:09,919 --> 00:19:13,440 helpful during an investigation 456 00:19:15,039 --> 00:19:16,400 okay 457 00:19:16,400 --> 00:19:19,360 some closing thoughts 458 00:19:19,360 --> 00:19:20,240 so 459 00:19:20,240 --> 00:19:23,039 what what do you see here yeah 460 00:19:23,039 --> 00:19:25,360 these are some typical answers i've 461 00:19:25,360 --> 00:19:28,400 heard when i ask folks who work in 462 00:19:28,400 --> 00:19:30,320 incident response 463 00:19:30,320 --> 00:19:33,120 if the companies they work with 464 00:19:33,120 --> 00:19:35,679 resolving an incident 465 00:19:35,679 --> 00:19:37,760 have sysmon deployed in their 466 00:19:37,760 --> 00:19:40,240 environment 467 00:19:40,480 --> 00:19:43,520 so i see things like rarely 468 00:19:43,520 --> 00:19:44,720 never 469 00:19:44,720 --> 00:19:46,240 hardly ever 470 00:19:46,240 --> 00:19:48,400 this is a good one yes but not 471 00:19:48,400 --> 00:19:52,480 configured to send to the sim 472 00:19:52,480 --> 00:19:53,760 so i guess 473 00:19:53,760 --> 00:19:56,799 i just want to say you know 474 00:19:56,799 --> 00:19:59,039 if you have never 475 00:19:59,039 --> 00:20:01,520 deployed sysmon 476 00:20:01,520 --> 00:20:02,960 in your environment 477 00:20:02,960 --> 00:20:04,880 please do 478 00:20:04,880 --> 00:20:07,600 install sysmon and make sure you send 479 00:20:07,600 --> 00:20:11,760 the suspend events to a sim 480 00:20:11,919 --> 00:20:14,159 could really help everybody 481 00:20:14,159 --> 00:20:16,960 in an incident 482 00:20:18,320 --> 00:20:21,280 that's it thanks 483 00:20:21,280 --> 00:20:23,840 join the conversation uh meet up with 484 00:20:23,840 --> 00:20:26,000 the blue team village 485 00:20:26,000 --> 00:20:29,000 discord.blueteamvillage.org 486 00:20:30,799 --> 00:20:32,840 i'm extreme paper 487 00:20:32,840 --> 00:20:36,240 clip thanks 488 00:20:38,400 --> 00:20:42,039 and you're clear