1 00:00:00,000 --> 00:00:06,920 Both of these folks have a pretty extensive background, so I'm just going to cover some of it, introduce them. 2 00:00:07,060 --> 00:00:16,360 But before I do that, quick show of hands, how many people are doing threat hunting in memory, looking for hostile actors in memory, right? 3 00:00:16,360 --> 00:00:19,340 So it's a difficult problem. 4 00:00:19,860 --> 00:00:25,300 And so I'm really, really excited to personally to hear this talk. 5 00:00:25,300 --> 00:00:30,380 This is an area that needs a whole lot of work to be done in it. 6 00:00:30,380 --> 00:00:40,760 And it's, you know, folks like Carlos and Marcos that are, you know, on the edge of providing this kind of content for us. 7 00:00:41,140 --> 00:00:44,980 So Marcos is a software architect at McAfee. 8 00:00:45,140 --> 00:00:57,580 He's leading the development of exploit prevention technology components, which are part of the company McAfee's next generation flagship product called Endpoint Security. 9 00:00:57,580 --> 00:01:03,960 Marco also led the organization of the first ever B-Sides conference in Cordoba, Argentina. 10 00:01:05,220 --> 00:01:19,740 Carlos is an experienced InfoSec analyst who drives strategic initiatives and provides thought leadership and insight regarding the ever-changing global landscape at Claro America Mobile Offices in South America. 11 00:01:19,740 --> 00:01:32,080 He organized the One Hack Para Los Chicos local security conference, and is now working on organizing the first ever B-Sides conference in Cordoba, Argentina. 12 00:01:32,220 --> 00:01:38,600 So great, great to have these folks come and share their research with us. 13 00:01:38,600 --> 00:01:40,120 Give them a round of applause. 14 00:01:40,620 --> 00:01:41,800 Thank you. 15 00:01:46,120 --> 00:01:47,160 Okay. 16 00:01:48,020 --> 00:01:56,140 Thank you all for being here, and thank you for attending this call, this talk, and thank you Blue Team Villas for having us here. 17 00:01:56,380 --> 00:02:02,440 This talk is going to be about this project that we started like a year ago called Memhunter. 18 00:02:02,440 --> 00:02:12,000 For us it was really a way to learn and new and past code injection techniques and process manipulation in general. 19 00:02:12,000 --> 00:02:23,220 And also it was a way for us to explore and how to cope up with a problem that we were having on the field, which was around doing this threat hunting process in memory at scale. 20 00:02:23,280 --> 00:02:28,380 So we will talk about that during the slide, and we'll talk about the problem that we are trying to solve. 21 00:02:28,420 --> 00:02:30,580 So this is the agenda for today. 22 00:02:30,880 --> 00:02:37,580 So probably we will skip the first slide, and then introduction part. 23 00:02:37,580 --> 00:02:43,420 Then we will jump into the why, the how, and the what part of this issue. 24 00:02:43,420 --> 00:02:48,000 So on the why, we will dive into why hunting in memory is important. 25 00:02:48,120 --> 00:02:54,480 At least from our perspective, I will leave some, some, some hints on that. 26 00:02:54,500 --> 00:03:08,340 Then on the how part of things, we will discuss on the how someone can go and hunt for this stuff in memory by looking at specific properties of the processes. 27 00:03:08,500 --> 00:03:12,980 And then on the what part of the agenda, we will discuss the tools. 28 00:03:12,980 --> 00:03:18,280 And this tool that we have created called Memhunter, we will discuss on the characteristics of the tool. 29 00:03:18,280 --> 00:03:23,640 And we will also talk about the, on the, the current state of the tool and then the future. 30 00:03:24,000 --> 00:03:27,000 Uh, and we will wrap up everything with a, with a demo. 31 00:03:27,140 --> 00:03:28,820 Uh, with two demos actually. 32 00:03:29,740 --> 00:03:31,500 Okay, uh, about us. 33 00:03:31,500 --> 00:03:32,180 So, okay. 34 00:03:32,180 --> 00:03:32,720 Do you want to? 35 00:03:32,720 --> 00:03:33,080 Yeah. 36 00:03:33,140 --> 00:03:34,600 Uh, hello. 37 00:03:34,620 --> 00:03:35,720 Thank you for coming. 38 00:03:35,720 --> 00:03:37,260 Uh, I'm Carlos. 39 00:03:37,260 --> 00:03:38,160 He's Marcos. 40 00:03:38,160 --> 00:03:41,000 Uh, he's a Infosec lover. 41 00:03:41,260 --> 00:03:44,840 Uh, he, he working in McAfee. 42 00:03:44,840 --> 00:03:47,300 Uh, he's a software architect. 43 00:03:47,300 --> 00:03:48,900 Sorry for my English. 44 00:03:49,300 --> 00:03:51,340 Uh, we, okay. 45 00:03:51,340 --> 00:03:55,480 Uh, we, we are a B-site Cordova organizations. 46 00:03:55,540 --> 00:03:56,280 Okay. 47 00:03:56,280 --> 00:03:58,640 And I work in, in Arsec. 48 00:03:58,640 --> 00:04:00,980 It's a startup of Infosecurity. 49 00:04:00,980 --> 00:04:01,880 Okay. 50 00:04:01,880 --> 00:04:02,480 Okay. 51 00:04:02,480 --> 00:04:02,880 Yeah. 52 00:04:02,880 --> 00:04:03,540 Thank you. 53 00:04:03,540 --> 00:04:04,380 Thank you, Carlos. 54 00:04:04,380 --> 00:04:06,280 So why, why hunting in memory? 55 00:04:06,380 --> 00:04:09,560 So, uh, couple of things here. 56 00:04:09,560 --> 00:04:12,960 So memory, why hunting in memory these days? 57 00:04:13,200 --> 00:04:19,920 Uh, it's, it's a, I mean, hunting in memory is an important thing because of, uh, the shift that we haven't seen on the threat landscape. 58 00:04:19,920 --> 00:04:24,200 So the threat landscape, uh, uh, has evolved over the last few years. 59 00:04:24,200 --> 00:04:31,620 Mainly the, the attackers have really started to, to adopt new techniques, to, to, to adopt new things, to evade the, the current detections. 60 00:04:31,620 --> 00:04:43,400 So they shifted their, their, their, their attacker, attacker threat graph from, uh, a, a purely fail-based, uh, uh, approach to a file-less, uh, base approach. 61 00:04:43,520 --> 00:04:54,320 Um, so one, one trend or, or one aspect of, uh, this, uh, evolution is what we call the different, uh, vectors that attacker, that they are using for that. 62 00:04:54,320 --> 00:04:58,280 So one of these vector is, uh, what I call the process manipulation. 63 00:04:58,860 --> 00:05:05,980 Uh, so as part of, uh, the process manipulation, there are several things that attackers do in order to evade the current defenses. 64 00:05:06,200 --> 00:05:12,780 Um, one of those manipulations, uh, are what, what is called the, the call injection, right? 65 00:05:12,780 --> 00:05:16,980 There, there is another type of process manipulation called, uh, defense evasion. 66 00:05:16,980 --> 00:05:19,540 So we'll touch on that during, during the, the presentation. 67 00:05:19,540 --> 00:05:32,440 What I wanted to mention here is that mainly because of this trend is what, uh, uh, people working on the blue side of the house have to, uh, uh, come up with a new, new way to, to detect this, uh, this stuff. 68 00:05:32,500 --> 00:05:45,240 And another thing that, which is actually quite important is the fact that, uh, in the past, uh, these, uh, techniques, this, especially the call injection techniques, they used to be, uh, uh, something that was only available for, you know, these big, 69 00:05:45,240 --> 00:05:49,640 uh, sponsor, uh, APT groups, mostly national state groups. 70 00:05:49,640 --> 00:06:02,640 Uh, and they, they know, uh, how to take advantage of this just to avoid, you know, being detected and being spot, uh, spotted, uh, on, uh, you know, on their, uh, on their, uh, uh, intrusions. 71 00:06:02,800 --> 00:06:05,680 Um, but nowadays that, that is not actually the case. 72 00:06:05,680 --> 00:06:10,020 Nowadays it's, uh, call injection techniques especially are, are, are a commodity. 73 00:06:10,020 --> 00:06:18,320 I mean, uh, anyone can go to GitHub, for example, and grab, you know, the latest and, and greatest, uh, call injection and include it on their code. 74 00:06:18,340 --> 00:06:25,540 So accessing to these, uh, these techniques, uh, are, are, are available to anyone, uh, right now. 75 00:06:25,560 --> 00:06:32,360 Uh, so that's why we, we need to, uh, start thinking on including, uh, ways to, to detect this stuff, uh, on memory. 76 00:06:32,400 --> 00:06:38,880 So going, going back to the file list, uh, uh, uh, state that I, that I just mentioned. 77 00:06:38,940 --> 00:06:46,840 So there are, uh, I, I, I really like this, uh, diagram that was taken from, uh, uh, uh, a sans, uh, uh, uh, white paper. 78 00:06:46,840 --> 00:06:55,920 So the idea here is that, uh, from the diagram you can see where call injection came into the, into play, uh, on the file list, uh, attack, uh, scenario. 79 00:06:55,920 --> 00:07:06,840 So you see that call injection is used, uh, as part of, uh, uh, I mean it's mostly used, uh, uh, this, this series of techniques are mostly used as stages on, uh, stages of attack. 80 00:07:06,840 --> 00:07:20,400 So, uh, for example in the, this, uh, scenario where we got a remote code execution, uh, attack where, uh, someone is executing, uh, executing, uh, execution on our, on our, uh, uh, endpoint. 81 00:07:20,400 --> 00:07:34,040 An example of this is, uh, the, the WannaCry example, for example, where, where we have, uh, the SMB vulnerable driver, driver, and then, uh, uh, by exploiting, uh, that vulnerability someone can get, uh, code to execute an, an, an endpoint. 82 00:07:34,040 --> 00:07:52,100 And then they, they will most likely use, uh, uh, they, they will mostly, uh, uh, trigger the second stage of that attack by, um, by injecting, uh, their malicious payload into the memory, the user's main memory of, uh, running process, the system process, 83 00:07:52,100 --> 00:07:52,900 most likely. 84 00:07:52,900 --> 00:08:08,500 So in the case of WannaCry, for example, they use a technique, uh, called QueueUserAPC, which allows them to, uh, um, um, to, uh, execute code, to inject code into the context of, uh, Elsa's, uh, from, uh, kernel space. 85 00:08:08,500 --> 00:08:14,560 So, uh, so in that case, uh, code injection was used as a, as a second stage of an attack. 86 00:08:14,560 --> 00:08:25,540 And, uh, and the most, uh, common attacks that we are seeing nowadays, which are mostly driven by download, download, we see that code injection is used as a second stage of the attack. 87 00:08:25,540 --> 00:08:35,760 So, uh, the attacker, uh, uh, gain, uh, code execution through a Word document, for example, just by having, uh, the user to open a, a, a, a document with a macro. 88 00:08:35,760 --> 00:08:46,180 Then the, the macro will exercise some Win, Win32 APIs and then the, the injection will happen and the attacker will be able to, uh, run code in the context of a different process. 89 00:08:46,180 --> 00:08:50,600 So that's where code injection is, uh, actually, uh, a thing nowadays. 90 00:08:51,080 --> 00:08:55,300 So, uh, yeah, so we, we know what, what, uh, these techniques are. 91 00:08:55,380 --> 00:08:57,620 We know how to catch them, actually. 92 00:08:57,620 --> 00:09:02,160 Uh, but why, why is that difficult to, to hunt for this stuff, uh, at scale? 93 00:09:02,160 --> 00:09:11,980 So the, the, the, the, the problem came, uh, on the, uh, tools and tech, uh, yeah, on the tools and frameworks that we have to hunt for, for this stuff. 94 00:09:12,020 --> 00:09:22,100 So, uh, currently the, the, I mean, you, you have, I mean, if you want to hunt for this stuff, you only have, uh, two ways, uh, from what I, from my point of view. 95 00:09:22,200 --> 00:09:28,140 You either go and buy, uh, uh, uh, an expensive EDR product that supports these, uh, techniques. 96 00:09:28,140 --> 00:09:42,580 There are several EDR products out there that, uh, either does, uh, uh, memory inspection, which is the, the same, the, the same thing that I'm doing with this tool, or, uh, memory scanner and they, they do, uh, you know, dump, uh, pattern matching on the memory of, 97 00:09:42,580 --> 00:09:47,680 uh, the, the different processes to look for IOCs and see if, uh, there is an injection going on. 98 00:09:47,700 --> 00:10:02,920 So you either have to go and do that or you get, uh, volatility and you get a full memory dump of the machine that you want to analyze and take that full memory dump, uh, uh, uh, into the volatility framework, uh, uh, and, and, and run the different, uh, 99 00:10:02,920 --> 00:10:08,420 uh, scanners that volatility have in order to detect for this stuff on the, on that, on that dump. 100 00:10:08,420 --> 00:10:11,060 The problem with that approach is that it, it doesn't scale. 101 00:10:11,060 --> 00:10:22,480 I mean, if you want, if you, if you have to do that, you have to go to the machine that you, uh, think, uh, might contain some, some, some of, uh, of, uh, of, uh, something living in memory. 102 00:10:22,480 --> 00:10:26,560 You have to dump, uh, you have to get a full memory dump of that machine. 103 00:10:26,560 --> 00:10:32,880 You have to grab that memory dump into a forensic environment and then analyze the stuff in there. 104 00:10:33,100 --> 00:10:37,460 The problem with that, uh, is that, um, you cannot do that scale. 105 00:10:37,460 --> 00:10:42,360 You cannot do that, uh, every day on, on your organization, on any machine on your organization. 106 00:10:42,420 --> 00:10:46,460 So mainly because of that, uh, we, we created this tool called, uh , Memhunter. 107 00:10:46,460 --> 00:10:54,280 So what Memhunter will do, so I'm just giving a, a, a brief spoiler because we are seeing that in, in detail in a moment. 108 00:10:54,280 --> 00:11:03,060 But, uh, what Memhunter will do is that it will perform what is called a memory inspection on every processes on the, uh, every process on the endpoint. 109 00:11:03,060 --> 00:11:13,920 And it will apply the same type of heuristics, uh, and, and, and an extra couple of more, uh, that, uh, that detects for this stuff in memory and it will report that back to you. 110 00:11:14,000 --> 00:11:24,860 Um, so through that you can, uh, run this, uh, periodically either as a service or on demand and get the results of, uh, your entire organization, uh, at scale. 111 00:11:25,020 --> 00:11:27,460 So, okay , so we just talked about the why. 112 00:11:27,460 --> 00:11:34,540 So now we will talk a bit, uh, about the how, uh, we can hunt for this stuff, uh, in memory. 113 00:11:34,700 --> 00:11:52,980 So on the how part, we will, uh, mention, uh, uh, a bit , uh, we will, we will, uh, sorry, we will, we will do a quick overview on the, on the, on what the process manipulation is, what the properties of a process are affected by a process manipulation and a code injection techniques. 114 00:11:53,080 --> 00:12:05,880 And then we will also describe, uh, uh, we will also give, uh, a few, uh, give you a few details on, uh, how a process is created, uh, on the, when, uh, on the, on the Windows, uh, environment. 115 00:12:06,220 --> 00:12:08,880 So talking about, uh, process manipulation. 116 00:12:09,060 --> 00:12:24,080 So process manipulation is, uh, is, uh, for me is, uh, uh, uh, an umbrella term that can be used for any type of, uh, technique used to compromise a legitimate, uh, process and have it to execute malicious code. 117 00:12:24,080 --> 00:12:30,140 So you can do that, uh, either by, uh, performing a code injection through memory location or memory writing. 118 00:12:30,140 --> 00:12:34,320 You can do that by, uh, getting, forcing the process to execute something. 119 00:12:34,320 --> 00:12:44,020 Or you can do that through, uh, mechanism that are available , uh, in the Windows environment to force a DLL to, to be loaded, uh, during the process start. 120 00:12:44,300 --> 00:13:02,140 Uh, so going into the Win32, uh, process internals, uh, the thing that I want to, that I want you to take from here, I mean we can spend hours talking about this, but, uh, the most important things for, for this talk is the fact that, uh, the Windows kernel is, 121 00:13:02,140 --> 00:13:18,480 is the one in charge of, uh, allocating the, I mean when a process is started, uh, uh, the, the Windows kernel is the one in charge of, uh, creating, uh, what is called a, a, a process, uh, uh, a process object that will take care of, uh, the different, 122 00:13:18,480 --> 00:13:21,460 uh, uh, areas that that process container will have. 123 00:13:21,460 --> 00:13:30,500 Uh, along, among those areas, uh, there will be, uh, memories, uh, areas, uh, designated for the different threads that will run within that process. 124 00:13:30,620 --> 00:13:39,900 So every thread, uh, which are, by the way, the ones that will be running code, I mean the process itself, uh, is not running any code, just the thread, the ones that are running the code. 125 00:13:40,060 --> 00:13:44,500 So the, the, there will be a, a, a call stack, uh, uh, designated for every thread. 126 00:13:44,540 --> 00:13:59,420 There will be also a, a, a, an area within the process internal called PEV, which is a process environment block that will contain information on the common line used for the process, the, some, uh, information about the, the, the, the properties of the image file, 127 00:13:59,420 --> 00:14:03,120 um, yeah, and a couple of other things that we'll mention in a second. 128 00:14:03,120 --> 00:14:15,260 Then there will be areas around, uh, that, that will, that will hold information, um, uh, regarding the, the, the dynamic, uh, uh, uh, libraries that will, that the process will load. 129 00:14:15,420 --> 00:14:33,360 Uh, and within those, uh, dynamic libraries, uh, I wanted to mention that every library loaded, uh, within, uh, uh, uh, Windows process will have, uh, will follow what is called a PE format, which is a format described by Microsoft to, uh, load stuff in memory. 130 00:14:33,500 --> 00:14:39,160 Uh, so that, that is going to be important for one of the, the, the things that we'll be discussing in a second. 131 00:14:39,300 --> 00:14:42,800 So, uh, just to wrap up a couple of things that I just mentioned. 132 00:14:42,800 --> 00:14:53,080 So the process properties, uh, the thread properties, and the memory properties are the things that define, you know, the normal or standard behavior of a, of a process. 133 00:14:53,920 --> 00:14:59,880 Uh, so, okay, so why, why I am mentioning this and why I put in so emphasis on, on this? 134 00:14:59,880 --> 00:15:16,260 It's because of the fact that we will use that as a way to, uh, detect, uh, anomalies, uh, in the, in either the process properties, the thread properties, or the memory properties to, to, uh, and we will use that, that to, to hunt, uh, for stuff in memory. 135 00:15:17,000 --> 00:15:21,760 So I'm giving three examples here as a bit of a spoiler. 136 00:15:21,840 --> 00:15:32,940 Uh, we will discuss this in, in a bit more detail in a second, but, uh, the idea is that, that, for example, uh, as I mentioned, every, uh, piece of code that you run in a process, uh, have to run in a thread. 137 00:15:33,020 --> 00:15:42,440 So you can, you, you will, you will run in a normal scenario that that thread will have to run from code that is actually backed by a file on disk. 138 00:15:42,520 --> 00:15:57,800 So usually what, what is happening is that, uh, you, you have your process, you load your process, uh, and the, uh, you create threads, uh, and that thread, those threads have to run from code that they will be, uh, uh, that will be part of the main module, 139 00:15:57,800 --> 00:16:04,200 the main executable, or they will be part of, uh, DLL, uh, within the, uh, that, that was loaded by the process, right? 140 00:16:04,200 --> 00:16:14,200 So, uh, uh, there might be scenarios, uh, where the process, uh, is not running, uh, sorry, that the thread is not running from, uh, code that is backed on disk. 141 00:16:14,200 --> 00:16:27,060 And those scenarios are mostly, uh, no, not 100 percent of the cases, but are mostly caused by, uh, these, uh, by the side effects, uh, uh, on the, on the artifacts left by these, uh, code injection techniques. 142 00:16:27,060 --> 00:16:45,660 So whenever we found a thread whose start address is not, is running from memory that is not backed by disk, we might say, okay, you know, this heuristic, because we call that heuristic, the heuristic might, might, might be telling us that there might be something suspicious on that thread that might require further attention, 143 00:16:45,660 --> 00:16:48,360 and that's what the tool will actually report. 144 00:16:48,360 --> 00:16:56,340 So the tool will basically, uh, flag those processes with anomalies for ThreadHunter to go and look, uh, in detail. 145 00:16:56,520 --> 00:17:06,460 Uh, another, uh, potentially, uh, another, uh, anomaly that we might end up using is the memory permissions for the base address of, uh, the threads. 146 00:17:06,700 --> 00:17:20,600 So, uh, the threads are supposed to be from, uh, memory regions that are marked as, uh, read, uh, um, execute, but there might, there are code injections that left those memory regions marked as, uh, read, write, execute. 147 00:17:20,680 --> 00:17:27,340 So that goes, uh, uh, the, the, uh, that will cause, uh, one of our heuristics to, to, to fire, basically. 148 00:17:27,500 --> 00:17:37,380 Then, uh, in terms of, uh, memory properties, uh, we can also look for, uh, uh, as I mentioned, uh, memory regions, uh, with, uh, read, write, uh, execute permissions. 149 00:17:37,580 --> 00:17:53,080 We can also look for all allocations, so whenever you allocate a, a piece of, uh, uh, allocate and commit, uh, um, a piece of, um, virtual memory within the context of a process, there will be two, uh, meta, meta data fields within that memory regions that will indicate the, 150 00:17:53,080 --> 00:18:07,580 the state of, uh, those, uh, um, of, uh, of, uh, the, the, the, sorry, the, the protections, the, yeah, the, the, the state of, uh, that memory region, I mean, is that memory region is, uh, read, write, execute region or, or something else. 151 00:18:07,680 --> 00:18:23,980 Uh, so there, there are cases, uh, that, uh, techniques, uh, initially allocates, uh, the memory region with, uh, read, write, execute and then, uh, uh, call, uh, uh, a Win32 API called virtual protect to move those memory regions back to read, execute so it can look, 152 00:18:23,980 --> 00:18:24,760 uh, legit. 153 00:18:25,000 --> 00:18:33,880 Uh, but there, uh, there is a flag within those, uh, memory regions meta data that will still contain the initial allocation, uh, uh, value. 154 00:18:33,880 --> 00:18:43,840 So by looking into the, uh, mismatch between those values is, uh, is a way to, to, to determine if there have been a, a potential injection in place. 155 00:18:44,060 --> 00:18:49,440 Uh, then, uh, in terms of memory content, uh, there are a couple of things that we can do here. 156 00:18:49,440 --> 00:19:00,140 Uh, I mean, one thing is just go and do, you know, the regular DOM, uh, IOC match, which is, uh, effective, but it's, but it's very costly in terms of, uh, performance. 157 00:19:00,180 --> 00:19:06,420 So there, there are EDR vendors that, uh, you know, have, uh, modules that are specialized on doing this. 158 00:19:06,420 --> 00:19:18,760 They are mostly running, uh, drivers, uh, that scan the memory of the process and looking for specific patterns and, and flag, you know, uh, uh, a threat event whenever something, uh, malicious is found. 159 00:19:18,760 --> 00:19:21,780 In our case, uh, we, we were not able to do that. 160 00:19:21,780 --> 00:19:26,400 Again, mainly because of performance reason, Memhunter is just a user space application. 161 00:19:26,820 --> 00:19:34,060 So we, uh, we cannot afford, you know, just going and scanning, uh, the memory of the entire memory base of a, of a process. 162 00:19:34,200 --> 00:19:40,420 So, uh, mainly because of that, what we are doing is something called, uh, the virtual query walk. 163 00:19:40,420 --> 00:19:46,740 So what basically, uh, what we're doing is that we are walking the different memory regions of every process. 164 00:19:46,740 --> 00:20:00,020 And then in some cases we are looking for, you know, just a few, uh, f-f-fierce, uh, uh, bytes within those memory regions, uh, looking for, uh, you know, signs of, uh, uh, P file within that, that, that region. 165 00:20:00,020 --> 00:20:05,240 Like, uh, looking for the MC header, uh, within the, those, those f-f-fierce, uh, few bytes. 166 00:20:05,240 --> 00:20:12,460 Or we look for, uh, you know, uh, uh, associated, uh, strings, uh, left by a Tagger thread graph. 167 00:20:12,460 --> 00:20:22,140 Uh, but again, uh, this is, uh, uh, optimized just to look for a specific stuff and not for entire content of, uh, the memory region. 168 00:20:22,140 --> 00:20:36,600 Okay, so, uh, having said that, uh, we will jump into, uh, two examples of, uh, both code injection, uh, and, and, uh, uh, and, and defensivation, uh, approaches. 169 00:20:36,820 --> 00:20:40,400 Uh, the, these examples are actually not quite new. 170 00:20:40,400 --> 00:20:43,360 They have been in the, in the field for quite some time now. 171 00:20:43,460 --> 00:20:47,660 Uh, the, the first one is, uh, reflective DLL injection. 172 00:20:47,740 --> 00:20:56,020 So reflective, uh, DLL injection, uh, is, uh, is a technique that got, uh, popularized, uh, a few, a couple of years back. 173 00:20:56,020 --> 00:21:00,120 It was, uh, created and released by a guy from Germany called Stephen Feuer. 174 00:21:00,200 --> 00:21:18,360 Uh, what this technique, uh, was to, uh, I mean the, the purpose of the, this technique was to, um, allow the, the, the, the, the, yeah, mostly the, the, the people interested on this kind of approach to unload code, uh, uh, in the context of a remote process just by using a DLL. 175 00:21:18,360 --> 00:21:32,680 So the idea is that you get the, the reflective DLL framework , you create the DLL, you include a part of that framework within your code, uh, compile your DLL, and then, uh, the, the result of that compilation is something that you can embed into the, 176 00:21:32,680 --> 00:21:41,600 uh, the, your, your attacking process or, uh, something that you can read, read from, from the file system in, in, if that, that is what you, you wanted to do. 177 00:21:41,600 --> 00:21:53,440 But the idea is that once you get that, that, that load of, load of data into the context of, uh, the attacking process, you will write, you will write that, uh, that up into the victim process. 178 00:21:53,640 --> 00:22:01,480 Uh, actually, sorry, uh, you, you will allocate first, you know, the, uh, read, write, execute, uh, uh, big chunk of memory in the context of, uh, remote process. 179 00:22:01,480 --> 00:22:12,300 Then you will write that down into the context of, uh, remote process and then you will spawn a thread, a new thread, uh, that will run out of, uh, that, uh, that floating read, write, execute, uh, code. 180 00:22:13,700 --> 00:22:26,900 Uh, one of the biggest, uh, biggest or then most well-known, uh, consumers of, uh, these techniques was, uh, Metasploit on, with this, uh, Meta interpreter, uh, payload. 181 00:22:26,960 --> 00:22:34,660 So initially they, they used this to move, uh, their, their, their payload around, you know, processes using this technique to go in a pure file-less way. 182 00:22:34,860 --> 00:22:38,500 Uh, nowadays, uh, I think that they are using it as a kind of a fallback. 183 00:22:38,500 --> 00:22:45,500 They, they, I think that they start with a different technique, the Q-user APC one, and then use this as a fallback in case the previous one fails. 184 00:22:45,900 --> 00:23:02,380 Um, but, uh, yeah, but, uh, yeah, but, but the thing, uh, the important thing here is that the anomalies that this technique will introduce, uh, within the context of the process is that, that after the technique is executed, you will run, uh, a new thread running from, 185 00:23:02,380 --> 00:23:04,020 uh, floating code, right? 186 00:23:04,020 --> 00:23:18,140 So there will be a big, uh, a new thread that was not there before and the base address of that thread will be, uh, uh, uh, uh, uh, code, uh, memory region marked as read, write, execute, which, which is not, uh, backed, uh, by a model on disk. 187 00:23:18,180 --> 00:23:29,620 Then if you look into the code stack of that thread, there will be a stock frames that will, again, will be not, um, uh, backed by a symbol, uh, uh, uh, by, uh, on, uh, one of the models on disk. 188 00:23:29,620 --> 00:23:46,420 And that basically means that, uh, uh, I mean for this particular technique, that basically means that, that thread, uh, uh, was created out of, uh, shellcode that, uh, in, in the case of, uh, this technique was used to bootstrap the, the malicious payload that you are, 189 00:23:46,420 --> 00:23:47,440 you are using. 190 00:23:47,440 --> 00:24:03,100 So basically the techniques, uh, simplifies that, uh, bootstrapping, uh, for you so you are putting your regular DLL code, uh, uh, and the bootstrapping code, shellcode will take care of, uh, uh, mapping sections, resolving import, uh, fixing up relocations, 191 00:24:03,100 --> 00:24:04,620 uh, yeah, couple of extra things. 192 00:24:04,620 --> 00:24:17,400 But the idea is that after, after the execution, uh, happens, uh, these three anomalies, uh, can be, will, can be seen, uh, will, I mean we will be able to see these three anomalies in the process. 193 00:24:17,840 --> 00:24:25,680 Okay, so, now, uh, jumping into, uh, defense, uh, evasion example, the process following one. 194 00:24:26,020 --> 00:24:35,820 So the idea here is that, uh, uh, you want to run, uh, you want to evade, uh, you know, the, the, the, the available, uh, endpoint protection stack. 195 00:24:35,820 --> 00:24:40,800 So you want to evade the, the AVs and the EDR, uh, most likely on the, on the endpoint. 196 00:24:40,800 --> 00:24:46,640 You want to, your, your malicious, uh, process to look as legit for, uh, these solutions. 197 00:24:46,900 --> 00:24:54,640 Uh, and, uh, yeah, and you want to use, uh, uh, uh, a legit process as a container for your malicious code. 198 00:24:54,720 --> 00:25:02,460 Uh, and this technique works by, uh, by again using, uh, legal, uh, Win32 APIs. 199 00:25:02,460 --> 00:25:05,760 So the idea is that you create a process in suspended state. 200 00:25:06,420 --> 00:25:18,440 Uh, then you get the, I mean, when, when a process is created in suspended state, uh, the, that process will not be assigned with, uh, any , you know, uh, time, uh, in the, uh, scaling time in the kernel. 201 00:25:18,460 --> 00:25:27,360 It will be just, uh, you know , freeze, uh, will, uh, with, uh, just, uh, uh, one, uh, single thread that will be also freeze. 202 00:25:27,360 --> 00:25:29,340 So nothing, uh, will, will happen. 203 00:25:29,340 --> 00:25:37,660 Then, uh, once you, the process is created in suspended state, you can get the, the, the execution context of that thread. 204 00:25:37,740 --> 00:25:46,060 Uh, from the execution context and by also wa- and, and by also working, you know, the memory of, uh, uh, of, uh, that, that process. 205 00:25:46,060 --> 00:25:52,960 Uh, you can, uh, with those two inputs, you can determine which is the main module of, uh, of, uh, for that thread. 206 00:25:53,180 --> 00:26:04,780 Uh, and then you can, uh, call this API called NT unmap view of section, which will end up, uh, unmapping, you know, the, the main module from, uh, from the, from the process. 207 00:26:04,900 --> 00:26:10,060 Uh, and then you, the, there are a couple of things, uh, that you can do, uh, that, at that point in time. 208 00:26:10,300 --> 00:26:18,300 Um, um, there are more basic ways of, uh, uh, uh, or, or writing the, the, your malicious payload into that process. 209 00:26:18,300 --> 00:26:31,880 In this case, and just for simplification, uh, I, I just, uh, mentioned that, uh, uh, one of the, uh, uh, one of the, uh, possibilities that the attacker can do, can follow, is that they can call virtual lock. 210 00:26:31,880 --> 00:26:35,500 Again, allocating a big chunk of, uh, read write execute memory. 211 00:26:35,640 --> 00:26:39,700 They can, they can, uh, write, uh, you know, the payload into that memory. 212 00:26:39,700 --> 00:26:52,740 And then they can, uh, redirect, uh, the, the, uh, the, the execution context of, uh, the, uh, the, the thread that is posed to this new, uh, memory region. 213 00:26:52,740 --> 00:26:55,000 And then they can resume, uh, the thread. 214 00:26:55,000 --> 00:27:02,340 So that will force the, your, uh, uh, the, the, the malicious, uh, the host, the host process to run your code. 215 00:27:02,340 --> 00:27:14,340 But at the same time as, uh, no other thing has been modified in the process, just the, uh, the, we, we just forced the, the, the victim process to run a different, uh, uh, module. 216 00:27:14,640 --> 00:27:22,940 Uh, the process will, for, for a basic system, um, for AR solutions, uh, they will, process will look like, uh, will look as, will look as legit. 217 00:27:23,000 --> 00:27:30,500 So the, the P, the PB, uh, uh, yeah, most of the, the stuff on the process will not be touched. 218 00:27:31,000 --> 00:27:33,940 Uh, yeah, so we will see that, uh, in a moment too. 219 00:27:34,460 --> 00:27:40,660 Uh, uh, so in, in terms of anomalies and, uh, and in terms of, uh, ways to detect this, uh, this stuff. 220 00:27:40,660 --> 00:27:59,120 So the, the most likely, the most, uh, uh, the, the, the best heuristic to detect, uh, something like this will be to, uh, uh, check, uh, uh, for the, uh, P header fields of the main module on memory versus the P header fields of the counterpart on disk. 221 00:27:59,120 --> 00:28:07,340 So by, by checking that, you can detect if, uh, uh, there is a mismatch with, uh, which, uh, should never happen. 222 00:28:07,340 --> 00:28:11,480 And if there is a mismatch, we can, uh, report that as something, uh, suspicious. 223 00:28:11,680 --> 00:28:12,720 So, yeah. 224 00:28:13,260 --> 00:28:16,200 Okay, so we just talk about those two examples. 225 00:28:16,200 --> 00:28:20,860 We will, we will just talk about the process properties and how we can detect stuff. 226 00:28:20,860 --> 00:28:32,920 We will now jump into the what part of, uh, the talk, which is around, uh, how to perform this as, uh, uh, at scale, uh, as part of our threat hunting process. 227 00:28:33,240 --> 00:28:36,560 Uh, and this is where we are introducing Memhunter. 228 00:28:36,560 --> 00:28:46,260 So, um, so this is a tool, uh, that we, I probably mentioned this already, but anyways, uh, uh, this is a tool that we, we, we started some, some time ago. 229 00:28:46,260 --> 00:28:54,620 And again, it was a, a, a way for us to, to explore on these, uh, techniques and ways, and ways to, uh, ways to explore these, uh, uh, capabilities . 230 00:28:54,700 --> 00:28:56,980 So, uh, so Memhunter. 231 00:28:56,980 --> 00:29:00,520 Memhunter is a tool that, uh, deploys itself as a standalone binary. 232 00:29:00,820 --> 00:29:09,980 Uh, it will, once, uh, the tool is running, it will, uh, perform a series of inspection heuristics, which are the anomalies thing that I was just mentioning. 233 00:29:10,320 --> 00:29:16,940 So, uh, and then whenever there is a find, finding, the tool will report that to the, to the user. 234 00:29:17,000 --> 00:29:20,520 So the idea is that you have all these, uh, this is the architecture of the tool. 235 00:29:20,520 --> 00:29:29,580 The idea is that you have, uh, uh, all these different heuristics in, in, uh, in the, in the, abstracted in this concept, uh, called, uh, Hunter Modules. 236 00:29:29,580 --> 00:29:33,440 So every hunter is specialized in one of, uh, one specific heuristics. 237 00:29:33,540 --> 00:29:42,140 And then, uh, there is, uh, uh, along with the, the hunters, there is a, a part of a company in the tool in charge of, uh, doing the, the process context enumeration. 238 00:29:42,180 --> 00:29:46,660 There is a part of the tool, uh, doing, in charge of doing the, the orchestration of the hunters . 239 00:29:46,700 --> 00:29:50,620 And there is a part of the tool in charge of getting the, the forensic data. 240 00:29:50,860 --> 00:30:05,940 Uh, something that I didn't quite mention is the fact that the tool can run, uh, either as, uh, as, uh, a standalone service, uh, which, uh, is mainly a way for, to, for the tool to get the, uh, the, the, the hunters to be driven by events. 241 00:30:05,940 --> 00:30:11,200 So we are using ETW to determine when the hunters will be triggered. 242 00:30:11,220 --> 00:30:24,660 So, for example, we are listening for, uh, uh, kernel providers, uh, from, uh, ETW kernel providers to, to determine if there is a process, uh, if a process got created, if a thread got created, if an image was load. 243 00:30:24,660 --> 00:30:30,720 So those, those kind of things will draw, will draw, uh, you know, some hunters to run on the context of a process. 244 00:30:30,880 --> 00:30:33,480 So that's, uh, the real time eventing way. 245 00:30:33,480 --> 00:30:39,960 And then you also have the point in time or standalone execution, execution analysis, which is the thing that we are going to demo. 246 00:30:40,040 --> 00:30:54,820 So the idea here is that you get the tool, uh, you, you get the binary of the tool, uh, uh, you run it without being privileged and the tool will perform the process enumeration and it will, uh, perform, uh, it will apply the heuristics over every, uh, 247 00:30:54,820 --> 00:30:57,060 process, uh, on the endpoint. 248 00:30:57,640 --> 00:30:59,740 Uh, okay. 249 00:30:59,740 --> 00:31:03,820 So, uh, currently, uh, the tool support nine hunter heuristics. 250 00:31:03,820 --> 00:31:06,760 So we will see that, uh, uh, in the next slide. 251 00:31:06,860 --> 00:31:13,800 Along with the tool, uh, I have also created as a way to exercise, uh, uh, the different hunter heuristics. 252 00:31:13,800 --> 00:31:21,520 I created, uh, this tool, uh, separate tool called M Injector, which is basically a test tool, which, uh, 15 code injection techniques. 253 00:31:21,880 --> 00:31:29,640 Uh, I'm probably going to include, uh, um, I need the new injection framework to add a couple of, uh, extra techniques. 254 00:31:29,640 --> 00:31:41,000 So there was a great talk yesterday on code injection, uh, in general, uh, which, uh, uh, they, they released a framework, um, which I cannot remember the name to be honest, sorry. 255 00:31:41,040 --> 00:31:45,200 But, uh, yeah, but, uh, anyways, uh, that framework is, is great. 256 00:31:45,200 --> 00:31:47,420 Uh, I will, I will, uh, I will start to use it. 257 00:31:47,420 --> 00:31:55,480 And then the, the tool will also, um, generate some even logs, uh, and it also support the, the, some, uh, baseline, uh, some exclusion. 258 00:31:55,480 --> 00:32:05,380 Because, uh, uh, as I mentioned that the tool will not give you data on which malware, which, uh, attacker, tradecraft is running on the endpoint. 259 00:32:05,380 --> 00:32:10,080 It will just give you a hint that there is something, uh, suspicious on the endpoint. 260 00:32:10,180 --> 00:32:13,540 So you have to go and, and, and find yourself, you know, what, what is going on. 261 00:32:13,560 --> 00:32:17,500 And that, uh, also means that the tool might end up reporting fault positives. 262 00:32:17,560 --> 00:32:23,200 So for both, for, for, sorry, for the fault positive scenario, you have to have a way to exclude some processes. 263 00:32:23,260 --> 00:32:31,920 Uh, the processes that most likely are going to cause fault positives are the, the process that, uh, use techniques, use these techniques for legit, uh, purposes. 264 00:32:32,060 --> 00:32:41,520 Example of that is, uh, the, the .NET processes, the managed processes, what, which use, uh, which compile things, uh, on the fly, uh, and have, uh, JIT compilers. 265 00:32:41,520 --> 00:32:50,500 There are also products, uh, uh, for, from security vendors that use code injection as a way to hook into stuff, uh, to monitor behavior and so on. 266 00:32:50,500 --> 00:32:52,860 So there might be some positives, fault positives. 267 00:32:52,860 --> 00:32:56,560 You have, uh, an exclusion, a way to baseline your, your environment. 268 00:32:56,680 --> 00:33:06,040 Okay, talking about the, the hunters, uh, as we have, uh, nine, uh, hunters, so we are running out of time for demo, so I will go really quick on, on this one. 269 00:33:06,080 --> 00:33:08,300 So the, the first one is a suspicious threat. 270 00:33:08,300 --> 00:33:13,240 It will look for the base, uh, uh, star address and it will check for read write execution flag. 271 00:33:13,240 --> 00:33:17,140 Suspicious call stack will look for, uh, symbols that are not backed. 272 00:33:17,140 --> 00:33:29,880 Suspicious memory regions, it will check for the first few bytes, uh, to, to look for, uh, you know, signs of, uh, uh, uh, uh, P models, uh, that was loaded or that currently been loaded and used. 273 00:33:29,960 --> 00:33:38,080 Uh, sufficient base address is something that indicates that the main model is running from private commit, uh, markup, uh, read write execute memory regions. 274 00:33:38,080 --> 00:33:41,240 Suspicious pair is, uh, the thing that I just mentioned. 275 00:33:41,240 --> 00:33:46,040 Uh, suspicious models, uh, models, uh, associated with, uh, read write execute memory regions. 276 00:33:46,180 --> 00:33:54,960 Suspicious hollow mo- hollow models is, uh, the, this, uh, cross check between the, the P header, uh, field from the memory versus the counterpart on disk. 277 00:33:55,200 --> 00:34:06,200 Uh, register persistent is just to, to look for, uh, stuff like, uh, this, uh, uh, functionality from Windows to force, uh, DLL to load into, uh, into remote process. 278 00:34:06,240 --> 00:34:16,240 Uh, and the last one, suspicious shellcode, uh, is, uh, mainly to look for, uh, the well-known products from 886 and 864, uh, you know, shellcodes. 279 00:34:16,240 --> 00:34:22,660 So, uh, there are, uh, good amount of shellcodes that start with the same set of, uh, opcodes. 280 00:34:22,680 --> 00:34:25,560 Uh, and this is something that I am develop- developing right now. 281 00:34:25,560 --> 00:34:35,040 So this is a, uh, you know, some evasions that have started to appear, uh, a couple of, uh, I think it was the last year, between last year and the, uh, the year before the last one. 282 00:34:35,040 --> 00:34:42,700 So ways to evade the EDR solutions like, uh, uh, parent PID spoofing, uh, and the, uh, and, uh, common line spoofing. 283 00:34:42,700 --> 00:34:48,720 So the way to do that is to, again, to cross check information from the OS with the current things, uh, on the PID. 284 00:34:49,180 --> 00:34:54,700 Okay, uh, this is, uh, the, the eventing information and this will be later available for reference. 285 00:34:54,880 --> 00:34:58,540 Uh, the set of information, forensic information that the tool reports. 286 00:34:58,560 --> 00:35:00,680 And after that, we will jump into the demo. 287 00:35:13,870 --> 00:35:16,830 Okay, so Carlos here will help me with the demo. 288 00:35:16,830 --> 00:35:17,770 Thank you, Carlos. 289 00:35:19,130 --> 00:35:32,090 Uh, okay, so the, the idea, uh, the idea, yeah, the idea is that we will look first at the, you know, the, uh, the expected behavior of a process. 290 00:35:32,210 --> 00:35:35,570 So Carlos will, will open, uh, uh, Notepad. 291 00:35:35,930 --> 00:35:40,070 Um, are you able to see? 292 00:35:40,070 --> 00:35:50,710 Yeah, so he, he will open Notepad with, uh, Process Hacker, which is, uh, really convenient tool to, to look for, you know, uh, the details on the property of, uh, of a process. 293 00:35:50,710 --> 00:35:58,550 Uh, and within, uh, um, Notepad, he will check for the running threads of the processes, uh, of, uh, that process. 294 00:35:58,550 --> 00:36:01,810 He will check for the call stack of those threads. 295 00:36:01,830 --> 00:36:13,330 And he will also, he, he will also check for the memory regions currently located just to, just allow you to see that there are no memory regions with, uh, read, write, execute, uh, permissions. 296 00:36:13,410 --> 00:36:22,430 And after that, uh, we will, uh, exercise the reflective DLL injection, uh, the technique that we, that we just mentioned. 297 00:36:22,710 --> 00:36:27,630 Uh, and we will come back again to the tool, to the Process Hacker tool. 298 00:36:27,670 --> 00:36:34,030 We will, we will look for the anomalies and then we will run Memhunter to see the, the thing that, that, uh, reports. 299 00:36:41,960 --> 00:36:43,920 Okay, just a second guys. 300 00:36:55,100 --> 00:36:57,220 Okay, we'll switch, uh, computers. 301 00:37:07,920 --> 00:37:08,800 Okay. 302 00:37:16,000 --> 00:37:17,240 Just a second. 303 00:37:17,240 --> 00:37:18,640 Okay. 304 00:37:18,640 --> 00:37:25,400 So we will use, uh, Win10 RS4 machine for, for this, uh, testing. 305 00:37:25,980 --> 00:37:28,700 Uh, yeah. 306 00:37:34,650 --> 00:37:36,170 Okay. 307 00:37:37,190 --> 00:37:39,270 Just one more second. 308 00:37:40,630 --> 00:37:45,390 Uh, there you go. 309 00:37:48,820 --> 00:37:54,080 Okay, so we have, uh, we have, uh, our environment over here. 310 00:37:54,740 --> 00:38:00,300 Uh, we will, as I mentioned, we will run, uh, Notepad first. 311 00:38:02,000 --> 00:38:05,600 Uh, then, uh, we will go and, uh, Process Hacker. 312 00:38:05,600 --> 00:38:07,720 We will check for the properties of Notepad. 313 00:38:07,840 --> 00:38:12,780 We, we see that, uh, there are a bunch of, uh, threads running because of, uh, Windows. 314 00:38:12,980 --> 00:38:20,460 Uh, but, uh, the important thing is that , that there is, uh, this thread running, uh, out of, uh, the main executable image from Notepad. 315 00:38:20,460 --> 00:38:23,240 If we open that thread, we can see the call stack. 316 00:38:23,260 --> 00:38:29,120 Uh, and the call stack, you see that all the, all the symbols in the call stack are mapped to a byte, uh, to a file on disk. 317 00:38:29,140 --> 00:38:30,020 Right? 318 00:38:30,260 --> 00:38:41,000 Uh, and then if we go and check the memory, uh, we will see that there are, I mean, no memory, uh, region with, uh, read, write, execute. 319 00:38:41,060 --> 00:38:46,580 There are only read, either, uh, read, read, execute, or read, write. 320 00:38:46,720 --> 00:38:59,600 Uh, and there is also memory regions with, uh, copy and write, uh, um, which are the, which is the thing that, um, uh, Microsoft use for the, his, uh, uh, copy and write, uh, capabilities. 321 00:38:59,640 --> 00:39:05,600 Uh, okay, so, uh, yeah, so let's, uh, go ahead and, and execute an attack against, uh, Notepad. 322 00:39:05,600 --> 00:39:09,560 So it's, Notepad is process 6020. 323 00:39:09,920 --> 00:39:14,060 So we will, uh, we will run this tool. 324 00:39:14,060 --> 00:39:18,040 So this is an M-injector tool, uh, supports, uh, 15, uh, techniques. 325 00:39:18,040 --> 00:39:22,420 I'm going to, uh, add a couple more, uh, after, uh, DEFCON. 326 00:39:22,640 --> 00:39:39,000 So if we run the, uh, the technique number 5, which is, uh, reflective DLL injection, and then we ask the tool to run, uh, payload that is part of, uh, the M-injector project called, uh, M-reflective payload. 327 00:39:40,820 --> 00:39:49,020 And then we target, uh, the, the PID of Notepad, which is 60, 6020. 328 00:39:49,120 --> 00:40:00,580 And we run this, uh, we will get, uh, this popup coming from Notepad that indicates there is now code that was injected and is running, uh, uh, out of, uh, Notepad. 329 00:40:00,700 --> 00:40:19,140 Uh, and then if we go, uh, back to the project, uh, to the process, sorry, uh, and check on the threats, uh, area, we will see now that there is a new threat, uh, RTL use that I started, uh, that's supposed to start, uh, that's showing to start from RTL user threat to start. 330 00:40:19,140 --> 00:40:28,140 And if we check on the code stack of that threat, we will see that there is now two, uh, uh, symbols that are not backed by any, anything on disk. 331 00:40:28,160 --> 00:40:33,420 Uh, process hacker just run, is showing the, the memory addresses of, uh, those symbols. 332 00:40:33,760 --> 00:40:49,260 Uh, and then, uh, the memory area, we can check that, uh, there is, there will be a read, write, execute, uh, allocation uh, that will contain the malicious payload, which is this private commit allocation. 333 00:40:49,460 --> 00:40:54,840 Uh, if we open the allocation, we will see the P header signs in here. 334 00:40:54,840 --> 00:41:00,000 Okay, so now if we run MemHunter, so let's go ahead and run MemHunter. 335 00:41:00,020 --> 00:41:06,040 So MemHunter, this is the output that you get from MemHunter, so we will apply a specific heuristic to MemHunter. 336 00:41:06,040 --> 00:41:10,100 The one that, that we're interested in is the, the suspicious threat. 337 00:41:10,260 --> 00:41:13,080 Uh, you, you don't have to apply any heuristic when you run this. 338 00:41:13,080 --> 00:41:16,700 In this case we're, we're just doing it for, for the sake of, of time. 339 00:41:16,880 --> 00:41:20,960 Uh, and then we will ask MemHunter to be verbose on his output. 340 00:41:21,320 --> 00:41:28,940 Uh, so MemHunter will run a bit, it will, again it will enumerate the process, it will perform the beautiful query walk on all the processes. 341 00:41:29,240 --> 00:41:38,240 Uh, and after that it will report that there is something suspicious on nowpa.dxc on this specific threat ID. 342 00:41:38,280 --> 00:41:41,920 Uh, and these are the details of that memory region. 343 00:41:42,280 --> 00:41:46,060 Uh, okay so that's uh, demo number one. 344 00:41:49,040 --> 00:41:59,860 Okay, uh, demo number two, uh, again is uh, uh, the, the, the defensivation example that we just uh, mentioned. 345 00:41:59,880 --> 00:42:10,760 Uh, demo number two we are uh, launching, let's uh, close this notepad instance and we will use also notepad as a, as a target, as a hosting process for our attack. 346 00:42:10,760 --> 00:42:15,080 So we are running technique number seven, uh, which is uh , process Halloween. 347 00:42:15,080 --> 00:42:29,240 We are uh, pointing uh, uh, M injector to use another payload, oh, sorry , another payload uh, which is in this case is uh, uh, MSX payload. 348 00:42:30,540 --> 00:42:31,920 There you go. 349 00:42:31,920 --> 00:42:35,060 And then the target is going to be notepad again. 350 00:42:42,550 --> 00:42:43,710 Yeah, there you go. 351 00:42:43,710 --> 00:42:49,210 So the technique just executed, so we just hollow out the main memory of uh, notepad. 352 00:42:49,210 --> 00:42:54,470 So if we check on notepad, uh, the process uh, looks uh, pretty legit. 353 00:42:54,470 --> 00:42:57,130 Looks as a signed process from Microsoft. 354 00:42:57,130 --> 00:43:01,090 Uh, it, it contains uh, uh, some threats. 355 00:43:01,090 --> 00:43:07,750 The, the, the threat is con- contains a potentially valid uh, call stack. 356 00:43:07,750 --> 00:43:11,310 I mean there are no issues from a simple uh, site. 357 00:43:11,310 --> 00:43:20,390 So we'll run uh, uh, uh, uh, Memhunter, but this time uh, we will use uh, a different uh, uh, heuristic. 358 00:43:20,390 --> 00:43:32,930 Uh, heuristic number four that will perform the uh, the cross check between the, the, the P header uh, uh, fields from the things in memory versus something on disk on all the processes running on the, on the end point. 359 00:43:32,990 --> 00:43:38,310 Uh, uh, and there will be a mismatch on notepad.exe because of uh, process hollowing. 360 00:43:38,310 --> 00:43:40,810 Uh, so Memhunter will, will flag that out. 361 00:43:40,910 --> 00:43:41,910 Uh, okay. 362 00:43:41,910 --> 00:43:43,070 So that's it. 363 00:43:43,070 --> 00:43:47,170 Thank you very much for, for being here, for attending our call. 364 00:43:47,390 --> 00:43:51,790 There are some uh, stickers of the tool uh, on the, on the tables. 365 00:43:52,090 --> 00:43:53,010 Uh, yeah. 366 00:43:53,010 --> 00:43:53,530 Thank you very much.