1 00:00:00,000 --> 00:00:01,320 My name is Asher Davila. 2 00:00:01,320 --> 00:00:09,260 I'm the principal security researcher for Palo Alto Networks, mainly working on IoT and OT vulnerabilities and malware research. 3 00:00:09,260 --> 00:00:16,900 I've presented at multiple conferences including DEF CON, RSA, S4, and you can find me everywhere as Asher underscore Davila. 4 00:00:18,820 --> 00:00:20,000 Hello, everyone. 5 00:00:20,000 --> 00:00:21,360 My name is Cristobal Barret. 6 00:00:21,360 --> 00:00:24,880 I'm a senior principal security researcher working for Palo Alto Networks. 7 00:00:24,880 --> 00:00:33,360 I focus on detection engineering, especially in C2 frameworks malware, and I am part of the advanced threat prevention team. 8 00:00:33,520 --> 00:00:37,640 So everything about Gold Strike, anything like that, so I'm pretty much the owner of that. 9 00:00:37,820 --> 00:00:41,940 Previously, I have presented at Blahat Asia and the Blahat U.S. 10 00:00:41,940 --> 00:00:45,860 Arsenal and some other conferences as well. 11 00:00:45,860 --> 00:00:49,080 So you have the link in here if you want to connect to it. 12 00:00:50,320 --> 00:00:50,720 All right. 13 00:00:50,720 --> 00:00:54,020 So first of all, let's introduce the Golang. 14 00:00:54,020 --> 00:01:00,900 So Golang was designed by Robert Grissomier, Rob Pike, and Ken Thompson in 2007. 15 00:01:00,900 --> 00:01:05,080 It was firstly publicly released in November of 2009. 16 00:01:05,200 --> 00:01:08,740 And then some people know about the name. 17 00:01:08,740 --> 00:01:10,100 It's Go or Golang. 18 00:01:10,100 --> 00:01:15,000 So Go is actually the official programming language, but many people refer to it as Golang. 19 00:01:15,000 --> 00:01:24,360 So Golang is going to be easier in the case that you want to see more about the programming language, like, for example, searching the actual Google search, for example. 20 00:01:24,360 --> 00:01:26,680 All right. 21 00:01:26,680 --> 00:01:28,760 So why Go malware? 22 00:01:28,760 --> 00:01:33,360 So why is the interest of malware users using this programming language? 23 00:01:33,360 --> 00:01:36,360 So first of all, this is a cross-platform language. 24 00:01:36,360 --> 00:01:42,720 That means that we have support up to 16 operating systems. 25 00:01:42,820 --> 00:01:47,600 Also we have the binaries that are steadily compiled by default. 26 00:01:47,600 --> 00:01:52,260 That means that obviously we will be dealing with larger binaries. 27 00:01:52,260 --> 00:01:58,280 So these binaries can also be dynamically linked in the case that you are using the C Go implementation. 28 00:01:58,700 --> 00:02:02,600 Also Go produces self-contained binaries. 29 00:02:02,800 --> 00:02:13,320 So this is going to be good in terms of, for example, if you are a malware writer and you are working on these kind of projects using the Go language, so you will have really huge binaries. 30 00:02:13,320 --> 00:02:18,440 That means that for static analyzers it would be really difficult to deal with these kind of examples. 31 00:02:18,740 --> 00:02:22,680 Also you will find less dependence of external libraries. 32 00:02:22,680 --> 00:02:25,360 So it's going to be somehow good as well. 33 00:02:25,560 --> 00:02:32,040 So finally it is harder to analyze and reverse compared with some other programming languages like C or C++. 34 00:02:34,060 --> 00:02:36,740 So Go-based malware in the news. 35 00:02:36,740 --> 00:02:43,280 So as you can see here on this slide, so we have different companies with some of the research that they have done. 36 00:02:43,280 --> 00:02:48,600 So in our case for unit 42 we have the blog post related to the Go BruteForcer. 37 00:02:48,600 --> 00:02:51,460 This is a Go-based botnet. 38 00:02:51,460 --> 00:02:54,260 So it's actively harvesting web servers. 39 00:02:54,400 --> 00:03:00,800 And also we have some other companies reporting GovRat, for example, malware, which is targeting Linux routers. 40 00:03:00,800 --> 00:03:05,680 And also some other companies like, for example, Go-based Trojans as well. 41 00:03:05,680 --> 00:03:12,220 So as you can see here, some other companies are mentioning the malware created in Go is a trend and is here to stay. 42 00:03:12,220 --> 00:03:14,720 So let's find out. 43 00:03:15,080 --> 00:03:20,320 So we run some internal telemetry and then we gather some information almost like a year. 44 00:03:20,320 --> 00:03:23,460 And then we started to find some trends here. 45 00:03:23,540 --> 00:03:31,740 So we identified that a peak happening in February and March 2025. 46 00:03:31,740 --> 00:03:38,640 And we found different samples related to the botnet malware, coin miners and sleeper implants as well. 47 00:03:42,050 --> 00:03:45,810 Other Go-based malware we can see here in this table. 48 00:03:45,810 --> 00:03:47,870 So we have different malware families. 49 00:03:47,870 --> 00:03:49,570 The first one is SevaCryGo. 50 00:03:49,570 --> 00:03:53,870 So the purpose of this is just performing a recon, an exfiltration implant. 51 00:03:53,870 --> 00:03:56,710 This is being used by the APT2014. 52 00:03:56,950 --> 00:03:59,550 And the binary type is a Windows PE file. 53 00:04:00,110 --> 00:04:07,190 Also we have the second place, the Go tier, which is a wiper ransomware, which is also in the binary type of Windows PE. 54 00:04:07,530 --> 00:04:09,510 The third case we have PumaBot. 55 00:04:09,570 --> 00:04:18,330 PumaBot is just a malware which focuses on attacking IoT devices and it performs different malicious attacks, like for example, SSH brute force. 56 00:04:18,330 --> 00:04:20,950 This is a Linux ELF sample. 57 00:04:21,130 --> 00:04:25,990 And also finally we have the BotenaGo, which is an IoT scanner and exploiter. 58 00:04:25,990 --> 00:04:28,990 And also this is an ELF for Linux. 59 00:04:31,670 --> 00:04:37,770 In July 2024, we have also the first malware which is ICS-centric. 60 00:04:37,770 --> 00:04:39,490 This is called FrostyGoop. 61 00:04:39,490 --> 00:04:43,590 So this particular malware is attacking Modbus protocol. 62 00:04:43,590 --> 00:04:46,550 And also it was obviously, as you can infer, programming in Go. 63 00:04:46,550 --> 00:04:51,310 It was used against Ukraine in order to disrupt the critical infrastructure. 64 00:04:52,510 --> 00:05:01,030 So back then, Ashan and I, we did a specific research just to see what is going on about this kind of FrostyGoop. 65 00:05:01,030 --> 00:05:05,830 And then we identified something new, which is actually a new artifact, which is called GoEncrypt. 66 00:05:05,830 --> 00:05:16,110 And this is a secondary tool, an artifact, that apparently they are using to encrypt and decrypt configuration files that are based in JSON. 67 00:05:16,390 --> 00:05:22,790 So if you want to know more, we also included the QR code here if you want to see the deep analysis on this. 68 00:05:24,370 --> 00:05:24,970 All right. 69 00:05:24,970 --> 00:05:28,050 So the programs and all these challenges for Go. 70 00:05:28,050 --> 00:05:33,110 So first of all, we have the large file size, as I mentioned earlier. 71 00:05:33,110 --> 00:05:39,450 So this is going to be really good in case that you want to evade, for example, security scanners because of the file limitations. 72 00:05:39,450 --> 00:05:43,330 So this is actually true because we try different kind of cases. 73 00:05:43,330 --> 00:05:50,490 And if you have like really large files, the static analyzer is saying, well, I use a word mission and I don't go forward there. 74 00:05:50,490 --> 00:05:51,810 So it's bad, right? 75 00:05:51,950 --> 00:05:55,230 So the second thing is about the analysis complexity. 76 00:05:55,230 --> 00:06:01,730 So we know that for these Go binaries, we see a high function count. 77 00:06:01,730 --> 00:06:04,690 And obviously, this is because of the static linking. 78 00:06:05,010 --> 00:06:12,770 So if you deal with malware before, you will see that when you're dealing with a lot of functions, it's going to be really difficult for you to figure out what is going on. 79 00:06:13,450 --> 00:06:15,930 So this is also making it really difficult. 80 00:06:16,610 --> 00:06:20,010 The third one that I have is a tooling limitation. 81 00:06:20,010 --> 00:06:25,550 So right now, the most of the reverse engineering tools are designed to support C and C++ binaries. 82 00:06:25,750 --> 00:06:35,030 So obviously, in order to deal with the Go's unique characteristics, we just need to know which kind of tools we can use to fulfill the requirement here. 83 00:06:35,690 --> 00:06:39,170 Finally, we have the string handling. 84 00:06:39,290 --> 00:06:46,490 So unlike C and C++, we'll see that you are pretty much dealing with strings that are null terminated. 85 00:06:46,490 --> 00:06:53,670 So in strings, we have a specific structure, which is counting the byte elements of the array. 86 00:06:53,670 --> 00:07:00,230 And also, we have at the same time, the length of the byte array. 87 00:07:00,230 --> 00:07:03,810 So in this case, so we are dealing with two different things at the same time. 88 00:07:05,170 --> 00:07:10,330 So the tooling for Go analysis, so we have the disassemblers and the compilers. 89 00:07:10,330 --> 00:07:13,950 So we have R2, we have Jira, we have Binary Ninja. 90 00:07:14,010 --> 00:07:18,890 And on top of it, we can also use some other, for example, AI-assisted tools. 91 00:07:18,890 --> 00:07:25,270 So you can have R2 AI, we have R2 MCP, Jira, MCP, Sidekick. 92 00:07:25,270 --> 00:07:32,470 And also, you have additional tools like, for example, GoStrings, GoRedim, and Redress in order that you want to deal with some more complicated cases. 93 00:07:34,930 --> 00:07:35,830 All right. 94 00:07:37,590 --> 00:07:38,530 All right. 95 00:07:38,530 --> 00:07:42,210 So let's go to the section that says main difference, Go versus C. 96 00:07:42,290 --> 00:07:47,070 And you can see the first thing we tried to compare were two very similar programs. 97 00:07:47,070 --> 00:07:49,090 So just a hello world kind of a thing. 98 00:07:49,150 --> 00:07:50,550 So it says hello DEF CON. 99 00:07:50,550 --> 00:07:54,650 It has the Go version on the left and the C version on the right. 100 00:07:54,870 --> 00:07:57,270 So you can see they're very similar programs. 101 00:07:57,630 --> 00:08:02,470 But when we go to the next slide and see the sizes, the sizes are a huge difference. 102 00:08:02,470 --> 00:08:05,510 So for C, you can see the binary is 16K. 103 00:08:05,510 --> 00:08:08,490 But for the Go, it's 2.2 megabytes. 104 00:08:08,490 --> 00:08:12,470 So it's huge just for a simple program of a hello world style. 105 00:08:13,010 --> 00:08:15,570 In the next slide, we can see the binary info. 106 00:08:16,170 --> 00:08:18,750 And you can see, again, the sizes are pretty different. 107 00:08:19,930 --> 00:08:27,010 Some of the compilers, most of the time you're going to see that the Go binaries are mostly statically linked. 108 00:08:27,010 --> 00:08:32,890 And when they're dynamically linked, it's just because of some special scenario that I'm going to describe later on. 109 00:08:33,750 --> 00:08:41,690 And the next slide, if we see the string search, you're going to see the strings are one of the things that behave completely different from Go than C. 110 00:08:41,690 --> 00:08:48,430 So in Go, you see the first image, or the first part of the image is a C representation of the string. 111 00:08:48,430 --> 00:08:50,030 So you have a null terminator. 112 00:08:50,110 --> 00:08:53,710 So tools like string scan immediately identify when the string ends. 113 00:08:53,810 --> 00:08:57,950 So when it finds the null terminator, it says, okay, this is the end of the string. 114 00:08:58,090 --> 00:08:59,390 But in Go, that's not the case. 115 00:08:59,390 --> 00:09:04,690 You can see there's a chunk of garbage and a lot of strings all together. 116 00:09:04,850 --> 00:09:08,250 And the reason is because the way they behave is very different in Go. 117 00:09:08,250 --> 00:09:10,310 They don't have null terminated strings. 118 00:09:11,670 --> 00:09:14,330 In the next slide, you can see the number of functions. 119 00:09:14,670 --> 00:09:28,670 So we listed a number of functions of the program, of the same program, and the Go has 1,800 functions and C only 10. 120 00:09:29,150 --> 00:09:44,150 And in the next slide, if you see the disassembly, the disassembly is pretty much similar, not much changed, but immediately you can see that there's a lot more code on the assembly side of Go than C. 121 00:09:44,150 --> 00:09:56,230 It initializes a lot of the routines, run time things, and it creates a lot of ‑‑ I would say for analysis, some garbage code. 122 00:09:57,150 --> 00:10:00,370 And in the next slide, we can see the compiler view. 123 00:10:00,370 --> 00:10:07,190 The way we compile this was using PDG, which is the compiler of Ghidra that is embedded within Radare 2. 124 00:10:08,050 --> 00:10:13,450 And we tried to use most of ‑‑ a lot of open source tools for the entire presentation. 125 00:10:14,690 --> 00:10:20,310 So in this one, it's Radare and Ghidra are tools that go really well together. 126 00:10:20,310 --> 00:10:25,150 So you can use the compiler there and you can see it is integrated. 127 00:10:25,150 --> 00:10:30,930 And actually you don't need to install Ghidra to use Ghidra as a compiler inside of Radare. 128 00:10:30,930 --> 00:10:40,070 So in this one you can see even the compiler, like with no changes, the C version, you can immediately see that it spits out a code that says hello DEF CON. 129 00:10:40,210 --> 00:10:45,070 And in the Ghost version, you cannot immediately tell what is going on. 130 00:10:46,190 --> 00:10:48,350 So now let's go to the sections. 131 00:10:48,990 --> 00:10:54,430 And as many other binaries, you can see that section, like they have sections, right? 132 00:10:54,430 --> 00:11:03,730 But sections in Go binaries are kind of different or you're going to find different kinds of sections, like for example, Go build. 133 00:11:03,790 --> 00:11:12,010 So Go build info section is a section that is found on all the Go binaries that are either ELF or MACO. 134 00:11:12,010 --> 00:11:14,850 And PE files, they are in a different section. 135 00:11:14,850 --> 00:11:18,170 So you're not going to see it immediately there in the parsing of the sections. 136 00:11:18,170 --> 00:11:22,210 You're going to need to find it within the binary in the data sections. 137 00:11:22,470 --> 00:11:29,370 And then if it is compiled with Go mode, which is enabled by default, you're going to have a lot more information available. 138 00:11:29,910 --> 00:11:33,210 So by default, you're going to have way more information than a Strip C binary. 139 00:11:35,050 --> 00:11:45,250 And then we can see in the next slide that you can see the magic number of the section and you can find a lot of interesting things as a reverser is going to be very useful, like the Go version. 140 00:11:45,250 --> 00:11:51,110 Go version is very important because depending on the Go version, the magic numbers are going to be different. 141 00:11:51,650 --> 00:11:53,250 You can see the Go build info. 142 00:11:53,250 --> 00:11:58,590 So there are many things that are going to stand out and you can quickly identify if this is a Go binary or not. 143 00:11:58,590 --> 00:12:06,350 It also tells you the architecture, like in this case it's an AMD 64 and the operating system is a Linux machine. 144 00:12:06,350 --> 00:12:08,590 It was compiled on a Linux machine. 145 00:12:09,090 --> 00:12:13,250 And also it tells you some of the command line arguments that were used during the compilation. 146 00:12:13,250 --> 00:12:20,770 Of course, they are not all of them like explicitly stated, but are the ones that configuration of the build executed to compile the binary. 147 00:12:21,970 --> 00:12:30,510 Then we have the Go PC line table and that table is very important because it's going to act as a map. 148 00:12:30,830 --> 00:12:50,550 And that map is going to help the reverser to reconstruct the binary because in that section it's going to be, you're going to have them, if you go to the next slide in which there's an image that says magic number of the Go PC link table, well that magic number is what many tools use to identify and try to recover or to construct the binary. 149 00:12:50,630 --> 00:13:00,150 And that magic number, be very careful if you're trying to do your own scripts because that magic number changes depending on the version of the Go binary or the Go compiler that you use. 150 00:13:00,870 --> 00:13:04,070 So it is not always F1, FF, FF, FF. 151 00:13:04,570 --> 00:13:13,890 So just be careful about that because when I was building this script for this, I was like, hey, why it works for some binaries, it doesn't work for some other binaries and the reason is that magic number changes. 152 00:13:14,530 --> 00:13:20,010 And then you can see in the left side, in orange, the storing memory addresses. 153 00:13:20,430 --> 00:13:23,710 Those are the pointers to the program counter. 154 00:13:23,710 --> 00:13:28,510 So they are mapped directly to each of the lines on the assembly representation. 155 00:13:29,070 --> 00:13:35,970 And then you can see on the right side, those are the pointers to the metadata of each functions that are in the table. 156 00:13:36,150 --> 00:13:39,690 And then also you have things like the size of the functions table. 157 00:13:39,690 --> 00:13:45,430 And all of those things are going to be very important if you're building a tool that wants to parse this. 158 00:13:45,430 --> 00:13:50,830 And actually this is the most important thing that I want you to take home is this part for my side. 159 00:13:50,830 --> 00:13:56,530 So it's like if you have a binary that looks very weird, that your tools are not working, don't be afraid of that. 160 00:13:56,530 --> 00:14:03,570 Just read the documentation, try to see how the binary or the file that you're trying to parse is made of. 161 00:14:03,570 --> 00:14:12,370 And those magic numbers, how is it being parsed is going to be a key to help you to understand and parse and try to analyze the binary you're looking at. 162 00:14:13,210 --> 00:14:15,370 And in the next image you'll see the struct function. 163 00:14:15,370 --> 00:14:19,490 And the struct function, there's a link of the official documentation of Go. 164 00:14:19,550 --> 00:14:24,930 And in which you can see that it has a pointer, which is the start of the function. 165 00:14:24,930 --> 00:14:26,110 And also you have the name. 166 00:14:26,110 --> 00:14:31,350 And that's going to be very useful to try to reconstruct the binary with that information. 167 00:14:31,350 --> 00:14:36,790 So in your script you're going to parse what we mentioned in the last slide. 168 00:14:36,890 --> 00:14:40,190 And you're going to use that information to rename it in your tool. 169 00:14:41,630 --> 00:14:44,430 And then I'm going to mention some tooling. 170 00:14:44,430 --> 00:14:47,770 As I said, there's a slide that says tooling. 171 00:14:47,770 --> 00:14:52,430 So from there, I try to use mostly only open source tools. 172 00:14:52,430 --> 00:14:54,050 We try to use mostly open source tools. 173 00:14:54,050 --> 00:14:57,170 Of course I have to introduce some commercial ones. 174 00:14:57,170 --> 00:15:01,570 I know that you're open source enthusiasts and you love open source. 175 00:15:01,570 --> 00:15:02,070 I'm sorry. 176 00:15:02,070 --> 00:15:03,950 I hope I don't offend you. 177 00:15:04,710 --> 00:15:07,270 I try to not put any brands, just that Coca-Cola there. 178 00:15:07,270 --> 00:15:12,390 But other than that, I hope everything that is open source, anyone can do it at home. 179 00:15:12,690 --> 00:15:15,670 And in that part, you can see that there are two types of strings. 180 00:15:15,670 --> 00:15:16,590 String handling. 181 00:15:16,590 --> 00:15:17,990 One that is dynamically located. 182 00:15:17,990 --> 00:15:22,310 So it means that during run time it's going to be trying to reconstruct the string. 183 00:15:23,490 --> 00:15:31,650 And also you have statically located, which are already there, but they are just a huge chunk of charts that are not clearly defined. 184 00:15:31,930 --> 00:15:34,050 At least for the tools, of course. 185 00:15:34,350 --> 00:15:39,730 And even if you go to the next slide, when you say Ghidra, it says it supports Golang compiler. 186 00:15:39,750 --> 00:15:49,510 So even if you choose that option, when you try to open them, you're going to see that there are some caveats that it still doesn't completely construct the binary, especially for the string side. 187 00:15:49,550 --> 00:15:59,410 So the NCC group, very famous guys, they have this Go strings feature or it's like a plugin that you can install on Ghidra, for example. 188 00:15:59,410 --> 00:16:01,110 And they propose a flow. 189 00:16:01,190 --> 00:16:02,370 So they give you eight steps. 190 00:16:02,370 --> 00:16:04,610 Some of them are optional, as you can see there. 191 00:16:05,170 --> 00:16:11,150 But if you can see in the next image, I tried to run it in that order that they suggest. 192 00:16:12,370 --> 00:16:24,830 And in the image that says before and after running Go strings, you can see in the left, even though I already selected the Go compiler option in Ghidra, there are some strings that are not found. 193 00:16:24,830 --> 00:16:27,530 It's the same program that we've been analyzing. 194 00:16:27,690 --> 00:16:34,910 So in the right side, we see that after running the scripts in that order, then you can see the word Defcon. 195 00:16:34,910 --> 00:16:36,750 And it's well defined. 196 00:16:37,990 --> 00:16:47,010 But also I wanted to give something new, because many people have already talked about this, the problems of analyzing Go. 197 00:16:47,030 --> 00:16:53,230 But we wanted to do something more like something that is in the news, try to use AI. 198 00:16:53,450 --> 00:16:56,850 Of course, it's not everything about AI. 199 00:16:56,910 --> 00:16:59,210 Please don't think about that. 200 00:16:59,210 --> 00:17:00,950 I want to try to explain different things. 201 00:17:00,950 --> 00:17:04,490 And it's not about that AI is going to solve all the problems, right? 202 00:17:04,490 --> 00:17:07,230 It's going to act like a clippy. 203 00:17:07,830 --> 00:17:17,890 R2 AI actually is defined as kind of like a clippy that you remember that you were back in the day using Word, trying to write a love letter and say, oh, it looks like you're trying to write a love letter. 204 00:17:17,890 --> 00:17:19,050 Do you want me to help you? 205 00:17:19,050 --> 00:17:20,250 So it's going to be like that. 206 00:17:20,250 --> 00:17:22,350 It's going to suggest you some commands. 207 00:17:22,370 --> 00:17:30,910 Because Radare, if you haven't used it, it's a low level tool that compared to other big compilers, it doesn't start loading. 208 00:17:30,910 --> 00:17:34,910 And even as a debugger, it doesn't start at the main function. 209 00:17:34,910 --> 00:17:36,610 It starts at the entry point. 210 00:17:37,230 --> 00:17:39,630 And not even at the entry point, sorry, at the loader. 211 00:17:39,670 --> 00:17:40,690 So why? 212 00:17:40,690 --> 00:17:51,170 Because imagine you are trying to debug a vulnerability that happens at loading time and when the binary is loading and you already skipped that part until the entry point, you already missed that part. 213 00:17:51,170 --> 00:17:56,650 So that's why certain tools like this start at the very beginning and not at the entry point. 214 00:17:56,750 --> 00:17:58,070 So this is what they do. 215 00:17:58,070 --> 00:17:59,350 And they use mnemonics. 216 00:17:59,350 --> 00:18:02,030 So instead of commands, you supply mnemonics. 217 00:18:02,130 --> 00:18:08,210 And that's why it is very difficult to, if you haven't used a tool, if you haven't read the documentation, it's very hard to use it. 218 00:18:08,210 --> 00:18:13,150 So it's a, this tool is going to help you to ask questions to the tool. 219 00:18:13,150 --> 00:18:16,030 Like, hey, how do I open this function? 220 00:18:16,030 --> 00:18:20,570 Or how do I, how can I know the strings contained within this section? 221 00:18:20,570 --> 00:18:31,310 So that like Clippy is going to help you to answer those questions on how to use the tool without having to read the entire documentation. 222 00:18:31,650 --> 00:18:36,150 And then we use some commands that you can use to install. 223 00:18:37,390 --> 00:18:40,990 And how to set it up. 224 00:18:40,990 --> 00:18:41,110 Right? 225 00:18:41,110 --> 00:18:42,810 It has so many different use cases. 226 00:18:42,810 --> 00:18:47,830 You can use it as an assistant, as a compiler, as a crack me solver, as a CTF. 227 00:18:47,830 --> 00:18:50,430 So out of the box it can help you for a lot of things. 228 00:18:50,430 --> 00:18:53,690 But for more complex things it's not like the solution for everything. 229 00:18:53,690 --> 00:18:55,770 Like you still, it is not going to steal our jobs. 230 00:18:55,770 --> 00:18:58,210 So it's just going to be a side kick for us. 231 00:18:58,210 --> 00:19:03,030 It's just going to be someone that is going to be there for us to help us when you feel lonely. 232 00:19:03,190 --> 00:19:05,770 But it's actually not going to replace you. 233 00:19:06,030 --> 00:19:09,930 And then I just put some slides on how to set it up in case you want to try it at home. 234 00:19:09,930 --> 00:19:11,730 You need to define an API. 235 00:19:11,810 --> 00:19:13,970 So you can use a commercial one. 236 00:19:13,970 --> 00:19:16,850 You can use your own models that you have trained. 237 00:19:16,850 --> 00:19:17,890 You have a local model. 238 00:19:17,890 --> 00:19:19,490 You have a server running with your model. 239 00:19:19,490 --> 00:19:20,430 You can use it. 240 00:19:20,430 --> 00:19:23,790 You just need to define the provider, which they call the API. 241 00:19:23,790 --> 00:19:26,650 And then you need to define the model. 242 00:19:26,650 --> 00:19:31,870 In this case, for the first example, we used Gemini as a provider. 243 00:19:31,870 --> 00:19:35,330 And we used Gemini 2.5 pro for the model. 244 00:19:36,170 --> 00:19:37,650 And there are, it's very confusing. 245 00:19:37,650 --> 00:19:40,070 Everything in Radar is very confusing in terms of naming. 246 00:19:40,070 --> 00:19:45,850 But R2AI is actually a model that has different models or it's a component that has different models. 247 00:19:45,850 --> 00:19:50,990 And R2AI has a model called R2AI but it also has another model called DK. 248 00:19:51,270 --> 00:19:54,730 And that DK is going to be another way to decompile it. 249 00:19:54,730 --> 00:19:57,370 So as you know, Radar has different ways to decompile. 250 00:19:57,370 --> 00:20:00,910 Like you can use the compiler. 251 00:20:01,010 --> 00:20:15,190 But you can also use this new way to decompile binaries, which is you're going to ask the LLM to try to decompile it or translate the assembly into ‑‑ or as close as possible as source code. 252 00:20:15,330 --> 00:20:23,090 But the cool thing about it is you don't need to supply exactly ‑‑ you don't need to supply source ‑‑ sorry, assembly. 253 00:20:23,090 --> 00:20:25,670 Because I know models are not very well trained in assembly. 254 00:20:25,670 --> 00:20:28,650 So you can pass intermediate representations. 255 00:20:28,650 --> 00:20:31,790 So Radar by default has ECL, which is the intermediate representation. 256 00:20:31,790 --> 00:20:39,450 But you can use other intermediate representations that you can pass to the models and it can tell you ‑‑ and try to decompile the best it can. 257 00:20:39,710 --> 00:20:46,850 And for example, after the R2AI modes, there's a slide that I'm asking a question. 258 00:20:46,850 --> 00:20:50,690 It says R2AI minus A. 259 00:20:50,830 --> 00:20:53,870 And I ask the question, in what language was this program developed? 260 00:20:53,870 --> 00:20:57,030 So it suggests me ‑‑ it is not, by the way, this is not fully automated. 261 00:20:57,030 --> 00:20:59,570 It just suggests me the commands that I should execute. 262 00:20:59,630 --> 00:21:04,570 So you can see it suggests me to execute AAA, which is full analysis of the binary. 263 00:21:04,670 --> 00:21:09,550 It suggests me to analyze like the information of the binary. 264 00:21:09,550 --> 00:21:13,270 And it also suggests me to print all the functions from the binary. 265 00:21:13,270 --> 00:21:20,370 And then there is the output of those commands are going to be fed ‑‑ they were fed into the model. 266 00:21:20,370 --> 00:21:25,770 And then it answers with a ‑‑ in the slide that says R2AI assistant response. 267 00:21:25,770 --> 00:21:31,830 The assistant respondent, based on the analysis of the binary, it's clear that this program was developed in Go. 268 00:21:32,570 --> 00:21:43,150 So several pieces of evidence point to that this is Go because we found like this and those strings that clearly tells us that it's a Go. 269 00:21:43,150 --> 00:21:53,090 In this case it says that it found the function FMTF print line and some other garbage functions like for panic messages that indicates that it's a Go binary. 270 00:21:53,470 --> 00:21:55,330 And then we tried to use DK. 271 00:21:55,510 --> 00:21:59,610 As you can see in DK you can set up different models and different ways to compile it. 272 00:21:59,610 --> 00:22:04,490 In my case it was like just use ‑‑ make it as possible to look like C. 273 00:22:04,950 --> 00:22:06,970 And then it clearly did, right? 274 00:22:07,490 --> 00:22:13,510 They compiled it into ‑‑ it also gave me some context and the output that is predicting. 275 00:22:13,510 --> 00:22:18,090 It says, okay, the conclusion is that this program is printing hell of DEF CON to standard output. 276 00:22:18,630 --> 00:22:21,950 But also we use this MCP approach. 277 00:22:22,330 --> 00:22:26,190 It also ‑‑ you can use whatever provider that you want. 278 00:22:26,190 --> 00:22:31,130 In this case we use cloth for the MCP agent connecting to radar. 279 00:22:31,130 --> 00:22:33,270 And in this case this is fully automated. 280 00:22:33,410 --> 00:22:38,470 So if you follow through the slides, there is one slide that says automating the task. 281 00:22:38,550 --> 00:22:39,850 And then I ask a simple question. 282 00:22:39,850 --> 00:22:41,670 I said disassemble the binary. 283 00:22:41,950 --> 00:22:49,630 I pass the path to the binary in my computer, in my laptop locally and then I say tell me what the program is doing. 284 00:22:49,810 --> 00:22:53,250 So it tries to disassemble and here I don't have to interact with it. 285 00:22:53,250 --> 00:22:54,850 In the other one it suggests me commands. 286 00:22:54,850 --> 00:23:01,170 I have to click enter and I can modify the commands if I say, okay, this doesn't make too much sense. 287 00:23:01,170 --> 00:23:10,730 But in this case it's fully automated and it tells me key assembly analysis like binary characteristics and finally the expected output. 288 00:23:12,790 --> 00:23:13,450 All right. 289 00:23:13,450 --> 00:23:18,830 Now that we know a little bit more about Go, so let's go dive into the malware. 290 00:23:18,830 --> 00:23:23,130 So let's identify what's going on with Botanago IoT malware. 291 00:23:23,510 --> 00:23:28,390 So let's have some kind of introduction about the threat. 292 00:23:28,390 --> 00:23:31,090 So it was freely discovered in 2021. 293 00:23:31,090 --> 00:23:36,490 It targets IoT devices and also we have seen that a lot of vendors are part of this. 294 00:23:36,510 --> 00:23:46,230 So this malware performs scans and exploits more than 30 vulnerabilities and also sets backdoors upon exploitation and compromised machines. 295 00:23:46,410 --> 00:23:49,870 Also a listing of commands and drops additional shells. 296 00:23:49,870 --> 00:23:55,790 Also we have added here the SHA256 of the sample in case that you want to play with it. 297 00:23:55,870 --> 00:24:03,110 So this is a Go ELF64B dynamically linked and on strip binary as well. 298 00:24:03,430 --> 00:24:06,410 So we will look at the virus total information. 299 00:24:06,410 --> 00:24:15,130 You will see that there's a 41 out of the 66 vendors identified as malicious and also there's a CVE that I highlighted over here. 300 00:24:15,130 --> 00:24:26,870 So when we run the file command and we can obviously see the Go build ID which is basically there and also we use a redress info option just to see what other information. 301 00:24:26,870 --> 00:24:33,650 So in this case we have additional information like compiler version so you will see a lot of information besides of this. 302 00:24:35,070 --> 00:24:37,630 So let's see about CVEs and exploits. 303 00:24:37,630 --> 00:24:46,050 So we have a clue that's at least one and then when we just try to find the exploit for that we identify that the exploit database has at least one hit. 304 00:24:46,050 --> 00:24:49,890 So this one is mentioned in the GPON browsers. 305 00:24:49,890 --> 00:24:53,130 It's having authentication bypass and command injection. 306 00:24:53,770 --> 00:25:03,950 So if we read the description of this CVE it's targeting the Dasan GPON home browsers and you will see some URIs also included here. 307 00:25:04,730 --> 00:25:09,210 So the next slide is just a little bit of the context of the exploit. 308 00:25:09,210 --> 00:25:16,830 So in this case we just want to do some cross-referencing just to see which actual CVEs are related to the strings that we see here. 309 00:25:16,830 --> 00:25:33,910 So in this case we were able to identify two and also at the very bottom you will see that we run the strings command and then we did a grep just to see like for example the very first string which is x web and then whatever we can find also. 310 00:25:33,910 --> 00:25:39,410 So obviously you will see we're getting a lot of information starting from the string that we just look. 311 00:25:39,830 --> 00:25:43,010 So how and where are these strings referenced? 312 00:25:43,010 --> 00:25:48,170 So we can infer that everything is probably coming from the raw data section. 313 00:25:49,110 --> 00:25:55,810 So by using R2 there are different commands that you can display the additional information. 314 00:25:55,810 --> 00:26:04,430 So in this case we use a iz raw data in order to do a dump of the section and then looking for the same string. 315 00:26:04,510 --> 00:26:08,130 So in this case we just pretty much get the same kind of information, right? 316 00:26:08,130 --> 00:26:21,530 So one thing that we need to notice here is that we get the exploit payload but also a lot of different information which is mentioning like or at least giving us a clue that there's some sort of command injection as well. 317 00:26:21,530 --> 00:26:25,230 But you will see there's a bunch of suspicious information here. 318 00:26:25,230 --> 00:26:32,070 We see HTTP headers like really, really suspicious, some filenames, commands, wgets. 319 00:26:32,070 --> 00:26:34,830 It's kind of highly suspicious over here. 320 00:26:35,510 --> 00:26:41,750 So the next one is just we run the gore scene with the human option just to see what is going on. 321 00:26:41,750 --> 00:26:47,810 So obviously this tool performs an analysis on the binary and then we see also the go version. 322 00:26:47,810 --> 00:26:57,370 And also you can see the user functions, the start va, nva, the package name, the actual name, function name. 323 00:26:57,370 --> 00:27:00,990 In this case on the right side you will see survive with all this information. 324 00:27:00,990 --> 00:27:09,550 So if you are dealing with this kind of automation you can use the JSON format and then you will get this information really properly format. 325 00:27:10,370 --> 00:27:13,830 In the next slide we just want to see a quick assessment. 326 00:27:13,830 --> 00:27:16,690 We identify that there are several functions. 327 00:27:16,690 --> 00:27:21,790 Some of them the malware author actually mentions the function name as infect. 328 00:27:22,010 --> 00:27:23,950 So it's highly suspicious obviously. 329 00:27:23,950 --> 00:27:25,830 So it's interesting to look at. 330 00:27:26,070 --> 00:27:30,290 And also if you see the function names also contains even the vendor. 331 00:27:30,290 --> 00:27:37,810 Like for example infect function Alcatel or D-Link or Fiber Home, Jipon Fiber, Hongdian, Live DVR. 332 00:27:37,810 --> 00:27:38,530 So vendors. 333 00:27:38,530 --> 00:27:39,690 So they are targeting these vendors. 334 00:27:39,690 --> 00:27:41,690 It's pretty clear what is the purpose. 335 00:27:41,750 --> 00:27:43,350 And also we have supporting functions. 336 00:27:43,350 --> 00:27:47,310 Like for example we have the main function but also we have the reverse shell. 337 00:27:47,310 --> 00:27:49,370 We have the scanner init exploit. 338 00:27:49,370 --> 00:27:50,410 So highly suspicious. 339 00:27:50,410 --> 00:27:53,890 We just want to know what's going on afterwards. 340 00:27:54,850 --> 00:28:03,130 So here we use Radare with a piping with redress to perform an initial evaluation in the next slide. 341 00:28:03,130 --> 00:28:08,070 So we do the mapping and then we see a lot of information here. 342 00:28:08,070 --> 00:28:14,050 Obviously again we have the compiler version and then on the right side you'll see the redress information. 343 00:28:14,050 --> 00:28:21,510 So this one is also giving you additional information about the functions and the number of lines where you can get more information about this. 344 00:28:22,830 --> 00:28:26,070 In the next slide we have the GDRAW symbol tree. 345 00:28:26,070 --> 00:28:29,850 So it's pretty much the same information, a little bit more like visually speaking better. 346 00:28:29,850 --> 00:28:32,350 So you will get this information, same one. 347 00:28:32,350 --> 00:28:35,950 We see a lot of pretty much the same functions here. 348 00:28:38,330 --> 00:28:41,490 The next slide is the strings analysis of a network IOC. 349 00:28:41,490 --> 00:28:45,970 So as you can see we know that all this is happening. 350 00:28:45,970 --> 00:28:47,950 So we just want to make sure what is going on. 351 00:28:47,950 --> 00:28:55,970 So we just want to see if we can do a search looking for the get request or URIs or whatever and also the post. 352 00:28:56,230 --> 00:28:57,370 So what is happening? 353 00:28:57,370 --> 00:29:02,330 So on the left side you'll see all the gets and on the right side you will see all the posts. 354 00:29:02,370 --> 00:29:04,930 So we have a lot, plenty of information to dig in. 355 00:29:06,290 --> 00:29:08,890 Next slide is a GDRAW exploit payload search. 356 00:29:08,890 --> 00:29:15,010 So in this case we already know what is the and then let's use GDRAW just to see what is going on. 357 00:29:15,010 --> 00:29:19,550 So we perform a string search and then we got the match. 358 00:29:20,150 --> 00:29:22,370 And in the next slide we will see the entire thing. 359 00:29:22,370 --> 00:29:24,590 So we have step number one, we got a match. 360 00:29:24,590 --> 00:29:31,990 Step number two, we identify where are the addresses where these ASCII strings are stored. 361 00:29:32,010 --> 00:29:43,290 And then we in step number three, we'll see that address variable and then we see the function, the referring function, which is the effect function GP on OG. 362 00:29:43,470 --> 00:29:49,150 And then finally we see, all right, so we identify the address for the function, what is happening next. 363 00:29:49,150 --> 00:29:56,990 Usually when you are dealing with malware you go and then go to the function, identify the parameters and do the whatever reverse engineering actions. 364 00:29:56,990 --> 00:29:59,630 In this case we don't want to do that. 365 00:29:59,630 --> 00:30:01,390 Let's use GDRAW MCP. 366 00:30:01,390 --> 00:30:02,250 It's kind of new. 367 00:30:02,250 --> 00:30:03,410 Let's try it out. 368 00:30:03,410 --> 00:30:04,730 All right. 369 00:30:04,730 --> 00:30:09,530 So before that we just want to set up the GDRAW MCP and Cloud. 370 00:30:09,530 --> 00:30:11,190 So it's quite simple. 371 00:30:11,190 --> 00:30:27,410 So you need to get the GDRAW MCP code from GitHub and then you need to install the extension to make sure that the configure developer plugins is already there and also you can configure Cloud in order to use a local MCP server. 372 00:30:27,850 --> 00:30:30,810 The Python script is already included so everything is fine. 373 00:30:30,810 --> 00:30:35,270 So let's perform a function analysis using GDRAW and Cloud. 374 00:30:35,270 --> 00:30:39,590 So the very first question is what is the purpose of that actual function? 375 00:30:39,590 --> 00:30:41,910 So we just pass the function address here. 376 00:30:41,910 --> 00:30:43,990 So you can see there's a lot of information. 377 00:30:43,990 --> 00:30:45,210 This is a purpose. 378 00:30:45,210 --> 00:30:48,610 What are the different red flags indicating that this malicious intent? 379 00:30:48,610 --> 00:30:54,770 We have different like additional like clues, network connections, payload delivery. 380 00:30:54,770 --> 00:30:59,690 We have a string manipulation, data transformation, memory management and so on. 381 00:31:01,050 --> 00:31:15,250 So in the next slide we see the network IOCs and we just want to know what is happening so we are able to match between the DAT core referencing and then the POST request which is obviously part of the strings that we already know. 382 00:31:15,790 --> 00:31:24,510 So now that we have this information I just ask like collect all the DAT addresses related to the particular function and attempt to generate the final payload. 383 00:31:24,590 --> 00:31:28,410 So the Cloud was saying okay so let's analyze it. 384 00:31:28,410 --> 00:31:29,650 We have some key findings. 385 00:31:29,650 --> 00:31:31,230 We identified the attack method. 386 00:31:31,230 --> 00:31:32,910 We have the dot addresses. 387 00:31:33,710 --> 00:31:37,970 The AI identified a command injection, even its infrastructure. 388 00:31:37,970 --> 00:31:42,310 So command and control, some IPs, host names, target scope. 389 00:31:42,310 --> 00:31:44,870 That's pretty much really useful. 390 00:31:45,010 --> 00:31:49,190 So in the next slide we just want to see what about the DAT variable resolution. 391 00:31:49,190 --> 00:32:01,390 So even the AI was able to give us some information about the network interface connection data, the HTTP request components, and also the terminator, and also including even the primary attack payload. 392 00:32:01,390 --> 00:32:06,190 That means that with all this information we can somehow reconstruct the actual attack. 393 00:32:07,050 --> 00:32:14,010 So in this slide I also included the data addresses as well. 394 00:32:14,070 --> 00:32:19,530 So I asked okay so let's reconstruct it, the actual payload. 395 00:32:19,530 --> 00:32:20,870 So I got these results. 396 00:32:20,870 --> 00:32:27,050 So in the next slide you will see this is the primary attack vector, this HTTP request, and you will see the actual payload. 397 00:32:27,210 --> 00:32:29,310 But something is not right here. 398 00:32:29,310 --> 00:32:37,810 So even though that we got something, it's been BusyBox, Wget, something makes somehow sense but probably not at all. 399 00:32:37,810 --> 00:32:39,410 I'm going to explain it further. 400 00:32:40,630 --> 00:32:43,070 All right so now let's reconstruct it. 401 00:32:43,070 --> 00:32:49,790 So we get references here, the data, and then against the actual local variable in the compiler. 402 00:32:49,910 --> 00:32:57,210 And then I manually somehow created a table in order to identify the parts that are related to these addresses. 403 00:32:57,210 --> 00:33:02,730 But if you can see, I see the URL decoded string, which is pretty clear. 404 00:33:02,730 --> 00:33:10,510 So it's an IP just requesting the G file, both cases, to the command injection. 405 00:33:10,970 --> 00:33:15,150 So in the next slide I created the final HTTP exploit request header. 406 00:33:15,150 --> 00:33:18,070 But still something is interesting here. 407 00:33:18,070 --> 00:33:20,210 You see the user agent is Mozilla. 408 00:33:20,210 --> 00:33:24,730 Mozilla is not WL, so it's kind of odd here. 409 00:33:25,050 --> 00:33:28,410 But even though this is going to be useful for detection purposes. 410 00:33:28,410 --> 00:33:34,710 But also the command injection, as I explained, so this is the URL decoded version, so it's pretty much the same kind of case. 411 00:33:35,190 --> 00:33:41,750 So I asked the cloud to provide CVE identification, specifically on the GET and POST requests. 412 00:33:41,750 --> 00:33:46,470 And then we got a lot of information, seems to be good, but we need to investigate further. 413 00:33:46,650 --> 00:33:50,890 So I also identify what are the attack vectors found. 414 00:33:50,890 --> 00:33:56,730 So for each of the requests, cloud was able to provide a lot of additional information, including CVE. 415 00:33:56,890 --> 00:34:01,670 So it's pretty useful, but again, we just need to analyze further. 416 00:34:01,670 --> 00:34:08,670 So I just got the POST information, and I'm just trying to identify if it's true or not. 417 00:34:08,670 --> 00:34:13,590 So we got CVE hits, but also we have true positives and false positives. 418 00:34:13,590 --> 00:34:20,150 I used manually check, so those are not part of the actual attacks, but there are some valid, some invalid. 419 00:34:20,150 --> 00:34:21,910 So you're just going to be cautious about it. 420 00:34:22,890 --> 00:34:26,230 Same kind of case for the HTTP GET. 421 00:34:26,730 --> 00:34:31,890 We got a lot of command injections in here, and then we see some offset calculations. 422 00:34:31,890 --> 00:34:38,310 So we know that the exploit string is already there, and then we just want to use a radar in order to identify. 423 00:34:38,310 --> 00:34:43,330 So we got the string, but also the sizes from the listing. 424 00:34:43,650 --> 00:34:53,190 And then if you can see on the right side, so we got the exact post, I mean, the information based on the addresses and the data sizes as well. 425 00:34:53,830 --> 00:34:59,390 So I asked the AI to reconstruct the full script, the exploit script, the POC. 426 00:34:59,390 --> 00:35:06,530 But what I noticed is that the main payload was not actually the original one that I was expecting, or the original one that is being used. 427 00:35:06,530 --> 00:35:10,350 So instead, it uses a different string, which is odd. 428 00:35:10,350 --> 00:35:16,450 So I used manually check, and then the payload is actually Hongdian payload, which is a different device. 429 00:35:16,450 --> 00:35:23,190 But when I double checked, I even extracted the malware code just to see if everything is right. 430 00:35:23,190 --> 00:35:27,030 So I just confirmed that the payload is incorrect here. 431 00:35:27,030 --> 00:35:31,050 So we just need to use the GPOG payload instead. 432 00:35:31,050 --> 00:35:32,690 All right. 433 00:35:32,690 --> 00:35:36,470 So one thing that we can do is also trying to identify unknown functions. 434 00:35:36,470 --> 00:35:39,430 In this case, we have a phone underscore, and then the address. 435 00:35:39,430 --> 00:35:42,970 So obviously, the AI is able to help you on that. 436 00:35:43,510 --> 00:35:46,690 So the to-do list, we need to validate all the payload generated. 437 00:35:46,690 --> 00:35:48,630 We need to validate all the CVs. 438 00:35:48,630 --> 00:35:53,870 We let the AI analyze additional interesting functions, like the scanner in exploits. 439 00:35:53,870 --> 00:35:56,350 We need to reconstruct all the HTTP requests. 440 00:35:56,350 --> 00:36:00,570 And also, if possible, run the sample in a sandbox system. 441 00:36:00,570 --> 00:36:03,350 So now let's jump to the Puma bot. 442 00:36:04,650 --> 00:36:05,230 Sure. 443 00:36:05,230 --> 00:36:06,550 This is a simple malware. 444 00:36:06,550 --> 00:36:09,390 It's also targeting IoT malware, and it's programming Go. 445 00:36:09,390 --> 00:36:14,570 So let's try to follow the same examples as we did in the Hello World using Radaria. 446 00:36:14,610 --> 00:36:20,750 So we see the binary, well, first we see Envirus total, that it is identified as malicious. 447 00:36:21,030 --> 00:36:25,770 We check the information of the binary using Radaria executing I and capital I. 448 00:36:25,770 --> 00:36:27,530 It says the language is Go. 449 00:36:27,530 --> 00:36:35,030 But it says that it was compiled, when it says that it was, if it was statically compiled or not, it says false. 450 00:36:35,030 --> 00:36:36,970 So it means it was not statically compiled. 451 00:36:37,070 --> 00:36:42,890 And you say, wait, but you at the beginning said that the binaries in Go are completely statically linked, right? 452 00:36:42,890 --> 00:36:56,350 But the problem here, or not a problem, there's certain caveats, is that when you have, there are certain invocations to the C runtime or the C libraries from your computer, it is going to use something called C Go. 453 00:36:56,410 --> 00:37:02,030 And C Go is a way to invoke C functions and linking C libraries from your Go code. 454 00:37:02,450 --> 00:37:06,470 So in those cases that's where you're going to see that it was not statically compiled. 455 00:37:06,670 --> 00:37:12,490 So in those cases, like, if some tools are going to struggle with that, and that's why you need to have that in mind. 456 00:37:12,510 --> 00:37:22,610 And I promise you this is one of the last commercial tools, and these guys were really nice to providing us licenses for Sidekick. 457 00:37:22,730 --> 00:37:26,070 And Sidekick, it's a plug‑in for Binary Ninja. 458 00:37:26,630 --> 00:37:30,510 And then it is going to be, as its name implies, it's just your Sidekick, right? 459 00:37:30,510 --> 00:37:33,530 It's going to be a small chat in which you can ask small questions. 460 00:37:33,530 --> 00:37:37,350 Actually they recommend you don't ask, like, analyze the entire binary. 461 00:37:37,350 --> 00:37:40,330 Just certain tasks, like, what is this string used for? 462 00:37:40,550 --> 00:37:43,110 Try to find C2s or those kind of questions. 463 00:37:43,110 --> 00:37:48,050 So I tried to make a very generic question just to see how it behaved, because this is my first time using it. 464 00:37:48,050 --> 00:37:51,110 Like, what are the most important behaviors of the malware? 465 00:37:51,110 --> 00:37:54,610 And it tells you that it is using SSH brute force attacks. 466 00:37:54,610 --> 00:37:57,250 It tells you the C2 that it is connecting to. 467 00:37:57,250 --> 00:38:01,410 It is telling you that it has interesting strings such as Pumatronics. 468 00:38:01,710 --> 00:38:04,230 And that is related to a malware family. 469 00:38:04,350 --> 00:38:19,190 So even though it was just a very generic question, as an analyzer, and sometimes you as a malware analyst you're trying to see if this is a new family, if this is a new malware, if it's just a variant, this immediately is going to tell you what kind of things you are dealing with. 470 00:38:19,750 --> 00:38:28,590 So as you can see here, it just tries to ask questions for specific functions that were in the binary. 471 00:38:28,590 --> 00:38:32,170 For example, what is the main brute function doing? 472 00:38:32,250 --> 00:38:43,090 And it tells you, like, okay, it is enumerating IPs that is reading from certain URLs and then it is passing that to try SSH logging functions. 473 00:38:43,090 --> 00:38:47,230 So I ask, okay, now describe me what try SSH logging is doing. 474 00:38:47,390 --> 00:38:52,270 So I, of course, as Chris mentioned, verifying what the output was. 475 00:38:52,270 --> 00:38:56,530 And, yeah, most of the time I think it was very precise on what it was mentioning. 476 00:38:56,850 --> 00:39:02,010 For example, it says, like, okay, it is doing this brute force attack. 477 00:39:02,010 --> 00:39:05,890 It does retries, up to five retries. 478 00:39:06,190 --> 00:39:09,050 And then if it has a success login, it's going to tell you. 479 00:39:09,050 --> 00:39:10,710 If not, it goes to the next one. 480 00:39:10,730 --> 00:39:15,410 And then it tells you, I ask, like, hey, what is the C2 domain and what is it connecting to? 481 00:39:15,410 --> 00:39:19,250 So it gave me a very ‑‑ it responded correctly. 482 00:39:19,250 --> 00:39:22,810 However, it missed some strings that were important as well. 483 00:39:22,810 --> 00:39:28,810 So I went back to the cloud version and just asked, hey, what are the C2s that you can find here? 484 00:39:28,810 --> 00:39:35,010 And it gave me a complete list of the domain and where the files that it was trying to retrieve. 485 00:39:35,650 --> 00:39:47,210 And finally, well, I asked the question, is this ‑‑ looks like based on what you already told me and of the reports that we have been gathering, it looks like a Puma bot malware. 486 00:39:47,210 --> 00:39:48,150 Is it correct? 487 00:39:48,150 --> 00:39:48,990 Is this a Puma bot? 488 00:39:48,990 --> 00:39:50,050 Can you confirm it? 489 00:39:50,050 --> 00:39:53,630 And it asked, yeah, like, yeah, I can confirm that this is a Puma tronic. 490 00:39:53,630 --> 00:40:02,010 It is a Puma bot variant and it has a Puma tronics reference of the U name after executing U name command. 491 00:40:02,010 --> 00:40:08,830 And basically Puma tronics is a Brazilian manufacturer of surveillance systems and traffic camera systems. 492 00:40:09,070 --> 00:40:11,830 So, yeah, it's likely targeting these systems, right? 493 00:40:11,830 --> 00:40:17,710 And finally, one of the functions that was really interesting was the system service function. 494 00:40:17,810 --> 00:40:22,210 So the last question, I think was the last question, is what is this main function used for? 495 00:40:22,430 --> 00:40:28,110 And it tells you that it is ‑‑ it doesn't tell you that it's being used for evasion or persistence. 496 00:40:28,110 --> 00:40:28,890 You can infer that. 497 00:40:28,890 --> 00:40:30,630 As I said, it's just a side kick. 498 00:40:30,630 --> 00:40:36,850 So it is telling you that it uses a service file for ready server service. 499 00:40:36,910 --> 00:40:40,450 And that is using exec start to create the service, right? 500 00:40:40,450 --> 00:40:43,810 And it gives you the path, which is leave Redis. 501 00:40:44,830 --> 00:40:57,650 But then if you check into the binary, it says that it configures the program and, like, if you go and do the manual analysis, you're going to see that it is doing this, writing this service called my SQI. 502 00:40:57,650 --> 00:41:03,650 Instead of my SQL, this is not an L, it's a capital I. 503 00:41:03,650 --> 00:41:05,950 So my SQI service, right? 504 00:41:05,950 --> 00:41:10,430 So it is disguising and it is using ‑‑ being used for persistence. 505 00:41:11,870 --> 00:41:12,470 All right. 506 00:41:12,470 --> 00:41:17,370 Now let's talk about R2 AI versus Goblin EXE. 507 00:41:17,370 --> 00:41:19,530 This is our reverse me CTF challenge. 508 00:41:19,870 --> 00:41:22,670 So this is a Go, obviously. 509 00:41:23,030 --> 00:41:23,870 Malware. 510 00:41:23,870 --> 00:41:26,510 Well, it's benign for this purpose, right? 511 00:41:26,510 --> 00:41:27,230 It's reverse me. 512 00:41:27,230 --> 00:41:30,630 So we have here the GDRA symbol tree. 513 00:41:30,630 --> 00:41:32,690 You will see some unknown functions here. 514 00:41:32,690 --> 00:41:34,330 We also see the headers. 515 00:41:34,330 --> 00:41:35,770 Headers are quite interesting. 516 00:41:35,770 --> 00:41:37,230 So it's ninjas don't cry. 517 00:41:37,230 --> 00:41:39,190 So that's a meaningful name. 518 00:41:39,450 --> 00:41:42,070 But also we just ask Cloud to see what is going on. 519 00:41:42,070 --> 00:41:45,370 So some key findings, obviously, this is a packer crypter. 520 00:41:45,910 --> 00:41:47,550 Some pales in there. 521 00:41:47,550 --> 00:41:50,550 So the section names, just as we already know. 522 00:41:50,550 --> 00:42:00,570 And also anti‑analysis features, so stripped symbols, custom packing, dynamic API loading, uses load library A, so something is happening here, right? 523 00:42:00,730 --> 00:42:01,070 All right. 524 00:42:01,070 --> 00:42:02,910 So let's use R2 AI. 525 00:42:02,910 --> 00:42:07,470 So we define the model that we are going to use and then we start asking questions. 526 00:42:07,470 --> 00:42:10,270 So is this reverse me CTF challenge? 527 00:42:10,270 --> 00:42:12,390 It is also trying to solve it. 528 00:42:12,390 --> 00:42:14,370 It does not contain any plain strings. 529 00:42:14,370 --> 00:42:16,690 So we got the guides. 530 00:42:16,690 --> 00:42:20,250 So we start typing kind of information, getting information back. 531 00:42:20,590 --> 00:42:27,470 And then obviously, while we are just traversing to this information, you will see the Go Build ID. 532 00:42:27,490 --> 00:42:30,790 So it identifies the AI as a Go Build ID. 533 00:42:30,790 --> 00:42:33,210 It examines Forter. 534 00:42:33,390 --> 00:42:35,550 Let's see what is going on in between. 535 00:42:35,670 --> 00:42:39,550 So it says now I need to understand where the encrypted packet data starts. 536 00:42:39,550 --> 00:42:41,790 So it started looking at the sections. 537 00:42:41,790 --> 00:42:44,310 It found the sections, displayed the sections. 538 00:42:44,710 --> 00:42:46,590 Interesting, the sections have initial names. 539 00:42:46,590 --> 00:42:47,690 Ninjas don't cry. 540 00:42:47,690 --> 00:42:49,450 This confirms it's a custom packed binary. 541 00:42:49,450 --> 00:42:50,510 I don't know why. 542 00:42:50,590 --> 00:42:53,070 It is an indicator that this is going to be custom. 543 00:42:53,070 --> 00:42:54,310 It's just a random name. 544 00:42:54,310 --> 00:42:58,530 But yeah, it goes and starts analyzing this kind of next things. 545 00:42:58,530 --> 00:43:03,990 It identifies within the sections of version 5.00LOL. 546 00:43:03,990 --> 00:43:06,830 So it starts analyzing, analyzing. 547 00:43:07,750 --> 00:43:11,930 The LOL signature suggests that this may have a custom packed. 548 00:43:11,930 --> 00:43:15,230 It analyzes Forter, Forter and Forter. 549 00:43:15,230 --> 00:43:18,430 Okay, it is attempting to decompress information as well. 550 00:43:18,430 --> 00:43:23,350 So it is really, really trying really hard to see what is going on with this reverse me. 551 00:43:24,150 --> 00:43:30,190 So the emulation and debugging, so the AI is really, really trying hard. 552 00:43:30,190 --> 00:43:40,210 So you're trying to see, even though this is a PE file running on a Linux system, the AI was attempting to emulate and to debug the commands, what is going on. 553 00:43:40,210 --> 00:43:41,990 So after all, no luck. 554 00:43:42,590 --> 00:43:44,250 So getting stuck. 555 00:43:44,330 --> 00:43:50,410 So we got additional information, starting decompressing algorithms, nothing was found. 556 00:43:50,910 --> 00:43:52,430 So final result and questions. 557 00:43:52,430 --> 00:43:53,690 So R2I, zero. 558 00:43:53,690 --> 00:43:55,130 Goblin EXE, one. 559 00:43:55,450 --> 00:44:00,650 Emulation debugging, so good efforts but not enough to solve the reverse me. 560 00:44:01,130 --> 00:44:04,730 Problems dealing with packers, so what about crypters, right? 561 00:44:04,730 --> 00:44:06,630 Probably a little bit more complicated. 562 00:44:06,770 --> 00:44:09,510 So strictly speaking, the reverse me is quite simple. 563 00:44:09,770 --> 00:44:14,610 But are we lacking of context here or what else is required? 564 00:44:15,530 --> 00:44:18,290 So you can beat the AI, let's find out. 565 00:44:18,290 --> 00:44:24,090 So we included the QR code in order that you want to see the, download the sample and then you can play around. 566 00:44:26,510 --> 00:44:33,530 And finally, the key takeaways of this presentation, as I said at the beginning, is don't be afraid of opening irregular file structures. 567 00:44:33,890 --> 00:44:37,130 I think that's the core of reverse engineering. 568 00:44:37,730 --> 00:44:47,950 If what you're trying to open does not match any regular kind of file, just read documentation or try to understand what it's doing from scratch. 569 00:44:48,010 --> 00:44:59,270 And don't be afraid, like if it doesn't load at the, like when you load, when you're starting doing reverse engineering, you load this into your tool, it doesn't properly like loads or parses the information on the file. 570 00:44:59,330 --> 00:44:59,930 It doesn't matter. 571 00:44:59,930 --> 00:45:09,530 Don't be afraid of just read the documentation, try to figure out how to, how is the compiler or how the compiler build a binary. 572 00:45:09,750 --> 00:45:15,330 Also, what we tried to show here was build a hybrid toolkit, right? 573 00:45:15,330 --> 00:45:17,070 So AI is definitely great. 574 00:45:17,070 --> 00:45:18,070 It's going to help us. 575 00:45:18,070 --> 00:45:19,030 It's going to make us more efficient. 576 00:45:19,030 --> 00:45:24,630 But definitely don't rely completely on it because as you can see, it made mistakes. 577 00:45:24,630 --> 00:45:27,370 It doesn't properly identify some things. 578 00:45:27,570 --> 00:45:34,490 In the challenge, the CTF challenge that Chris was describing, it was trying to look for like regular compression algorithms. 579 00:45:34,490 --> 00:45:43,850 But if the challenge, sometimes if the challenge contains something that is custom made, man, maybe that's going to be really struggling for AI to solve. 580 00:45:44,350 --> 00:45:46,090 And yeah. 581 00:45:47,230 --> 00:45:52,590 Also, we just need to, we don't need to take the AI response for granted. 582 00:45:52,590 --> 00:45:54,550 So we just need to always validate. 583 00:45:54,610 --> 00:45:59,210 Many people I heard that, you know what, if they are saying yes, just trust. 584 00:45:59,290 --> 00:46:00,370 So don't do it. 585 00:46:00,730 --> 00:46:01,670 Double check. 586 00:46:02,650 --> 00:46:14,990 So but even though we can use AI to automate your things, for example, it is very good if you are dealing with a lot of samples every day, not only one, imagine thousands or I don't know, it's kind of difficult to deal with this. 587 00:46:14,990 --> 00:46:19,190 So if we can leverage the AI to do the works for that, it's going to be better. 588 00:46:19,190 --> 00:46:24,450 So just filter them out and then you can just focus on the things that really matters. 589 00:46:24,770 --> 00:46:26,650 So this is just a guideline. 590 00:46:26,650 --> 00:46:29,470 You don't need to use all the tools that we showed today. 591 00:46:29,470 --> 00:46:30,910 So it depends, right? 592 00:46:30,910 --> 00:46:36,090 So depending on the requirement, it's the kind of the tools that you will be using, the strategy that you will be using. 593 00:46:36,790 --> 00:46:42,230 There's no specific guideline to do when you're dealing with, you know, malware in this case. 594 00:46:42,230 --> 00:46:45,650 So just use whatever you feel comfortable using. 595 00:46:45,650 --> 00:46:47,090 And that's pretty much all. 596 00:46:48,150 --> 00:47:02,230 So in this slide, we have the QR codes for the IoT enterprise solution that we have, and also the IoT related research blog post that the unit 42 had done during this time. 597 00:47:02,250 --> 00:47:06,170 So if you want to take a look, so you can go ahead and check. 598 00:47:06,290 --> 00:47:10,070 We also included the open source links that we discussed today. 599 00:47:10,070 --> 00:47:14,730 So you can easily get from GitHub and then you can play around. 600 00:47:14,990 --> 00:47:22,070 And also, if you have any other questions, I think we have still five minutes left. 601 00:47:22,070 --> 00:47:23,330 So we are open. 602 00:47:23,330 --> 00:47:23,990 No? 603 00:47:24,150 --> 00:47:26,570 Well, we don't have it. 604 00:47:26,570 --> 00:47:31,090 But we can... you have our contact details, so reach out. 605 00:47:31,090 --> 00:47:31,590 Thank you.