Both of these folks have a pretty extensive background, so I'm just going to cover some of it, introduce them. 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? So it's a difficult problem. And so I'm really, really excited to personally to hear this talk. This is an area that needs a whole lot of work to be done in it. 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. So Marcos is a software architect at McAfee. 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. Marco also led the organization of the first ever B-Sides conference in Cordoba, Argentina. 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. 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. So great, great to have these folks come and share their research with us. Give them a round of applause. Thank you. Okay. 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. This talk is going to be about this project that we started like a year ago called Memhunter. For us it was really a way to learn and new and past code injection techniques and process manipulation in general. 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. So we will talk about that during the slide, and we'll talk about the problem that we are trying to solve. So this is the agenda for today. So probably we will skip the first slide, and then introduction part. Then we will jump into the why, the how, and the what part of this issue. So on the why, we will dive into why hunting in memory is important. At least from our perspective, I will leave some, some, some hints on that. 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. And then on the what part of the agenda, we will discuss the tools. And this tool that we have created called Memhunter, we will discuss on the characteristics of the tool. And we will also talk about the, on the, the current state of the tool and then the future. Uh, and we will wrap up everything with a, with a demo. Uh, with two demos actually. Okay, uh, about us. So, okay. Do you want to? Yeah. Uh, hello. Thank you for coming. Uh, I'm Carlos. He's Marcos. Uh, he's a Infosec lover. Uh, he, he working in McAfee. Uh, he's a software architect. Sorry for my English. Uh, we, okay. Uh, we, we are a B-site Cordova organizations. Okay. And I work in, in Arsec. It's a startup of Infosecurity. Okay. Okay. Yeah. Thank you. Thank you, Carlos. So why, why hunting in memory? So, uh, couple of things here. So memory, why hunting in memory these days? 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. So the threat landscape, uh, uh, has evolved over the last few years. Mainly the, the attackers have really started to, to adopt new techniques, to, to, to adopt new things, to evade the, the current detections. 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. 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. So one of these vector is, uh, what I call the process manipulation. Uh, so as part of, uh, the process manipulation, there are several things that attackers do in order to evade the current defenses. Um, one of those manipulations, uh, are what, what is called the, the call injection, right? There, there is another type of process manipulation called, uh, defense evasion. So we'll touch on that during, during the, the presentation. 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. 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, uh, sponsor, uh, APT groups, mostly national state groups. 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. Um, but nowadays that, that is not actually the case. Nowadays it's, uh, call injection techniques especially are, are, are a commodity. 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. So accessing to these, uh, these techniques, uh, are, are, are available to anyone, uh, right now. Uh, so that's why we, we need to, uh, start thinking on including, uh, ways to, to detect this stuff, uh, on memory. So going, going back to the file list, uh, uh, uh, state that I, that I just mentioned. 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. 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. 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. 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. 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. 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, most likely. 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. So, uh, so in that case, uh, code injection was used as a, as a second stage of an attack. 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. 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. 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. So that's where code injection is, uh, actually, uh, a thing nowadays. So, uh, yeah, so we, we know what, what, uh, these techniques are. We know how to catch them, actually. Uh, but why, why is that difficult to, to hunt for this stuff, uh, at scale? 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. 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. You either go and buy, uh, uh, uh, an expensive EDR product that supports these, uh, techniques. 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, uh, the, the different processes to look for IOCs and see if, uh, there is an injection going on. 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, uh, scanners that volatility have in order to detect for this stuff on the, on that, on that dump. The problem with that approach is that it, it doesn't scale. 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. You have to dump, uh, you have to get a full memory dump of that machine. You have to grab that memory dump into a forensic environment and then analyze the stuff in there. The problem with that, uh, is that, um, you cannot do that scale. You cannot do that, uh, every day on, on your organization, on any machine on your organization. So mainly because of that, uh, we, we created this tool called, uh, Memhunter. 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. 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. 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. 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. So, okay, so we just talked about the why. So now we will talk a bit, uh, about the how, uh, we can hunt for this stuff, uh, in memory. 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. 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. So talking about, uh, process manipulation. 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. So you can do that, uh, either by, uh, performing a code injection through memory location or memory writing. You can do that by, uh, getting, forcing the process to execute something. 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. 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, 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, uh, uh, areas that that process container will have. 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. 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. So the, the, there will be a, a, a call stack, uh, uh, designated for every thread. 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, um, yeah, and a couple of other things that we'll mention in a second. 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. 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. Uh, so that, that is going to be important for one of the, the, the things that we'll be discussing in a second. So, uh, just to wrap up a couple of things that I just mentioned. 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. Uh, so, okay, so why, why I am mentioning this and why I put in so emphasis on, on this? 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. So I'm giving three examples here as a bit of a spoiler. 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. 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. 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, the main executable, or they will be part of, uh, DLL, uh, within the, uh, that, that was loaded by the process, right? 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. 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. 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, and that's what the tool will actually report. So the tool will basically, uh, flag those processes with anomalies for ThreadHunter to go and look, uh, in detail. 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. 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. So that goes, uh, uh, the, the, uh, that will cause, uh, one of our heuristics to, to, to fire, basically. 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. 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, 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. 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, uh, legit. 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. 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. Uh, then, uh, in terms of memory content, uh, there are a couple of things that we can do here. 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. So there, there are EDR vendors that, uh, you know, have, uh, modules that are specialized on doing this. 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. In our case, uh, we, we were not able to do that. Again, mainly because of performance reason, Memhunter is just a user space application. 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. So, uh, mainly because of that, what we are doing is something called, uh, the virtual query walk. So what basically, uh, what we're doing is that we are walking the different memory regions of every process. 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. Like, uh, looking for the MC header, uh, within the, those, those f-f-fierce, uh, few bytes. Or we look for, uh, you know, uh, uh, associated, uh, strings, uh, left by a Tagger thread graph. 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. 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. Uh, the, these examples are actually not quite new. They have been in the, in the field for quite some time now. Uh, the, the first one is, uh, reflective DLL injection. So reflective, uh, DLL injection, uh, is, uh, is a technique that got, uh, popularized, uh, a few, a couple of years back. It was, uh, created and released by a guy from Germany called Stephen Feuer. 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. 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, 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. 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. 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. 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. 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. 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. Uh, nowadays, uh, I think that they are using it as a kind of a fallback. 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. 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, uh, floating code, right? 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. 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. 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, you are using. 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, uh, yeah, couple of extra things. 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. Okay, so, now, uh, jumping into, uh, defense, uh, evasion example, the process following one. 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. So you want to evade the, the AVs and the EDR, uh, most likely on the, on the endpoint. You want to, your, your malicious, uh, process to look as legit for, uh, these solutions. Uh, and, uh, yeah, and you want to use, uh, uh, uh, a legit process as a container for your malicious code. Uh, and this technique works by, uh, by again using, uh, legal, uh, Win32 APIs. So the idea is that you create a process in suspended state. 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. 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. So nothing, uh, will, will happen. Then, uh, once you, the process is created in suspended state, you can get the, the, the execution context of that thread. 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. Uh, you can, uh, with those two inputs, you can determine which is the main module of, uh, of, uh, for that thread. 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. Uh, and then you, the, there are a couple of things, uh, that you can do, uh, that, at that point in time. Um, um, there are more basic ways of, uh, uh, uh, or, or writing the, the, your malicious payload into that process. 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. Again, allocating a big chunk of, uh, read write execute memory. They can, they can, uh, write, uh, you know, the payload into that memory. 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. And then they can resume, uh, the thread. So that will force the, your, uh, uh, the, the, the malicious, uh, the host, the host process to run your code. 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. 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. So the, the P, the PB, uh, uh, yeah, most of the, the stuff on the process will not be touched. Uh, yeah, so we will see that, uh, in a moment too. Uh, uh, so in, in terms of anomalies and, uh, and in terms of, uh, ways to detect this, uh, this stuff. 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. So by, by checking that, you can detect if, uh, uh, there is a mismatch with, uh, which, uh, should never happen. And if there is a mismatch, we can, uh, report that as something, uh, suspicious. So, yeah. Okay, so we just talk about those two examples. We will, we will just talk about the process properties and how we can detect stuff. 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. Uh, and this is where we are introducing Memhunter. 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. 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. So, uh, so Memhunter. Memhunter is a tool that, uh, deploys itself as a standalone binary. 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. So, uh, and then whenever there is a find, finding, the tool will report that to the, to the user. So the idea is that you have all these, uh, this is the architecture of the tool. 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. So every hunter is specialized in one of, uh, one specific heuristics. 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. There is a part of the tool, uh, doing, in charge of doing the, the orchestration of the hunters. And there is a part of the tool in charge of getting the, the forensic data. 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. So we are using ETW to determine when the hunters will be triggered. 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. So those, those kind of things will draw, will draw, uh, you know, some hunters to run on the context of a process. So that's, uh, the real time eventing way. And then you also have the point in time or standalone execution, execution analysis, which is the thing that we are going to demo. 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, process, uh, on the endpoint. Uh, okay. So, uh, currently, uh, the tool support nine hunter heuristics. So we will see that, uh, uh, in the next slide. Along with the tool, uh, I have also created as a way to exercise, uh, uh, the different hunter heuristics. I created, uh, this tool, uh, separate tool called M Injector, which is basically a test tool, which, uh, 15 code injection techniques. Uh, I'm probably going to include, uh, um, I need the new injection framework to add a couple of, uh, extra techniques. 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. But, uh, yeah, but, uh, anyways, uh, that framework is, is great. Uh, I will, I will, uh, I will start to use it. 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. 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. It will just give you a hint that there is something, uh, suspicious on the endpoint. So you have to go and, and, and find yourself, you know, what, what is going on. And that, uh, also means that the tool might end up reporting fault positives. So for both, for, for, sorry, for the fault positive scenario, you have to have a way to exclude some processes. 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. 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. 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. So there might be some positives, fault positives. You have, uh, an exclusion, a way to baseline your, your environment. 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. So the, the first one is a suspicious threat. It will look for the base, uh, uh, star address and it will check for read write execution flag. Suspicious call stack will look for, uh, symbols that are not backed. 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. 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. Suspicious pair is, uh, the thing that I just mentioned. Uh, suspicious models, uh, models, uh, associated with, uh, read write execute memory regions. 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. 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. 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. So, uh, there are, uh, good amount of shellcodes that start with the same set of, uh, opcodes. Uh, and this is something that I am develop- developing right now. 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. So ways to evade the EDR solutions like, uh, uh, parent PID spoofing, uh, and the, uh, and, uh, common line spoofing. So the way to do that is to, again, to cross check information from the OS with the current things, uh, on the PID. Okay, uh, this is, uh, the, the eventing information and this will be later available for reference. Uh, the set of information, forensic information that the tool reports. And after that, we will jump into the demo. Okay, so Carlos here will help me with the demo. Thank you, Carlos. 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. So Carlos will, will open, uh, uh, Notepad. Um, are you able to see? 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. Uh, and within, uh, um, Notepad, he will check for the running threads of the processes, uh, of, uh, that process. He will check for the call stack of those threads. 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. And after that, uh, we will, uh, exercise the reflective DLL injection, uh, the technique that we, that we just mentioned. Uh, and we will come back again to the tool, to the Process Hacker tool. We will, we will look for the anomalies and then we will run Memhunter to see the, the thing that, that, uh, reports. Okay, just a second guys. Okay, we'll switch, uh, computers. Okay. Just a second. Okay. So we will use, uh, Win10 RS4 machine for, for this, uh, testing. Uh, yeah. Okay. Just one more second. Uh, there you go. Okay, so we have, uh, we have, uh, our environment over here. Uh, we will, as I mentioned, we will run, uh, Notepad first. Uh, then, uh, we will go and, uh, Process Hacker. We will check for the properties of Notepad. We, we see that, uh, there are a bunch of, uh, threads running because of, uh, Windows. 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. If we open that thread, we can see the call stack. 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. Right? 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. There are only read, either, uh, read, read, execute, or read, write. 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. Uh, okay, so, uh, yeah, so let's, uh, go ahead and, and execute an attack against, uh, Notepad. So it's, Notepad is process 6020. So we will, uh, we will run this tool. So this is an M-injector tool, uh, supports, uh, 15, uh, techniques. I'm going to, uh, add a couple more, uh, after, uh, DEFCON. 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. And then we target, uh, the, the PID of Notepad, which is 60, 6020. 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. 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. 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. Uh, process hacker just run, is showing the, the memory addresses of, uh, those symbols. 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. Uh, if we open the allocation, we will see the P header signs in here. Okay, so now if we run MemHunter, so let's go ahead and run MemHunter. So MemHunter, this is the output that you get from MemHunter, so we will apply a specific heuristic to MemHunter. The one that, that we're interested in is the, the suspicious threat. Uh, you, you don't have to apply any heuristic when you run this. In this case we're, we're just doing it for, for the sake of, of time. Uh, and then we will ask MemHunter to be verbose on his output. 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. Uh, and after that it will report that there is something suspicious on nowpa.dxc on this specific threat ID. Uh, and these are the details of that memory region. Uh, okay so that's uh, demo number one. Okay, uh, demo number two, uh, again is uh, uh, the, the, the defensivation example that we just uh, mentioned. 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. So we are running technique number seven, uh, which is uh, process Halloween. 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. There you go. And then the target is going to be notepad again. Yeah, there you go. So the technique just executed, so we just hollow out the main memory of uh, notepad. So if we check on notepad, uh, the process uh, looks uh, pretty legit. Looks as a signed process from Microsoft. Uh, it, it contains uh, uh, some threats. The, the, the threat is con- contains a potentially valid uh, call stack. I mean there are no issues from a simple uh, site. So we'll run uh, uh, uh, uh, Memhunter, but this time uh, we will use uh, a different uh, uh, heuristic. 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. Uh, uh, and there will be a mismatch on notepad.exe because of uh, process hollowing. Uh, so Memhunter will, will flag that out. Uh, okay. So that's it. Thank you very much for, for being here, for attending our call. There are some uh, stickers of the tool uh, on the, on the tables. Uh, yeah. Thank you very much.