[00:00.880 --> 00:04.780] So it's 20 minutes. There's a lot of information. [00:04.840 --> 00:10.460] There's links in the slides at the end for, well, the whole version. Thank you all for coming. [00:11.280 --> 00:18.900] Table of contents for today. We'll be looking at Ghidra and some related info to that, mostly. [00:19.460 --> 00:24.080] So first I'll introduce myself and then I'll give you some background information. [00:24.080 --> 00:28.280] We'll go a bit more into the nitty gritty details and I want to end a bit with the methodology [00:28.830 --> 00:32.680] and then in the end there might be time for Q&A. [00:32.680 --> 00:36.780] If not, find me afterwards or run to a microphone if there is time. [00:37.700 --> 00:40.840] So my name is Max Hersta. I go by the nickname of Libra. [00:40.840 --> 00:44.180] I work for Trellix within the advanced research team. [00:44.180 --> 00:49.300] We do research into all kinds of malware related things that can be something new, [00:49.300 --> 00:53.020] can be a trend, can be anything that piques interest. [00:53.180 --> 00:58.260] And one of the things we do is outreach and share that with the community such as, [00:58.260 --> 00:59.240] here. [01:00.400 --> 01:05.760] Now, the talk itself is about symbols or rather the lack thereof in binaries [01:06.400 --> 01:08.740] and how to recover them, right? [01:08.740 --> 01:11.880] But before diving into that, I want to share a bit what is a symbol [01:12.420 --> 01:16.380] and this slide should show you exactly what it's not, right? [01:16.380 --> 01:21.180] So a symbol is normally the function name from a reversing perspective [01:21.780 --> 01:25.220] and normally when you have symbols they should be recognizable, [01:25.220 --> 01:27.940] they should be self-explanatory and it should be unambiguous. [01:28.460 --> 01:30.420] Unlike the symbols I used here, [01:30.420 --> 01:35.440] this would be more useful for you to recognize something with. [01:38.060 --> 01:41.620] So binaries consist of multiple types of code. [01:41.620 --> 01:45.940] Now, this is no official definition but it's more to what I adhere to [01:45.940 --> 01:48.660] and it will make more sense down the road. [01:48.840 --> 01:53.560] So in terms of types of code, I'm going to be making a difference [01:53.560 --> 01:57.560] between the runtime, libraries and user code. [01:57.560 --> 02:03.080] Now, there's some gray areas in between, it obviously has room for discussion [02:03.080 --> 02:10.540] but in this case the purpose is mainly to focus on the big aspects that they each have, right? [02:10.540 --> 02:14.740] So for runtime, I'm going to use Golang as an example. [02:15.220 --> 02:20.500] The runtime is statically compiled within your binary or at least the part that you use, [02:20.500 --> 02:26.000] meaning that if you have 10 different Golang binaries of the same Golang version, [02:26.000 --> 02:29.260] you will have a lot of overlap of code. [02:29.280 --> 02:33.120] Now, that's not to say that those 10 binaries are related to each other [02:33.120 --> 02:36.720] other than the fact that they share the same Golang runtime. [02:36.800 --> 02:41.620] But if you have zero functions or function names within your binary, [02:41.620 --> 02:44.180] it's kind of hard to find out what the function does [02:44.720 --> 02:47.140] even though your tools might say there's overlap. [02:47.540 --> 02:49.340] Now, the same kind of goes for the libraries [02:49.920 --> 02:53.100] but libraries might give you more of an indication, right? [02:53.100 --> 02:55.740] If you're searching for a specific version of a library [02:55.740 --> 03:00.780] or if you're tracking a piece of malware based on the library that they use, [03:00.780 --> 03:02.680] you might be very interested in the library [03:02.680 --> 03:08.280] but to do so you would need to know where to find it and what library is included. [03:08.760 --> 03:10.700] And then as a last part, we have the user code [03:11.240 --> 03:14.620] and the user code would be anything that the user writes. [03:14.620 --> 03:18.420] So the user code generally calls functions within the runtime and the library [03:19.320 --> 03:22.980] or consists of purely user code itself, right? [03:22.980 --> 03:28.040] You make a minimalistic C binary and you use no external software [03:28.840 --> 03:33.800] then your binary will be very small and you'll just have your user code. [03:33.800 --> 03:38.740] Now, the user code is obviously of interest from my perspective as a malware researcher [03:39.300 --> 03:42.740] because if I can find that in other binaries, [03:42.740 --> 03:46.980] it will tell me that this is likely a shared piece of code [03:46.980 --> 03:50.680] and the user code is generally relatively unique [03:50.680 --> 03:53.760] to the extent that we can say these binaries overlap. [03:55.160 --> 03:58.780] So to recover symbols, we have multiple ways [03:58.780 --> 04:03.200] and three of them are what I'm going to be focusing on. [04:03.200 --> 04:07.480] So you have metadata in your binaries that you might be able to use. [04:07.480 --> 04:11.180] Golang is another great example of this where you have the PCLN tab [04:11.180 --> 04:15.020] and the information within so you can recover the function names. [04:15.040 --> 04:17.660] Obviously, using this is of great benefit. [04:17.660 --> 04:19.860] However, not all binaries have this. [04:19.860 --> 04:24.880] You have a stripped C++ binary, you're going to have a hard time, right? [04:25.080 --> 04:29.980] Now, Ghidra has two features that you can use to recover symbols. [04:30.380 --> 04:33.700] One is specifically made for this, which is function ID. [04:33.700 --> 04:38.420] For those using IDA, that would be flirt signatures, but then Ghidra is equivalent. [04:38.940 --> 04:42.940] And it has a hash of a function and a function name. [04:42.940 --> 04:46.820] So it hashes your function, cutting some corners here, [04:46.820 --> 04:48.880] but the gist of it is that you have a hash [04:48.880 --> 04:51.180] and if the hash is found in another place, [04:51.180 --> 04:55.860] you can compare the hash and take the name from the mapping that you already have. [04:56.160 --> 04:59.380] And then there's bsim, which stands for behavioral similarity. [04:59.640 --> 05:05.980] This was recently released by the NSA, recently being the day before last Christmas. [05:06.440 --> 05:10.720] And what you can do is you have the decompiler, [05:10.720 --> 05:12.980] produces intermediate language called p-code, [05:12.980 --> 05:17.220] and based on the high p-code vectors and some other things are calculated, [05:17.940 --> 05:21.680] based on which you can find functions that overlap code. [05:21.960 --> 05:29.040] Within Ghidra, you have the advantage that you have the decompiler of your match [05:29.040 --> 05:31.700] and of your original function side by side. [05:31.700 --> 05:36.660] So say you're patch diffing a file, you can very nicely see the differences. [05:37.940 --> 05:42.260] In order to do that, you do need to retain access to the Ghidra project [05:42.260 --> 05:45.640] and the files therein which you're using, [05:45.640 --> 05:49.620] or where the match is found as well as your program that you're analyzing. [05:50.780 --> 05:56.940] The script I have is kind of shoehorning that where we do not use the last part, [05:56.940 --> 06:02.220] meaning we have less data required and we can also automate the process [06:02.220 --> 06:06.100] because in the end it's code that you can use for this. [06:06.720 --> 06:14.060] So for the function ID databases, I wrote a script that you can automate. [06:14.100 --> 06:18.760] First the ingestion, you can run Ghidra headless to just import your files, [06:18.760 --> 06:22.840] and then this script will make for each unique architecture [06:22.840 --> 06:25.520] and what Ghidra calls a language ID, [06:25.520 --> 06:29.740] it will make a different function ID database that you can use later on. [06:29.740 --> 06:35.340] A language ID, very briefly put, is a PE file, 32 bits, [06:35.340 --> 06:40.060] for Windows for a specific compiler, and then we do that for each. [06:40.160 --> 06:43.660] This allows you to have the files that you can share with colleagues, [06:43.660 --> 06:50.100] either internally or externally, and this is the quickest way of recovering the symbols. [06:52.120 --> 06:57.380] As a case study, I have a Qubit Stealer sample which is Golang-based, [06:57.380 --> 07:01.120] and it has a lot of functions, but it has no real names, [07:01.120 --> 07:03.640] and we'll get more statistics on this in a bit. [07:03.640 --> 07:06.940] But just to showcase function ID, the first top screenshot [07:06.940 --> 07:11.940] is a screenshot that is post-default analysis from Ghidra. [07:11.960 --> 07:17.940] Right, so it just has fun underscore, which is the equivalent in IDA of saying sub underscore. [07:18.180 --> 07:21.140] So these are just functions that have no names. [07:21.220 --> 07:26.260] Now in the bottom screenshot, we can see that the P256 sub-internal function has been recognized [07:26.260 --> 07:30.340] and subsequently been renamed, which saves you time as the analyst, right? [07:30.340 --> 07:33.420] This is part of your default analysis, [07:33.420 --> 07:37.180] because the function ID is an analyzer which runs within. [07:37.480 --> 07:42.160] For the sake here, I first ran it without the function ID library [07:42.160 --> 07:45.400] which contains these functions, and then the one after. [07:47.400 --> 07:50.380] So for bsim, I already mentioned it's a bit shoehorned, [07:50.380 --> 07:52.340] because we're not going to be using the GUI to do this, [07:52.340 --> 07:56.980] and we're also not relying on the fact that you need access to the Ghidra project. [07:56.980 --> 08:01.280] Meaning that if I make a bsim database and I give it to you, [08:01.280 --> 08:04.560] then you can still use those databases with this script, [08:04.560 --> 08:08.020] even though you do not have access to the Ghidra project [08:08.020 --> 08:11.460] and the files therein, which I used to create it. [08:11.660 --> 08:16.800] So these are, along with function ID databases and some more information, [08:16.800 --> 08:19.640] all available on GitHub afterwards. [08:20.420 --> 08:23.700] So it's not necessarily using bsim as intended, [08:23.700 --> 08:29.680] but since the screenshot on top is relatively readable, I think, on screen, [08:29.680 --> 08:32.920] you can see that it has a function name, [08:32.920 --> 08:35.160] which is within the fdesc, right? [08:35.160 --> 08:37.860] Function description XML object. [08:37.980 --> 08:40.300] And within there, you can see that there are some vectors [08:40.300 --> 08:42.720] and calls being made to other functions, [08:42.720 --> 08:46.200] which is what bsim uses to identify this. [08:46.740 --> 08:48.540] The fact that you can automate this [08:49.100 --> 08:52.340] doesn't mean it's fully magically working for you. [08:52.340 --> 08:57.720] You still need to specify what your threshold is for the similarity, [08:57.720 --> 09:00.760] which is a value between zero, meaning no overlap, [09:00.760 --> 09:02.860] and one being an exact match. [09:02.940 --> 09:06.240] You also need to specify how many results do you want [09:06.240 --> 09:13.660] from the bsim database to match or to be collected for use, right? [09:13.660 --> 09:17.020] So you can do one, meaning if you have the first match it finds, [09:17.020 --> 09:18.540] it will say, well, it's this. [09:18.820 --> 09:21.560] But especially if you're not relying on an exact match, [09:21.560 --> 09:26.820] but rather, say, 75% or more of overlap, [09:26.820 --> 09:30.500] you might be interested in what other functions might be matching as well. [09:30.500 --> 09:33.580] Now, obviously, if all those functions have the exact same name, [09:33.580 --> 09:37.820] it's pretty clear that based on the database that you use, [09:37.820 --> 09:39.300] there's only one match. [09:39.760 --> 09:42.920] But you can also have the case that you have multiple functions, [09:42.920 --> 09:45.420] different names that match, [09:45.420 --> 09:48.160] which requires you to do a bit more research. [09:50.420 --> 09:54.660] To automate this in the script, you have identical matches. [09:54.740 --> 09:57.060] So these are renamed as is, right? [09:57.060 --> 09:59.540] Identical meaning there's only one name matched, [09:59.540 --> 10:01.500] even if you have multiple functions. [10:02.680 --> 10:05.760] The information, the metadata that's still available in the signatures [10:05.760 --> 10:09.360] is added to that function within Kedra. [10:09.620 --> 10:12.340] And it will show you the original file, [10:12.340 --> 10:16.240] the similarity for the match based on the function you're looking at. [10:16.240 --> 10:21.220] The significance, which tends to be based on your function size. [10:21.220 --> 10:23.100] And the architecture, right? [10:23.100 --> 10:26.120] It should only match the architecture that you have, [10:26.780 --> 10:28.720] though bsim has specifics. [10:28.720 --> 10:30.980] So since it's based on a decompiler, [10:30.980 --> 10:34.140] you can make databases that are known specifically [10:34.140 --> 10:37.160] for the bitness of your architecture. [10:37.160 --> 10:39.840] So say you have a Intel-based binary, [10:40.620 --> 10:43.820] 132-bit version and 164-bit version. [10:43.820 --> 10:46.680] The size of an integer, for example, is different, right? [10:46.680 --> 10:48.340] It's four versus eight bytes. [10:48.840 --> 10:51.660] What you can tell bsim to do when making the [10:51.660 --> 10:53.680] or importing the signatures in a database [10:53.680 --> 10:56.840] is you can give it a no-size database, [10:56.840 --> 10:59.200] meaning that it will ignore certain values [10:59.760 --> 11:04.560] and allow you to find matches of code from a 64-bit binary [11:04.560 --> 11:07.360] in a 32-bit binary or vice versa. [11:08.820 --> 11:10.840] So the information here will allow you [11:10.840 --> 11:15.340] to more accurately decide if this matches. [11:15.400 --> 11:17.620] And given the original file name, right? [11:17.620 --> 11:21.800] This says empty project go 1.9, for example, [11:21.800 --> 11:24.080] and you can see 1.14, 1.13. [11:24.080 --> 11:26.300] So these are the go versions where this function [11:26.300 --> 11:28.760] was also found in when making signatures. [11:28.820 --> 11:30.020] So this gives you an indication [11:30.020 --> 11:33.400] as to which Golang version it might be. [11:33.400 --> 11:37.340] And it will also tell you it's a Golang function on its own. [11:37.360 --> 11:39.660] Obviously, the original file name [11:39.660 --> 11:42.040] is based on what you use as a file name [11:42.040 --> 11:44.200] in Ghidra when making the signatures. [11:44.220 --> 11:46.840] So if you give it useful names, that's great. [11:46.840 --> 11:50.580] If not, then it might not be as great. [11:52.020 --> 11:55.140] Having said that, there's also a generic match, right? [11:55.140 --> 11:56.540] Because we want to automate this. [11:56.540 --> 11:58.660] You can have functions with thousands of, [11:59.280 --> 12:02.120] well, unknown functions within your binary. [12:02.400 --> 12:04.780] So there's also what I call a generic match, [12:04.780 --> 12:07.320] meaning there is more than one unique name [12:08.100 --> 12:10.800] that has been returned from the database. [12:10.920 --> 12:16.220] Now, not renaming these at all will not help you, right? [12:16.220 --> 12:17.620] Because you can make these databases [12:17.620 --> 12:19.480] for very specific purposes. [12:20.100 --> 12:23.880] Say, right, this is my database for the Golang runtime. [12:23.880 --> 12:29.760] Then any match that I have based on my similarity threshold [12:30.300 --> 12:32.640] will be Golang runtime related, [12:32.640 --> 12:36.280] or at least be very likely to be related to it. [12:36.380 --> 12:39.180] So in this case, we have two functions [12:39.180 --> 12:42.140] and we can see that the package name within Go [12:43.540 --> 12:45.340] has changed over time. [12:45.340 --> 12:47.880] Yet the function name itself is the same. [12:47.900 --> 12:49.600] Now, obviously, we could add a lot more logic [12:49.600 --> 12:52.260] as to how do we identify this between strings. [12:52.380 --> 12:55.340] But that is a future work. [12:55.400 --> 12:57.840] But also kind of depends on what you're using, right? [12:57.840 --> 13:00.640] If it's multiple versions of the same runtime, that works. [13:00.640 --> 13:02.620] But maybe you have a database where you put in [13:02.620 --> 13:04.860] not only Golang, but a lot more. [13:04.860 --> 13:07.180] It gets a lot harder to do the differentiation. [13:08.200 --> 13:12.340] So instead, I opted to rename all those functions [13:12.340 --> 13:15.000] that match generically with a prefix. [13:15.000 --> 13:16.260] And you can provide this prefix [13:16.260 --> 13:18.100] when running the script headless [13:18.100 --> 13:20.580] so that any match is then renamed. [13:20.840 --> 13:23.480] And if you run it over multiple databases, right? [13:23.480 --> 13:25.960] So the script, unless you change it, [13:25.960 --> 13:28.200] uses only one database at a time. [13:28.200 --> 13:32.840] What you can do is simply provide the prefix. [13:32.840 --> 13:36.820] And any function that has the non-default function naming scheme [13:36.820 --> 13:40.360] is not included in subsequent runs, right? [13:40.360 --> 13:42.700] So if a function starts with fun underscore [13:42.700 --> 13:44.940] or thunk underscore fun underscore, [13:45.340 --> 13:47.500] it's included in the search. [13:47.500 --> 13:50.800] However, if you have this function right now, [13:50.800 --> 13:53.100] it's Golang underscore whatever. [13:53.100 --> 13:59.480] If I now run it on another database I have for bsim, [13:59.480 --> 14:02.360] then this function is not going to be included anymore. [14:02.360 --> 14:04.840] So your subsequent runs will A, be faster, [14:04.840 --> 14:07.720] but also likely more accurate [14:07.720 --> 14:09.500] depending on the order you run it [14:09.500 --> 14:11.600] and how you structure your databases. [14:13.040 --> 14:15.220] So to continue with our case study, [14:15.220 --> 14:19.660] we have the top screenshot, which is after function ID, right? [14:19.660 --> 14:21.800] And I would recommend you first run function ID [14:21.800 --> 14:22.760] because it's faster [14:22.760 --> 14:26.700] and it is designed literally for this purpose. [14:27.440 --> 14:31.520] And bsim is a bit misused for this purpose, yet it works. [14:32.120 --> 14:33.780] And then we see in the bottom one, [14:33.780 --> 14:35.720] we see that the different functions [14:35.720 --> 14:38.940] are now renamed to Golang underscore, right? [14:38.940 --> 14:41.300] So these are all generic matches. [14:42.420 --> 14:44.240] Now looking at this function, [14:44.240 --> 14:46.500] and it's a bit of a spoiler alert, [14:46.500 --> 14:49.080] it is just a function within the Golang runtime [14:49.080 --> 14:50.520] that I used as an example. [14:50.520 --> 14:53.480] But you would also guess that it is, [14:53.480 --> 14:58.060] given that there's only calls to the Golang runtime within. [15:00.080 --> 15:02.540] So aside from making these scripts, [15:02.540 --> 15:05.280] I decided that making this invoke [15:05.280 --> 15:07.260] would A, be a good test case, [15:07.260 --> 15:09.840] but it would also save CPU cycles for others [15:09.840 --> 15:11.980] as soon as we share this, right? [15:11.980 --> 15:13.900] So I downloaded hundreds of gigabytes [15:13.900 --> 15:17.100] of benign binaries, [15:17.100 --> 15:19.820] mostly runtimes and libraries, [15:19.820 --> 15:21.960] compiled them if need be. [15:22.160 --> 15:26.100] And I ended up with 117 gigabytes [15:26.620 --> 15:28.750] of signatures for bsim. [15:30.900 --> 15:33.740] And the data doesn't necessarily say much, [15:33.740 --> 15:35.900] but there's not a lot of exact details [15:35.900 --> 15:37.460] I have for the bsim part. [15:37.600 --> 15:39.800] I do, however, for function ID, [15:39.800 --> 15:42.680] because you get a lot of detailed information in return. [15:42.700 --> 15:47.420] So 60% is Golang based as to what I created. [15:47.420 --> 15:50.120] And then we have 35 related to Boost, right? [15:50.120 --> 15:53.480] The C++ library, which contains a lot [15:53.480 --> 15:54.880] and it's used a lot. [15:54.880 --> 15:56.660] And then there's, well, other. [15:56.660 --> 15:57.580] Now, what is other? [15:57.580 --> 15:58.760] You might ask the 5%. [15:59.660 --> 16:01.740] So here I have the signature generation [16:01.740 --> 16:04.920] with the unique number of signatures within each. [16:05.080 --> 16:07.920] So for Golang, that was any runtime available [16:07.920 --> 16:09.440] that I had at the time. [16:09.440 --> 16:13.340] For Boost, it's roughly the last 10 years of Boost. [16:13.380 --> 16:17.100] And then we have, say, LibXML, OpenSSL, [16:17.100 --> 16:18.800] other libraries that are used. [16:18.880 --> 16:20.340] Now, depending on how big they are, [16:20.340 --> 16:21.980] you have more or less functions. [16:22.220 --> 16:24.540] But overall, this is, well, I would say [16:24.700 --> 16:25.740] a decent amount of functions [16:25.740 --> 16:27.480] that now you don't have to reverse [16:27.480 --> 16:30.260] or make signatures for anymore. [16:31.160 --> 16:32.880] So to put that in a broader perspective [16:32.880 --> 16:34.760] for the Qubits dealer, [16:34.760 --> 16:37.100] when you do the default Gitter analysis, [16:37.100 --> 16:39.480] it will find 2016 functions, [16:39.480 --> 16:41.900] out of which one has a name, right? [16:41.900 --> 16:43.080] The entry function. [16:43.740 --> 16:45.260] If we then run function ID, [16:45.260 --> 16:46.700] one function is merged, right? [16:46.700 --> 16:48.860] The total goes down one, [16:48.860 --> 16:52.180] but we recover about 40% of the function names. [16:52.180 --> 16:57.100] If we then use bsim with a 75%, right? [16:57.100 --> 17:00.380] 0.75 threshold for similarity, [17:00.380 --> 17:05.140] we recover another 16%, leaving us at 58. [17:05.200 --> 17:07.840] Now, that doesn't necessarily sound too much. [17:07.840 --> 17:09.140] So why is that? [17:09.140 --> 17:12.680] Now, we had access to the Qubit dealer source code, [17:13.420 --> 17:16.380] and it imports a library. [17:16.380 --> 17:17.280] And there's no signatures [17:17.280 --> 17:20.380] for Golang libraries in this corpus. [17:20.380 --> 17:21.560] So if you make this, [17:21.560 --> 17:24.920] you will have even more matches. [17:26.000 --> 17:27.760] So as a methodology, [17:29.320 --> 17:32.040] I would suggest you use, [17:32.040 --> 17:34.400] feedback is obviously welcome, [17:34.400 --> 17:35.380] that you identify metadata [17:35.380 --> 17:37.600] within the binary if you can. [17:37.620 --> 17:40.800] You can utilize that if you find it. [17:40.800 --> 17:42.660] You want to identify the runtimes [17:42.660 --> 17:44.680] and libraries used within your binary. [17:44.680 --> 17:46.960] You might need to make signatures for them [17:46.960 --> 17:48.820] if you don't have them yet, right? [17:48.820 --> 17:50.240] Maybe you identified something. [17:50.240 --> 17:51.980] So you first make the signatures, [17:51.980 --> 17:52.960] you apply them, [17:52.960 --> 17:54.780] and you do that process both for function ID [17:54.780 --> 17:56.580] and for the behavior signatures. [17:56.980 --> 17:57.900] Once that's done, [17:57.900 --> 17:59.840] you can have any other further logic [17:59.840 --> 18:01.320] that you can use, right? [18:01.320 --> 18:02.780] A lot of people are using LLMs [18:02.780 --> 18:04.180] to help rename functions [18:04.180 --> 18:05.900] without looking at them necessarily. [18:05.900 --> 18:07.900] So you can apply more scripts. [18:08.080 --> 18:09.520] And you can all do this [18:09.520 --> 18:12.040] from importing a binary, [18:12.040 --> 18:13.660] running function ID, bsim, [18:13.660 --> 18:14.600] and your other logic [18:14.600 --> 18:18.120] within the headless execution. [18:18.120 --> 18:19.780] So essentially, you can do that at night. [18:19.780 --> 18:20.440] When you wake up, [18:20.440 --> 18:23.320] everything is ready for you to analyze. [18:25.080 --> 18:27.220] That leaves room for questions. [18:27.360 --> 18:29.340] There's two minutes left. [18:29.360 --> 18:30.940] Either ask them now [18:31.480 --> 18:33.460] or find me off stage. [18:33.600 --> 18:35.340] The GitHub link here, [18:35.340 --> 18:37.600] I will activate them after the talk, [18:37.600 --> 18:39.080] has the GitHub scripts [18:39.660 --> 18:41.840] for this talk that I created. [18:41.840 --> 18:43.640] It has function ID databases [18:43.640 --> 18:46.220] and it has the bsim databases. [18:46.220 --> 18:48.280] Additionally, there is about 66 gigabytes [18:48.280 --> 18:50.490] of Golang binaries. [18:50.840 --> 18:52.180] It's an empty main function [18:52.180 --> 18:53.660] and contains the entire runtime [18:53.660 --> 18:55.020] of that version. [18:55.240 --> 18:56.880] And if you want to make signatures, [18:56.880 --> 18:58.120] play around with them, [18:58.120 --> 19:00.800] then feel very much free to as well. [19:00.820 --> 19:03.940] So the URL is at the top [19:03.940 --> 19:05.300] and then you have the slash [19:05.300 --> 19:06.500] for each of the sub options [19:06.500 --> 19:08.970] or just go there and find the repositories. [19:09.900 --> 19:11.280] Thank you very much. [19:33.310 --> 19:36.310] You have a microphone in the front. [19:44.380 --> 19:45.960] All right, if you just shout, [19:45.960 --> 19:47.300] I'll repeat the question. [19:52.280 --> 19:53.680] So the question is, [19:53.680 --> 19:56.780] how good is bsim when matching functions [19:56.780 --> 19:59.140] compiled with different compilers? [20:00.140 --> 20:02.300] I haven't tested this myself. [20:02.300 --> 20:07.400] It's a relatively new feature within Kedra. [20:07.400 --> 20:10.000] I think it does relatively well [20:10.000 --> 20:12.360] because it uses the decompiler. [20:12.360 --> 20:15.320] Some of the abstractions are moved away. [20:15.900 --> 20:16.740] And I think it also depends [20:16.740 --> 20:18.580] if Kedra knows the used [20:19.160 --> 20:21.260] calling conventions and such. [20:25.310 --> 20:27.670] Hi, so in a similar vein, [20:27.670 --> 20:28.710] how do you deal with [20:28.710 --> 20:31.270] different compiler options? [20:31.270 --> 20:33.590] Things like f-function sections, [20:33.590 --> 20:36.310] all the moving symbols around. [20:36.310 --> 20:39.230] What of those kind of break this process? [20:41.550 --> 20:43.290] Yes and no. [20:44.570 --> 20:46.770] It's the standard engineering answer, right? [20:46.770 --> 20:47.870] It depends. [20:48.090 --> 20:49.850] So if you say, [20:49.850 --> 20:52.630] use an unoptimized compiler run [20:52.630 --> 20:54.230] versus a very optimized, [20:54.230 --> 20:56.250] you will have differences in code, [20:56.250 --> 20:57.170] meaning there's differences [20:57.170 --> 20:59.050] within the signatures as well. [20:59.050 --> 21:00.570] For bsim, it might break it [21:00.570 --> 21:02.750] because it does match certain things. [21:02.750 --> 21:06.150] But if the match isn't matching well enough, [21:06.150 --> 21:08.630] it will not find a hit. [21:09.030 --> 21:10.450] For bsim, you can tweak [21:10.450 --> 21:12.530] how much it should look alike. [21:12.530 --> 21:14.330] If you are aware [21:14.330 --> 21:15.830] that something specific is used [21:15.830 --> 21:17.130] and you have a database for this, [21:17.130 --> 21:18.290] it might help. [21:19.590 --> 21:21.390] But if it changed too much, [21:21.390 --> 21:23.490] then you need to lower your threshold too much [21:23.490 --> 21:25.630] and you will probably get too many hits [21:25.630 --> 21:27.770] to make sense of it. [21:27.810 --> 21:30.330] So I think the best option [21:30.330 --> 21:33.290] is to compile the target libraries [21:33.290 --> 21:34.490] in all options [21:34.490 --> 21:36.330] and then make signatures for all, [21:36.330 --> 21:38.270] which is obviously a lot more work. [21:38.730 --> 21:42.210] But I think that is the most accurate option [21:42.210 --> 21:43.290] that you have. [21:43.710 --> 21:44.710] Thank you. [21:48.270 --> 21:48.970] All right. [21:48.970 --> 21:50.030] Thank you very much.