1 00:00:01,439 --> 00:00:02,960 welcome to prague 2 00:00:02,960 --> 00:00:05,279 obsidian uh this is thought halftone 3 00:00:05,279 --> 00:00:06,879 kill chain one 4 00:00:06,879 --> 00:00:09,360 um the title of this is go fish 5 00:00:09,360 --> 00:00:11,759 visualizing basic malice 6 00:00:11,759 --> 00:00:16,480 and this will be by myself salmonella x 7 00:00:16,480 --> 00:00:18,240 a little bit about myself 8 00:00:18,240 --> 00:00:19,840 uh who i am 9 00:00:19,840 --> 00:00:22,240 i'm saminos kx 10 00:00:22,240 --> 00:00:24,400 i'm a tinkerer 11 00:00:24,400 --> 00:00:26,960 i'm also a sock team member 12 00:00:26,960 --> 00:00:29,279 for an organization 13 00:00:29,279 --> 00:00:31,760 i am a blue team enthusiast 14 00:00:31,760 --> 00:00:35,600 i have been for many many years 15 00:00:35,600 --> 00:00:37,840 i am also an instructor 16 00:00:37,840 --> 00:00:41,840 but most of all i am also a student 17 00:00:42,000 --> 00:00:43,440 so let's take a look at what we're going 18 00:00:43,440 --> 00:00:45,680 to be learning today 19 00:00:45,680 --> 00:00:47,680 first of all we're going to learn what 20 00:00:47,680 --> 00:00:50,160 fishing is and what is a phishing 21 00:00:50,160 --> 00:00:51,440 payload 22 00:00:51,440 --> 00:00:55,280 in a context of phishing 23 00:00:55,280 --> 00:00:57,199 we're going to be learning what visual 24 00:00:57,199 --> 00:01:00,559 basic for applications is 25 00:01:00,879 --> 00:01:02,640 we're also going to learn what macros 26 00:01:02,640 --> 00:01:06,320 are and what does this have to do with 27 00:01:06,320 --> 00:01:09,920 fishing and thread hunting 28 00:01:09,920 --> 00:01:12,479 and we'll also learn how to uh walk 29 00:01:12,479 --> 00:01:13,200 through 30 00:01:13,200 --> 00:01:16,720 the process from a hype from hypothesis 31 00:01:16,720 --> 00:01:20,400 to tangible results during a foot hunt 32 00:01:20,400 --> 00:01:22,640 also we're going to recognize what tools 33 00:01:22,640 --> 00:01:24,880 do we have in our arsenal and what can 34 00:01:24,880 --> 00:01:26,720 we do with it 35 00:01:26,720 --> 00:01:29,679 for our threat hunt 36 00:01:31,680 --> 00:01:33,680 so let's take a look at fishing 37 00:01:33,680 --> 00:01:35,920 so fishing is 38 00:01:35,920 --> 00:01:37,840 still one of the most common attack 39 00:01:37,840 --> 00:01:40,640 methods in use today 40 00:01:40,640 --> 00:01:42,640 generally what phishing 41 00:01:42,640 --> 00:01:45,840 means is that it's a way for a 42 00:01:45,840 --> 00:01:47,119 uh 43 00:01:47,119 --> 00:01:49,680 adversary to get credentials 44 00:01:49,680 --> 00:01:51,200 or information 45 00:01:51,200 --> 00:01:52,960 from an individual 46 00:01:52,960 --> 00:01:57,280 via nefarious or malicious means 47 00:02:00,799 --> 00:02:03,200 a phishing payload is the method of 48 00:02:03,200 --> 00:02:06,640 getting that data so a phishing payload 49 00:02:06,640 --> 00:02:07,680 could be 50 00:02:07,680 --> 00:02:08,399 a 51 00:02:08,399 --> 00:02:11,120 document a zip file 52 00:02:11,120 --> 00:02:14,800 a link in an email 53 00:02:16,239 --> 00:02:19,440 we also are going to learn 54 00:02:19,520 --> 00:02:21,360 there are differences between these 55 00:02:21,360 --> 00:02:23,599 different types of payloads 56 00:02:23,599 --> 00:02:26,799 we'll see that a little bit later 57 00:02:31,040 --> 00:02:32,560 here are a couple examples of some 58 00:02:32,560 --> 00:02:34,720 phishing payloads that i've seen in my 59 00:02:34,720 --> 00:02:35,840 actual 60 00:02:35,840 --> 00:02:38,720 day-to-day experience 61 00:02:38,720 --> 00:02:40,400 here's one example 62 00:02:40,400 --> 00:02:42,640 so this is an i.t security update 63 00:02:42,640 --> 00:02:46,160 from the it help desk 64 00:02:46,160 --> 00:02:47,840 and if you look at this 65 00:02:47,840 --> 00:02:48,959 it is 66 00:02:48,959 --> 00:02:51,840 has so many warnings that a user would 67 00:02:51,840 --> 00:02:53,599 be i'd be surprised if the user would 68 00:02:53,599 --> 00:02:55,440 actually click on the 69 00:02:55,440 --> 00:02:56,640 the email 70 00:02:56,640 --> 00:02:58,800 link that's in it however let's take a 71 00:02:58,800 --> 00:03:01,680 look at it uh microsoft gives you an 72 00:03:01,680 --> 00:03:04,400 email uh header that says it's this 73 00:03:04,400 --> 00:03:05,519 person's from outside of your 74 00:03:05,519 --> 00:03:07,280 organization 75 00:03:07,280 --> 00:03:09,360 they also have another one inside 76 00:03:09,360 --> 00:03:11,120 saying that the email was from an 77 00:03:11,120 --> 00:03:12,959 external source 78 00:03:12,959 --> 00:03:15,599 the warnings are there 79 00:03:15,599 --> 00:03:17,920 in the actual body of the email we see 80 00:03:17,920 --> 00:03:19,200 it says 81 00:03:19,200 --> 00:03:20,879 your email account will be deactivated 82 00:03:20,879 --> 00:03:24,480 shortly to stop deactivation click here 83 00:03:24,480 --> 00:03:27,200 companies are not going to do that 84 00:03:27,200 --> 00:03:29,040 they click on the if somebody were to 85 00:03:29,040 --> 00:03:30,720 click on the click here button it would 86 00:03:30,720 --> 00:03:32,799 take them to a site that would have them 87 00:03:32,799 --> 00:03:35,040 enter their credentials 88 00:03:35,040 --> 00:03:37,599 part of what makes fishing a little bit 89 00:03:37,599 --> 00:03:38,400 more 90 00:03:38,400 --> 00:03:40,239 concerning is that the attack the 91 00:03:40,239 --> 00:03:42,720 adversaries will try to use 92 00:03:42,720 --> 00:03:45,120 a sense of urgency or you need to do 93 00:03:45,120 --> 00:03:47,200 this immediately or you need to do this 94 00:03:47,200 --> 00:03:49,120 before the end of the day 95 00:03:49,120 --> 00:03:51,440 or you'll lose something or 96 00:03:51,440 --> 00:03:55,360 will charge you or something like that 97 00:03:55,360 --> 00:03:57,519 let's take another look at another 98 00:03:57,519 --> 00:03:59,040 one 99 00:03:59,040 --> 00:04:00,959 say the user clicks on the link that 100 00:04:00,959 --> 00:04:02,640 says hey here's something that here's 101 00:04:02,640 --> 00:04:04,400 some money that you owe 102 00:04:04,400 --> 00:04:06,400 uh we need you to review it so they 103 00:04:06,400 --> 00:04:08,159 would click on the link and they would 104 00:04:08,159 --> 00:04:09,680 get something like this 105 00:04:09,680 --> 00:04:12,000 this is obviously uh inside of a web 106 00:04:12,000 --> 00:04:13,680 page 107 00:04:13,680 --> 00:04:16,320 and there's a box that says 108 00:04:16,320 --> 00:04:18,560 that your authentication is needed to 109 00:04:18,560 --> 00:04:21,040 log into this document 110 00:04:21,040 --> 00:04:23,919 this is not legit 111 00:04:26,000 --> 00:04:27,680 we have another one as well this is 112 00:04:27,680 --> 00:04:28,960 comes from 113 00:04:28,960 --> 00:04:30,960 um goes back to the urgency that we 114 00:04:30,960 --> 00:04:32,960 discussed earlier this is an invoice 115 00:04:32,960 --> 00:04:34,639 that's urgent 116 00:04:34,639 --> 00:04:37,120 um if you take a look at the spelling in 117 00:04:37,120 --> 00:04:38,320 the email 118 00:04:38,320 --> 00:04:40,240 uh there's often misspellings that's not 119 00:04:40,240 --> 00:04:41,919 always a 120 00:04:41,919 --> 00:04:43,280 absolute tell 121 00:04:43,280 --> 00:04:45,840 but it's one of those signs that could 122 00:04:45,840 --> 00:04:47,120 mean that it is 123 00:04:47,120 --> 00:04:49,600 potentially malicious 124 00:04:49,600 --> 00:04:52,560 and then we have the invoice.dlcx 125 00:04:52,560 --> 00:04:55,440 which is a microsoft word document that 126 00:04:55,440 --> 00:04:57,919 most likely has a 127 00:04:57,919 --> 00:04:59,360 malicious payload 128 00:04:59,360 --> 00:05:01,600 inside of it via a macro which we'll 129 00:05:01,600 --> 00:05:04,320 learn about later 130 00:05:07,680 --> 00:05:11,090 so visual basic for applications 131 00:05:11,090 --> 00:05:12,560 [Music] 132 00:05:12,560 --> 00:05:15,919 we call it vba for short 133 00:05:15,919 --> 00:05:17,840 but it's microsoft's generous gift for 134 00:05:17,840 --> 00:05:20,160 accessibility in office 135 00:05:20,160 --> 00:05:22,240 so what this does this allows for adding 136 00:05:22,240 --> 00:05:23,919 functionality in microsoft word 137 00:05:23,919 --> 00:05:25,520 powerpoint excel 138 00:05:25,520 --> 00:05:27,680 access 139 00:05:27,680 --> 00:05:31,520 microsoft project i believe or publisher 140 00:05:31,520 --> 00:05:34,880 but what that does is it allows the 141 00:05:34,880 --> 00:05:36,000 a 142 00:05:36,000 --> 00:05:38,240 file to interact with the operating 143 00:05:38,240 --> 00:05:39,840 underlying operating system or other 144 00:05:39,840 --> 00:05:42,400 office applications to transfer data or 145 00:05:42,400 --> 00:05:44,400 do different things between different 146 00:05:44,400 --> 00:05:47,280 applications uh automatically 147 00:05:47,280 --> 00:05:49,600 that's it could be a good thing but it 148 00:05:49,600 --> 00:05:52,720 more than likely is a bad thing 149 00:05:52,720 --> 00:05:54,720 we refer to these 150 00:05:54,720 --> 00:05:57,919 functions as macros 151 00:05:57,919 --> 00:06:00,400 and as i discussed it's not limited in 152 00:06:00,400 --> 00:06:02,560 scope to just the office applications 153 00:06:02,560 --> 00:06:04,319 which is what makes this 154 00:06:04,319 --> 00:06:07,680 kind of a bigger issue 155 00:06:07,680 --> 00:06:09,759 except 156 00:06:09,759 --> 00:06:12,160 if it were not just limit it to the 157 00:06:12,160 --> 00:06:14,479 office applications 158 00:06:14,479 --> 00:06:16,240 as i said this can be a rather large 159 00:06:16,240 --> 00:06:18,400 concern 160 00:06:18,400 --> 00:06:19,440 with the 161 00:06:19,440 --> 00:06:21,759 amount of privilege and the actions that 162 00:06:21,759 --> 00:06:23,919 can be done with this 163 00:06:23,919 --> 00:06:25,039 uh 164 00:06:25,039 --> 00:06:27,840 functionality 165 00:06:29,039 --> 00:06:31,120 this can actually be weaponized by 166 00:06:31,120 --> 00:06:32,560 adversaries 167 00:06:32,560 --> 00:06:34,560 and we'll see an example of that here 168 00:06:34,560 --> 00:06:36,960 shortly 169 00:06:40,080 --> 00:06:42,000 the macros can perform the actions 170 00:06:42,000 --> 00:06:44,400 automatically and without 171 00:06:44,400 --> 00:06:46,639 sometimes without obvious signs just by 172 00:06:46,639 --> 00:06:48,960 opening a document or a file that 173 00:06:48,960 --> 00:06:52,560 contains active macros 174 00:06:52,639 --> 00:06:54,800 what are the implications 175 00:06:54,800 --> 00:06:57,919 if a user downloads a an email 176 00:06:57,919 --> 00:06:59,520 a file from an email 177 00:06:59,520 --> 00:07:01,599 and they open the document 178 00:07:01,599 --> 00:07:03,599 and they click a button that could 179 00:07:03,599 --> 00:07:05,120 activate 180 00:07:05,120 --> 00:07:08,880 additional downloads of malicious 181 00:07:09,039 --> 00:07:12,400 files from an adversary's 182 00:07:12,400 --> 00:07:14,880 systems 183 00:07:15,280 --> 00:07:17,120 what does the macro look like 184 00:07:17,120 --> 00:07:19,840 here's an example of a macro that 185 00:07:19,840 --> 00:07:21,840 is not legitimate 186 00:07:21,840 --> 00:07:23,360 um 187 00:07:23,360 --> 00:07:26,319 but this is what uh the macro interface 188 00:07:26,319 --> 00:07:27,759 looks like in 189 00:07:27,759 --> 00:07:31,800 microsoft office applications 190 00:07:35,520 --> 00:07:37,440 so let's think a little bit about what 191 00:07:37,440 --> 00:07:39,840 our scenario is right now 192 00:07:39,840 --> 00:07:41,599 let's say i'm a new team member of the 193 00:07:41,599 --> 00:07:43,360 magnum tempest 194 00:07:43,360 --> 00:07:45,759 mt security team i've been asked to 195 00:07:45,759 --> 00:07:48,000 build a threat hunt based on what i 196 00:07:48,000 --> 00:07:49,919 think might have been missed in the 197 00:07:49,919 --> 00:07:51,120 environment 198 00:07:51,120 --> 00:07:53,360 but i've never done a threat hunt before 199 00:07:53,360 --> 00:07:56,080 where do i start 200 00:07:56,960 --> 00:07:58,479 so first things first what you need to 201 00:07:58,479 --> 00:08:00,879 do is we need to start with a 202 00:08:00,879 --> 00:08:03,280 hypothesis 203 00:08:03,280 --> 00:08:04,879 uh i'll thought you need to start with a 204 00:08:04,879 --> 00:08:06,319 hypothesis in mind because you need to 205 00:08:06,319 --> 00:08:09,039 know what you're looking for 206 00:08:09,039 --> 00:08:10,479 for me 207 00:08:10,479 --> 00:08:12,879 i'm focusing on macro usage in the 208 00:08:12,879 --> 00:08:14,400 environment so visual basic for 209 00:08:14,400 --> 00:08:17,520 applications macros 210 00:08:17,520 --> 00:08:19,039 i'm going to start 211 00:08:19,039 --> 00:08:22,479 with a broad hypothesis 212 00:08:22,479 --> 00:08:24,560 and i'm going to presume 213 00:08:24,560 --> 00:08:26,560 that magnum tempest employees receive 214 00:08:26,560 --> 00:08:29,520 malicious documents 215 00:08:29,520 --> 00:08:32,879 or malicious emails 216 00:08:32,880 --> 00:08:35,760 this is a good starting point but it's 217 00:08:35,760 --> 00:08:38,000 far too broad because 218 00:08:38,000 --> 00:08:41,120 malicious emails uh yes 219 00:08:41,120 --> 00:08:43,200 we will get that but we need to kind of 220 00:08:43,200 --> 00:08:44,640 refine that 221 00:08:44,640 --> 00:08:47,040 uh hypothesis a little 222 00:08:47,040 --> 00:08:48,000 more 223 00:08:48,000 --> 00:08:50,240 direct 224 00:08:50,240 --> 00:08:53,040 so let's let's refine and what we come 225 00:08:53,040 --> 00:08:54,560 up with is 226 00:08:54,560 --> 00:08:56,399 magnum tempest employees are targeted 227 00:08:56,399 --> 00:08:58,560 with malicious microsoft documents 228 00:08:58,560 --> 00:09:02,800 containing bba macros via phishing email 229 00:09:02,800 --> 00:09:04,160 and we're going to presume that some 230 00:09:04,160 --> 00:09:06,720 employees will download 231 00:09:06,720 --> 00:09:07,760 and open 232 00:09:07,760 --> 00:09:11,600 and detonate these malicious documents 233 00:09:15,120 --> 00:09:17,200 now what's important to note about this 234 00:09:17,200 --> 00:09:18,560 is that a lot of what we're going to be 235 00:09:18,560 --> 00:09:20,720 going over and doing here 236 00:09:20,720 --> 00:09:23,920 is specifically structured towards the 237 00:09:23,920 --> 00:09:26,560 splunk query language 238 00:09:26,560 --> 00:09:28,640 but these concepts 239 00:09:28,640 --> 00:09:30,240 can be applied 240 00:09:30,240 --> 00:09:32,080 to any platform 241 00:09:32,080 --> 00:09:34,720 any uh query language 242 00:09:34,720 --> 00:09:36,560 and there are also online applications 243 00:09:36,560 --> 00:09:39,440 or tools that will allow you to 244 00:09:39,440 --> 00:09:41,839 convert from one query language 245 00:09:41,839 --> 00:09:43,519 to another 246 00:09:43,519 --> 00:09:44,880 we won't be discussing that here but 247 00:09:44,880 --> 00:09:48,920 that is available 248 00:09:51,279 --> 00:09:54,160 so let's start with the thread hunt so 249 00:09:54,160 --> 00:09:56,320 we need to start with a query and splunk 250 00:09:56,320 --> 00:09:58,080 but we need to know what sources we have 251 00:09:58,080 --> 00:09:59,600 available 252 00:09:59,600 --> 00:10:03,200 so yeah we could start by just going 253 00:10:03,200 --> 00:10:05,839 across the entire platform 254 00:10:05,839 --> 00:10:08,160 and just go 255 00:10:08,160 --> 00:10:09,839 index equals 256 00:10:09,839 --> 00:10:11,760 asterisk 257 00:10:11,760 --> 00:10:13,200 let's take a look and see what we get 258 00:10:13,200 --> 00:10:16,680 when we do that 259 00:10:18,399 --> 00:10:20,079 we're going to type index 260 00:10:20,079 --> 00:10:22,480 equals 261 00:10:22,480 --> 00:10:24,880 star 262 00:10:25,120 --> 00:10:26,399 we have no 263 00:10:26,399 --> 00:10:28,000 no hits right now 264 00:10:28,000 --> 00:10:30,880 but that's because we need to go to the 265 00:10:30,880 --> 00:10:32,399 timeline here 266 00:10:32,399 --> 00:10:34,160 and for 267 00:10:34,160 --> 00:10:36,480 for lack of a better time time period 268 00:10:36,480 --> 00:10:38,959 let's go with all time 269 00:10:38,959 --> 00:10:42,760 and then click on search 270 00:10:47,040 --> 00:10:48,560 interesting we have nothing so let's 271 00:10:48,560 --> 00:10:49,920 take a look let's kind of refine a 272 00:10:49,920 --> 00:10:52,240 little bit more 273 00:10:52,240 --> 00:10:55,640 oh we do 274 00:11:03,040 --> 00:11:04,320 as you see 275 00:11:04,320 --> 00:11:08,399 the search is increasing 276 00:11:08,720 --> 00:11:10,399 this is more these are more entries than 277 00:11:10,399 --> 00:11:12,839 we could ever want to go through and 278 00:11:12,839 --> 00:11:14,720 parse 279 00:11:14,720 --> 00:11:15,839 and this number is just going to go 280 00:11:15,839 --> 00:11:19,240 higher and higher 281 00:11:30,079 --> 00:11:32,079 let's stop this right now let's go back 282 00:11:32,079 --> 00:11:33,600 to our 283 00:11:33,600 --> 00:11:35,360 drawing board let's see what else we can 284 00:11:35,360 --> 00:11:37,519 do 285 00:11:37,519 --> 00:11:39,760 and for reference this is bad practice 286 00:11:39,760 --> 00:11:43,600 to do the uh asterisk with a query 287 00:11:43,600 --> 00:11:45,440 because it's one it's a great way to get 288 00:11:45,440 --> 00:11:47,279 server admins mad at you 289 00:11:47,279 --> 00:11:49,200 for slowing down the system 290 00:11:49,200 --> 00:11:51,440 but you might also get not get exactly 291 00:11:51,440 --> 00:11:53,680 what you're expecting you might get more 292 00:11:53,680 --> 00:11:55,519 and you won't be able to kind of refine 293 00:11:55,519 --> 00:11:58,079 your your query as much 294 00:11:58,079 --> 00:12:00,399 so let's take a look at a query that we 295 00:12:00,399 --> 00:12:02,959 could use 296 00:12:07,760 --> 00:12:10,399 so this one will summarize 297 00:12:10,399 --> 00:12:11,519 all of the 298 00:12:11,519 --> 00:12:12,800 the log 299 00:12:12,800 --> 00:12:15,120 sources that we have in splunk 300 00:12:15,120 --> 00:12:16,800 now i'm going to cheat because i already 301 00:12:16,800 --> 00:12:18,399 have this 302 00:12:18,399 --> 00:12:22,320 as a search in my my history 303 00:12:22,320 --> 00:12:25,760 so i'm going to add that to my search 304 00:12:25,760 --> 00:12:28,079 i'm going to do all time and i'm going 305 00:12:28,079 --> 00:12:30,240 to search 306 00:12:30,240 --> 00:12:32,240 okay so we see we have a number of 307 00:12:32,240 --> 00:12:36,320 different indexes we have 12 results 308 00:12:36,720 --> 00:12:37,519 and 309 00:12:37,519 --> 00:12:39,360 the ones that kind of stand out to me 310 00:12:39,360 --> 00:12:43,040 right now is zeke because 311 00:12:43,040 --> 00:12:45,279 zeke will allow me to get 312 00:12:45,279 --> 00:12:47,040 uh information about 313 00:12:47,040 --> 00:12:50,000 data that is being transmitted over uh 314 00:12:50,000 --> 00:12:52,639 the wire so over the network 315 00:12:52,639 --> 00:12:54,800 so let's go back and look and see 316 00:12:54,800 --> 00:12:59,240 what we can do with that information 317 00:13:06,320 --> 00:13:09,360 so this is what we saw 318 00:13:11,200 --> 00:13:12,480 again we're going to start with zeke 319 00:13:12,480 --> 00:13:13,760 let's see what what files are 320 00:13:13,760 --> 00:13:16,000 transmitted over the network so instead 321 00:13:16,000 --> 00:13:17,519 of putting the asterisk we're going to 322 00:13:17,519 --> 00:13:18,839 go index 323 00:13:18,839 --> 00:13:20,480 z 324 00:13:20,480 --> 00:13:22,160 and as i said previously we need to set 325 00:13:22,160 --> 00:13:23,760 a date range for the what we're going 326 00:13:23,760 --> 00:13:24,800 through 327 00:13:24,800 --> 00:13:26,320 and for the example 328 00:13:26,320 --> 00:13:28,880 we're going to use uh february 11th 329 00:13:28,880 --> 00:13:33,399 through february 13th of 2022 330 00:13:36,079 --> 00:13:38,079 index equals 331 00:13:38,079 --> 00:13:40,399 zeek 332 00:13:41,279 --> 00:13:43,360 i'm going to do 333 00:13:43,360 --> 00:13:45,360 date range 334 00:13:45,360 --> 00:13:48,360 between 335 00:13:50,560 --> 00:13:52,160 february 11th 336 00:13:52,160 --> 00:13:54,399 and 337 00:13:54,959 --> 00:13:56,959 february 13th 338 00:13:56,959 --> 00:13:59,279 i'm going to apply that 339 00:13:59,279 --> 00:14:02,959 and then we're going to search 340 00:14:02,959 --> 00:14:05,279 as you still see we still have 341 00:14:05,279 --> 00:14:06,720 a rather 342 00:14:06,720 --> 00:14:08,959 large amount of events 343 00:14:08,959 --> 00:14:10,320 so we need to refine that a little bit 344 00:14:10,320 --> 00:14:11,519 better 345 00:14:11,519 --> 00:14:15,399 go back to our drawing board 346 00:14:17,040 --> 00:14:18,240 we already know that we're dealing with 347 00:14:18,240 --> 00:14:20,079 microsoft office documents 348 00:14:20,079 --> 00:14:22,399 uh and with the macro behavior so let's 349 00:14:22,399 --> 00:14:24,000 see what we can do 350 00:14:24,000 --> 00:14:26,320 um so our typical 351 00:14:26,320 --> 00:14:28,560 microsoft document files that we 352 00:14:28,560 --> 00:14:31,600 typically see being transmitted over uh 353 00:14:31,600 --> 00:14:33,760 email in attacks are 354 00:14:33,760 --> 00:14:36,760 dlc.dlcx.xls 355 00:14:37,040 --> 00:14:39,760 and xlsx so you have microsoft word 356 00:14:39,760 --> 00:14:41,920 documents and excel documents let's see 357 00:14:41,920 --> 00:14:44,560 if we can add that to the query 358 00:14:44,560 --> 00:14:47,040 like this 359 00:14:47,760 --> 00:14:49,680 and actually physique 360 00:14:49,680 --> 00:14:53,920 dot dot or dot dot x or dot xls or dot 361 00:14:53,920 --> 00:14:59,240 xlsx so let's add that to our query 362 00:15:00,800 --> 00:15:03,199 and i have that here 363 00:15:03,199 --> 00:15:05,279 so let's query that 364 00:15:05,279 --> 00:15:07,839 okay we're getting better we have 863 365 00:15:07,839 --> 00:15:10,160 events 366 00:15:10,240 --> 00:15:11,519 so let's scroll through and see what we 367 00:15:11,519 --> 00:15:13,839 can see 368 00:15:15,760 --> 00:15:18,160 that's still a lot of documents so we 369 00:15:18,160 --> 00:15:20,160 want to see can we i would find that a 370 00:15:20,160 --> 00:15:22,800 little bit better 371 00:15:22,880 --> 00:15:25,360 see what we can do 372 00:15:25,360 --> 00:15:29,920 so you see we saw 863 events 373 00:15:30,720 --> 00:15:32,320 what are we what do we find there were a 374 00:15:32,320 --> 00:15:34,000 lot of events we could probably never 375 00:15:34,000 --> 00:15:36,639 done this more 376 00:15:36,639 --> 00:15:38,639 so we've got the initial 377 00:15:38,639 --> 00:15:42,959 uh entry index ecozeek dot dot dot 378 00:15:42,959 --> 00:15:46,399 uh these document formats 379 00:15:49,279 --> 00:15:51,040 but this is also probably a great point 380 00:15:51,040 --> 00:15:52,399 to bring up something that's integral 381 00:15:52,399 --> 00:15:55,680 for butt hunting 382 00:15:55,680 --> 00:15:57,680 pick notes uh you need we need to know 383 00:15:57,680 --> 00:16:01,279 what we did what worked what didn't work 384 00:16:01,279 --> 00:16:02,240 and 385 00:16:02,240 --> 00:16:04,240 uh for the purposes of this 386 00:16:04,240 --> 00:16:09,079 we're keeping track as we go along 387 00:16:15,839 --> 00:16:19,519 how could we refine this search 388 00:16:19,920 --> 00:16:21,440 since we're focusing on supposed 389 00:16:21,440 --> 00:16:23,360 phishing emails we can look at common 390 00:16:23,360 --> 00:16:25,120 terms that are used in phishing 391 00:16:25,120 --> 00:16:26,160 documents 392 00:16:26,160 --> 00:16:29,040 sans has a cool uh extensive list and 393 00:16:29,040 --> 00:16:30,880 it's not comprehensive but it's very 394 00:16:30,880 --> 00:16:31,920 useful 395 00:16:31,920 --> 00:16:34,000 um at this link here 396 00:16:34,000 --> 00:16:35,440 and 397 00:16:35,440 --> 00:16:36,720 uh 398 00:16:36,720 --> 00:16:38,560 we can use some terms 399 00:16:38,560 --> 00:16:41,199 to fine-tune the 400 00:16:41,199 --> 00:16:42,079 search 401 00:16:42,079 --> 00:16:44,079 so let's add some of the ones that i 402 00:16:44,079 --> 00:16:45,360 found 403 00:16:45,360 --> 00:16:47,199 um 404 00:16:47,199 --> 00:16:49,440 invoice we see a lot of that 405 00:16:49,440 --> 00:16:53,600 or remit or payment or order so let's go 406 00:16:53,600 --> 00:16:55,279 back to splunk 407 00:16:55,279 --> 00:16:59,000 and see how that looks 408 00:17:25,679 --> 00:17:27,119 so 409 00:17:27,119 --> 00:17:30,320 while these are common uh phishing email 410 00:17:30,320 --> 00:17:32,000 um 411 00:17:32,000 --> 00:17:33,679 document names or it could be part of 412 00:17:33,679 --> 00:17:36,799 emails we're not getting very many hits 413 00:17:36,799 --> 00:17:39,280 we're actually getting no hits 414 00:17:39,280 --> 00:17:43,320 so let's go back to the drawing board 415 00:17:46,559 --> 00:17:49,360 let's try using another index this is 416 00:17:49,360 --> 00:17:50,640 sysmon 417 00:17:50,640 --> 00:17:52,880 so what this mod will do is this one 418 00:17:52,880 --> 00:17:53,760 will 419 00:17:53,760 --> 00:17:55,039 is essentially 420 00:17:55,039 --> 00:17:58,000 giving you telemetry from the endpoint 421 00:17:58,000 --> 00:18:02,000 much how z gives you telemetry from the 422 00:18:02,000 --> 00:18:03,520 network 423 00:18:03,520 --> 00:18:05,360 so let's add system on to that see if we 424 00:18:05,360 --> 00:18:07,760 have any 425 00:18:08,080 --> 00:18:10,399 hits 426 00:18:12,559 --> 00:18:15,039 again no hiss okay 427 00:18:15,039 --> 00:18:15,760 so 428 00:18:15,760 --> 00:18:17,360 perhaps we should try a different 429 00:18:17,360 --> 00:18:18,799 approach 430 00:18:18,799 --> 00:18:21,520 let's go back 431 00:18:27,440 --> 00:18:30,000 as you see we had no no event 432 00:18:30,000 --> 00:18:32,240 okay 433 00:18:36,240 --> 00:18:40,320 what can we do to get better results 434 00:18:40,400 --> 00:18:42,400 again we want to probably go back to our 435 00:18:42,400 --> 00:18:43,360 notes 436 00:18:43,360 --> 00:18:45,360 kind of see what we've done so far what 437 00:18:45,360 --> 00:18:47,120 hasn't worked and let's see what else we 438 00:18:47,120 --> 00:18:48,880 can do to kind of 439 00:18:48,880 --> 00:18:50,799 uh fine-tune 440 00:18:50,799 --> 00:18:53,360 maybe do some uh external searching see 441 00:18:53,360 --> 00:18:56,320 what we can kind of do to 442 00:18:56,320 --> 00:18:59,200 get better results 443 00:19:00,799 --> 00:19:02,559 what but we need to go back and remember 444 00:19:02,559 --> 00:19:04,799 what were we looking for when we started 445 00:19:04,799 --> 00:19:07,280 right we're looking for visual basic for 446 00:19:07,280 --> 00:19:09,840 applications macro evidence to 447 00:19:09,840 --> 00:19:13,600 office documents obtained via email 448 00:19:13,600 --> 00:19:15,760 is there a way for us to determine via 449 00:19:15,760 --> 00:19:16,720 logs 450 00:19:16,720 --> 00:19:20,080 that a macro has been executed 451 00:19:20,160 --> 00:19:23,280 yes obviously because uh 452 00:19:23,280 --> 00:19:25,919 fans actually have a really nice uh 453 00:19:25,919 --> 00:19:27,520 explanation of 454 00:19:27,520 --> 00:19:30,880 uh registry entries that will indicate 455 00:19:30,880 --> 00:19:34,000 that the macro has been activated 456 00:19:34,000 --> 00:19:35,919 um according to sans we can look for 457 00:19:35,919 --> 00:19:37,760 something called trust records 458 00:19:37,760 --> 00:19:40,320 and this indicates macro execution 459 00:19:40,320 --> 00:19:42,879 on a system 460 00:19:44,960 --> 00:19:47,440 and uh this is from the 461 00:19:47,440 --> 00:19:49,440 the web page from sans 462 00:19:49,440 --> 00:19:50,840 it points 463 00:19:50,840 --> 00:19:53,120 out what a few places where macro 464 00:19:53,120 --> 00:19:54,880 execution these traces is in the trust 465 00:19:54,880 --> 00:19:57,360 records entry in the registry and we can 466 00:19:57,360 --> 00:20:01,280 see that right here in this box 467 00:20:01,600 --> 00:20:03,120 and that's something that we can use in 468 00:20:03,120 --> 00:20:04,480 our search 469 00:20:04,480 --> 00:20:07,480 so 470 00:20:07,679 --> 00:20:09,440 let's try to add that and see if we can 471 00:20:09,440 --> 00:20:13,600 try and find trust records in our query 472 00:20:13,600 --> 00:20:15,760 so we're going to stick with our initial 473 00:20:15,760 --> 00:20:19,200 index in zeke and sysmon 474 00:20:19,200 --> 00:20:22,320 and we're going to 475 00:20:22,559 --> 00:20:23,679 add 476 00:20:23,679 --> 00:20:27,960 trust records to that 477 00:20:46,000 --> 00:20:49,280 i'm gonna take this off 478 00:20:49,280 --> 00:20:50,480 i'm gonna do 479 00:20:50,480 --> 00:20:51,520 plus 480 00:20:51,520 --> 00:20:54,000 records 481 00:20:54,400 --> 00:20:58,200 and let's see what we get 482 00:21:05,360 --> 00:21:07,520 okay so we get 483 00:21:07,520 --> 00:21:10,320 48 events 484 00:21:12,559 --> 00:21:14,000 see what we have 485 00:21:14,000 --> 00:21:15,600 okay so we're going to look here we see 486 00:21:15,600 --> 00:21:17,760 this this file right here employee 487 00:21:17,760 --> 00:21:19,520 conduct put a conduct 488 00:21:19,520 --> 00:21:21,200 but this one appears on a 489 00:21:21,200 --> 00:21:22,720 file server 490 00:21:22,720 --> 00:21:24,159 so let's 491 00:21:24,159 --> 00:21:26,320 take a look and see 492 00:21:26,320 --> 00:21:28,000 okay 493 00:21:28,000 --> 00:21:31,840 well this is evidence of a macro 494 00:21:34,320 --> 00:21:36,880 so let's go back and look at this okay 495 00:21:36,880 --> 00:21:39,840 so we have a result 496 00:21:43,679 --> 00:21:45,600 and the first event we see 497 00:21:45,600 --> 00:21:48,640 it's a prisoner internal uh file share 498 00:21:48,640 --> 00:21:50,559 as we we noticed 499 00:21:50,559 --> 00:21:52,799 what's the significance of it being a 500 00:21:52,799 --> 00:21:54,320 power share 501 00:21:54,320 --> 00:21:56,400 uh it appears to be a company file share 502 00:21:56,400 --> 00:21:58,080 we're looking for documents downloaded 503 00:21:58,080 --> 00:22:00,000 by our user via email 504 00:22:00,000 --> 00:22:02,400 we're not going to likely see this on a 505 00:22:02,400 --> 00:22:05,840 file share at least not initially 506 00:22:05,840 --> 00:22:08,400 we would expect to see it on a user's 507 00:22:08,400 --> 00:22:11,280 desktop or endpoint 508 00:22:11,280 --> 00:22:12,880 so let's take a look at see how many of 509 00:22:12,880 --> 00:22:15,120 these events are located on the file 510 00:22:15,120 --> 00:22:16,000 share 511 00:22:16,000 --> 00:22:17,600 so by doing that and doing that we're 512 00:22:17,600 --> 00:22:18,480 going to have 513 00:22:18,480 --> 00:22:20,240 the trust records but then we're going 514 00:22:20,240 --> 00:22:22,080 to add in an and 515 00:22:22,080 --> 00:22:24,159 files.magnum template 516 00:22:24,159 --> 00:22:26,559 magnum tempestfinancial.com 517 00:22:26,559 --> 00:22:28,720 let's go back to our 518 00:22:28,720 --> 00:22:31,200 splunk 519 00:22:38,080 --> 00:22:41,280 and i have that here how's that magnum 520 00:22:41,280 --> 00:22:42,799 tempest.com 521 00:22:42,799 --> 00:22:45,600 that's like looking good 522 00:22:45,840 --> 00:22:48,320 so we get 26 events 523 00:22:48,320 --> 00:22:50,639 okay 524 00:22:51,280 --> 00:22:52,840 employee called 525 00:22:52,840 --> 00:22:57,600 conduct employee code of conduct 526 00:22:58,400 --> 00:23:01,280 marketing template 527 00:23:01,600 --> 00:23:03,840 marketing template 528 00:23:03,840 --> 00:23:05,200 okay so 529 00:23:05,200 --> 00:23:09,360 at this point i am 530 00:23:09,360 --> 00:23:11,520 fairly confident that that's 531 00:23:11,520 --> 00:23:14,640 not necessarily malicious could be 532 00:23:14,640 --> 00:23:16,080 but 533 00:23:16,080 --> 00:23:18,559 going based off my hypothesis of being 534 00:23:18,559 --> 00:23:20,320 from an email 535 00:23:20,320 --> 00:23:22,320 i'm going to disregard these files for 536 00:23:22,320 --> 00:23:24,559 now 537 00:23:24,880 --> 00:23:28,080 so going back to our 538 00:23:29,919 --> 00:23:32,960 we we saw 26 events 539 00:23:32,960 --> 00:23:36,000 so associated with the files paper 540 00:23:36,000 --> 00:23:39,360 so now let's do the inverse 541 00:23:39,440 --> 00:23:41,760 uh removing the file share event from 542 00:23:41,760 --> 00:23:44,320 our query 543 00:23:44,880 --> 00:23:47,279 so all we're going to change is not in 544 00:23:47,279 --> 00:23:50,440 the query 545 00:24:05,360 --> 00:24:07,600 at least gives us 22 events 546 00:24:07,600 --> 00:24:09,120 which is better because this is a little 547 00:24:09,120 --> 00:24:12,000 bit more for us to work with 548 00:24:12,000 --> 00:24:15,120 okay so let's look at this 549 00:24:15,120 --> 00:24:18,799 so the first one is 550 00:24:18,799 --> 00:24:21,520 trust records user profile downloads 551 00:24:21,520 --> 00:24:23,440 downloads that's what we're looking for 552 00:24:23,440 --> 00:24:26,240 magnum tempest policy violation 553 00:24:26,240 --> 00:24:28,480 mattress tristique 554 00:24:28,480 --> 00:24:31,039 at magnum tempestfinancial.com 555 00:24:31,039 --> 00:24:33,760 okay so this one stands out because 556 00:24:33,760 --> 00:24:35,520 i would not expect to see 557 00:24:35,520 --> 00:24:37,520 a user's email 558 00:24:37,520 --> 00:24:39,840 address in a document 559 00:24:39,840 --> 00:24:41,200 that 560 00:24:41,200 --> 00:24:44,400 is being sent from 561 00:24:45,200 --> 00:24:47,760 a legitimate internal 562 00:24:47,760 --> 00:24:49,840 uh group 563 00:24:49,840 --> 00:24:52,720 um what we do know is that 564 00:24:52,720 --> 00:24:54,320 uh having 565 00:24:54,320 --> 00:24:55,679 uh 566 00:24:55,679 --> 00:24:56,799 templates 567 00:24:56,799 --> 00:24:58,880 and sending out the mass 568 00:24:58,880 --> 00:25:04,159 users you might see the name like this 569 00:25:04,159 --> 00:25:06,400 but having the entire email just kind of 570 00:25:06,400 --> 00:25:08,720 signifies that this might be 571 00:25:08,720 --> 00:25:11,039 could be malicious but we need to kind 572 00:25:11,039 --> 00:25:12,559 of dig a little bit deeper let's see 573 00:25:12,559 --> 00:25:15,279 what else we have here uh okay we have 574 00:25:15,279 --> 00:25:17,120 another similar one 575 00:25:17,120 --> 00:25:18,080 from 576 00:25:18,080 --> 00:25:23,520 a different user amanda newensis 577 00:25:23,679 --> 00:25:25,360 okay so let's go back to our drawing 578 00:25:25,360 --> 00:25:27,120 board 579 00:25:27,120 --> 00:25:29,120 so we ran the query so we do have 22 580 00:25:29,120 --> 00:25:31,120 events 581 00:25:31,120 --> 00:25:33,678 are we done 582 00:25:34,640 --> 00:25:37,039 no 583 00:25:37,039 --> 00:25:39,120 but we do have 22 events 584 00:25:39,120 --> 00:25:40,000 uh 585 00:25:40,000 --> 00:25:43,279 and like i said we do have that uh file 586 00:25:43,279 --> 00:25:45,200 name stands out to me 587 00:25:45,200 --> 00:25:49,039 as potentially an issue 588 00:25:50,640 --> 00:25:52,080 and it stands out because the naming 589 00:25:52,080 --> 00:25:54,480 convention is odd why would there 590 00:25:54,480 --> 00:25:56,000 have an email address in the file name 591 00:25:56,000 --> 00:25:57,919 right 592 00:25:57,919 --> 00:25:58,960 um 593 00:25:58,960 --> 00:26:00,799 the location indicates that it's 594 00:26:00,799 --> 00:26:02,799 downloaded on the user's endpoint and 595 00:26:02,799 --> 00:26:06,080 both scenarios downloads and desktop 596 00:26:06,080 --> 00:26:07,360 which you'd expect if you were 597 00:26:07,360 --> 00:26:10,080 downloading an email from 598 00:26:10,080 --> 00:26:13,600 an actual endpoint 599 00:26:13,679 --> 00:26:15,360 the it also indicates that the trust 600 00:26:15,360 --> 00:26:16,720 records section was triggered for the 601 00:26:16,720 --> 00:26:19,679 file which as we know indicates 602 00:26:19,679 --> 00:26:23,080 macro activity 603 00:26:24,640 --> 00:26:26,559 can we find similar files 604 00:26:26,559 --> 00:26:28,559 let's refine our query knowing that we 605 00:26:28,559 --> 00:26:30,080 know the file name 606 00:26:30,080 --> 00:26:32,880 and what we may succee suspect to be a 607 00:26:32,880 --> 00:26:34,880 moleskin file 608 00:26:34,880 --> 00:26:36,559 so we're going to stick with uh indexing 609 00:26:36,559 --> 00:26:39,120 zeek and sysmond 610 00:26:39,120 --> 00:26:40,799 but we're going to go with magnum 611 00:26:40,799 --> 00:26:45,200 tempest dash policy dash violation dash 612 00:26:45,200 --> 00:26:49,000 let's see what this results 613 00:27:06,799 --> 00:27:09,919 so we have 40 events for this 614 00:27:09,919 --> 00:27:11,520 let's take a look at this 615 00:27:11,520 --> 00:27:13,440 okay i'm not sure what this is this 616 00:27:13,440 --> 00:27:14,960 looks like these are 617 00:27:14,960 --> 00:27:15,919 zeke 618 00:27:15,919 --> 00:27:18,640 logs but these might not be parsed so 619 00:27:18,640 --> 00:27:20,399 that could be an issue 620 00:27:20,399 --> 00:27:22,640 um but let's look down a little bit 621 00:27:22,640 --> 00:27:23,760 deeper 622 00:27:23,760 --> 00:27:24,799 okay 623 00:27:24,799 --> 00:27:27,440 so we knew amanda and nunes 624 00:27:27,440 --> 00:27:29,279 nunes just 625 00:27:29,279 --> 00:27:30,080 uh 626 00:27:30,080 --> 00:27:32,640 downloaded this file 627 00:27:32,640 --> 00:27:36,080 and it looks like uh it was caught 628 00:27:36,080 --> 00:27:38,399 as a forced authentication 629 00:27:38,399 --> 00:27:40,399 however we also noticed that this was 630 00:27:40,399 --> 00:27:42,320 not parsed as well so that's another 631 00:27:42,320 --> 00:27:45,600 thing for us to add to our notes 632 00:27:45,600 --> 00:27:49,840 and we scroll down see more 633 00:27:51,279 --> 00:27:53,200 new municips 634 00:27:53,200 --> 00:27:57,440 it's obviously matt matristique again 635 00:27:58,720 --> 00:27:59,300 and 636 00:27:59,300 --> 00:28:00,960 [Music] 637 00:28:00,960 --> 00:28:03,840 about to speak 638 00:28:05,120 --> 00:28:09,279 so right now over she's matt and amanda 639 00:28:13,200 --> 00:28:15,760 so let's go back and see 640 00:28:15,760 --> 00:28:17,600 can we refine this 641 00:28:17,600 --> 00:28:20,600 more 642 00:28:36,320 --> 00:28:38,880 so we know we have 40 events available 643 00:28:38,880 --> 00:28:40,720 we looked at what we saw the first 644 00:28:40,720 --> 00:28:41,919 events 645 00:28:41,919 --> 00:28:44,000 prayer has not been parsed let's note 646 00:28:44,000 --> 00:28:47,039 this so we can notice in our findings 647 00:28:47,039 --> 00:28:48,640 but like we said 648 00:28:48,640 --> 00:28:51,440 it we saw that there was one that had a 649 00:28:51,440 --> 00:28:54,080 drive-by compromise 650 00:28:54,080 --> 00:28:57,440 the program used was thunderbird 651 00:28:57,440 --> 00:28:59,919 and it fits the 652 00:28:59,919 --> 00:29:01,440 target file name 653 00:29:01,440 --> 00:29:05,600 that we were discussing previously 654 00:29:05,600 --> 00:29:06,799 now 655 00:29:06,799 --> 00:29:07,919 i don't know a whole lot about the 656 00:29:07,919 --> 00:29:09,760 organization yet 657 00:29:09,760 --> 00:29:11,760 but it appears that the organization 658 00:29:11,760 --> 00:29:14,320 uses thunderbird as a mail client 659 00:29:14,320 --> 00:29:16,320 so can we refine that a little bit 660 00:29:16,320 --> 00:29:18,559 deeper 661 00:29:18,559 --> 00:29:21,279 knowing that 662 00:29:21,279 --> 00:29:23,200 that little bit of information 663 00:29:23,200 --> 00:29:24,000 so 664 00:29:24,000 --> 00:29:25,279 let's go back and we're going to add 665 00:29:25,279 --> 00:29:29,520 thunderbird.exe to our query 666 00:29:38,080 --> 00:29:41,360 okay we're down to 12 events 667 00:29:41,360 --> 00:29:44,080 again if we look at these they're not 668 00:29:44,080 --> 00:29:45,440 done 669 00:29:45,440 --> 00:29:47,360 uh 670 00:29:47,360 --> 00:29:49,120 they're not parked correctly so that's 671 00:29:49,120 --> 00:29:53,080 something to note that 672 00:29:55,600 --> 00:29:57,440 we're going through amanda downloaded 673 00:29:57,440 --> 00:29:58,559 that 674 00:29:58,559 --> 00:29:59,270 command 675 00:29:59,270 --> 00:30:01,279 [Music] 676 00:30:01,279 --> 00:30:02,159 aaron 677 00:30:02,159 --> 00:30:03,279 mutans 678 00:30:03,279 --> 00:30:07,559 also appears to download this 679 00:30:09,520 --> 00:30:11,039 okay so let's see what what do we have 680 00:30:11,039 --> 00:30:14,399 so let's go back 681 00:30:14,960 --> 00:30:17,600 at this point 682 00:30:18,000 --> 00:30:19,760 uh with our previous grade we see that 683 00:30:19,760 --> 00:30:21,520 we have 12 entries 684 00:30:21,520 --> 00:30:23,440 scrolling we see two additional users 685 00:30:23,440 --> 00:30:24,880 downloaded 686 00:30:24,880 --> 00:30:27,360 amanda nunes 687 00:30:27,360 --> 00:30:29,200 and 688 00:30:29,200 --> 00:30:32,080 karen mutants 689 00:30:32,640 --> 00:30:34,840 what does this 690 00:30:34,840 --> 00:30:38,000 mean at this point we validated 691 00:30:38,000 --> 00:30:40,399 our initial hypothesis that a microsoft 692 00:30:40,399 --> 00:30:42,480 office document was downloaded from 693 00:30:42,480 --> 00:30:44,320 email by the end users and that it 694 00:30:44,320 --> 00:30:46,399 contained visual basic for applications 695 00:30:46,399 --> 00:30:48,159 macros 696 00:30:48,159 --> 00:30:49,520 are we done 697 00:30:49,520 --> 00:30:52,320 with plan b we we've satisfied our 698 00:30:52,320 --> 00:30:54,000 hypothesis 699 00:30:54,000 --> 00:30:56,240 and our uh investigation or our threat 700 00:30:56,240 --> 00:30:58,480 hunt 701 00:30:59,039 --> 00:31:01,120 um however if you're like me you like 702 00:31:01,120 --> 00:31:03,039 might be interested in digging a bit 703 00:31:03,039 --> 00:31:04,559 deeper to see if you can find more 704 00:31:04,559 --> 00:31:07,840 information about these spirals so 705 00:31:07,840 --> 00:31:09,440 what does this mean 706 00:31:09,440 --> 00:31:12,559 we need to go deeper 707 00:31:14,399 --> 00:31:15,919 so 708 00:31:15,919 --> 00:31:18,399 what's next 709 00:31:18,399 --> 00:31:20,880 so we we have other tools available to 710 00:31:20,880 --> 00:31:22,720 us that 711 00:31:22,720 --> 00:31:24,640 might be useful 712 00:31:24,640 --> 00:31:26,240 um we have access to the practice 713 00:31:26,240 --> 00:31:27,279 capture 714 00:31:27,279 --> 00:31:29,440 for network traffic that's done that's a 715 00:31:29,440 --> 00:31:30,399 zeke 716 00:31:30,399 --> 00:31:32,240 but we can actually be able to kind of 717 00:31:32,240 --> 00:31:34,000 uh look at 718 00:31:34,000 --> 00:31:36,080 our traffic close and actually rebuild 719 00:31:36,080 --> 00:31:37,760 those traffic flows and that's what we 720 00:31:37,760 --> 00:31:40,159 call a packet capture 721 00:31:40,159 --> 00:31:43,519 or we call it pcapp for short 722 00:31:43,519 --> 00:31:45,519 a common uh tool that we use to browse 723 00:31:45,519 --> 00:31:48,320 and hunt in a pcap file is called 724 00:31:48,320 --> 00:31:49,600 wireshark 725 00:31:49,600 --> 00:31:51,919 let's load up wireless merge arc 726 00:31:51,919 --> 00:31:53,679 with the appropriate p cap and let's see 727 00:31:53,679 --> 00:31:56,399 what we can find 728 00:31:59,039 --> 00:32:00,640 and once we load the pcapp we can start 729 00:32:00,640 --> 00:32:02,000 searching for some information that we 730 00:32:02,000 --> 00:32:04,000 located in our hunt 731 00:32:04,000 --> 00:32:06,080 let's look back and remember that we 732 00:32:06,080 --> 00:32:08,799 found a file name that was opened 733 00:32:08,799 --> 00:32:11,360 by multiple users 734 00:32:11,360 --> 00:32:13,279 and the file name was 735 00:32:13,279 --> 00:32:14,720 magnum tempest 736 00:32:14,720 --> 00:32:17,600 dash policy dash violation dash 737 00:32:17,600 --> 00:32:22,480 user email dot doc okay so we know that 738 00:32:22,640 --> 00:32:23,919 knowing that the company's name is 739 00:32:23,919 --> 00:32:26,640 magnum tempest we we probably should 740 00:32:26,640 --> 00:32:28,559 avoid using that because it's possible 741 00:32:28,559 --> 00:32:30,399 we could end up with other 742 00:32:30,399 --> 00:32:32,240 uh 743 00:32:32,240 --> 00:32:33,600 events that we were not really 744 00:32:33,600 --> 00:32:35,840 interested in what stands out to me in 745 00:32:35,840 --> 00:32:36,640 this 746 00:32:36,640 --> 00:32:38,880 would be the policy to ask violation 747 00:32:38,880 --> 00:32:39,919 dash 748 00:32:39,919 --> 00:32:42,960 it could be very unique to the file name 749 00:32:42,960 --> 00:32:44,640 so let's proceed 750 00:32:44,640 --> 00:32:46,480 uh we're searching for this because if 751 00:32:46,480 --> 00:32:49,360 you remember we only had 12 hits 752 00:32:49,360 --> 00:32:52,559 for that file name 753 00:32:54,240 --> 00:32:57,840 so let's load up wireshark 754 00:33:00,320 --> 00:33:02,640 so i already have wireshark already 755 00:33:02,640 --> 00:33:04,080 up and ready to go 756 00:33:04,080 --> 00:33:06,559 what we want to do is we want to 757 00:33:06,559 --> 00:33:09,440 do ctrl f 758 00:33:09,440 --> 00:33:11,440 we'll change this it starts off a packet 759 00:33:11,440 --> 00:33:14,559 list we're going to go to packet details 760 00:33:14,559 --> 00:33:16,799 this starts off as display filter we're 761 00:33:16,799 --> 00:33:18,960 going to switch this string 762 00:33:18,960 --> 00:33:21,120 i already have policy violation in here 763 00:33:21,120 --> 00:33:21,919 but 764 00:33:21,919 --> 00:33:23,200 if you didn't 765 00:33:23,200 --> 00:33:25,120 have anything in there it would be red 766 00:33:25,120 --> 00:33:26,960 so you would type policy 767 00:33:26,960 --> 00:33:30,240 dash violation 768 00:33:30,320 --> 00:33:32,080 dash 769 00:33:32,080 --> 00:33:34,879 then you hit enter 770 00:33:35,919 --> 00:33:37,039 and it's going to take a little bit of 771 00:33:37,039 --> 00:33:40,000 time to search for it 772 00:33:40,000 --> 00:33:42,559 but we did we found one right here so if 773 00:33:42,559 --> 00:33:45,039 you see here it says action required 774 00:33:45,039 --> 00:33:47,360 internal i.t policy violation 775 00:33:47,360 --> 00:33:49,600 from legal dash internal at magnum 776 00:33:49,600 --> 00:33:52,320 tempest dot financial 777 00:33:52,320 --> 00:33:56,080 at this point we can right click 778 00:33:56,240 --> 00:33:58,799 we can follow tcp stream so what this 779 00:33:58,799 --> 00:33:59,760 will do 780 00:33:59,760 --> 00:34:02,000 this will bring up the 781 00:34:02,000 --> 00:34:05,760 stream of data that is 782 00:34:05,760 --> 00:34:08,159 associated with this particular packet 783 00:34:08,159 --> 00:34:10,879 so let's do that now 784 00:34:15,440 --> 00:34:17,280 this will take a little bit 785 00:34:17,280 --> 00:34:20,440 to load 786 00:34:33,679 --> 00:34:36,480 go back to our 787 00:34:36,560 --> 00:34:39,359 document real quick 788 00:34:39,760 --> 00:34:40,800 so here's 789 00:34:40,800 --> 00:34:44,000 an explanation of how to switch the 790 00:34:44,000 --> 00:34:47,960 display filter to the string 791 00:34:58,560 --> 00:35:00,400 so as we saw we saw action required 792 00:35:00,400 --> 00:35:02,960 internal i.t policy violation 793 00:35:02,960 --> 00:35:05,040 from legal dash internal at magnum 794 00:35:05,040 --> 00:35:08,040 tempestfinancial.com 795 00:35:08,079 --> 00:35:10,640 as we saw 796 00:35:15,599 --> 00:35:18,240 again uh this is where we will uh right 797 00:35:18,240 --> 00:35:21,680 click and follow uh tcp stream but again 798 00:35:21,680 --> 00:35:24,079 tcv stream will give you the actual uh 799 00:35:24,079 --> 00:35:25,440 data 800 00:35:25,440 --> 00:35:27,839 uh flow for that particular packet where 801 00:35:27,839 --> 00:35:29,040 it 802 00:35:29,040 --> 00:35:31,839 exists 803 00:35:35,839 --> 00:35:37,760 the colors indicate whether data was 804 00:35:37,760 --> 00:35:40,720 sent or received let's go back to our 805 00:35:40,720 --> 00:35:42,640 information 806 00:35:42,640 --> 00:35:44,560 so there's a lot of data here 807 00:35:44,560 --> 00:35:45,520 but 808 00:35:45,520 --> 00:35:48,240 so if we scroll a little bit we will see 809 00:35:48,240 --> 00:35:50,399 the 810 00:35:50,720 --> 00:35:52,320 original the email that we were 811 00:35:52,320 --> 00:35:54,880 referring to so subject 812 00:35:54,880 --> 00:35:56,720 actually required internal i.t policy 813 00:35:56,720 --> 00:35:58,880 violation from legal dash internal at 814 00:35:58,880 --> 00:36:02,200 magnum tempest.financial 815 00:36:03,359 --> 00:36:06,560 so this one was sent to 816 00:36:06,560 --> 00:36:10,720 solis so let's say pecunia 817 00:36:10,720 --> 00:36:14,240 this file this is the email itself the 818 00:36:14,240 --> 00:36:17,040 actual email text 819 00:36:17,040 --> 00:36:19,680 that was sent 820 00:36:19,920 --> 00:36:22,480 um what stands out here is this is uh 821 00:36:22,480 --> 00:36:24,160 network traffic 822 00:36:24,160 --> 00:36:26,800 so network traffic by 823 00:36:26,800 --> 00:36:28,640 in a in a 824 00:36:28,640 --> 00:36:30,560 good network should be encrypted 825 00:36:30,560 --> 00:36:32,800 especially with emails you should never 826 00:36:32,800 --> 00:36:36,560 be able to see email text over a 827 00:36:36,560 --> 00:36:38,880 um 828 00:36:39,200 --> 00:36:40,960 over our network 829 00:36:40,960 --> 00:36:42,720 that's a security issue 830 00:36:42,720 --> 00:36:44,720 that's also something to note 831 00:36:44,720 --> 00:36:46,000 uh 832 00:36:46,000 --> 00:36:48,800 uh when you're 833 00:36:49,520 --> 00:36:52,000 keeping track 834 00:36:52,000 --> 00:36:54,400 what we see here too this is the 835 00:36:54,400 --> 00:36:57,760 file name that we were expecting 836 00:36:57,839 --> 00:37:00,720 uh magnum tempest it policy 837 00:37:00,720 --> 00:37:02,000 violation 838 00:37:02,000 --> 00:37:06,000 and then we have the uh username here 839 00:37:06,000 --> 00:37:08,480 dot doc this is what we expected and 840 00:37:08,480 --> 00:37:10,800 then what we have here is a base64 841 00:37:10,800 --> 00:37:12,160 encoded 842 00:37:12,160 --> 00:37:14,960 blob of text 843 00:37:14,960 --> 00:37:17,440 well what this will do 844 00:37:17,440 --> 00:37:19,839 is if you were to take this 845 00:37:19,839 --> 00:37:23,359 and send this to 846 00:37:23,359 --> 00:37:26,160 reverse the base64 encryption what will 847 00:37:26,160 --> 00:37:27,680 happen is 848 00:37:27,680 --> 00:37:30,320 you can recreate this attachment this 849 00:37:30,320 --> 00:37:31,760 document 850 00:37:31,760 --> 00:37:34,240 that contains the macro 851 00:37:34,240 --> 00:37:37,720 files in it 852 00:37:37,839 --> 00:37:40,960 so let's go back to our 853 00:37:42,000 --> 00:37:43,520 so like we said we needed to throw a 854 00:37:43,520 --> 00:37:45,040 little bit to get to the 855 00:37:45,040 --> 00:37:47,359 uh what we needed 856 00:37:47,359 --> 00:37:48,640 again so let's take a look and see what 857 00:37:48,640 --> 00:37:50,079 we said and one and two we're seeing the 858 00:37:50,079 --> 00:37:52,240 subject and and the 859 00:37:52,240 --> 00:37:53,599 uh 860 00:37:53,599 --> 00:37:55,200 on the from 861 00:37:55,200 --> 00:37:57,680 that we saw before 862 00:37:57,680 --> 00:37:59,119 and number three we're seeing what 863 00:37:59,119 --> 00:38:01,040 appears to be the email contents in 864 00:38:01,040 --> 00:38:04,079 plain text 865 00:38:04,079 --> 00:38:05,760 um this is concerning as i said 866 00:38:05,760 --> 00:38:08,720 previously that uh unencrypted 867 00:38:08,720 --> 00:38:10,160 uh email 868 00:38:10,160 --> 00:38:13,040 over the wire is not a good thing 869 00:38:13,040 --> 00:38:15,839 it could be a misconfiguration 870 00:38:15,839 --> 00:38:18,400 um by the uh 871 00:38:18,400 --> 00:38:21,599 server admins when they set up email 872 00:38:21,599 --> 00:38:23,359 in number four and five we noticed that 873 00:38:23,359 --> 00:38:26,720 this is a base64 encoded a task rent 874 00:38:26,720 --> 00:38:28,960 and the file name matches what we would 875 00:38:28,960 --> 00:38:31,680 expect to see based on what we did in 876 00:38:31,680 --> 00:38:34,078 splunk 877 00:38:34,240 --> 00:38:36,960 again it's important to recognize that 878 00:38:36,960 --> 00:38:38,560 um 879 00:38:38,560 --> 00:38:41,359 because it's b64 we have the ability to 880 00:38:41,359 --> 00:38:43,040 turn that into an actual 881 00:38:43,040 --> 00:38:47,160 document or file 882 00:38:47,680 --> 00:38:50,799 at this point what's next 883 00:38:52,000 --> 00:38:54,000 at this point we could dive further 884 00:38:54,000 --> 00:38:56,400 investigate we could uh 885 00:38:56,400 --> 00:38:58,560 try to download the attachment and see 886 00:38:58,560 --> 00:39:00,800 what macros are inside of it 887 00:39:00,800 --> 00:39:02,160 however this might be a good point for 888 00:39:02,160 --> 00:39:03,680 us to stop 889 00:39:03,680 --> 00:39:05,119 and 890 00:39:05,119 --> 00:39:07,599 uh pass off to the next team to agree 891 00:39:07,599 --> 00:39:10,800 with their investigation or their threat 892 00:39:10,800 --> 00:39:12,720 um but it's also a chance for us to take 893 00:39:12,720 --> 00:39:14,160 a look and 894 00:39:14,160 --> 00:39:16,879 check our notes 895 00:39:22,400 --> 00:39:24,560 what we want to do is so for our threat 896 00:39:24,560 --> 00:39:26,560 hunter playbook our playbook title is 897 00:39:26,560 --> 00:39:28,560 going to be detecting enterprise macro 898 00:39:28,560 --> 00:39:31,119 activity from emails 899 00:39:31,119 --> 00:39:32,880 the miter tactic is t 900 00:39:32,880 --> 00:39:35,200 1566 which is fishing 901 00:39:35,200 --> 00:39:36,960 but we're also going to use the sub 902 00:39:36,960 --> 00:39:38,880 technique 903 00:39:38,880 --> 00:39:41,920 zero zero one spear phishing attachment 904 00:39:41,920 --> 00:39:44,400 because based on what we know so far 905 00:39:44,400 --> 00:39:46,160 this could be 906 00:39:46,160 --> 00:39:49,280 a spearfishing attachment 907 00:39:49,280 --> 00:39:50,480 so we're going to take our initial 908 00:39:50,480 --> 00:39:52,320 hypothesis 909 00:39:52,320 --> 00:39:53,680 which is that employees are targeted 910 00:39:53,680 --> 00:39:55,359 with malicious documents 911 00:39:55,359 --> 00:39:57,760 with vba macro code and some employees 912 00:39:57,760 --> 00:39:59,359 will open the documents and detonate the 913 00:39:59,359 --> 00:40:01,599 payload 914 00:40:01,599 --> 00:40:03,119 based on what we've seen that is the 915 00:40:03,119 --> 00:40:05,440 case 916 00:40:05,920 --> 00:40:09,359 the proposed detection query is index in 917 00:40:09,359 --> 00:40:12,319 z consist log 918 00:40:12,319 --> 00:40:14,000 dot dot 919 00:40:14,000 --> 00:40:18,880 or dot xls or dot dot x or dot xlsx 920 00:40:18,880 --> 00:40:21,680 trust records and not files.magnum 921 00:40:21,680 --> 00:40:24,680 tempestfinancial.com 922 00:40:24,800 --> 00:40:27,920 we have no simulation details 923 00:40:27,920 --> 00:40:30,000 it put a hundred limitations observation 924 00:40:30,000 --> 00:40:31,839 notes during several portions of the 925 00:40:31,839 --> 00:40:33,200 hunt we discovered there were log 926 00:40:33,200 --> 00:40:35,200 sources that were not properly parsed 927 00:40:35,200 --> 00:40:39,480 which made finding details difficult 928 00:40:41,280 --> 00:40:43,119 hunt findings 929 00:40:43,119 --> 00:40:44,480 three users download the melissa's 930 00:40:44,480 --> 00:40:46,560 document two users appear to have been 931 00:40:46,560 --> 00:40:50,200 affected by the payload 932 00:40:52,800 --> 00:40:54,240 and that brings us to the end of the 933 00:40:54,240 --> 00:40:55,040 talk 934 00:40:55,040 --> 00:40:56,400 thank you so much 935 00:40:56,400 --> 00:40:58,480 to join the conversation 936 00:40:58,480 --> 00:41:00,160 join us at 937 00:41:00,160 --> 00:41:03,160 discord.blueteamvillage.org 938 00:41:03,359 --> 00:41:06,598 thank you