1 00:00:00,000 --> 00:00:04,140 Okay, we're about time so thank you again for being here. 2 00:00:04,280 --> 00:00:07,380 Um, hopefully you've been enjoying DEF CON. 3 00:00:07,380 --> 00:00:10,400 Closing ceremonies will be soon here for the village. 4 00:00:10,460 --> 00:00:14,340 Later on you can go and head out to uh, closing ceremonies for DEF CON. 5 00:00:14,340 --> 00:00:17,680 If this is your first time, hopefully you had a good time. 6 00:00:17,720 --> 00:00:23,140 I hope that you made some friends and if you haven't, then please talk to the person next to you. 7 00:00:23,220 --> 00:00:25,980 They might uh, be into the same things that you are. 8 00:00:25,980 --> 00:00:28,860 Uh, and I really recommend you go to the closing ceremonies. 9 00:00:28,860 --> 00:00:30,300 It's always a lot of fun. 10 00:00:30,300 --> 00:00:31,920 Again, thank you for being here. 11 00:00:31,920 --> 00:00:32,780 Cheers. 12 00:00:34,860 --> 00:00:36,960 Round of applause. 13 00:00:40,500 --> 00:00:42,120 Alright, welcome. 14 00:00:42,120 --> 00:00:46,160 Uh, really cool way to finish up the day. 15 00:00:46,160 --> 00:00:53,220 Uh, understudy 77, he is uh, not only paranoid but he is actually a-paranoid. 16 00:00:53,220 --> 00:00:55,820 Like that's, that's in his title. 17 00:00:55,820 --> 00:00:57,200 How cool is that, right? 18 00:00:57,200 --> 00:01:00,780 So, um, he's a paranoid with Verizon. 19 00:01:00,840 --> 00:01:02,820 Um, head of security operations. 20 00:01:03,180 --> 00:01:05,600 Head of security operations. 21 00:01:05,740 --> 00:01:11,680 And um, he's going to talk, talk to you guys a little about uh, hold on. 22 00:01:14,300 --> 00:01:15,300 Okay, cool. 23 00:01:15,300 --> 00:01:20,820 Um, he's going to talk with you guys about uh, an introduction of malware RE, reverse engineering. 24 00:01:20,820 --> 00:01:23,440 If you haven't done it before, he and I were just talking. 25 00:01:23,980 --> 00:01:30,740 Um, this is a really cool talk because it's going to be an anybody can do malware reverse engineering kind of talk. 26 00:01:30,740 --> 00:01:32,580 So, really looking forward to this. 27 00:01:32,580 --> 00:01:33,480 Give him a hand. 28 00:01:40,350 --> 00:01:42,170 Uh, sorry just to interrupt. 29 00:01:42,170 --> 00:01:46,330 We just, we just, the open talk just ended so if you hear a little bit of noise it's because of that. 30 00:01:46,370 --> 00:01:51,950 So, why don't we just give him a good applause to everyone that participated in the open talk because they just completed. 31 00:01:51,950 --> 00:01:53,150 CTF is over. 32 00:01:53,250 --> 00:01:54,390 Sorry for that. 33 00:02:00,070 --> 00:02:08,170 So, I want to start off at the end of the weekend by asking, did everybody have a really good DEF CON and Hacker Summer Camp? 34 00:02:09,910 --> 00:02:10,970 All right. 35 00:02:11,570 --> 00:02:15,030 So, I've been here most of the weekend and I want to say two things. 36 00:02:15,030 --> 00:02:19,450 First off, I want a round of applause for all the volunteers and organizers of Blue Team Village. 37 00:02:19,450 --> 00:02:23,210 They kicked ass, did a really good job and a lot of work. 38 00:02:26,150 --> 00:02:28,750 And secondly to Open Sock. 39 00:02:28,970 --> 00:02:36,210 Um, it was an awesome CTF and I sat up here in the evening and watched them rebuild the whole thing because everybody killed it. 40 00:02:36,390 --> 00:02:38,150 So, they worked tirelessly. 41 00:02:38,150 --> 00:02:40,890 I'm sure they're all tired and somebody should buy them beer. 42 00:02:46,940 --> 00:02:50,260 So, let's do an introduction to malware analysis. 43 00:02:50,320 --> 00:02:52,000 Uh, I'll start with the introductions. 44 00:02:52,140 --> 00:02:54,720 I'm the head of the security operations center at Verizon Media. 45 00:02:54,840 --> 00:02:58,420 I was an IR and breach consultant once upon a time, slash threat hunter. 46 00:02:58,680 --> 00:03:02,620 Um, I'm probably a little bit rusty on this topic so don't hold anything too far against me. 47 00:03:02,620 --> 00:03:03,360 Management. 48 00:03:03,600 --> 00:03:05,140 Uh, and I'm pretty shitty at Twitter. 49 00:03:06,320 --> 00:03:08,900 Now, let's talk about what this is and what this isn't. 50 00:03:09,000 --> 00:03:11,800 Um, I have not done this every day in a little while. 51 00:03:11,800 --> 00:03:16,500 I love teaching this because every time I add something new and I get to do something new and learn something new. 52 00:03:16,820 --> 00:03:20,580 Um, there's a lot more tools and different things than what I'm going to be using. 53 00:03:21,080 --> 00:03:23,440 This is very much an introduction. 54 00:03:23,780 --> 00:03:32,780 Um, I built this specifically to lower the entry barrier and make the concept of analyzing malware seem not so difficult. 55 00:03:33,120 --> 00:03:36,880 So, some people may or may not be my target market and that's okay. 56 00:03:36,880 --> 00:03:40,660 But, I just want to make sure that I'm very clear about what this is going into it. 57 00:03:41,300 --> 00:03:44,980 So, we can talk a little bit about what tools we're going to be using primarily. 58 00:03:45,100 --> 00:03:47,300 I run Ubuntu 14.04 with Remnux. 59 00:03:47,300 --> 00:03:50,420 Remnux is an open source malware analysis distro. 60 00:03:50,660 --> 00:03:54,200 Oh, I should mention as well, photos are fine this way. 61 00:03:54,780 --> 00:03:58,780 Um, I wouldn't take them that way but I know that's a sensitive topic so I want everybody to know I don't care. 62 00:03:59,580 --> 00:04:07,960 Um, in Remnux we're going to use some tools like PDF ID, PDF parser, um, OLE tools and VMs. 63 00:04:07,960 --> 00:04:13,360 From a VM perspective we're going to be looking at things like Process Explorer, RegShot, Fiddler, Wireshark. 64 00:04:13,560 --> 00:04:20,560 Um, we're also going to kind of touch a little bit on Cuckoo Sandbox and how you can kind of automate some of this process that we're going to go over as well. 65 00:04:21,340 --> 00:04:24,140 So, let's set up the scenario. 66 00:04:24,760 --> 00:04:26,900 You are a security analyst for the Daily Bugle. 67 00:04:26,900 --> 00:04:30,800 You received an alert or notification about a suspicious email with an attachment. 68 00:04:30,980 --> 00:04:33,200 You got a copy of that attachment. 69 00:04:33,760 --> 00:04:35,880 So you have a PDF right now. 70 00:04:35,940 --> 00:04:38,240 So now we can jump right into it. 71 00:04:38,240 --> 00:04:39,300 Into the good part. 72 00:04:39,380 --> 00:04:45,360 By the way, this is all demo pretty much and I've prayed intensely to the demo gods that this is going to work out okay. 73 00:04:46,780 --> 00:04:51,760 So, we have a PDF right here. 74 00:04:52,020 --> 00:04:53,680 Here's our suspicious PDF. 75 00:04:54,020 --> 00:04:56,460 We can do a couple things to look into this. 76 00:04:56,460 --> 00:04:58,740 I like to start with PDF ID. 77 00:04:59,180 --> 00:05:00,300 Is this big enough? 78 00:05:00,300 --> 00:05:01,360 Can everybody read it? 79 00:05:01,360 --> 00:05:03,480 I tried to make the size really big. 80 00:05:03,480 --> 00:05:04,320 Great. 81 00:05:04,500 --> 00:05:11,640 So, I'm already in my directory and we can hit PDF ID and our file name. 82 00:05:12,360 --> 00:05:14,400 And we can see what's going on with this. 83 00:05:14,540 --> 00:05:17,560 So, if we look through this, this is going to tell us in the header what's there. 84 00:05:18,060 --> 00:05:21,060 So, this is going to tell us objects. 85 00:05:21,160 --> 00:05:23,800 This is going to tell us JavaScript. 86 00:05:24,600 --> 00:05:27,740 Importantly in this case, this is going to tell us that we have an embedded file. 87 00:05:28,960 --> 00:05:29,820 That's interesting. 88 00:05:29,820 --> 00:05:31,480 Why would you put a file inside your PDF? 89 00:05:32,540 --> 00:05:34,360 So, there's a couple different ways we can get it. 90 00:05:34,360 --> 00:05:35,340 We can go to a sandbox. 91 00:05:35,340 --> 00:05:37,560 We can open the PDF and we can get the file. 92 00:05:37,620 --> 00:05:39,560 Or we can use some other tools. 93 00:05:39,560 --> 00:05:42,360 But let's see if we can find out some more information about it first. 94 00:05:42,640 --> 00:05:44,880 So, I'm going to go ahead and clear this out. 95 00:05:45,520 --> 00:05:47,800 And then let's see what we can find out about that file. 96 00:05:47,800 --> 00:05:52,940 And let's start with the file name and see if we can find that. 97 00:05:57,960 --> 00:05:59,240 So, embedded files. 98 00:05:59,240 --> 00:06:00,340 Looks like a Word doc. 99 00:06:01,720 --> 00:06:03,060 602803.doc. 100 00:06:03,460 --> 00:06:04,740 Also interesting. 101 00:06:05,320 --> 00:06:08,020 What can we find out about that file? 102 00:06:08,980 --> 00:06:12,340 Or general information about this PDF in general. 103 00:06:12,420 --> 00:06:15,000 Or more information about this PDF in general. 104 00:06:17,480 --> 00:06:20,920 And this is where the demo stuff happens. 105 00:06:20,920 --> 00:06:22,560 Because I forget to type things. 106 00:06:22,560 --> 00:06:25,280 So, we see that there's an embedded file. 107 00:06:26,100 --> 00:06:27,280 We can go through. 108 00:06:27,280 --> 00:06:28,500 There's the name. 109 00:06:29,380 --> 00:06:31,100 Some additional information. 110 00:06:31,260 --> 00:06:36,140 This will basically break down the whole PDF and give you general information from it. 111 00:06:36,380 --> 00:06:37,580 It's really useful. 112 00:06:37,640 --> 00:06:41,400 It's not as human readable as either of the other tools we just talked about, though. 113 00:06:42,320 --> 00:06:47,300 So, here's our who wrote and who made. 114 00:06:48,080 --> 00:06:49,760 So, now we need to get that. 115 00:06:49,900 --> 00:06:52,180 And preferably I think we'd like to get that in a safe way. 116 00:06:52,180 --> 00:06:55,400 Although I do like clicking on everything that I can click on. 117 00:06:55,640 --> 00:06:58,140 I find that that's one of my favorite things in this world to do. 118 00:06:58,980 --> 00:07:01,020 But we'll do it the safe way. 119 00:07:01,900 --> 00:07:03,460 So, we'll do detach again. 120 00:07:03,780 --> 00:07:05,640 We know there's only one file there. 121 00:07:05,640 --> 00:07:06,980 So, we can do save all. 122 00:07:07,860 --> 00:07:09,380 And then we can hit step one. 123 00:07:09,380 --> 00:07:15,000 So, if you take a look here, this is all laid out for ease of use in case something breaks. 124 00:07:15,140 --> 00:07:22,540 But if I run this and we take a look back there, we've now saved out our document. 125 00:07:22,980 --> 00:07:23,720 Easy. 126 00:07:24,340 --> 00:07:28,880 So, we've now successfully extracted a document from a PDF file. 127 00:07:29,240 --> 00:07:31,460 So, now we get into analysis of that document. 128 00:07:32,240 --> 00:07:34,080 There's no internet for this. 129 00:07:34,080 --> 00:07:36,520 Typically I would be on a VPN and online. 130 00:07:36,520 --> 00:07:40,580 But I don't really want to be executing live malware throughout this experience. 131 00:07:41,080 --> 00:07:46,200 So, I'm going to go ahead and I'm going to open up a VM. 132 00:07:46,200 --> 00:07:47,380 And we're going to start there. 133 00:07:47,400 --> 00:07:52,820 So, we will start with opening up this document and seeing what we see. 134 00:07:54,620 --> 00:07:56,520 Because I find that to be fun. 135 00:07:57,900 --> 00:08:01,680 So, if we take our doc, we move it over to our VM. 136 00:08:05,040 --> 00:08:07,280 We can run a couple things here. 137 00:08:07,460 --> 00:08:12,020 And we're going to talk more in-depthly about different tools as we get into the file analysis as well. 138 00:08:12,880 --> 00:08:16,720 So, as soon as this paces, this is the downside of live demos, right? 139 00:08:18,340 --> 00:08:20,860 I can start opening things though. 140 00:08:23,740 --> 00:08:28,260 For anybody unfamiliar, Fiddler is basically a web debugger. 141 00:08:28,620 --> 00:08:41,140 So, if I have, if I'm suspicious that web based call outs are going to happen or something of that nature and I'm not worried about just general TCP connections, I like to use Fiddler because it displays everything really nicely and very easily. 142 00:08:41,180 --> 00:08:42,740 So, I'm a big fan. 143 00:08:42,900 --> 00:08:45,120 We'll use Wireshark later as well. 144 00:08:47,950 --> 00:08:49,190 Come on. 145 00:08:53,210 --> 00:08:58,930 You know the really crappy part about this is I practiced this six times and had no issues. 146 00:09:00,390 --> 00:09:02,850 And now, everything wants to freeze. 147 00:09:05,780 --> 00:09:06,820 Cancel. 148 00:09:14,030 --> 00:09:15,830 Let's try that again. 149 00:09:27,310 --> 00:09:28,270 Hey, there we go. 150 00:09:28,270 --> 00:09:29,090 It's back. 151 00:09:38,410 --> 00:09:39,610 All right. 152 00:09:39,610 --> 00:09:40,930 So, we have a document. 153 00:09:41,290 --> 00:09:43,470 We have something capturing web traffic. 154 00:09:45,050 --> 00:09:50,890 And right now, we're going to get something capturing processes as well. 155 00:09:51,550 --> 00:09:53,570 For this, we'll use process explorer. 156 00:09:54,610 --> 00:10:00,870 Process explorer is essentially like task manager on steroids and will give you a lot more information. 157 00:10:04,450 --> 00:10:05,250 Yes. 158 00:10:07,590 --> 00:10:09,250 So, interesting thing. 159 00:10:09,250 --> 00:10:11,510 Process explorer is going to be pretty live. 160 00:10:11,510 --> 00:10:12,950 So, things are going to disappear. 161 00:10:12,950 --> 00:10:14,290 Things are going to go away. 162 00:10:14,970 --> 00:10:16,950 Where Fiddler is going to record. 163 00:10:17,010 --> 00:10:22,750 So, in this use case, I tend to always keep process explorer top so that I can pay attention to it quickly. 164 00:10:22,850 --> 00:10:26,250 And then I'll go back to and look at the network traffic afterward. 165 00:10:26,610 --> 00:10:30,850 So, as we open up this document, we can see here that there is a macro. 166 00:10:32,970 --> 00:10:35,690 We can also shrink this down so it's out of our way. 167 00:10:35,690 --> 00:10:38,970 And we can enable content because we like to live dangerously. 168 00:10:41,330 --> 00:10:44,230 So, we can see WinWord here. 169 00:10:44,950 --> 00:10:48,990 We can see PowerShell just popped up and did a lot of things. 170 00:10:48,990 --> 00:10:49,850 And now, it's gone. 171 00:10:51,830 --> 00:10:54,410 So, let's move over here and see what else happened. 172 00:10:54,650 --> 00:10:58,830 A lot of these are going to be Microsoft because I don't open Word that often. 173 00:11:01,350 --> 00:11:04,890 But I see a couple things that look kind of suspicious over here. 174 00:11:04,890 --> 00:11:06,350 They can't go anywhere. 175 00:11:06,470 --> 00:11:07,950 But that's not traffic I would expect. 176 00:11:07,950 --> 00:11:09,910 That's relatively suspicious. 177 00:11:10,630 --> 00:11:12,770 So, it's trying to get something. 178 00:11:13,730 --> 00:11:20,090 And if I expand this out a bit, we can go take a look and see if it did anything. 179 00:11:20,090 --> 00:11:24,170 Although, we probably won't see very much because it's not connected to the internet. 180 00:11:25,230 --> 00:11:26,250 Where are you? 181 00:11:27,190 --> 00:11:33,270 So, that's one way without network connection that we can get access to see this kind of stuff. 182 00:11:33,790 --> 00:11:34,930 So, here's something interesting. 183 00:11:34,930 --> 00:11:38,210 We see two URLs at least in this use case. 184 00:11:38,370 --> 00:11:39,590 It couldn't connect to one. 185 00:11:39,590 --> 00:11:40,610 It jumped to another. 186 00:11:40,750 --> 00:11:44,530 A lot of different pieces of malware will have multiple URLs built in. 187 00:11:45,290 --> 00:11:55,770 In the case of those multiple URLs, if you connect to the first one, meaning if the first time you run it, you're on a virtual machine that connects to the internet, you might never see the second piece. 188 00:11:56,290 --> 00:12:01,810 So, I tend to run everything first offline and then run online. 189 00:12:01,810 --> 00:12:06,250 I also tend to let a lot of this stuff sit for several hours to see if anything happens afterward. 190 00:12:06,530 --> 00:12:09,870 But in this case , I think there's an easier way to go through this data. 191 00:12:10,670 --> 00:12:14,270 So, we can go ahead and we can close out some of this stuff. 192 00:12:14,270 --> 00:12:15,530 We'll keep some of it open. 193 00:12:17,870 --> 00:12:19,630 And we can go back over here. 194 00:12:20,610 --> 00:12:24,430 So, there's a tool suite called OLE tools. 195 00:12:24,430 --> 00:12:27,670 Which basically will look at things and tell us what they are. 196 00:12:28,570 --> 00:12:33,130 In this case, we're going to use OLE VBA because we know there's visual basic. 197 00:12:34,290 --> 00:12:35,830 Step two. 198 00:12:37,030 --> 00:12:40,730 So, we know we have a macro user form one. 199 00:12:41,650 --> 00:12:43,930 It can auto exact document open. 200 00:12:43,930 --> 00:12:49,770 It may execute or may run an executable or a system command which it launched CMD. 201 00:12:49,790 --> 00:12:55,190 Hex encoded strings detected and executable file name being that it ran CMD. 202 00:12:55,450 --> 00:13:01,750 So, if we want to see more on this, hit D to decode. 203 00:13:03,070 --> 00:13:05,430 And again, pipe more. 204 00:13:06,450 --> 00:13:10,090 So, this is going to give us the full context around that. 205 00:13:10,450 --> 00:13:15,170 So, just from the beginning, we can see call command line, call PowerShell. 206 00:13:15,690 --> 00:13:16,810 No profile. 207 00:13:16,810 --> 00:13:19,410 So, it's going to ignore any built in PowerShell settings. 208 00:13:19,410 --> 00:13:20,470 Window style hidden. 209 00:13:20,470 --> 00:13:21,870 So, you're not going to see it run. 210 00:13:22,070 --> 00:13:23,170 Executable bypass. 211 00:13:23,170 --> 00:13:27,590 So, it's going to try to bypass execution policy that you have on your computer and run locally. 212 00:13:27,610 --> 00:13:31,070 And then we've got a whole bunch of other stuff going on here. 213 00:13:31,130 --> 00:13:32,430 Just numbers. 214 00:13:33,550 --> 00:13:35,930 And numbers and numbers and numbers. 215 00:13:36,510 --> 00:13:40,470 So , what that data ends up looking like is this. 216 00:13:42,350 --> 00:13:45,850 Not really super useful yet, right? 217 00:13:46,490 --> 00:13:50,830 So, we could probably assume that this entire section here is encoded. 218 00:13:51,290 --> 00:13:54,050 Actually, this entire section here is decimal encoded. 219 00:13:54,750 --> 00:14:00,510 Is anybody here or everybody here familiar with a tool called CyberChef? 220 00:14:01,370 --> 00:14:02,890 Great tool for this kind of stuff. 221 00:14:02,890 --> 00:14:04,390 Makes everything very fast. 222 00:14:04,390 --> 00:14:05,690 So, I can go in here. 223 00:14:05,950 --> 00:14:07,630 I can paste all that in. 224 00:14:08,050 --> 00:14:10,510 And I can go from decimal. 225 00:14:10,510 --> 00:14:11,530 Well, that didn't work. 226 00:14:11,530 --> 00:14:13,710 But everything is comma delimited. 227 00:14:13,710 --> 00:14:15,330 And you have to specify that. 228 00:14:15,630 --> 00:14:19,110 So, if I specify comma delimited, now we have a lot more information. 229 00:14:20,850 --> 00:14:22,910 So, we can see some stuff. 230 00:14:22,910 --> 00:14:24,590 But there's still a lot going on. 231 00:14:24,590 --> 00:14:26,510 So, I can see that there's an XOR key. 232 00:14:26,770 --> 00:14:28,570 This looks like byte string. 233 00:14:30,450 --> 00:14:32,970 Some pieces of URLs down there. 234 00:14:32,970 --> 00:14:35,150 But there's a lot going on with this. 235 00:14:35,450 --> 00:14:39,270 And this is kind of an interesting way to encode an additional layer. 236 00:14:39,770 --> 00:14:42,130 Basically, what they're doing is they're shifting numbers. 237 00:14:42,130 --> 00:14:46,710 So, like in URLs, they're saying 10, 1, 13. 238 00:14:46,710 --> 00:14:51,070 And that's taking this list here and counting from that list, that number. 239 00:14:51,370 --> 00:15:00,530 So, if we use that and take a look at that in another way, that's the wrong, oh, no, that's the right one. 240 00:15:00,530 --> 00:15:01,990 Because that's this. 241 00:15:02,530 --> 00:15:04,650 We can also see an executable down there. 242 00:15:05,510 --> 00:15:09,290 So, if we use that and we want to get rid of that, we'll use URLs as an example. 243 00:15:09,290 --> 00:15:11,450 So, I took each one of those URL pieces. 244 00:15:11,450 --> 00:15:13,390 I haven't found an automated way to do this, by the way. 245 00:15:13,390 --> 00:15:15,810 If anybody knows an automated way to do this, that would be great. 246 00:15:15,810 --> 00:15:17,530 Because manual takes some time. 247 00:15:18,530 --> 00:15:20,030 Count them from 0 up. 248 00:15:20,030 --> 00:15:21,250 So, 0 to 20. 249 00:15:21,250 --> 00:15:22,830 And then piece these together. 250 00:15:22,830 --> 00:15:28,290 10, H, 1, TTP, and so on and so forth. 251 00:15:28,410 --> 00:15:29,970 And you now have three URLs. 252 00:15:30,530 --> 00:15:31,990 So, we saw two. 253 00:15:32,030 --> 00:15:33,370 We didn't see the third one. 254 00:15:33,370 --> 00:15:36,630 But we know that there's three hard-coded URLs in this sample. 255 00:15:37,210 --> 00:15:38,710 Or in this piece of code. 256 00:15:38,710 --> 00:15:43,150 If we deobfuscate the whole thing, it gets more interesting. 257 00:15:43,390 --> 00:15:45,170 So, we see our PowerShell. 258 00:15:45,170 --> 00:15:46,270 We see no profile. 259 00:15:46,270 --> 00:15:47,290 We see hidden. 260 00:15:47,610 --> 00:15:49,630 We see executable bypass. 261 00:15:49,850 --> 00:15:52,550 And now we start to get into some other interesting stuff. 262 00:15:52,550 --> 00:15:54,150 So, some variable calling. 263 00:15:54,150 --> 00:15:56,530 There's an XOR key in there for XOR encoding. 264 00:15:57,570 --> 00:16:00,490 Um, byte string link sets. 265 00:16:00,670 --> 00:16:01,970 Here's our URLs. 266 00:16:02,190 --> 00:16:04,490 And then we start to get into down here. 267 00:16:05,310 --> 00:16:07,710 So, write host URL. 268 00:16:10,820 --> 00:16:12,180 There's our file. 269 00:16:12,180 --> 00:16:13,340 That we're going to see. 270 00:16:13,960 --> 00:16:15,180 Here's our write. 271 00:16:15,320 --> 00:16:16,480 New object. 272 00:16:16,480 --> 00:16:18,640 Download file invoke URL. 273 00:16:18,900 --> 00:16:20,640 And then unXOR. 274 00:16:22,400 --> 00:16:25,820 And then write bytes unXOR and start said process. 275 00:16:25,820 --> 00:16:31,780 So, what that means, and this is a little bit out of scope of what I'm going to talk about throughout the whole thing. 276 00:16:31,780 --> 00:16:32,820 But it's worth mentioning. 277 00:16:32,820 --> 00:16:38,800 If I go to one of those URLs and I WGIT and I pull down that file, it's an incomplete file. 278 00:16:39,040 --> 00:16:43,940 It's an XOR file that needs to be unencoded again, which this script does. 279 00:16:44,520 --> 00:16:46,580 Um, I've already done that part. 280 00:16:46,880 --> 00:16:49,000 So, I already have the completed file. 281 00:16:49,320 --> 00:16:51,980 So, we can start talking about that completed file. 282 00:16:54,240 --> 00:16:58,680 So, now we get down to an EXE. 283 00:16:58,680 --> 00:17:00,020 So, we have an EXE. 284 00:17:00,020 --> 00:17:01,560 We can take a look at it. 285 00:17:01,740 --> 00:17:02,560 We're unsure. 286 00:17:02,560 --> 00:17:05,600 And now is where we get into running malicious files. 287 00:17:06,980 --> 00:17:08,720 So, same system. 288 00:17:08,720 --> 00:17:10,500 We're going to have process explorer up. 289 00:17:12,140 --> 00:17:14,160 In this case, we're going to use Wireshark. 290 00:17:19,080 --> 00:17:20,920 And I'm going to hide that off in the bottom. 291 00:17:23,720 --> 00:17:25,940 And we're going to use another tool called RegShot. 292 00:17:26,480 --> 00:17:30,360 So, RegShot will take two snapshots of your registry at different times. 293 00:17:30,360 --> 00:17:33,100 So, I click a button, it captures the entirety of my registry. 294 00:17:33,120 --> 00:17:36,260 I click another button, it captures the entirety of my registry again. 295 00:17:36,260 --> 00:17:38,940 And then compares the two files for any potential changes. 296 00:17:40,560 --> 00:17:42,560 So, we'll go ahead and pop that open. 297 00:17:43,060 --> 00:17:44,880 And we'll take our first shot. 298 00:17:47,660 --> 00:17:50,540 Now, none of this is an exact science. 299 00:17:50,540 --> 00:17:56,360 If you have any background processes running, things that can affect your registry, those things may come up as well. 300 00:17:56,600 --> 00:18:00,140 So, unless it's a completely clean system, you might run into some things. 301 00:18:00,140 --> 00:18:06,740 One of the reasons why I didn't restart this is so that it would be cleaner and all background processes would finish running. 302 00:18:06,740 --> 00:18:09,020 So, that I would get the best shot possible. 303 00:18:10,300 --> 00:18:12,920 So, now we will move over our file. 304 00:18:16,830 --> 00:18:18,170 We've got everything open. 305 00:18:18,170 --> 00:18:20,750 I want to make sure Process Explorer is front and center. 306 00:18:23,070 --> 00:18:24,530 And we'll run it. 307 00:18:24,870 --> 00:18:27,270 So, we see here it is. 308 00:18:27,270 --> 00:18:30,810 And it's making a call to SVCHost, which is Windows Service Host File. 309 00:18:30,810 --> 00:18:32,030 And now it's gone. 310 00:18:32,210 --> 00:18:36,050 But, SVCHost with that file still there. 311 00:18:37,390 --> 00:18:38,670 That's interesting. 312 00:18:38,670 --> 00:18:39,950 It's doing something. 313 00:18:40,690 --> 00:18:42,170 Do we have any network traffic? 314 00:18:43,650 --> 00:18:46,250 In this case, I'm just going to filter for TCP. 315 00:18:49,110 --> 00:18:50,810 And we have network traffic. 316 00:18:51,390 --> 00:18:54,810 Not much of any network traffic, because, again, not connected to the internet. 317 00:18:54,810 --> 00:18:56,970 But, that's an unexpected call. 318 00:18:56,970 --> 00:19:01,790 I don't know why my computer would be going to 199.36.194.27. 319 00:19:03,050 --> 00:19:04,850 So, we have network traffic, too. 320 00:19:05,430 --> 00:19:07,570 So, we have network traffic. 321 00:19:07,570 --> 00:19:10,070 We have a suspicious SVCHost running. 322 00:19:10,250 --> 00:19:12,790 We can take a look at the properties of that and kind of go through. 323 00:19:12,790 --> 00:19:15,130 We can continue to see the parent process here. 324 00:19:15,470 --> 00:19:22,930 We can continue to see what it's doing, what it looks like, if there's an auto start location, the command line that was run, where it's running from. 325 00:19:23,550 --> 00:19:25,750 Get performance graphs of how it's running. 326 00:19:26,630 --> 00:19:28,030 General performance of it. 327 00:19:28,030 --> 00:19:29,250 GPU graph. 328 00:19:30,450 --> 00:19:33,310 Threads that it's running and strings of that file. 329 00:19:33,310 --> 00:19:35,790 So, this is strings of the actual SVCHost. 330 00:19:36,030 --> 00:19:39,030 We can run strings of the specific file, as well, over here. 331 00:19:40,630 --> 00:19:46,350 Strings are... I don't know how to properly explain them. 332 00:19:48,270 --> 00:19:49,250 Step 8. 333 00:19:50,290 --> 00:19:51,710 Step 9. 334 00:19:53,230 --> 00:19:56,570 But, you can go through this and you can find some interesting things. 335 00:19:56,670 --> 00:20:02,570 So, going through this, a lot of it's going to seem a little bit out of place, but I might be able to find some interesting calls. 336 00:20:02,570 --> 00:20:04,610 And I know there's a couple interesting ones in here. 337 00:20:07,010 --> 00:20:10,350 So, I can see a couple things right through here. 338 00:20:10,350 --> 00:20:23,190 So, set class, registry, call message filter, some calls to some DLLs, initializations, all of these things are kind of the full word pieces of the pieces that I'm potentially interested in when I'm going through this. 339 00:20:23,190 --> 00:20:25,710 This might give me an idea of what the file does. 340 00:20:26,370 --> 00:20:29,150 Before I run it or after I run it or whenever. 341 00:20:29,430 --> 00:20:30,590 I'll get some idea. 342 00:20:30,590 --> 00:20:33,530 And if we look at the registry, some of that should match up. 343 00:20:34,730 --> 00:20:36,850 So, we'll go ahead and take our second shot. 344 00:20:45,120 --> 00:20:46,660 And then we'll compare. 345 00:20:49,840 --> 00:20:51,060 So, let's see. 346 00:20:51,060 --> 00:20:52,800 We added three keys. 347 00:20:53,320 --> 00:20:57,220 Google one, that's probably Google doing something. 348 00:20:57,960 --> 00:21:00,500 Microsoft tracing to SVC host, that's expected. 349 00:21:00,500 --> 00:21:04,340 We saw that file kind of launch from SVC host. 350 00:21:04,340 --> 00:21:05,600 So, we expect that. 351 00:21:06,040 --> 00:21:07,700 But now we know it's in registry. 352 00:21:07,700 --> 00:21:11,200 We have enable file tracing, enable console tracing. 353 00:21:11,440 --> 00:21:14,240 And again, this is very much a touch base on things. 354 00:21:14,240 --> 00:21:16,760 So, I'm not going to go into what every one of these things may mean. 355 00:21:16,940 --> 00:21:22,280 Just how to run it, how to find it, some things that might be concerning or interesting. 356 00:21:23,160 --> 00:21:25,660 So, file directory. 357 00:21:25,660 --> 00:21:30,700 Then we get into our modified values, which we're also going to get some stuff in here. 358 00:21:31,880 --> 00:21:34,100 I'm not as good at reading text as I used to be. 359 00:21:36,020 --> 00:21:43,520 So, looking for potential current versions of different file pieces, window placement, so on and so forth. 360 00:21:46,810 --> 00:21:48,610 So, we have network traffic. 361 00:21:49,850 --> 00:21:55,990 We have a rogue process that looks like a legitimate Windows process and we have registry files that have changed. 362 00:21:56,130 --> 00:21:58,610 So, there's a couple different ways that you can go about this. 363 00:21:58,670 --> 00:22:04,890 You can reimage a box like most places do or you can go kind of harp in on each one of those individual problems. 364 00:22:04,890 --> 00:22:06,230 Piece by piece. 365 00:22:08,310 --> 00:22:20,390 There's also a much easier way to do this, although I genuinely suggest that everybody kind of do it in an automated or in a manual fashion as they're learning this process. 366 00:22:20,410 --> 00:22:23,410 I also realize that I'm speeding through this really fast. 367 00:22:23,410 --> 00:22:25,850 So, I hope I'm not like blowing anything off. 368 00:22:25,850 --> 00:22:27,510 I tend to go a little quick. 369 00:22:29,970 --> 00:22:31,190 Speak louder? 370 00:22:31,770 --> 00:22:32,570 Sorry. 371 00:22:32,630 --> 00:22:35,770 Yeah, I was standing back there yesterday and I realized I couldn't hear much either. 372 00:22:37,590 --> 00:22:38,730 No problem. 373 00:22:39,130 --> 00:22:42,190 So, automated sandboxing. 374 00:22:42,410 --> 00:22:43,870 Is anybody not familiar? 375 00:22:43,870 --> 00:22:44,570 Familiar? 376 00:22:45,250 --> 00:22:46,610 We'll talk about it anyway. 377 00:22:47,210 --> 00:22:48,850 Everything here is free and open source. 378 00:22:48,850 --> 00:22:51,450 Everything that I'm using throughout the course of this is free and open source. 379 00:22:51,450 --> 00:22:52,330 So, you can do it at home. 380 00:22:53,130 --> 00:22:56,610 As we get into automated sandboxing, you can build this, set it up yourself. 381 00:22:56,610 --> 00:23:01,190 You need a VM, some scripts to point to it, things of that nature. 382 00:23:01,210 --> 00:23:03,350 And it's literally drag and drop. 383 00:23:03,750 --> 00:23:10,530 So, I can take this file, I can drag and drop it to submit and then I can tell it a whole bunch of things. 384 00:23:10,530 --> 00:23:12,010 Do I want it to connect to the internet? 385 00:23:12,010 --> 00:23:12,930 Yes, no. 386 00:23:13,130 --> 00:23:14,670 Do I want to give it a priority? 387 00:23:14,710 --> 00:23:15,570 What's the time out? 388 00:23:15,570 --> 00:23:17,650 So, how long do I want to let this run for? 389 00:23:17,850 --> 00:23:27,110 Now, again, one of the things I like about running something manually is I will let a file, if I'm doing an engagement or was doing an engagement, I would often let a file run for like 24 hours. 390 00:23:27,110 --> 00:23:29,850 See if it did anything else interesting in that time period. 391 00:23:29,890 --> 00:23:33,470 In this case, you're looking at 60 to 120. 392 00:23:33,470 --> 00:23:38,090 You can give it whatever set you want, but it might not get any more information. 393 00:23:38,430 --> 00:23:46,350 You can add remote control, enable injection, dump process memory, um, dump full memory, and a whole bunch of other options. 394 00:23:46,350 --> 00:23:51,030 There's also a wild amount of add-ons that exist for this tool. 395 00:23:51,770 --> 00:23:53,770 So, you can add just about everything you want. 396 00:23:53,770 --> 00:24:02,050 Now, that said, even though I'm going fast, if I run this right now, it'll take like 10 minutes probably to go through and boot. 397 00:24:02,050 --> 00:24:05,910 But I've already run it because, again, I'm terrified something's going to break. 398 00:24:06,190 --> 00:24:08,270 So, we can just look at the report. 399 00:24:08,730 --> 00:24:12,370 So, same file we looked at before, let's see if anything matches up. 400 00:24:13,170 --> 00:24:15,570 Cuckoo also adds a whole bunch of base signatures. 401 00:24:15,570 --> 00:24:19,510 So, it's looking for things that look suspicious, essentially. 402 00:24:19,510 --> 00:24:22,750 So, we can see a couple different things as we go through this. 403 00:24:22,750 --> 00:24:24,950 We can, I like to start with red. 404 00:24:24,950 --> 00:24:25,870 Red is bad. 405 00:24:25,870 --> 00:24:27,070 Yellow could be bad. 406 00:24:27,070 --> 00:24:28,290 Blue, maybe. 407 00:24:28,950 --> 00:24:30,890 Order of priority by color. 408 00:24:31,810 --> 00:24:34,590 Um, attempts to identify installed AV. 409 00:24:34,590 --> 00:24:36,210 It's looking for trend micro. 410 00:24:36,410 --> 00:24:38,210 Deletes its original binary from disk. 411 00:24:38,210 --> 00:24:39,550 We watched that happen. 412 00:24:40,090 --> 00:24:43,050 Collects information about some other installed applications. 413 00:24:44,650 --> 00:24:46,430 Queries details from the computer. 414 00:24:46,430 --> 00:24:50,310 So, you can get a lot of general information from this. 415 00:24:50,670 --> 00:24:52,930 Just from running something in a sandbox. 416 00:24:52,930 --> 00:24:55,690 You can also find about a bunch of them online. 417 00:24:55,790 --> 00:25:01,670 But full disclaimer, don't use like things that you're using for work and then upload them to some website. 418 00:25:02,450 --> 00:25:06,570 Um, unless where you work for is cool with that, then by all means. 419 00:25:07,330 --> 00:25:09,570 Um, and then here we see our IP address. 420 00:25:09,570 --> 00:25:13,330 Although, it does look like after six years that IP address has finally died. 421 00:25:13,690 --> 00:25:17,110 Um, the last time I did this a couple months ago, it wasn't dead. 422 00:25:17,110 --> 00:25:18,950 It was, everything was still completely live. 423 00:25:18,950 --> 00:25:21,730 And I was amazed by that because this is a six year old piece of malware. 424 00:25:21,830 --> 00:25:24,430 Proving that this stuff never really goes out of style. 425 00:25:24,430 --> 00:25:28,070 Like, it still exists and functions and runs. 426 00:25:29,250 --> 00:25:33,210 Um, it'll also give us any of the network connections, anything that we saw. 427 00:25:33,210 --> 00:25:39,630 Again, if your box isn't completely clean though, you will add in some extra things that could hurt. 428 00:25:39,750 --> 00:25:42,270 We can look at some static analysis of that file. 429 00:25:42,270 --> 00:25:46,470 So we can look at any compile time or PDB path. 430 00:25:47,550 --> 00:25:53,270 Any imports for DLLs, which we saw some of those when we went through strings. 431 00:25:54,030 --> 00:25:57,470 Any artifacts that were extracted during that time frame from that file. 432 00:25:57,470 --> 00:25:59,670 In this case, there were no other ones. 433 00:25:59,770 --> 00:26:00,930 Behavioral analysis. 434 00:26:00,930 --> 00:26:03,110 This shows us that process tree. 435 00:26:03,310 --> 00:26:05,810 The file itself goes to SVC host. 436 00:26:06,390 --> 00:26:08,530 Any network analysis that we have. 437 00:26:11,010 --> 00:26:13,290 So we can look at general host connections. 438 00:26:13,450 --> 00:26:15,070 You can also pivot to MOLOC. 439 00:26:15,070 --> 00:26:20,250 Good shout out to MOLOC, even though I'm not going to cover that because Verizon Media, the company that I work for, makes it and open sources it. 440 00:26:20,250 --> 00:26:21,290 So it's a good shout out. 441 00:26:21,890 --> 00:26:24,570 Um, but you can pivot right to MOLOC for full packet capture. 442 00:26:25,070 --> 00:26:27,610 It'll tell you about any files that potentially dropped. 443 00:26:27,610 --> 00:26:30,230 In this case, the dropped file was the file we looked at. 444 00:26:30,830 --> 00:26:32,330 Um, process memory. 445 00:26:32,330 --> 00:26:33,470 It'll pull as well. 446 00:26:33,470 --> 00:26:36,450 So any potential URLs that exist in process memory. 447 00:26:36,450 --> 00:26:39,250 Again, all of these might not be related to that file. 448 00:26:40,110 --> 00:26:44,930 Um, because this is not quite as clean as I would have liked it when I ran this sample. 449 00:26:47,660 --> 00:26:51,060 So you get a kind of a good idea of what you can look at from this perspective. 450 00:26:51,060 --> 00:26:52,520 And there's a lot of other tools too . 451 00:26:52,520 --> 00:26:55,220 Say you're not a Linux guy, you're a Windows guy. 452 00:26:55,660 --> 00:27:04,300 If I hop back into here, which is horribly, horribly infected, and I copy my file back in, 453 00:27:07,390 --> 00:27:16,810 there's a tool called, not that one, PE Studio. 454 00:27:16,810 --> 00:27:17,710 That's it. 455 00:27:18,130 --> 00:27:22,390 So PE Studio essentially does a lot of this from a straight RE perspective. 456 00:27:22,390 --> 00:27:24,850 So you can just drag and drop a file for analysis. 457 00:27:25,390 --> 00:27:27,670 It'll kick into analysis with said file. 458 00:27:30,760 --> 00:27:34,920 Um, it will connect to virus total and look for that hash and give you any indicators. 459 00:27:34,920 --> 00:27:37,580 If this thing did connect to virus total, it would light up like a Christmas tree. 460 00:27:37,580 --> 00:27:39,580 I think it's like 46 out of 64. 461 00:27:40,300 --> 00:27:43,820 Um, it'll give you any potential indicators based by severity. 462 00:27:43,820 --> 00:27:49,220 So installation of hooks, blacklisted libraries, different section names being blacklisted. 463 00:27:49,500 --> 00:27:56,580 Again, we see some of the same things that we saw from each investigation method and maybe a little bit more as we go through each one of these processes. 464 00:27:57,040 --> 00:28:03,300 Um, when you get into that, it'll tell you certain sections, um, string analysis and the strings that it found that were weird. 465 00:28:03,300 --> 00:28:08,900 So the string analysis that we did via command line, this does, and it'll call out the things that are blacklisted. 466 00:28:08,940 --> 00:28:11,200 So, there's our DLL calls. 467 00:28:11,720 --> 00:28:14,260 Very, very convenient tool, also free. 468 00:28:14,880 --> 00:28:22,500 Um, but has to be run on Windows, which means you have to drop it from Windows, so make sure it's on a box that you don't mind completely screwing over. 469 00:28:23,700 --> 00:28:26,760 So, that's about the course of the demo. 470 00:28:26,880 --> 00:28:30,860 So let's kind of loop back in and talk a little bit about this. 471 00:28:32,600 --> 00:28:40,240 So, as a security person, all of us blue team-ish, what can we do with the information that we got? 472 00:28:40,380 --> 00:28:41,740 So we have a file. 473 00:28:42,360 --> 00:28:43,620 We know the hash. 474 00:28:43,720 --> 00:28:46,640 We have endpoint detection software, we can block that hash. 475 00:28:46,640 --> 00:28:48,660 We can look for that hash across our network. 476 00:28:48,960 --> 00:28:51,380 We have call-outs in multiple areas. 477 00:28:51,380 --> 00:28:54,460 So we have the initial call-out from the document that downloads the file. 478 00:28:54,780 --> 00:28:57,740 We can use that to see if anybody else potentially downloaded the file. 479 00:28:58,240 --> 00:29:08,680 We can also use the actual call-out with the semantics cert, the IP call-out, to see if anything went wrong or if anybody is infected with that file. 480 00:29:08,680 --> 00:29:10,940 Just because it tried to download doesn't mean it's infected. 481 00:29:10,940 --> 00:29:12,280 Something could have stopped that. 482 00:29:12,640 --> 00:29:20,560 So we have a whole host of information that we can use in our environment, especially if this came in as an email, it probably went to more than one user. 483 00:29:20,720 --> 00:29:27,820 So we can take a whole host of all the information that we pulled and get an idea of what this looks like across the scope of our whole network. 484 00:29:28,600 --> 00:29:31,700 Which is super useful in any situation. 485 00:29:32,720 --> 00:29:38,060 So, I like to leave this kind of stuff in case anybody wants to take pictures of this kind of stuff. 486 00:29:38,440 --> 00:29:42,500 So we have different commands that were run, um, the very specific commands. 487 00:29:42,500 --> 00:29:44,340 I'll give everybody a minute on that one. 488 00:29:48,240 --> 00:29:49,400 Lot of phones up. 489 00:29:49,400 --> 00:29:49,900 Good. 490 00:29:49,900 --> 00:29:50,640 Good. 491 00:29:52,600 --> 00:29:59,220 I, I keep them up because then we have the picture slide which is links to all different kinds of tools. 492 00:29:59,280 --> 00:30:04,500 Virus total is an amazing tool for seeing what AV vendors know about different stuff. 493 00:30:04,500 --> 00:30:08,440 URL void and IP void, great for IP and URL reputation. 494 00:30:08,900 --> 00:30:14,000 Um, malware.com is a very similar to cuckoo online sandbox that you can upload stuff to. 495 00:30:14,220 --> 00:30:16,400 Then there's a bunch of different tips. 496 00:30:16,420 --> 00:30:20,660 Um, reverse engineering tips, a lot from Lenny Zeltzer who's fantastic at this. 497 00:30:20,660 --> 00:30:26,940 There's great sans courses on the topic and I personally love the malware analyst cookbook and practical reverse engineering. 498 00:30:26,940 --> 00:30:30,880 If this is something that you want to get into, these are some of my recommendations. 499 00:30:31,460 --> 00:30:35,000 The next recommendation page however is a little bit more dangerous. 500 00:30:35,460 --> 00:30:36,900 Links to live malware. 501 00:30:37,720 --> 00:30:41,480 And I, I say disclaimer right now, use those at your own risk. 502 00:30:41,880 --> 00:30:45,280 Um, I suggest having a separate box. 503 00:30:45,480 --> 00:30:49,480 This box is literally the user name is guest and the host name is like malware. 504 00:30:50,220 --> 00:30:54,580 There's no identifiable information to me on this box whatsoever. 505 00:30:54,580 --> 00:30:56,240 I've never logged into a personal account. 506 00:30:56,240 --> 00:30:56,960 I've never done any of that. 507 00:30:56,960 --> 00:30:58,460 But again, paranoid. 508 00:30:58,840 --> 00:31:01,800 Maybe you don't need to do quite that, but that's my thing. 509 00:31:01,920 --> 00:31:04,460 But there you have some links to live malware. 510 00:31:05,100 --> 00:31:06,360 End of speech. 511 00:31:06,360 --> 00:31:10,380 However, I do have stuff for the three best questions. 512 00:31:10,500 --> 00:31:12,240 If anybody has any. 513 00:31:18,320 --> 00:31:21,880 So why don't I use process hacker instead of sys internals? 514 00:31:21,960 --> 00:31:25,280 Probably just stuck in my ways and I don't do it every day anymore. 515 00:31:33,830 --> 00:31:38,330 So easier to use procmon to capture the log and then look through the processes afterward. 516 00:31:38,330 --> 00:31:42,830 And I agree, it's more time consuming and harder to show like this though. 517 00:31:53,800 --> 00:31:59,080 So, VM aware malware, what method would I use to test that? 518 00:31:59,480 --> 00:32:00,160 Right? 519 00:32:01,420 --> 00:32:03,220 If it won't run on a virtual machine. 520 00:32:03,480 --> 00:32:09,380 Um, so I not only have this box, I have a couple other hard boxes that I can use to test this stuff on. 521 00:32:09,540 --> 00:32:13,540 Um, and just a base image, like a base windows image wipe. 522 00:32:13,900 --> 00:32:19,760 Um, a lot of stuff will run in virtual machine and it's much easier to teach this because I have both tools in the same place. 523 00:32:19,920 --> 00:32:25,160 But I have another laptop specifically with wipeable images that I can use for anything that's VM aware. 524 00:32:26,640 --> 00:32:27,580 What's that? 525 00:32:29,220 --> 00:32:31,120 For the image wiping? 526 00:32:31,860 --> 00:32:33,680 It's some enterprise tool. 527 00:32:44,220 --> 00:32:47,260 So, how often do I see something new is the question. 528 00:32:47,260 --> 00:32:49,140 And admittedly I don't do this every day anymore. 529 00:32:49,140 --> 00:32:52,980 But I will say that when I did IR it was in waves. 530 00:32:53,440 --> 00:33:02,960 So, you would see essentially the same thing a lot for a little while and then something new a lot for a little while and then something new a lot for a little while. 531 00:33:03,180 --> 00:33:07,780 Um, crypto miners when I was rolling out of IR and into management were the big thing. 532 00:33:08,100 --> 00:33:14,520 And just personal opinion, if somebody is going to hit you with that, like that's, it couldn't be better than that. 533 00:33:14,520 --> 00:33:16,480 Like there's not a lot of damage there. 534 00:33:16,760 --> 00:33:18,100 But it's waves. 535 00:33:18,100 --> 00:33:24,840 But eventually, I just talked to one of my IR buddies who was here the other day and he said, uh, 10 years he's seen basically the same thing over and over again. 536 00:33:24,840 --> 00:33:26,440 It doesn't change that much. 537 00:33:39,260 --> 00:33:43,240 So, when it comes to malware that's reaching out to CNC, what do you use to spoof the connections? 538 00:33:43,340 --> 00:33:44,860 Typically, I don't. 539 00:33:45,240 --> 00:33:48,520 Um, I log into a VPN and I let it make connections. 540 00:33:48,880 --> 00:33:53,180 I think you get a much more full picture of what happens when you let communication happen. 541 00:33:57,700 --> 00:33:58,680 What's that? 542 00:34:03,200 --> 00:34:05,920 Why attach it to an email instead of Google docs? 543 00:34:10,190 --> 00:34:15,870 Oh, so why not, from an attack perspective, not upload the PDF to Google docs instead of attaching it to an email? 544 00:34:15,870 --> 00:34:17,350 And that happens a lot more now. 545 00:34:17,930 --> 00:34:21,130 But it was just a setup scenario to start the conversation. 546 00:34:37,880 --> 00:34:40,100 Oh, why didn't I just upload the PDF? 547 00:34:42,380 --> 00:34:43,500 I don't know. 548 00:34:45,340 --> 00:34:46,260 Go ahead. 549 00:34:51,940 --> 00:34:56,100 I have and I actually have a sample of it sitting on this box, too. 550 00:34:56,240 --> 00:34:58,940 Um, Emotet V4, actually, I believe. 551 00:34:58,940 --> 00:35:00,740 I worked a big case with that. 552 00:35:00,960 --> 00:35:04,320 Um, you find certain things. 553 00:35:04,320 --> 00:35:11,420 So, like, polymorphic malware, for anybody not familiar, is malware that can change enough to change its hash to make it harder to detect, essentially. 554 00:35:11,500 --> 00:35:13,400 Um, and a couple other attributes. 555 00:35:13,600 --> 00:35:20,120 So, Emotet V4 is a module-based piece of malware that can call out and download different things and it's constantly changing itself on the system. 556 00:35:20,300 --> 00:35:34,660 So, in one of the cases that I used for that, I found common identifiers of the type, which specifically in this case, it was unsigned binaries under or between 60 and 74 kilobytes. 557 00:35:35,340 --> 00:35:41,920 And I tracked it down that way and got probably 150 different hashes until we could get Navy Vendor to do stuff. 558 00:35:42,480 --> 00:35:44,040 You come here, you get a gift. 559 00:35:47,040 --> 00:35:48,120 Yeah. 560 00:36:03,210 --> 00:36:06,070 So, did you say static analysis to intent? 561 00:36:12,270 --> 00:36:17,310 Significantly more difficult, um, from that base analysis to go into intent. 562 00:36:17,310 --> 00:36:26,010 Um, you're starting to get into real serious reverse engineering to get down into the code of exactly what it does outside of what you see from a dynamic perspective. 563 00:36:26,550 --> 00:36:33,610 Um, however, I have found that in many cases, and this is just me, like, I'm a horrible reverse engineer, I'm not going to lie. 564 00:36:33,690 --> 00:36:36,350 Because when I did IR, no company wanted to pay for that. 565 00:36:36,350 --> 00:36:39,650 They just wanted to know how to find it, how to get rid of it, and make sure it was gone. 566 00:36:48,990 --> 00:36:54,710 So, I just run a base VM, but I'm also sitting on a Linux box and I'm only messing with executables in this case. 567 00:36:55,670 --> 00:36:59,730 So, I don't do any specific VM isolation for this. 568 00:37:10,160 --> 00:37:14,580 What do I use to find different variances other than registry keys of the same malware? 569 00:37:14,580 --> 00:37:15,900 That's really interesting. 570 00:37:16,220 --> 00:37:17,600 And a really good question. 571 00:37:17,600 --> 00:37:18,840 I actually have to think about that. 572 00:37:18,840 --> 00:37:19,580 Also, come up here. 573 00:37:19,580 --> 00:37:20,460 You get a thing. 574 00:37:21,460 --> 00:37:26,860 Um, I mean, registry keys not being the only method of persistence in general either. 575 00:37:26,860 --> 00:37:35,180 So, any general auto runs that potentially exist, or any other normal common persistence mechanisms, but man, you're really stumping me with that question. 576 00:37:51,790 --> 00:37:58,930 So, the risk of letting network connections happen and what kind of setup I have in a lab and or VPN to accept that risk. 577 00:37:59,390 --> 00:38:07,830 And I will start that with a story of the one time I forgot to turn on my VPN and executed something that was terrifying and I thought I was screwed. 578 00:38:07,830 --> 00:38:12,470 Like, I thought I was going to get owned after I executed this thing because I completely forgot to turn it on. 579 00:38:12,810 --> 00:38:15,010 I was terrified for at least a week or two. 580 00:38:15,250 --> 00:38:17,030 I never made that mistake again, though. 581 00:38:19,250 --> 00:38:25,810 So, and all the fake DNS and stuff is really good, too, but it doesn't necessarily give you the full picture. 582 00:38:26,030 --> 00:38:29,430 So, I used private internet access for a long time and I was pretty happy with it. 583 00:38:29,430 --> 00:38:32,610 I switched over to Nord recently and I'm pretty happy with that, too. 584 00:38:32,930 --> 00:38:40,370 Um, depending on what I look at, I usually run it on host system, not on VM, so that my host system's coming from that location. 585 00:38:40,370 --> 00:38:46,970 I have seen a little bit of malware that's like location specific, so if you VPN, it's not necessarily going to execute anyway. 586 00:38:47,130 --> 00:38:48,910 But again, few and far between. 587 00:38:49,390 --> 00:38:52,410 Um, I've been pretty happy with standard out of the box VPN service. 588 00:38:52,410 --> 00:38:56,110 I haven't had problems in the five or so years that I did this regularly. 589 00:39:02,660 --> 00:39:05,620 Uh, I, I don't mind sharing the slides. 590 00:39:05,620 --> 00:39:07,000 I have no problem with that. 591 00:39:07,220 --> 00:39:10,600 So, is there anywhere that I can share the slides? 592 00:39:15,520 --> 00:39:16,320 Perfect. 593 00:39:16,520 --> 00:39:18,560 It'll be on blueteamvillage.org. 594 00:39:23,980 --> 00:39:24,960 Oh, another one. 595 00:39:24,960 --> 00:39:25,600 Go ahead. 596 00:39:32,710 --> 00:39:41,730 So, without getting into any of the ones that I can't talk about, um, one of the most interesting ones I've ever seen from a commodity perspective was that Emotet v4 sample. 597 00:39:41,930 --> 00:39:45,950 Because the initial payload was not malicious at all. 598 00:39:46,150 --> 00:39:55,370 And then it would call out and download modules, including SMB spreaders, um, different ransomware and like banking Trojan stuff. 599 00:39:55,370 --> 00:39:58,990 It could install other malware and it changed like every five minutes. 600 00:39:58,990 --> 00:40:03,590 So, trying to get a handle and I watched it shut down a company in two hours. 601 00:40:03,770 --> 00:40:06,610 Like completely shut down a company in two hours. 602 00:40:06,870 --> 00:40:16,110 So, trying to get a handle on what that was to clean it up when it kept changing was one of the most fun and stressful weekends of my life. 603 00:40:16,330 --> 00:40:21,650 It was also one of, on my birthday weekend, which was wonderful because I was supposed to be on vacation. 604 00:40:23,910 --> 00:40:25,210 Anything else? 605 00:40:27,650 --> 00:40:29,870 If not, thank you very much for your time, everybody.