start	end	text
0	1320	My name is Asher Davila.
1320	9260	I'm the principal security researcher for Palo Alto Networks, mainly working on IoT and OT vulnerabilities and malware research.
9260	16900	I've presented at multiple conferences including DEF CON, RSA, S4, and you can find me everywhere as Asher underscore Davila.
18820	20000	Hello, everyone.
20000	21360	My name is Cristobal Barret.
21360	24880	I'm a senior principal security researcher working for Palo Alto Networks.
24880	33360	I focus on detection engineering, especially in C2 frameworks malware, and I am part of the advanced threat prevention team.
33520	37640	So everything about Gold Strike, anything like that, so I'm pretty much the owner of that.
37820	41940	Previously, I have presented at Blahat Asia and the Blahat U.S.
41940	45860	Arsenal and some other conferences as well.
45860	49080	So you have the link in here if you want to connect to it.
50320	50720	All right.
50720	54020	So first of all, let's introduce the Golang.
54020	60900	So Golang was designed by Robert Grissomier, Rob Pike, and Ken Thompson in 2007.
60900	65080	It was firstly publicly released in November of 2009.
65200	68740	And then some people know about the name.
68740	70100	It's Go or Golang.
70100	75000	So Go is actually the official programming language, but many people refer to it as Golang.
75000	84360	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.
84360	86680	All right.
86680	88760	So why Go malware?
88760	93360	So why is the interest of malware users using this programming language?
93360	96360	So first of all, this is a cross-platform language.
96360	102720	That means that we have support up to 16 operating systems.
102820	107600	Also we have the binaries that are steadily compiled by default.
107600	112260	That means that obviously we will be dealing with larger binaries.
112260	118280	So these binaries can also be dynamically linked in the case that you are using the C Go implementation.
118700	122600	Also Go produces self-contained binaries.
122800	133320	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.
133320	138440	That means that for static analyzers it would be really difficult to deal with these kind of examples.
138740	142680	Also you will find less dependence of external libraries.
142680	145360	So it's going to be somehow good as well.
145560	152040	So finally it is harder to analyze and reverse compared with some other programming languages like C or C++.
154060	156740	So Go-based malware in the news.
156740	163280	So as you can see here on this slide, so we have different companies with some of the research that they have done.
163280	168600	So in our case for unit 42 we have the blog post related to the Go BruteForcer.
168600	171460	This is a Go-based botnet.
171460	174260	So it's actively harvesting web servers.
174400	180800	And also we have some other companies reporting GovRat, for example, malware, which is targeting Linux routers.
180800	185680	And also some other companies like, for example, Go-based Trojans as well.
185680	192220	So as you can see here, some other companies are mentioning the malware created in Go is a trend and is here to stay.
192220	194720	So let's find out.
195080	200320	So we run some internal telemetry and then we gather some information almost like a year.
200320	203460	And then we started to find some trends here.
203540	211740	So we identified that a peak happening in February and March 2025.
211740	218640	And we found different samples related to the botnet malware, coin miners and sleeper implants as well.
222050	225810	Other Go-based malware we can see here in this table.
225810	227870	So we have different malware families.
227870	229570	The first one is SevaCryGo.
229570	233870	So the purpose of this is just performing a recon, an exfiltration implant.
233870	236710	This is being used by the APT2014.
236950	239550	And the binary type is a Windows PE file.
240110	247190	Also we have the second place, the Go tier, which is a wiper ransomware, which is also in the binary type of Windows PE.
247530	249510	The third case we have PumaBot.
249570	258330	PumaBot is just a malware which focuses on attacking IoT devices and it performs different malicious attacks, like for example, SSH brute force.
258330	260950	This is a Linux ELF sample.
261130	265990	And also finally we have the BotenaGo, which is an IoT scanner and exploiter.
265990	268990	And also this is an ELF for Linux.
271670	277770	In July 2024, we have also the first malware which is ICS-centric.
277770	279490	This is called FrostyGoop.
279490	283590	So this particular malware is attacking Modbus protocol.
283590	286550	And also it was obviously, as you can infer, programming in Go.
286550	291310	It was used against Ukraine in order to disrupt the critical infrastructure.
292510	301030	So back then, Ashan and I, we did a specific research just to see what is going on about this kind of FrostyGoop.
301030	305830	And then we identified something new, which is actually a new artifact, which is called GoEncrypt.
305830	316110	And this is a secondary tool, an artifact, that apparently they are using to encrypt and decrypt configuration files that are based in JSON.
316390	322790	So if you want to know more, we also included the QR code here if you want to see the deep analysis on this.
324370	324970	All right.
324970	328050	So the programs and all these challenges for Go.
328050	333110	So first of all, we have the large file size, as I mentioned earlier.
333110	339450	So this is going to be really good in case that you want to evade, for example, security scanners because of the file limitations.
339450	343330	So this is actually true because we try different kind of cases.
343330	350490	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.
350490	351810	So it's bad, right?
351950	355230	So the second thing is about the analysis complexity.
355230	361730	So we know that for these Go binaries, we see a high function count.
361730	364690	And obviously, this is because of the static linking.
365010	372770	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.
373450	375930	So this is also making it really difficult.
376610	380010	The third one that I have is a tooling limitation.
380010	385550	So right now, the most of the reverse engineering tools are designed to support C and C++ binaries.
385750	395030	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.
395690	399170	Finally, we have the string handling.
399290	406490	So unlike C and C++, we'll see that you are pretty much dealing with strings that are null terminated.
406490	413670	So in strings, we have a specific structure, which is counting the byte elements of the array.
413670	420230	And also, we have at the same time, the length of the byte array.
420230	423810	So in this case, so we are dealing with two different things at the same time.
425170	430330	So the tooling for Go analysis, so we have the disassemblers and the compilers.
430330	433950	So we have R2, we have Jira, we have Binary Ninja.
434010	438890	And on top of it, we can also use some other, for example, AI-assisted tools.
438890	445270	So you can have R2 AI, we have R2 MCP, Jira, MCP, Sidekick.
445270	452470	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.
454930	455830	All right.
457590	458530	All right.
458530	462210	So let's go to the section that says main difference, Go versus C.
462290	467070	And you can see the first thing we tried to compare were two very similar programs.
467070	469090	So just a hello world kind of a thing.
469150	470550	So it says hello DEF CON.
470550	474650	It has the Go version on the left and the C version on the right.
474870	477270	So you can see they're very similar programs.
477630	482470	But when we go to the next slide and see the sizes, the sizes are a huge difference.
482470	485510	So for C, you can see the binary is 16K.
485510	488490	But for the Go, it's 2.2 megabytes.
488490	492470	So it's huge just for a simple program of a hello world style.
493010	495570	In the next slide, we can see the binary info.
496170	498750	And you can see, again, the sizes are pretty different.
499930	507010	Some of the compilers, most of the time you're going to see that the Go binaries are mostly statically linked.
507010	512890	And when they're dynamically linked, it's just because of some special scenario that I'm going to describe later on.
513750	521690	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.
521690	528430	So in Go, you see the first image, or the first part of the image is a C representation of the string.
528430	530030	So you have a null terminator.
530110	533710	So tools like string scan immediately identify when the string ends.
533810	537950	So when it finds the null terminator, it says, okay, this is the end of the string.
538090	539390	But in Go, that's not the case.
539390	544690	You can see there's a chunk of garbage and a lot of strings all together.
544850	548250	And the reason is because the way they behave is very different in Go.
548250	550310	They don't have null terminated strings.
551670	554330	In the next slide, you can see the number of functions.
554670	568670	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.
569150	584150	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.
584150	596230	It initializes a lot of the routines, run time things, and it creates a lot of ‑‑ I would say for analysis, some garbage code.
597150	600370	And in the next slide, we can see the compiler view.
600370	607190	The way we compile this was using PDG, which is the compiler of Ghidra that is embedded within Radare 2.
608050	613450	And we tried to use most of ‑‑ a lot of open source tools for the entire presentation.
614690	620310	So in this one, it's Radare and Ghidra are tools that go really well together.
620310	625150	So you can use the compiler there and you can see it is integrated.
625150	630930	And actually you don't need to install Ghidra to use Ghidra as a compiler inside of Radare.
630930	640070	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.
640210	645070	And in the Ghost version, you cannot immediately tell what is going on.
646190	648350	So now let's go to the sections.
648990	654430	And as many other binaries, you can see that section, like they have sections, right?
654430	663730	But sections in Go binaries are kind of different or you're going to find different kinds of sections, like for example, Go build.
663790	672010	So Go build info section is a section that is found on all the Go binaries that are either ELF or MACO.
672010	674850	And PE files, they are in a different section.
674850	678170	So you're not going to see it immediately there in the parsing of the sections.
678170	682210	You're going to need to find it within the binary in the data sections.
682470	689370	And then if it is compiled with Go mode, which is enabled by default, you're going to have a lot more information available.
689910	693210	So by default, you're going to have way more information than a Strip C binary.
695050	705250	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.
705250	711110	Go version is very important because depending on the Go version, the magic numbers are going to be different.
711650	713250	You can see the Go build info.
713250	718590	So there are many things that are going to stand out and you can quickly identify if this is a Go binary or not.
718590	726350	It also tells you the architecture, like in this case it's an AMD 64 and the operating system is a Linux machine.
726350	728590	It was compiled on a Linux machine.
729090	733250	And also it tells you some of the command line arguments that were used during the compilation.
733250	740770	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.
741970	750510	Then we have the Go PC line table and that table is very important because it's going to act as a map.
750830	770550	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.
770630	780150	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.
780870	784070	So it is not always F1, FF, FF, FF.
784570	793890	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.
794530	800010	And then you can see in the left side, in orange, the storing memory addresses.
800430	803710	Those are the pointers to the program counter.
803710	808510	So they are mapped directly to each of the lines on the assembly representation.
809070	815970	And then you can see on the right side, those are the pointers to the metadata of each functions that are in the table.
816150	819690	And then also you have things like the size of the functions table.
819690	825430	And all of those things are going to be very important if you're building a tool that wants to parse this.
825430	830830	And actually this is the most important thing that I want you to take home is this part for my side.
830830	836530	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.
836530	843570	Just read the documentation, try to see how the binary or the file that you're trying to parse is made of.
843570	852370	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.
853210	855370	And in the next image you'll see the struct function.
855370	859490	And the struct function, there's a link of the official documentation of Go.
859550	864930	And in which you can see that it has a pointer, which is the start of the function.
864930	866110	And also you have the name.
866110	871350	And that's going to be very useful to try to reconstruct the binary with that information.
871350	876790	So in your script you're going to parse what we mentioned in the last slide.
876890	880190	And you're going to use that information to rename it in your tool.
881630	884430	And then I'm going to mention some tooling.
884430	887770	As I said, there's a slide that says tooling.
887770	892430	So from there, I try to use mostly only open source tools.
892430	894050	We try to use mostly open source tools.
894050	897170	Of course I have to introduce some commercial ones.
897170	901570	I know that you're open source enthusiasts and you love open source.
901570	902070	I'm sorry.
902070	903950	I hope I don't offend you.
904710	907270	I try to not put any brands, just that Coca-Cola there.
907270	912390	But other than that, I hope everything that is open source, anyone can do it at home.
912690	915670	And in that part, you can see that there are two types of strings.
915670	916590	String handling.
916590	917990	One that is dynamically located.
917990	922310	So it means that during run time it's going to be trying to reconstruct the string.
923490	931650	And also you have statically located, which are already there, but they are just a huge chunk of charts that are not clearly defined.
931930	934050	At least for the tools, of course.
934350	939730	And even if you go to the next slide, when you say Ghidra, it says it supports Golang compiler.
939750	949510	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.
949550	959410	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.
959410	961110	And they propose a flow.
961190	962370	So they give you eight steps.
962370	964610	Some of them are optional, as you can see there.
965170	971150	But if you can see in the next image, I tried to run it in that order that they suggest.
972370	984830	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.
984830	987530	It's the same program that we've been analyzing.
987690	994910	So in the right side, we see that after running the scripts in that order, then you can see the word Defcon.
994910	996750	And it's well defined.
997990	1007010	But also I wanted to give something new, because many people have already talked about this, the problems of analyzing Go.
1007030	1013230	But we wanted to do something more like something that is in the news, try to use AI.
1013450	1016850	Of course, it's not everything about AI.
1016910	1019210	Please don't think about that.
1019210	1020950	I want to try to explain different things.
1020950	1024490	And it's not about that AI is going to solve all the problems, right?
1024490	1027230	It's going to act like a clippy.
1027830	1037890	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.
1037890	1039050	Do you want me to help you?
1039050	1040250	So it's going to be like that.
1040250	1042350	It's going to suggest you some commands.
1042370	1050910	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.
1050910	1054910	And even as a debugger, it doesn't start at the main function.
1054910	1056610	It starts at the entry point.
1057230	1059630	And not even at the entry point, sorry, at the loader.
1059670	1060690	So why?
1060690	1071170	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.
1071170	1076650	So that's why certain tools like this start at the very beginning and not at the entry point.
1076750	1078070	So this is what they do.
1078070	1079350	And they use mnemonics.
1079350	1082030	So instead of commands, you supply mnemonics.
1082130	1088210	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.
1088210	1093150	So it's a, this tool is going to help you to ask questions to the tool.
1093150	1096030	Like, hey, how do I open this function?
1096030	1100570	Or how do I, how can I know the strings contained within this section?
1100570	1111310	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.
1111650	1116150	And then we use some commands that you can use to install.
1117390	1120990	And how to set it up.
1120990	1121110	Right?
1121110	1122810	It has so many different use cases.
1122810	1127830	You can use it as an assistant, as a compiler, as a crack me solver, as a CTF.
1127830	1130430	So out of the box it can help you for a lot of things.
1130430	1133690	But for more complex things it's not like the solution for everything.
1133690	1135770	Like you still, it is not going to steal our jobs.
1135770	1138210	So it's just going to be a side kick for us.
1138210	1143030	It's just going to be someone that is going to be there for us to help us when you feel lonely.
1143190	1145770	But it's actually not going to replace you.
1146030	1149930	And then I just put some slides on how to set it up in case you want to try it at home.
1149930	1151730	You need to define an API.
1151810	1153970	So you can use a commercial one.
1153970	1156850	You can use your own models that you have trained.
1156850	1157890	You have a local model.
1157890	1159490	You have a server running with your model.
1159490	1160430	You can use it.
1160430	1163790	You just need to define the provider, which they call the API.
1163790	1166650	And then you need to define the model.
1166650	1171870	In this case, for the first example, we used Gemini as a provider.
1171870	1175330	And we used Gemini 2.5 pro for the model.
1176170	1177650	And there are, it's very confusing.
1177650	1180070	Everything in Radar is very confusing in terms of naming.
1180070	1185850	But R2AI is actually a model that has different models or it's a component that has different models.
1185850	1190990	And R2AI has a model called R2AI but it also has another model called DK.
1191270	1194730	And that DK is going to be another way to decompile it.
1194730	1197370	So as you know, Radar has different ways to decompile.
1197370	1200910	Like you can use the compiler.
1201010	1215190	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.
1215330	1223090	But the cool thing about it is you don't need to supply exactly ‑‑ you don't need to supply source ‑‑ sorry, assembly.
1223090	1225670	Because I know models are not very well trained in assembly.
1225670	1228650	So you can pass intermediate representations.
1228650	1231790	So Radar by default has ECL, which is the intermediate representation.
1231790	1239450	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.
1239710	1246850	And for example, after the R2AI modes, there's a slide that I'm asking a question.
1246850	1250690	It says R2AI minus A.
1250830	1253870	And I ask the question, in what language was this program developed?
1253870	1257030	So it suggests me ‑‑ it is not, by the way, this is not fully automated.
1257030	1259570	It just suggests me the commands that I should execute.
1259630	1264570	So you can see it suggests me to execute AAA, which is full analysis of the binary.
1264670	1269550	It suggests me to analyze like the information of the binary.
1269550	1273270	And it also suggests me to print all the functions from the binary.
1273270	1280370	And then there is the output of those commands are going to be fed ‑‑ they were fed into the model.
1280370	1285770	And then it answers with a ‑‑ in the slide that says R2AI assistant response.
1285770	1291830	The assistant respondent, based on the analysis of the binary, it's clear that this program was developed in Go.
1292570	1303150	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.
1303150	1313090	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.
1313470	1315330	And then we tried to use DK.
1315510	1319610	As you can see in DK you can set up different models and different ways to compile it.
1319610	1324490	In my case it was like just use ‑‑ make it as possible to look like C.
1324950	1326970	And then it clearly did, right?
1327490	1333510	They compiled it into ‑‑ it also gave me some context and the output that is predicting.
1333510	1338090	It says, okay, the conclusion is that this program is printing hell of DEF CON to standard output.
1338630	1341950	But also we use this MCP approach.
1342330	1346190	It also ‑‑ you can use whatever provider that you want.
1346190	1351130	In this case we use cloth for the MCP agent connecting to radar.
1351130	1353270	And in this case this is fully automated.
1353410	1358470	So if you follow through the slides, there is one slide that says automating the task.
1358550	1359850	And then I ask a simple question.
1359850	1361670	I said disassemble the binary.
1361950	1369630	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.
1369810	1373250	So it tries to disassemble and here I don't have to interact with it.
1373250	1374850	In the other one it suggests me commands.
1374850	1381170	I have to click enter and I can modify the commands if I say, okay, this doesn't make too much sense.
1381170	1390730	But in this case it's fully automated and it tells me key assembly analysis like binary characteristics and finally the expected output.
1392790	1393450	All right.
1393450	1398830	Now that we know a little bit more about Go, so let's go dive into the malware.
1398830	1403130	So let's identify what's going on with Botanago IoT malware.
1403510	1408390	So let's have some kind of introduction about the threat.
1408390	1411090	So it was freely discovered in 2021.
1411090	1416490	It targets IoT devices and also we have seen that a lot of vendors are part of this.
1416510	1426230	So this malware performs scans and exploits more than 30 vulnerabilities and also sets backdoors upon exploitation and compromised machines.
1426410	1429870	Also a listing of commands and drops additional shells.
1429870	1435790	Also we have added here the SHA256 of the sample in case that you want to play with it.
1435870	1443110	So this is a Go ELF64B dynamically linked and on strip binary as well.
1443430	1446410	So we will look at the virus total information.
1446410	1455130	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.
1455130	1466870	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.
1466870	1473650	So in this case we have additional information like compiler version so you will see a lot of information besides of this.
1475070	1477630	So let's see about CVEs and exploits.
1477630	1486050	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.
1486050	1489890	So this one is mentioned in the GPON browsers.
1489890	1493130	It's having authentication bypass and command injection.
1493770	1503950	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.
1504730	1509210	So the next slide is just a little bit of the context of the exploit.
1509210	1516830	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.
1516830	1533910	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.
1533910	1539410	So obviously you will see we're getting a lot of information starting from the string that we just look.
1539830	1543010	So how and where are these strings referenced?
1543010	1548170	So we can infer that everything is probably coming from the raw data section.
1549110	1555810	So by using R2 there are different commands that you can display the additional information.
1555810	1564430	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.
1564510	1568130	So in this case we just pretty much get the same kind of information, right?
1568130	1581530	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.
1581530	1585230	But you will see there's a bunch of suspicious information here.
1585230	1592070	We see HTTP headers like really, really suspicious, some filenames, commands, wgets.
1592070	1594830	It's kind of highly suspicious over here.
1595510	1601750	So the next one is just we run the gore scene with the human option just to see what is going on.
1601750	1607810	So obviously this tool performs an analysis on the binary and then we see also the go version.
1607810	1617370	And also you can see the user functions, the start va, nva, the package name, the actual name, function name.
1617370	1620990	In this case on the right side you will see survive with all this information.
1620990	1629550	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.
1630370	1633830	In the next slide we just want to see a quick assessment.
1633830	1636690	We identify that there are several functions.
1636690	1641790	Some of them the malware author actually mentions the function name as infect.
1642010	1643950	So it's highly suspicious obviously.
1643950	1645830	So it's interesting to look at.
1646070	1650290	And also if you see the function names also contains even the vendor.
1650290	1657810	Like for example infect function Alcatel or D-Link or Fiber Home, Jipon Fiber, Hongdian, Live DVR.
1657810	1658530	So vendors.
1658530	1659690	So they are targeting these vendors.
1659690	1661690	It's pretty clear what is the purpose.
1661750	1663350	And also we have supporting functions.
1663350	1667310	Like for example we have the main function but also we have the reverse shell.
1667310	1669370	We have the scanner init exploit.
1669370	1670410	So highly suspicious.
1670410	1673890	We just want to know what's going on afterwards.
1674850	1683130	So here we use Radare with a piping with redress to perform an initial evaluation in the next slide.
1683130	1688070	So we do the mapping and then we see a lot of information here.
1688070	1694050	Obviously again we have the compiler version and then on the right side you'll see the redress information.
1694050	1701510	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.
1702830	1706070	In the next slide we have the GDRAW symbol tree.
1706070	1709850	So it's pretty much the same information, a little bit more like visually speaking better.
1709850	1712350	So you will get this information, same one.
1712350	1715950	We see a lot of pretty much the same functions here.
1718330	1721490	The next slide is the strings analysis of a network IOC.
1721490	1725970	So as you can see we know that all this is happening.
1725970	1727950	So we just want to make sure what is going on.
1727950	1735970	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.
1736230	1737370	So what is happening?
1737370	1742330	So on the left side you'll see all the gets and on the right side you will see all the posts.
1742370	1744930	So we have a lot, plenty of information to dig in.
1746290	1748890	Next slide is a GDRAW exploit payload search.
1748890	1755010	So in this case we already know what is the and then let's use GDRAW just to see what is going on.
1755010	1759550	So we perform a string search and then we got the match.
1760150	1762370	And in the next slide we will see the entire thing.
1762370	1764590	So we have step number one, we got a match.
1764590	1771990	Step number two, we identify where are the addresses where these ASCII strings are stored.
1772010	1783290	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.
1783470	1789150	And then finally we see, all right, so we identify the address for the function, what is happening next.
1789150	1796990	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.
1796990	1799630	In this case we don't want to do that.
1799630	1801390	Let's use GDRAW MCP.
1801390	1802250	It's kind of new.
1802250	1803410	Let's try it out.
1803410	1804730	All right.
1804730	1809530	So before that we just want to set up the GDRAW MCP and Cloud.
1809530	1811190	So it's quite simple.
1811190	1827410	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.
1827850	1830810	The Python script is already included so everything is fine.
1830810	1835270	So let's perform a function analysis using GDRAW and Cloud.
1835270	1839590	So the very first question is what is the purpose of that actual function?
1839590	1841910	So we just pass the function address here.
1841910	1843990	So you can see there's a lot of information.
1843990	1845210	This is a purpose.
1845210	1848610	What are the different red flags indicating that this malicious intent?
1848610	1854770	We have different like additional like clues, network connections, payload delivery.
1854770	1859690	We have a string manipulation, data transformation, memory management and so on.
1861050	1875250	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.
1875790	1884510	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.
1884590	1888410	So the Cloud was saying okay so let's analyze it.
1888410	1889650	We have some key findings.
1889650	1891230	We identified the attack method.
1891230	1892910	We have the dot addresses.
1893710	1897970	The AI identified a command injection, even its infrastructure.
1897970	1902310	So command and control, some IPs, host names, target scope.
1902310	1904870	That's pretty much really useful.
1905010	1909190	So in the next slide we just want to see what about the DAT variable resolution.
1909190	1921390	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.
1921390	1926190	That means that with all this information we can somehow reconstruct the actual attack.
1927050	1934010	So in this slide I also included the data addresses as well.
1934070	1939530	So I asked okay so let's reconstruct it, the actual payload.
1939530	1940870	So I got these results.
1940870	1947050	So in the next slide you will see this is the primary attack vector, this HTTP request, and you will see the actual payload.
1947210	1949310	But something is not right here.
1949310	1957810	So even though that we got something, it's been BusyBox, Wget, something makes somehow sense but probably not at all.
1957810	1959410	I'm going to explain it further.
1960630	1963070	All right so now let's reconstruct it.
1963070	1969790	So we get references here, the data, and then against the actual local variable in the compiler.
1969910	1977210	And then I manually somehow created a table in order to identify the parts that are related to these addresses.
1977210	1982730	But if you can see, I see the URL decoded string, which is pretty clear.
1982730	1990510	So it's an IP just requesting the G file, both cases, to the command injection.
1990970	1995150	So in the next slide I created the final HTTP exploit request header.
1995150	1998070	But still something is interesting here.
1998070	2000210	You see the user agent is Mozilla.
2000210	2004730	Mozilla is not WL, so it's kind of odd here.
2005050	2008410	But even though this is going to be useful for detection purposes.
2008410	2014710	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.
2015190	2021750	So I asked the cloud to provide CVE identification, specifically on the GET and POST requests.
2021750	2026470	And then we got a lot of information, seems to be good, but we need to investigate further.
2026650	2030890	So I also identify what are the attack vectors found.
2030890	2036730	So for each of the requests, cloud was able to provide a lot of additional information, including CVE.
2036890	2041670	So it's pretty useful, but again, we just need to analyze further.
2041670	2048670	So I just got the POST information, and I'm just trying to identify if it's true or not.
2048670	2053590	So we got CVE hits, but also we have true positives and false positives.
2053590	2060150	I used manually check, so those are not part of the actual attacks, but there are some valid, some invalid.
2060150	2061910	So you're just going to be cautious about it.
2062890	2066230	Same kind of case for the HTTP GET.
2066730	2071890	We got a lot of command injections in here, and then we see some offset calculations.
2071890	2078310	So we know that the exploit string is already there, and then we just want to use a radar in order to identify.
2078310	2083330	So we got the string, but also the sizes from the listing.
2083650	2093190	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.
2093830	2099390	So I asked the AI to reconstruct the full script, the exploit script, the POC.
2099390	2106530	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.
2106530	2110350	So instead, it uses a different string, which is odd.
2110350	2116450	So I used manually check, and then the payload is actually Hongdian payload, which is a different device.
2116450	2123190	But when I double checked, I even extracted the malware code just to see if everything is right.
2123190	2127030	So I just confirmed that the payload is incorrect here.
2127030	2131050	So we just need to use the GPOG payload instead.
2131050	2132690	All right.
2132690	2136470	So one thing that we can do is also trying to identify unknown functions.
2136470	2139430	In this case, we have a phone underscore, and then the address.
2139430	2142970	So obviously, the AI is able to help you on that.
2143510	2146690	So the to-do list, we need to validate all the payload generated.
2146690	2148630	We need to validate all the CVs.
2148630	2153870	We let the AI analyze additional interesting functions, like the scanner in exploits.
2153870	2156350	We need to reconstruct all the HTTP requests.
2156350	2160570	And also, if possible, run the sample in a sandbox system.
2160570	2163350	So now let's jump to the Puma bot.
2164650	2165230	Sure.
2165230	2166550	This is a simple malware.
2166550	2169390	It's also targeting IoT malware, and it's programming Go.
2169390	2174570	So let's try to follow the same examples as we did in the Hello World using Radaria.
2174610	2180750	So we see the binary, well, first we see Envirus total, that it is identified as malicious.
2181030	2185770	We check the information of the binary using Radaria executing I and capital I.
2185770	2187530	It says the language is Go.
2187530	2195030	But it says that it was compiled, when it says that it was, if it was statically compiled or not, it says false.
2195030	2196970	So it means it was not statically compiled.
2197070	2202890	And you say, wait, but you at the beginning said that the binaries in Go are completely statically linked, right?
2202890	2216350	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.
2216410	2222030	And C Go is a way to invoke C functions and linking C libraries from your Go code.
2222450	2226470	So in those cases that's where you're going to see that it was not statically compiled.
2226670	2232490	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.
2232510	2242610	And I promise you this is one of the last commercial tools, and these guys were really nice to providing us licenses for Sidekick.
2242730	2246070	And Sidekick, it's a plug‑in for Binary Ninja.
2246630	2250510	And then it is going to be, as its name implies, it's just your Sidekick, right?
2250510	2253530	It's going to be a small chat in which you can ask small questions.
2253530	2257350	Actually they recommend you don't ask, like, analyze the entire binary.
2257350	2260330	Just certain tasks, like, what is this string used for?
2260550	2263110	Try to find C2s or those kind of questions.
2263110	2268050	So I tried to make a very generic question just to see how it behaved, because this is my first time using it.
2268050	2271110	Like, what are the most important behaviors of the malware?
2271110	2274610	And it tells you that it is using SSH brute force attacks.
2274610	2277250	It tells you the C2 that it is connecting to.
2277250	2281410	It is telling you that it has interesting strings such as Pumatronics.
2281710	2284230	And that is related to a malware family.
2284350	2299190	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.
2299750	2308590	So as you can see here, it just tries to ask questions for specific functions that were in the binary.
2308590	2312170	For example, what is the main brute function doing?
2312250	2323090	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.
2323090	2327230	So I ask, okay, now describe me what try SSH logging is doing.
2327390	2332270	So I, of course, as Chris mentioned, verifying what the output was.
2332270	2336530	And, yeah, most of the time I think it was very precise on what it was mentioning.
2336850	2342010	For example, it says, like, okay, it is doing this brute force attack.
2342010	2345890	It does retries, up to five retries.
2346190	2349050	And then if it has a success login, it's going to tell you.
2349050	2350710	If not, it goes to the next one.
2350730	2355410	And then it tells you, I ask, like, hey, what is the C2 domain and what is it connecting to?
2355410	2359250	So it gave me a very ‑‑ it responded correctly.
2359250	2362810	However, it missed some strings that were important as well.
2362810	2368810	So I went back to the cloud version and just asked, hey, what are the C2s that you can find here?
2368810	2375010	And it gave me a complete list of the domain and where the files that it was trying to retrieve.
2375650	2387210	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.
2387210	2388150	Is it correct?
2388150	2388990	Is this a Puma bot?
2388990	2390050	Can you confirm it?
2390050	2393630	And it asked, yeah, like, yeah, I can confirm that this is a Puma tronic.
2393630	2402010	It is a Puma bot variant and it has a Puma tronics reference of the U name after executing U name command.
2402010	2408830	And basically Puma tronics is a Brazilian manufacturer of surveillance systems and traffic camera systems.
2409070	2411830	So, yeah, it's likely targeting these systems, right?
2411830	2417710	And finally, one of the functions that was really interesting was the system service function.
2417810	2422210	So the last question, I think was the last question, is what is this main function used for?
2422430	2428110	And it tells you that it is ‑‑ it doesn't tell you that it's being used for evasion or persistence.
2428110	2428890	You can infer that.
2428890	2430630	As I said, it's just a side kick.
2430630	2436850	So it is telling you that it uses a service file for ready server service.
2436910	2440450	And that is using exec start to create the service, right?
2440450	2443810	And it gives you the path, which is leave Redis.
2444830	2457650	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.
2457650	2463650	Instead of my SQL, this is not an L, it's a capital I.
2463650	2465950	So my SQI service, right?
2465950	2470430	So it is disguising and it is using ‑‑ being used for persistence.
2471870	2472470	All right.
2472470	2477370	Now let's talk about R2 AI versus Goblin EXE.
2477370	2479530	This is our reverse me CTF challenge.
2479870	2482670	So this is a Go, obviously.
2483030	2483870	Malware.
2483870	2486510	Well, it's benign for this purpose, right?
2486510	2487230	It's reverse me.
2487230	2490630	So we have here the GDRA symbol tree.
2490630	2492690	You will see some unknown functions here.
2492690	2494330	We also see the headers.
2494330	2495770	Headers are quite interesting.
2495770	2497230	So it's ninjas don't cry.
2497230	2499190	So that's a meaningful name.
2499450	2502070	But also we just ask Cloud to see what is going on.
2502070	2505370	So some key findings, obviously, this is a packer crypter.
2505910	2507550	Some pales in there.
2507550	2510550	So the section names, just as we already know.
2510550	2520570	And also anti‑analysis features, so stripped symbols, custom packing, dynamic API loading, uses load library A, so something is happening here, right?
2520730	2521070	All right.
2521070	2522910	So let's use R2 AI.
2522910	2527470	So we define the model that we are going to use and then we start asking questions.
2527470	2530270	So is this reverse me CTF challenge?
2530270	2532390	It is also trying to solve it.
2532390	2534370	It does not contain any plain strings.
2534370	2536690	So we got the guides.
2536690	2540250	So we start typing kind of information, getting information back.
2540590	2547470	And then obviously, while we are just traversing to this information, you will see the Go Build ID.
2547490	2550790	So it identifies the AI as a Go Build ID.
2550790	2553210	It examines Forter.
2553390	2555550	Let's see what is going on in between.
2555670	2559550	So it says now I need to understand where the encrypted packet data starts.
2559550	2561790	So it started looking at the sections.
2561790	2564310	It found the sections, displayed the sections.
2564710	2566590	Interesting, the sections have initial names.
2566590	2567690	Ninjas don't cry.
2567690	2569450	This confirms it's a custom packed binary.
2569450	2570510	I don't know why.
2570590	2573070	It is an indicator that this is going to be custom.
2573070	2574310	It's just a random name.
2574310	2578530	But yeah, it goes and starts analyzing this kind of next things.
2578530	2583990	It identifies within the sections of version 5.00LOL.
2583990	2586830	So it starts analyzing, analyzing.
2587750	2591930	The LOL signature suggests that this may have a custom packed.
2591930	2595230	It analyzes Forter, Forter and Forter.
2595230	2598430	Okay, it is attempting to decompress information as well.
2598430	2603350	So it is really, really trying really hard to see what is going on with this reverse me.
2604150	2610190	So the emulation and debugging, so the AI is really, really trying hard.
2610190	2620210	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.
2620210	2621990	So after all, no luck.
2622590	2624250	So getting stuck.
2624330	2630410	So we got additional information, starting decompressing algorithms, nothing was found.
2630910	2632430	So final result and questions.
2632430	2633690	So R2I, zero.
2633690	2635130	Goblin EXE, one.
2635450	2640650	Emulation debugging, so good efforts but not enough to solve the reverse me.
2641130	2644730	Problems dealing with packers, so what about crypters, right?
2644730	2646630	Probably a little bit more complicated.
2646770	2649510	So strictly speaking, the reverse me is quite simple.
2649770	2654610	But are we lacking of context here or what else is required?
2655530	2658290	So you can beat the AI, let's find out.
2658290	2664090	So we included the QR code in order that you want to see the, download the sample and then you can play around.
2666510	2673530	And finally, the key takeaways of this presentation, as I said at the beginning, is don't be afraid of opening irregular file structures.
2673890	2677130	I think that's the core of reverse engineering.
2677730	2687950	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.
2688010	2699270	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.
2699330	2699930	It doesn't matter.
2699930	2709530	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.
2709750	2715330	Also, what we tried to show here was build a hybrid toolkit, right?
2715330	2717070	So AI is definitely great.
2717070	2718070	It's going to help us.
2718070	2719030	It's going to make us more efficient.
2719030	2724630	But definitely don't rely completely on it because as you can see, it made mistakes.
2724630	2727370	It doesn't properly identify some things.
2727570	2734490	In the challenge, the CTF challenge that Chris was describing, it was trying to look for like regular compression algorithms.
2734490	2743850	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.
2744350	2746090	And yeah.
2747230	2752590	Also, we just need to, we don't need to take the AI response for granted.
2752590	2754550	So we just need to always validate.
2754610	2759210	Many people I heard that, you know what, if they are saying yes, just trust.
2759290	2760370	So don't do it.
2760730	2761670	Double check.
2762650	2774990	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.
2774990	2779190	So if we can leverage the AI to do the works for that, it's going to be better.
2779190	2784450	So just filter them out and then you can just focus on the things that really matters.
2784770	2786650	So this is just a guideline.
2786650	2789470	You don't need to use all the tools that we showed today.
2789470	2790910	So it depends, right?
2790910	2796090	So depending on the requirement, it's the kind of the tools that you will be using, the strategy that you will be using.
2796790	2802230	There's no specific guideline to do when you're dealing with, you know, malware in this case.
2802230	2805650	So just use whatever you feel comfortable using.
2805650	2807090	And that's pretty much all.
2808150	2822230	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.
2822250	2826170	So if you want to take a look, so you can go ahead and check.
2826290	2830070	We also included the open source links that we discussed today.
2830070	2834730	So you can easily get from GitHub and then you can play around.
2834990	2842070	And also, if you have any other questions, I think we have still five minutes left.
2842070	2843330	So we are open.
2843330	2843990	No?
2844150	2846570	Well, we don't have it.
2846570	2851090	But we can... you have our contact details, so reach out.
2851090	2851590	Thank you.
