Learn Malware Analysis with Ghidra and x64dbg (for free)
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
So, you've had to create accounts on the dark web that are trusted so that you can see a bunch of this stuff. >> Yeah. So, basically on the dark web, it is something where you have to some accounts you can just kind of create. Other ones you either have to have some sort of vouch. So, either somebody has to vouch for you. So, they'd say, "David's really cool. I love him. Trust him. Let's let him in. He's done some great stuff for me." Or you have to put down money. >> [music] >> So, basically you're trying to prove that you are someone who's trustworthy. So, this means that we were right. So, now we have all the functions in the binary. And what we can do now is we can
take a lot of this these named functions. And then what we can do is we can go into our static analysis [music] and then start to figure them out. >> Everyone, David Bombal back with a very special guest. Lindsay, great to have you on the show. >> Thank you so much for having me. >> Love this topic. And I'm glad you wrote a book about it. But your book is not like some of the other material out there. Perhaps you can give us a quick overview of why you wrote the book and what you cover in the book. And tell us a bit about yourself.
>> Okay. So, I wrote Dissecting the Dark Web because it's the book that I wanted to purchase. So, basically we combine reverse engineering knowledge with the context of the dark web. So, each chapter starts with an overview of a tool. So, what the tool is, how it works, how it's bought and sold on the dark web, and how threat actors talk about it. Then we move into reverse engineering it. So, I lead you through reverse engineering, teach you what features to look for, and the technical indicators behind them. Then I turn it over to you as the reader to practice what you've learned in your own reverse engineering exercise.
>> Okay. So, it's not like some of the other stuff out there where it's like, "Okay, we're going to go on the dark web and just see what's there." You're actually getting the tools and then reverse engineering those tools. >> Yeah. So, we start with the initial access and I take you through the whole cyber kill chain. So, for example, one of the chapters covers banking trojans. So, people conceptually know what a banking trojan is, but we talk a little bit about how the threat actors talk about them, how are they marketed. Basically look at some advertisements. And we're not talking about all the mystique of the dark web. We're actually talking about facts. And then we look at how the actual technical parts of the tools back that up.
>> What kind of experience or knowledge do I need to be able to follow along in the with the book? >> So, I would say having a background or some experience with programming. You don't have to have been a programmer for 50 years, but at least having some idea of things like function structures, classes, different things like that will help you along. But, certainly if you're just interested in understanding what are these tools? How do they work? You'll get something out of it as well. >> So, just basic programming knowledge and then you take us along for the journey. You show us the tools. You explain them.
>> Yep. So, if you want to learn to do reverse engineering, I take a lot of the programming concepts that you're familiar with. So, for example, Windows API functions, different things like that. And then I show you what they look like, explain at a basic level, not too too basic, but then you get a chance to see how a lot of the code concepts that you're familiar with translate into reverse engineering. And then when you try it yourself, you have the opportunity to put that into practice. >> So, give us a bit of background about yourself. >> So, I am vice president of threat intelligence at Human Security, but I wasn't always that way. So, I started my career as actually a software engineer and one of my projects ended at my company and they were looking for somebody to staff on a reverse engineering project. I didn't know any at the time, but they said, "You'll do if you have interest and, you know, skill in writing C code." So, I learned to reverse engineer malware at that point and that was something that I turned out I loved. So, while I enjoyed writing code, I really loved taking it apart even more cuz you could see a lot of the concepts that you, you know, put into practice now on the other side. So, that was really fun. Eventually, I went to lead the technical arm of a threat intelligence organization at Recorded Future. And now I lead the whole team.
>> I want to thank Proton for sponsoring this video. Imagine if you only had one key that opened your house, your car, your office, your safe, and every other lock in your life. You probably wouldn't feel comfortable carrying that key around, but that's what millions of people are doing online. They use the the password for their email, their social media, their banking, shopping, and all their other online accounts. And if one of those websites gets hacked and that password leaks, suddenly an attacker has a key to a lot more than just one account. Your entire digital life has been compromised through that hack or data breach. The solution is pretty simple, actually. Use a different strong password for every account. But the problem with that is nobody wants to or can even remember 50 different passwords, especially when we need to implement passwords that are complex, uppercase, lowercase, special characters, etc. But there is a solution to all of those problems, and that's Proton Pass. Proton Pass generates unique passwords for every website and stores them in an end-to-end encrypted vault, so that not even Proton can access your passwords. And in addition, when you go to a website, Proton Pass automatically fills the details in, so that you can log in to any website across any device using your stored credentials. Now, not only is that much more convenient than having to remember your passwords for every website, but it's also a much more secure way to store them. Don't store your passwords in a text file. Store them in an encrypted vault. And in addition, if you generate email aliases, you don't have to give your real email address to every website you sign up for, which therefore saves you from receiving loads of unwanted spam and possibly even receiving phishing emails. So, if you want to take your password security and email privacy to the next level, sign up to Proton Pass for free using my link, proton.me/davidbumble, or you can use the link in the video description.
Can you highlight like parts of the book that are really special to you or that's something that surprised you, or something that's like standing out in the book? Cuz I mean there's a lot of amazing content, but perhaps you can just hone in on one or two things. >> Sure. Yeah, absolutely. So, when I look at the different chapters in the book, some of the things that were most interesting to me were actually having the chance to not only take the advertisements that we all know and love and that I was looking at, and then say, "Okay, how would I explain to a reader why the words and the facts that a threat actor is using actually come out?" So, for example, ransomware advertisements. And we'll talk a little bit more about black matter later, if that's okay with you.
>> Yeah. >> But >> And you go to demos. Sorry, sorry to interrupt. People love demos, so >> Yes, there will be a demo. So, we'll look at a couple examples of the ransomware-as-a-service program, so how they recruit affiliates, and you'll get a chance to see of how that advertisement actually translates into the things that you'd look for. So, for example, uh ransomware, what is the purpose of it? >> Yeah. >> It is to encrypt files. So, we'll look at a couple of the different pieces, so the iteration of the files, the encryption of the files, any sort of victim data collection as well, as well as another tool called SteelBit, which is actually a data exfiltration tool.
So, before you encrypt all the files, a lot of ransomware groups want to exfiltrate them, so they can extort companies. So, we'll look at um some of those features, and you could consider that as kind of a value add. Ultimately, cybercriminals want to make money, and as a ransomware gang, you make money by attracting more people, affiliates, to your program. So, that's just another kind of added bonus. >> Lindsey, always good to talk about a book, but it's much nicer to see a demo. So, I know you've got some demos lined up. Could you Could we jump into the demos? >> Absolutely. Let's do it.
>> Great. Let's go for it. >> Okay. So, the first tool that I want to talk a little bit about is called SteelBit. So, as I mentioned, that is a data exfiltration tool that was offered as part of the LockBit ransomware-as-a-service program. So, basically, what you want to do before you're a ransomware affiliate in order to extort your victims is you want to exfiltrate their files so that you can either get more information that you could potentially use to do further attacks or basically just get them to pay a ransom. So, while things like technology's gotten a lot better in terms of hosting things on the cloud or other places that aren't on premises, encryption is great but only to a certain degree. So, that's why file exfiltration is so important. A lot of the times you'll see threat actors who don't have a tool like this, they'll use things like WinSCP, curl, you know, basically living off the land type of nine tools that all of us are familiar with, but this just makes it so much easier to give them this one tool, point, click, and then they're off to the races. So, what we're going to do first is look at what the Stealbit console looks like.
So, when you first run the tool, what you see is this. So, a lot of programs have different options to them. So, if you're a malware analyst and you want to figure out what you should be looking for, oftentimes the options are a good place to start. So, what you can see here is you have network limits, self-delete, hide window, all these things. So, what this tells us is that we're potentially looking for some sort of configuration to say, "Well, what what folders do we want to exfiltrate? Do we want the window to necessarily show itself or not? Is there anything that we want to skip or not skip?" Cuz, you know, you don't necessarily want to exfiltrate everything. You can think of like system files, things like that. And do you want the program to delete itself?
>> Sorry, I'm slow, so I'm going to ask you some perhaps dumb questions. This is the software that they are using to take your data out of your company, right? So, this is software that you found on the dark web. >> So, this was offered, yes, via the threat actors' ransomware-as-a-service program. So, if you sign up as an affiliate, basically you say, "I want to deploy your ransomware." This is a tool that you'd have access to, uniquely through their program. >> Brilliant. Okay, go on. Sorry. >> So, based on this, what we first want to do is open the binary. So, why I picked this. So, this is something where in the book what we do is we learn how to start with a binary and start figuring out what we know, what we don't know, and where we should begin. So, one thing that I often do is suggest looking at the strings. So, when you're reverse engineering, often times there'll be strings in it that can tell you a lot.
So, for example here, let's look at our strings. That's not a lot of strings. So, in the book, what we learn to do is when you don't have a lot of strings, what are you going to do? Another thing that you want to look at often times is the imported functions. Also, what you could see here, you can see really there's no imports. So, what that tells us is that probably somewhere in the binary, there's encrypted or obfuscated strings, and they're probably going to likely load the functions at runtime. So, what this means, why you wanted to look at the functions is that tells you what the code is doing. As a reverse engineer, you want to figure out, "Okay, what does this binary do, and how does it do it?" So, you can explain the context to somebody else who wants to know. And the reason that they might hide the strings and the functions is because it then makes it harder for EDR to detect it, for reverse engineers like us to be able to take it apart. So, this is a slightly more advanced concept that readers can learn. Shall we jump in now?
>> Yes, so you cover that in this in the book, right? >> Yes. >> So, basically you're doing a demo of the stuff I'd learn in the book. >> So, we're going to walk through that example, so the readers can or listeners can get a taste of what types of things Dissecting the Dark Web goes through. >> So, if I buy the book, can I get hold of this, or is that something I just read, or can I follow along? >> So, if you want to grab this type of sample, pull it down and do it yourself, you can, but you absolutely don't have to. So, I'll walk you through this example, and then as the exercise in the book, you'll do something similar, but a little bit different.
>> I probably asked you the wrong question. I mean, it's malware, you're not going to be dishing this out, right? >> No. So, basically while I do tell you how to safely handle malware, um that's not a huge portion of the book and instructions, so you're doing it at your own risk cuz obviously malware is dangerous, but um I lead you through how to how to do it and there are examples that are not necessarily malware, but could be compiled to be malware or at some point could be malicious. So, obviously be careful, but um, not necessarily giving out these samples. >> Yeah, exactly. Yeah, exactly. Brilliant. Sorry to interrupt.
>> Oh, no big deal. Okay. So, I'm going to draw your attention to now what you see. So, like we talked about, you would expect that there would be some need for these functions to be loaded in the binary. So, what I would say is that in order for it to function because it needs these functions, you'd expect this to be relatively early in the code. And you'd also expect that it needs to decrypt its strings to use them. Some pieces of code actually decrypt their strings at runtime one by one, others just decrypt the whole swath and then use them. >> [clears throat] >> So, in an effort to kind of show you a little bit of movie magic, we're going to actually kind of look at a already analyzed version of this binary. But, there's something I want to point out.
So, when you run malware a lot of the time, what they'll put is an anti-analysis technique where basically if you're using a virtual machine or a debugger, it's going to either behave differently or not run. So, that's another concept that we cover in the book and part of also why I picked Steelbit because you can very clearly see this and it's in the beginning. Would you like to see that? >> Yeah, I really do. One question, dumb question, what tool are you using here? >> So, this tool is called Ghidra. So, it's an open-source free reverse engineering tool. Um, there are many other reverse engineering tools out there, but I particularly like Ghidra because you have the decompilations so for people who are learning, it's a lot easier to look at decompiled code than just disassembled code and it's also free, which is a fantastic price.
>> So, you're going to run you're going to show us the code running. >> Yep. >> That's cool. Yeah, that's great. >> So, the first thing that we're going to look at when we run this code is what you'll see is this code here. The process environment block tells you about different things to do with a process and there's There's piece of it which I'd like to draw your attention to here that is effectively is
it being debugged. So, if the code is being debugged, it'll do something different. So, I know the assembly is a little bit challenging to look at. The decompilation doesn't necessarily do this justice. But, what we'll see when we run it is how you would get past something where it's it checks if the value is 70, which means the debugger is attached to it, then it just goes into an infinite loop, which is not great if you want to analyze it. So, let's take a look at that if that is all right. >> yeah. That's good. I love it. >> So, another tool that we use, well, I like to use is x64 debug to run malware.
And several examples in the book actually do so. I like it cuz it's free. I like it cuz it's um something that I've just used for a long time and it's a great compliment to Ghidra. >> Yeah. >> So, what you see here, I'm opening x64 debug and what you're going to see is we're going to load our SteelBit sample. So, looking for the executables, pick the SteelBit sample, and then we start. So, going to jump to the program entry. So, that's the function that we were seeing before. And what we're going to do is we're going to step step-by-step to that instruction where it's checking for that value 70. So, this is where we want to use x64 debug to change the value that's in the process environment block. Whatever it is, we don't want it to be 70. So, what you can see here is I have highlighted where 70 is and I'm going to change it. So, pick a new value, zero, all right? So, now when it goes through that check, it's not going to stop execution cuz the value is not 70, so we can continue on. So, when you're dynamically analyzing your malware, now you can get past that initial check, as you can see, and there we go.
>> That's a great demo. I really enjoyed that. >> So, we've surpassed our first challenge. And like I said, the next thing is to figure out when are the functions and strings loaded because that's going to make our analysis a lot easier. So, in the book, we talk a little bit about how modules can be loaded at runtime, give you a couple examples, how strings can be decrypted at runtime. In this case, we're actually just going to run past it so that all of our functions will load in memory. So, it's a little bit easier. You'll learn how to specifically do that, but for the enjoyment of this demo and this chat, I'm going to just run through it. So, the first function that we would likely think would be around the functions. So, for example, you see in your binary here, let's check out this function cuz we know it has to happen relatively early. So, what you're seeing here is there's a loop here.
We're not entirely sure what it does, but let's just kind of run past this and see if we get some function names. So, one thing you'll notice when you do dynamic analysis along with static analysis is you'll go back and forth between your Ghidra tool and your x64dbg tool, at least in this case. So, it's really kind of complementing each other. So, let's jump back into x64dbg. So, what you can see here is I have a breakpoint. We're going to now jump past this call, the call that we suspect might be loading the functions. So, what you can now see is that you start to see function names. So, this means that we were right. So, now we have all the functions in the binary, and what we can do now is we can take a lot of this these named functions, and then what we can do is we can go into our static analysis and then start to figure them out.
>> so much for putting this together. This is quite >> In order to not bore all of our audience, what I have is a a version of Steel Bit that I've already gone through and done a lot of this for us. So, now we can start to see what the features are. There's one more particularly interesting part, which is the string decryption, which is here. Again, well, I teach everybody how to do so during in the book manually, this one we're just going to run through it. So, if you don't mind if we kind of go right back. The lines you do are string decryption.
See what I mean? The software's a little questionable here. All right. So, that next function that happens to be our string decryption, we're going to step and we are going to jump through it. Can kind of just go to the end. This is where our encrypted strings are. So, in that encrypted string block, what you're going to see is a particular address. And then what we're going to do is we're going to eventually when we keep stepping, is we're going to see all of the encrypted strings. So, we're going to follow that value. So, that is the location where we believe the string decryption's happening, and I can show you that there. But, you see this whole mess of garbage on the bottom. That doesn't look like strings. So, we're going to keep stepping, and when the strings decrypt, what you would expect is to see strings.
So, let's keep stepping. Here we go. There are calls. And what we're going to say is, you know what? I'm going to just jump to the end of the function here, because that's where I believe that all of the string decryption's going to happen. And now what you see is we have actual string content. So, movie magic for our listeners here. Again, this is something you can walk through manually if you'd like to watch it in action, but we're going to skip that for today. So, here we have the binary. So, right now, at least in Steelbit, it's relatively simple to use the entry function as our home base to find a lot of those features that I mentioned. So, we've covered the loading the libraries, the string decryption. Now, what we're going to want to figure out is those command line options. So, in here you'll parse your command line options. And basically here is where you start to correlate how are the command line options with what the functionality is. So, like I said, this was a data exfiltration tool. So, we're probably going to find something to do with how fast you want to exfiltrate the data, what do you want to exfiltrate, do you want to hide the window, do you not want to hide the window, and then file iteration. So, we can look first at file iteration, because I think that's one of the simplest ones to sort of discuss. So, this is what I determined to be files and folders. So, these In the book, one of the things that we look at is how do you find the concept of file iteration?
So, many types of malware will do almost idiomatic things. So, there's a couple of Windows API calls that you'd want to look for. So, the the idea of find first file and then find next file. So, find first file, is there another file? Find the next file. Keep going through that loop. So, this is something comes up with ransomware, comes up in Steelers, which sometimes will exfiltrate files, this kind. But basically what I want to teach the reader is malware Yes, malware samples are different from each other. Malware tools are different from each other. But a lot of the concepts that you learn to reverse engineer with and deal with Sun, you'll also see related to others. So, I help the reader effectively build their little toolkit of different things to look for. So, this is not the only malware that's going to use the dynamically loaded functions. Not the only one that's going to decrypt strings. Not the only one that's going to iterate through functions. So, basically you just build your toolkit and as you go through the chapters, you can apply it several different times. I think one of the things that I want readers to learn as they go through the reverse engineering is what can you take from each sample and to build your toolkit and your skill set. But a lot of our readers are people who want to learn to not only reverse engineer malware, but they're in positions where they want to be able to detect the malware.
So, this one was particularly interesting. So, one of the things that Steelbit uses is a shared pipe. So, sometimes you'll see if there's multiple instances of malware they use threads, right? I'm sure a lot of our software engineering listeners are familiar with threads. But Steelbit uses named pipes to communicate between different instances of the malware, which is particularly interesting. So, for many of our audience, they're probably familiar with SIMs if you do any sort of detection engineering. Um Sigma rules, for example, are something that we often write to be able to detect malware from basically logs. So, what I'm going to show you now is how the named pipe, which is named Steelbit master pipe, actually shows up in your Sysmon logs. So, you can write a Sigma rule to detect it if you'd would to see that. You can do that.
>> So, a lot of the time when you do reverse engineering, you're not just doing it for fun and profit. What you're doing it for is in order to write rules because your job generally requires you to. So, I'm going to show you exactly what that looks like, at least for SteelBit. So, what we are going to do is we are going to run SteelBit and just tell it to exfiltrate everything from C directory. Don't have a lot here cuz it's my VM, so you can see SteelBit and exfiltrate from C cuz you're required to put some kind of folder there. So, what you can see here is SteelBit is running.
Um good practice is not to have your VM connected to the internet, which is why you can see it try and reach out to the IP and it's not able to. So, can see it here. What I'm going to do is I'm actually going to use Process Explorer, find the process and stop it because we don't want it to keep trying. And then what we're going to be doing is we're going to look in the Event Viewer to look at what the Sysmon logs are showing. So, this is something where if you're collecting Sysmon logs, you would generally look for things like file creates or any sort of network requests or really anything that emphasizes what the malware does that we can use as a unique detection. So, here the particularly interesting thing, like I mentioned, was that really actually named pipe. So, we're going to look Here's all of our Sysmon events. You can see a couple of examples here. Um a lot of DNS cuz it's not exfiltrating. So, we're going to go and we're going to find our pipe. We're going to scroll a little bit, and here it is. So, what you can see here is the pipe named SteelBit Master Pipe. So, if you're writing a detection for this because, let's say your organization wants a way to detect this malware, that's a great avenue to go down.
>> Yeah, so you can pick it up. >> Yeah. Um it's something that's very evocative of this particular malware, and you know, if you're wondering what it is, it's SteelBit. So, that would be a great example of a detection that our readers will learn how and why you'd want to do that as they do the malware analysis. Um there's a bunch of features that I haven't gone through in this demo today, but all of that will be in the book. >> Yeah, that's great. I mean, cuz we're just giving taste of what's what you're doing. Yeah. Yeah, cuz we don't have time. >> No, there's no time for that. So, I think it's a great example because it highlights some of the advanced reverse engineering concepts that you'll see.
You don't again, you don't have to have any familiarity with this cuz we walk through it in different chapters. And then it also helps you understand what are those idioms that you're going to build and it's kind of a nice culmination of many of the things you've learned in earlier chapters. >> Really enjoyed that. You've got more demos though. Is that right? >> Yes. So, one of the, I guess claims to fame that I I talk about in the book, is finding and disrupting BlackMatter initially. So, at the time they had not
actually launched into really the public yet. So, they really weren't widely offering the ransomware to many people. >> Yeah. >> So, what we're going to look at is some of their initial effectively marketing of how they would talk about themselves to recruit affiliates, different things like that. And then we're going to look at a piece of the malware. So, we'll talk about some of what ransomware does, what you should look for. Again, a nice culmination. While we don't discuss BlackMatter in the book, we discuss another type of ransomware Sodinokibi, which was offered by REvil. So, this is a great chance to see how some of those ransomware concepts translate between different families. So, you'll get to deep dive with Sodinokibi in the book, look at different iterations of the malware. But, we're also going to look at BlackMatter and you'll see how this concept translate. What you are looking at here is some of the initial BlackMatter forum posting on Exploit forum of when they were trying to attract affiliates. So, they're talking about what they need. So, as you can kind of see here, they're not really explicit about what they want. So, a lot of the time in order to conduct an attack, you need some sort of access.
So, what this forum post shows here is they're requesting access. They give some requirements for what types and sizes of companies. So, generally what you'll see is actors are pretty specific about how much the company should be worth, how many systems, cuz they don't want, you know, a four-person company with three computers. What they want is the big money because the bigger the the big the company, the more money they have, the more likely they can will pay the ransom. So, you can see them looking for that's a hundred million and they want 60 to 1500 host so big again. But, this is just a great example of how you can see exactly how threat actors will talk. So, they're not explicit like, "We do ransomware." And part of that is because they don't want too much law enforcement attention because when they do that, then bad things happen. They have to disrupt and rebrand. But, this should give you an idea of some of how they talk. So, I want to point out that they say all areas except medicine and state institutions. So, generally when a
ransomware attack happens against something like that, that gets them a lot of attention. Law enforcement, international law enforcement, everybody freaks out. It's not that they care about the people or the state institutions. They just want to kind of fly under the radar. For example, if they attack e-commerce or financial institutions, maybe that's a little less upsetting, that gets them a little less attention, but they want to kind of fly as far away from the sun as possible. So, that's why they exclude those. >> Makes sense. Makes sense. Yeah, if they attack a school, they're not going to be very popular. >> No, they're really not. And the less attention they get, the less people that are looking to stop them, the better in their mind cuz, you know, once they get get disrupted, then they have to rebrand, they have to retool, they have to get infrastructure back and that's just a lot of work and money and cybercriminals really don't like being demonetized. Next one we're going to look at is when you join the affiliate program. So, this is for people who want to do the cyberattacks using this type of ransomware. So, when Black Matter first started, this is what the Black Matter news looked like. So, you can think of it as almost any membership program, right? You have your news, you have some bug reports, some tickets, there's a blog, FAQ. So, it's kind of this own little underground economy, right? We
talk a lot about that in the book, but this should give you an idea of some of the ways that they speak. What I as an analyst would take from this is what I would expect to see. You can see that they highlight stable Windows software. So, they have an EXE and a selective DLL. They also mention they have a stable Linux software and one to target NAS. >> Yeah. >> So, when you think about how companies host all out of their most precious infrastructure, it's not just on the Windows systems that are desktops, it's Linux servers, at least it was several years ago and before everyone moved to the cloud and off prem, but a lot of really valuable things that a company would be very worried about would be on these NASs and these Linux systems. So, that's why you see a lot of the ransomware groups really incorporating at this time, I believe it's 2021 and forward, having these Linux lockers as well. It's not just a Windows >> Interesting. Yeah, interesting.
>> So, this gives us a couple different clues of some of what we're going to look for when we look at their malware. Then the next one I want to look at. So, you are now part of this ransomware program as an affiliate. So, you want to be able to build software. So, like I said, you would expect to see Windows and Linux, and then this one has a PowerShell as well. So, this is how you as an affiliate would be able to build your version of ransomware. So, again, you're not going to target medical institutions, you're not going to target uh state institutions. So, you'd build your ransomware and this is what you would deploy on your victim. So, in one of the chapters in this book, I talk a little bit about what techniques ransomware actors and cybercriminals will use to drop the ransomware across the system. So, if you're familiar with things like Active Directory, right?
That allows you a couple different opportunities cuz you don't want to just put the ransomware on one host or 10% of
the hosts because you want them to pay the ransom, so they're not going to want to do that if it's not really impactful. So, I talk about a couple different techniques that they use to spread it widely throughout the network to do the most damage. So, here's how you build your ransomware as an affiliate. So, this is another piece of the configuration. So, as you build your ransomware, you can customize it. You don't have to. This is what it looks like default. So, you can say what folders and files do I not want to encrypt? What processes do I want to kill? So, basically one of the things that ransomware wants to assume are sure ensure is that no pesky antivirus or
other sorts of, you know, software get in the way of encrypting as much as they can as fast as they can. So, this gives you as an analyst some clue what types of things to look for. Sometimes you see processes and services on the kill list. For example, ESXi ransomware and Linux ransomware, it'll often look for the different virtual machines. It'll shut those down first because basically they don't want to leave anything unencrypted cuz that's not as much incentive. >> So, you found this. This is off the dark web, right? >> Yep. So, part of how you do so is you
have to establish your reputation and trust. So, you can't just kind of show up to the dark web and sign up as an affiliate just right out the gate, right? And especially the interesting part was that Black Matter wasn't widely offered yet. So, it was something where based on past reputation, past demonstration of it being a trustworthy cyber criminal, you're able to establish that reputation and then you know, someone else saying, "Yep, this person is really cool. They're totally great. We should allow them in." Um, not going to get into exactly how one does that, but proving yourself in order to get access to these things is generally what you do. So, it's something where you can't just go in and do it. It takes years sometimes to establish that reputation to be included in these groups. So, I know a lot of people talk about, you know, can't we see people planning attacks on the dark web? That would be so nice, but they're not going to openly do that. A lot of the time they'll move to private chats.
Um, nobody can see into private chats unless they're part of it. So, that's something that we want to have visibility into. So, this is something where getting this access was really interesting because now you can kind of see what happens behind those closed doors and as defenders what we want to do is be able to stop these things before they start hurting companies and people. >> So, you've had to create accounts on the dark web that are trusted so that you can see a bunch of the stuff. >> Yeah. So, basically on the dark web it is something where you have to some some accounts you can just kind of create.
Um, other ones you either have to have some sort of vouch and we talk about or I talk about it in the book a little bit. So, either somebody has to vouch for you so they'd say, "David's really cool. I love him. Trust him. Let's let him in. He's done some great stuff for me." Or you have to put down money. So, basically you're trying to prove that you are someone who's trustworthy and kind of a really interesting thing on that reputation front is the idea of arbitration. So, if I am buying a tool from you, let's say there is somebody who is the guarantor, they will handle the exchange, but let's say that I bought a tool from you and it didn't work or I never paid you, then you would have something some sort of arbitration. So, you'd go in front of the forum mods and everyone states their case. It's almost like a dark web criminal court, right?
>> And it's happening in full view of everyone in the forum. So, like I said, reputation is incredibly important and if I'm accused of giving you really awful software or not paying you for your software, that's not good for my reputation. So, again, reputation is everything in order to get these accesses, these tools. Some tools and accesses are almost free to anybody, right? Anybody can really sign up to deploy a stealer. Anybody can, you know, go on a lot of these forums and chat and see what kind of credentials, which makes it so easy for a lot of people to get into being a cyber criminal and so easy to conduct these attacks, but to get into these higher-level forums, get some of these higher-level more interesting accesses, it takes time and establishing reputation. And that's a lot of the reason why we're never going to have open visibility into cyber attacks because obviously a lot of companies are monitoring for their own company on the dark web.
>> So, we saw the forums. Did you manage to get some malware that you can demonstrate from those from those forums? >> Yep. >> Brilliant. >> So, I worked with a partner who did a lot of some of the actor engagement portion of it, and I brought a lot of the technical >> still to it. >> Yeah. >> So, that was really kind of where I learned to do a lot of this myself. And what we were able to do is so he worked to help obtain the malware, >> Yeah. >> and then there are a lot of technical questions that I had as I was looking at it. And you can't say, "Excuse me, ransomware. Excuse me, would you be able to tell me? It's like, what are some ways that questions that I have could be answered with them?" So, together we work on some some way of saying, "Okay, well, how do we ask the ransomware operators, you know, how do we say, 'Oh, we like, you know, another build, the build's not working, things like that' in order to get samples that >> Yeah.
>> are additional." So, what you're looking at here is actually the first Black Matter that I ever got to reverse engineer. So, >> Wow. >> near and dear to my heart. >> I can imagine. Well, that's amazing. >> So, what I've done is I've gone through and I've labeled all the functions here. Um but, I want to highlight a couple of the different things. So, this is where it takes in all the command line arguments, and what it's going to do is what the command line arguments say. So, what I want to draw your attention to is here. So, if you've written code, you've probably seen comparison of string for whatever it is, but what you don't see here is that. So, one of the things like I said is malware authors really don't want their malware to be picked up by AV or EDR. So, what they'll do, uh as we saw in the previous example of Stealbit, encrypt the strings, uh obfuscate them in some way, but what BlackMatter did at was particularly interesting. So, what it did is it did a hash of the command line of the command.
>> Oh, oka





