[00:00.000 --> 00:02.040] Good morning DEF CON. [00:02.800 --> 00:08.900] I'm Vanish and I hope you are awake and you didn't party too much yesterday. [00:09.620 --> 00:22.840] And I'm here just to ruin your fate in Linux, in a subsystem, in a Linux subsystem that usually you think it's secure. [00:24.560 --> 00:33.700] When most people think about ABPF, they think observability, they think networking. [00:34.360 --> 00:37.120] I think Ring Zero Playground. [00:37.680 --> 00:55.080] Today we are going to systematically fuzz and analyze ABPF subsystems and I'm going to show you exactly how to turn the world's most trusted sandbox into your personal kernel backdoor. [00:55.540 --> 00:57.120] That's the idea. [00:58.620 --> 01:04.480] It is what we are going to accomplish in the next 45 minutes almost. [01:04.500 --> 01:11.740] First I show you why ABPF's attack surface is absolutely massive. [01:12.380 --> 01:17.020] And it's getting worse for every kernel update. [01:18.260 --> 01:22.280] Second, we'll dive into state-of-the-art fuzzing. [01:22.280 --> 01:28.360] The technique that actually work against modern ABPF subsystems. [01:28.360 --> 01:37.860] Third, I work it through the Leviathan, the framework that I'm presenting today, that it's a systematic exploitation framework. [01:38.320 --> 01:47.100] Fourth, and this is the fun part, we do live fuzzing and exploitation of ABPF subsystems. [01:47.120 --> 01:50.080] And finally, we'll talk about defense. [01:50.680 --> 01:56.060] Because someone has to clean up the mess that we are doing. [01:57.240 --> 02:03.140] But before we jump into the actual technical meat, let me introduce myself. [02:04.040 --> 02:05.580] I'm Agostino. [02:05.580 --> 02:07.120] I'm from Italy. [02:07.640 --> 02:08.940] This means two things. [02:08.940 --> 02:11.680] Sorry for my English, first thing. [02:11.680 --> 02:15.000] Second thing, I don't like pineapple on pizza. [02:16.180 --> 02:24.220] So just to be clear, I'm a security researcher with over 15 years of experience. [02:24.220 --> 02:34.820] I've done red teaming, instant response, reverse engineering and I'm currently working mostly on Windows and Linux kernel exploitation. [02:35.680 --> 02:40.920] I'm the author and the maintainer of the framework that I'm presenting today that is Leviathan. [02:40.920 --> 02:43.000] It is going to be open source. [02:43.580 --> 02:50.200] The VM dragon's layer framework that is being presented yesterday for VM protect samples. [02:50.200 --> 02:57.880] And I'm also maintaining a fork, actively maintaining a fork for the spider foot project. [02:58.720 --> 03:03.140] My research focus is actually everything that is weaponizable. [03:03.860 --> 03:07.120] And together with my three cats, we review code. [03:07.400 --> 03:15.440] When I'm not doing that, I actually love scuba diving because I love the exploration part. [03:16.800 --> 03:25.540] But let's talk why ABPF should terrify every security professional in this room. [03:26.140 --> 03:36.160] We are diving deep into the attack surface that most people completely ignore or totally misunderstand. [03:37.740 --> 03:41.620] ABPF started as a simple packet filter. [03:42.040 --> 03:44.880] Basically a fancy way to drop packets. [03:45.480 --> 03:54.600] Today it's a complete virtual machine running with ring zero privileges in every Linux kernel. [03:54.720 --> 04:03.520] It can access arbitrary kernel memory, manipulate system calls and hook into any kernel subsystem. [04:04.260 --> 04:06.700] And here is the beautiful part. [04:07.020 --> 04:11.260] It's marked as safe and sandboxed. [04:11.500 --> 04:22.520] Every major cloud provider, every container platform, every observability tool is built on top of ABPF nowadays. [04:23.980 --> 04:27.120] The security implications of this are massive. [04:27.520 --> 04:34.740] We are talking about ring zero execution with direct kernel memory access. [04:35.480 --> 04:45.800] ABPF programs can establish persistence that survives reboots, system updates and most forensic analysis. [04:45.800 --> 04:47.760] That's the worst part. [04:47.800 --> 04:55.400] They operate below hypervisor, below security monitoring, below everything. [04:56.160 --> 05:03.900] And the best part, this technology is shipped by default everywhere. [05:04.040 --> 05:06.080] Ubuntu, Red Hat, AlmaLinux. [05:06.080 --> 05:10.900] Every major Linux distribution is shipping ABPF and is enabling by default. [05:12.700 --> 05:17.620] Understanding the exploitation pipeline in this case is critical. [05:18.480 --> 05:22.500] Every ABPF program follow this path usually. [05:22.760 --> 05:34.460] User program that goes to the ABPF bytecodes that goes to the verifier that goes just in time compiler and you have kernel execution. [05:34.980 --> 05:39.800] Each stage is a potential attack vector. [05:40.560 --> 05:49.860] At program construction we craft malicious bytecode designed to trigger the verifier edge case. [05:50.400 --> 05:59.380] During verification we can exploit bound checking errors, type confusion bugs and state tracking failure. [06:00.420 --> 06:12.680] JIT compilation gives us architecture specific vulnerabilities because we can run that on x86 R and RISC-V. [06:13.060 --> 06:20.760] Finally kernel execution provides arbitrary memory access and privilege escalation. [06:20.760 --> 06:23.440] That's the complete path that we can follow. [06:25.240 --> 06:27.280] Let's start with the verifier. [06:27.600 --> 06:29.920] The verifier is our primary target. [06:30.920 --> 06:37.040] And I have to be honest, it's one of the most beautiful piece of code that I have ever seen. [06:37.040 --> 06:42.860] It's almost 15,000 lines of C code that is really complex. [06:42.900 --> 06:47.240] And I think that they spend a lot of time going through that because it's really amazing. [06:47.240 --> 06:50.100] If you want to learn C that's the way to go. [06:53.480 --> 07:02.520] The verifier is actually trying to prove that arbitrary user programs are safe to run in the kernel. [07:02.880 --> 07:04.700] But there is the kicker. [07:05.800 --> 07:14.600] Analyzing it, what I've done, I cataloged over 200 interesting patterns in this code. [07:15.280 --> 07:31.440] We are talking about specific function that can lead to integer over four patterns, type confusion, state corruption vectors, loop bound verification bypass and stack base overflow. [07:33.700 --> 07:39.780] I started doing this analyzing the history of the vulnerability on a BPF. [07:39.880 --> 07:42.140] So I started from the past. [07:42.140 --> 07:48.660] I analyzed different CVs from 2020, 2021, 2022 and later on. [07:49.040 --> 07:53.840] Trying to find a way to have a pattern recognition. [07:54.540 --> 08:00.140] So to systematically find similar bugs inside the verifier. [08:00.460 --> 08:04.200] The pattern in this case is clear. [08:04.360 --> 08:11.220] Verifier complexity equals explorability. [08:12.220 --> 08:17.100] Every new BPF feature increased the attack surface. [08:19.020 --> 08:29.600] Based on this I started generating a framework detection signature that is part of the Leviathan framework . [08:29.800 --> 08:33.820] Let me show you some of the actual pattern that I'm using. [08:34.360 --> 08:44.860] I'm sharing pattern 47 for instance that show bound confusion in range tracking using specific BPF instruction that trigger integer overflow. [08:45.300 --> 08:57.700] The pattern 73 for instance demonstrate type confusion via other arguments where we can exploit the verifier failure to properly track the pointer type. [08:57.700 --> 08:59.040] And then we have also other patterns. [08:59.040 --> 09:01.300] There are more than 200 of them. [09:02.640 --> 09:04.660] These are just usable. [09:07.380 --> 09:15.880] JIT compilation vulnerabilities are particularly nasty because they are architecture specific. [09:16.500 --> 09:24.160] The same BPF byte code can trigger different vulnerabilities on different architecture. [09:24.820 --> 09:37.480] We are talking about specific functional level bugs, instruction encoding issue, optimization bugs, branch prediction problems, macro speculation bugs and so on. [09:37.480 --> 09:42.820] These give us multiple attack vectors in this vulnerability class. [09:45.780 --> 09:52.620] Our exploitation strategies leverage this architectural difference. [09:53.920 --> 10:01.460] Translation bugs occur when the same BPF byte code generate vulnerable machine code on specific architecture. [10:01.500 --> 10:07.660] Optimization error happens when performance improvement breaks security guarantee. [10:08.200 --> 10:13.740] Platform specific attacks target architecture dependent speculation. [10:14.620 --> 10:17.660] Branch prediction or instruction encoding. [10:17.660 --> 10:22.500] Those are some of the things that we are working on. [10:23.660 --> 10:30.160] The cross platform research help us find vulnerability pattern that works across multiple JIT. [10:30.160 --> 10:32.480] So multiple just-in-time compilers. [10:33.400 --> 10:34.860] It's not just one exploit. [10:34.860 --> 10:37.140] It's an exploit family completely. [10:37.380 --> 10:40.140] From one exploit, for instance, you can get four. [10:42.280 --> 10:45.240] And then we get the ABPF maps. [10:45.240 --> 10:51.300] The ABPF maps provide persistent storage and inter-program communication. [10:51.640 --> 10:57.000] But they are also a massive attack vector. [10:57.860 --> 11:03.200] Hash maps may suffer from collision attacks and time inside channels. [11:03.940 --> 11:08.740] Arrays have bound checking issue sometimes. [11:08.860 --> 11:11.540] And integer overflow vulnerabilities. [11:11.540 --> 11:19.880] LRU maps can enable cache timing attacks and memory pressure exploitation. [11:19.880 --> 11:25.140] And we have also other per CPU maps, stack trace maps and so on. [11:26.760 --> 11:30.760] But the real fun starts with the shared state management. [11:31.660 --> 11:36.740] ABPF maps enable race condition between programs. [11:36.760 --> 11:43.000] Synchronization bypass, memory management attacks via map operations. [11:43.120 --> 11:51.300] Information leakage through access patterns and performance versus security trade-off in which the performance always wins. [11:52.340 --> 11:57.740] Modern kernels have hundreds of map operations. [11:58.020 --> 12:02.560] And each one with a different security property. [12:03.360 --> 12:07.520] It's a race condition gold mine if you look at it. [12:08.960 --> 12:11.920] But let's now check the helpers. [12:11.920 --> 12:21.140] The ABPF helper function are the interface between the ABPF program and the kernel functionality. [12:21.280 --> 12:29.020] There are over 200 helper functions that have kernel privileges. [12:30.000 --> 12:34.760] Network helper enable manipulation for instance. [12:34.760 --> 12:42.800] File system helper provide the exploitation vector. [12:42.800 --> 12:50.840] The crypto helpers can help you understand and manage the crypto operations. [12:52.700 --> 12:59.460] Tracing helpers can give you some information that are leaked from the process itself. [12:59.880 --> 13:03.460] Each helper function is a potential privilege escalation vector. [13:04.260 --> 13:09.600] We are just setting up and understanding what's the attack surface of ABPF. [13:11.890 --> 13:16.330] Helper function exploitation focuses on validation bypass technique. [13:16.570 --> 13:22.330] Input sanitization failure allow malforming data to reach kernel APIs. [13:23.610 --> 13:26.750] We can have parameter confusion. [13:27.510 --> 13:31.210] We can have privilege boundary violation and so on. [13:31.290 --> 13:34.790] We can have also side channel exploitation in this case. [13:37.110 --> 13:41.850] The point is this is the attack surface. [13:42.590 --> 13:47.430] Traditional fuzzing doesn't work against ABPF. [13:47.930 --> 13:53.810] Because the verifier is smart and it's too smart for the traditional fuzzing. [13:54.750 --> 13:57.230] Random mutation gets blocked immediately. [13:57.230 --> 14:09.730] So I noticed that 99.99 percent of the request or the program generated with random mutation gets blocked. [14:12.290 --> 14:18.190] All the valid programs get rejected before reaching the verifier box. [14:18.870 --> 14:25.330] There is no coverage of complex state tracking vulnerabilities and we just waste the source. [14:27.050 --> 14:32.050] Static analysis in this case is equally useless. [14:32.890 --> 14:38.210] It cannot model the verifier complex state machine behavior. [14:38.770 --> 14:45.830] We get path explosion in interprocedural analysis with ABPF semantics. [14:46.490 --> 14:52.450] Just the existing tool lack the ABPF specific vulnerability patterns. [14:52.450 --> 14:54.250] That's one of the issues. [14:54.630 --> 14:59.870] The complexity is just why for the traditional approach. [15:01.670 --> 15:04.650] Manual analysis doesn't scale either. [15:04.850 --> 15:13.450] You need deep expertise across verifier, JIT, helper subsystems and it takes months per vulnerability. [15:13.910 --> 15:18.670] And you simply cannot keep pace with the rapid ABPF subsystem evolution. [15:18.670 --> 15:23.430] So we need something that is smarter and is faster. [15:25.350 --> 15:32.530] Because the kernel developers are adding new features faster than the manual researcher can analyze them. [15:35.220 --> 15:44.700] So the fundamental problem that I found during the analysis of ABPF is the missing state awareness. [15:45.380 --> 15:48.920] Traditional tools don't understand verified internal state tracking. [15:48.920 --> 15:55.660] They cannot target specific vulnerability class like bound calculation errors for instance. [15:55.760 --> 15:59.920] And there is no systematic approach to JIT compiler. [15:59.920 --> 16:01.580] I didn't find it. [16:02.780 --> 16:06.200] That's why we need something else. [16:06.860 --> 16:21.160] And this brings to the part two of the talk in which we describe a little bit the methodology and the framework that are developed to overcome this limitation. [16:24.780 --> 16:27.600] This is the key innovation of the framework. [16:27.600 --> 16:37.360] Instead of generating random programs, we generate programs that specifically target no vulnerability class in the verified state tracking. [16:38.060 --> 16:41.100] Bound calculation and type confusion logic. [16:41.100 --> 16:43.780] So we specifically generate those. [16:44.360 --> 16:49.880] This is a surgical precision against a complex state machine. [16:51.660 --> 16:54.380] And let me introduce you to the Leviathan. [16:55.060 --> 17:08.060] The Leviathan framework will be open source by the end of the month for some disclosure issues. [17:09.060 --> 17:18.860] But so far it's something that I'm trying to share open source with the entire community. [17:20.100 --> 17:25.500] We have a verified state tracking with advanced state machine analysis for bug discovery. [17:25.500 --> 17:27.200] This is one of the features. [17:27.200 --> 17:37.640] We have bound calculation and expectation covers verified errors into arbitrary primitives. [17:37.640 --> 17:44.820] We have bypass technique that can leverage information leakage. [17:44.920 --> 17:53.800] And we have chains completely built that go from memory corruption to full compromise. [17:54.620 --> 17:58.760] Multi architecture just in time compiler. [17:58.760 --> 18:05.320] Bugs checking across all the platform that are enabled in ABPF. [18:06.040 --> 18:12.460] And helper function validation bypass that can provide API level security convention. [18:14.400 --> 18:21.080] Let me give you some of the specific algorithm that has been implemented here. [18:21.580 --> 18:31.760] We have a coverage guided fuzzing that can achieve almost 90 percent of basic block coverage potentially. [18:32.740 --> 18:39.440] Differential fuzzing enables cross kernel version bug discovery. [18:40.040 --> 18:45.580] We have a neural guided fuzzing that provide machine learning driven program generation. [18:45.580 --> 18:50.020] So the entire program generator are machine learning generated. [18:50.020 --> 18:51.560] Not LLM. [18:53.560 --> 18:55.640] The old style machine learning. [18:56.200 --> 19:00.080] Semantic aware fuzzing using target verifier. [19:00.080 --> 19:01.820] Verified state model. [19:02.260 --> 19:06.520] And edge guided fuzzing optimize control flow exploration. [19:06.520 --> 19:07.860] That's the idea. [19:10.060 --> 19:15.520] We convert the verified bypass into arbitrary primitives. [19:16.260 --> 19:22.280] We use targeted information leaks for KSLR bypass and kernel based discovery. [19:23.060 --> 19:29.240] We employ heap grooming and kernel object manipulation for memory corruption chains. [19:29.460 --> 19:37.580] And we develop cross architecture reliability so our exploit techniques works across platform. [19:39.140 --> 19:41.800] That's why we focus on reliability. [19:41.800 --> 19:50.500] So the exploit can work consistently across kernel versions and are more stable. [19:51.580 --> 19:59.960] We do multistage validation because we test or you can test using the framework across all the kernel version directly. [20:02.200 --> 20:03.820] These are some metrics. [20:04.040 --> 20:06.980] Here the real performance number. [20:06.980 --> 20:16.960] In 24 hours we can generate roughly 2 million programs that are compilable. [20:20.040 --> 20:39.260] We achieve over almost 70 percent of basic block coverage and edge coverage during the four weeks of the first run of the framework. [20:41.160 --> 20:55.000] So we cover also the architecture but all the specific architecture from x86 to ARM to RISC-V and power PC with roughly a decent amount of percentage. [20:57.100 --> 21:02.840] Let's do a technical deep dive on some of the exploitation technique that we have. [21:03.440 --> 21:07.340] Let me show you the real bound calculation vulnerability pattern. [21:07.600 --> 21:12.680] The verifier bound calculation logic here is vulnerable to an integer overflow. [21:13.680 --> 21:18.720] That is vulnerable as an integer overflow can occur during the range validation. [21:19.580 --> 21:24.320] This simplified code shows how the verifier check conditions. [21:24.900 --> 21:29.300] But integer overflow can make this check pass when it shouldn't. [21:29.300 --> 21:33.300] This is one of the possible vulnerabilities you can have. [21:33.340 --> 21:35.000] But how we exploit it? [21:35.000 --> 21:38.360] It is how we can exploit this. [21:38.400 --> 21:42.520] We craft specific ABPF program to trigger overflow. [21:42.900 --> 21:48.740] We set the condition then in this case specific case we set the offset to 200. [21:48.740 --> 21:54.460] The result is an overflow that bypassed the bound check giving us arbitrary memory access. [21:55.200 --> 21:59.320] This specific instruction sequence triggered the vulnerability reliably. [21:59.420 --> 22:01.540] That's one of the key points. [22:02.180 --> 22:08.880] From this bound bypass we develop the exploitation primitives. [22:09.420 --> 22:13.920] We manipulate the verifier state to achieve control and memory offsets. [22:14.020 --> 22:19.580] We convert the bound bypass into reliable memory disclosure for arbitrary reads. [22:20.220 --> 22:26.860] And we extend the technique for control and memory corruption to get arbitrary memory writes. [22:28.660 --> 22:35.940] We use the information disclosure for the KSLR bypass and the kernel based discovery. [22:35.960 --> 22:39.780] This is the fundamental for a full privilege escalation. [22:42.730 --> 22:56.250] The second type of bugs that I'm showing you is the type of confusion attack that exploit the verifier type tracking across different code paths. [22:57.350 --> 23:03.870] Here is a simplified example of the verified code. [23:04.010 --> 23:14.670] And you can see here that the verified has two paths and it can be confused looking for one path or another based on the condition. [23:17.110 --> 23:23.990] In this particular bug class we have four main type confusion exploitation categories. [23:25.250 --> 23:31.050] Point and integer confusion treats pointer values as integer for arithmetic operation. [23:32.150 --> 23:34.190] Map type confusion access. [23:35.030 --> 23:41.530] And we have contest type error and cross path type issue in this case. [23:43.510 --> 23:51.550] Using these primitives we craft program that confuse the verifier type taking through the state manipulation. [23:52.090 --> 23:57.630] We exploit type inconsistencies during contest switching. [23:58.250 --> 24:03.310] And we use type confusion to access restricted helper function. [24:03.410 --> 24:05.810] That's one of the key point. [24:06.490 --> 24:10.810] And we leverage type confusion from memory layout attacks and corruption. [24:11.790 --> 24:15.510] This way we have multiple paths to kernel compromise. [24:17.010 --> 24:19.350] Let's talk a little bit about the JIT. [24:19.390 --> 24:26.050] Our JIT compiler exploitation engine targets multiple architectures systematically. [24:26.050 --> 24:34.710] We can target x86, JIT bugs, ARM, MIPS, RISC 5, power PC and so on. [24:35.090 --> 24:41.450] The framework automatically analyzes the compilation across different architecture type. [24:42.330 --> 24:45.610] To find platform specific vulnerabilities. [24:47.690 --> 24:50.610] But let's go to the fun part. [24:51.830 --> 24:55.570] Let's check how the framework works. [24:59.780 --> 25:03.720] First of all, wait, let me open it. [25:12.940 --> 25:17.040] Now this is the first run in which we do fuzzing. [25:17.040 --> 25:18.300] Just fuzzing. [25:19.680 --> 25:25.240] And these are against a vulnerable machine by design. [25:25.440 --> 25:28.440] Because we just make the point across for the demo. [25:29.080 --> 25:40.060] We load up old machine learning models and we integrate them inside the platform. [25:41.920 --> 25:46.880] We have a bunch of pattern categories and we start the fuzzing. [25:47.360 --> 25:54.380] In this case, we are just generating a few programs just then for the sake of the demo. [25:55.560 --> 26:08.300] Those programs are designed to exploit some of the patterns found in the database based on the machine that the system is analyzing. [26:13.510 --> 26:24.710] It generates ten samples in this case, but over those ten samples, for him, just six were actual vulnerability. [26:25.570 --> 26:28.190] So we have a 60% success rate. [26:28.330 --> 26:43.430] At this point he tried to compile it and see if they work on the system because the platform is monitoring the entire kernel to see if he gets a crash condition. [26:45.710 --> 26:49.710] And he starts to analyze the entire framework. [26:50.430 --> 27:09.310] He starts to analyze the machine behavior and we just find out that among those six just three were actual vulnerability. [27:09.950 --> 27:12.550] This is just by design. [27:12.550 --> 27:19.090] This is just something that was planned for the demo, but it works beautifully on every machine. [27:19.790 --> 27:27.110] So if you have a vulnerable machine, this just generates a C code that is a POC to get the vulnerability tested. [27:28.350 --> 27:37.250] But that's not the unique, you can have also other nice feature here. [27:38.010 --> 27:48.190] One of the feature you can have, actually the framework can analyze ABPF programs that interact, that should interact with ABPF. [27:48.390 --> 27:51.350] So let's make point across. [27:51.390 --> 27:58.270] For instance, you have Calico, you have Cilium, you have this kind of program that interact with ABPF. [27:58.270 --> 28:00.630] All those programs can be analyzed with the framework. [28:00.630 --> 28:04.050] So all ABPF systems can be analyzed directly. [28:05.050 --> 28:17.090] And you are analyzing them using dynamic train tracking and symbolic execution to help guide the analysis of the framework over those specific samples. [28:17.730 --> 28:21.430] In this case, we just have a bound checker. [28:21.430 --> 28:22.390] That's it. [28:25.760 --> 28:27.880] And the framework is analyzing it. [28:29.320 --> 28:32.920] And it found a bunch of path that it can follow. [28:35.140 --> 28:37.980] It starts solving constraint with Zeta 3. [28:39.520 --> 28:43.520] And you can actually check. [28:43.520 --> 28:46.840] And after the result with Zeta 3, it starts the taint. [28:47.940 --> 29:00.180] When you finish up with the taint, it mixes up all the results and analyze them using the machine learning models to see if the ABPF software is actually vulnerable. [29:01.920 --> 29:10.160] In this case, for this specific example, we just have three vulnerabilities found. [29:10.600 --> 29:18.120] Two high confidence and one is medium for the sake of the demo. [29:20.980 --> 29:22.740] But that's not it. [29:23.960 --> 29:28.880] The framework is able to do the complete exploitation chain. [29:29.200 --> 29:33.880] So it starts from the fuzzing that we have done in the first demo. [29:33.960 --> 29:41.760] It took the three vulnerability found and it generated the primitives from that. [29:44.240 --> 29:52.160] It starts analyzing it and using the machine learning models, it tried to weaponize it directly. [29:53.440 --> 30:01.940] So you can have C code after this stage that is actually pretty complete. [30:03.200 --> 30:11.220] And you can, interacting with the framework, you can actually test the exploits on different platforms. [30:11.220 --> 30:15.880] In this case, I just had a bunch of machines to test it on. [30:15.880 --> 30:21.620] It's connecting over those machines and testing if the exploit works. [30:21.620 --> 30:24.560] The entire chain works over those machines. [30:25.500 --> 30:29.160] And it come out with an average success rate. [30:29.160 --> 30:35.300] In this case, we have roughly 90 percent of success rate for the exploits. [30:53.890 --> 30:58.250] So what we have seen so far. [30:59.370 --> 31:04.110] What we have seen is a state of fuzzing targeting specific verifier. [31:04.630 --> 31:06.330] Vulnerability classes. [31:06.390 --> 31:14.450] For instance, what we have seen in the first three vulnerabilities that we found. [31:14.990 --> 31:23.030] We are doing live verified bypass discovering in bound calculation logic. [31:24.490 --> 31:34.610] We have seen the complete development of the exploit and also the fact that we can analyze an ABPF system directly with the framework. [31:34.610 --> 31:37.470] An ABPF program directly with the framework. [31:38.270 --> 31:49.390] That can give us some insight on pre-escalation and actually we can get some juicy CV if you would like to see that way. [31:51.290 --> 31:55.270] But let's talk about some defensive recommendation. [31:56.590 --> 32:02.550] I would like to highlight the run time protection that you can have. [32:02.550 --> 32:10.750] The run time protection requires an input validation and capability restriction. [32:11.890 --> 32:15.150] For all the function in the outputs. [32:15.150 --> 32:17.250] So that's something that you need to monitor. [32:18.270 --> 32:31.690] You need to have real time detection of the exploitation attempts on the ABPF subsystem and you need to monitor a little bit better with the auditing the system a little bit better. [32:31.690 --> 32:41.310] Because so far what I have seen is that with ABPF a lot of people trust it and they just don't check the logs of ABPF. [32:41.310 --> 32:43.970] They just don't audit ABPF. [32:43.970 --> 32:50.830] But ABPF can be easily exploited and abused. [32:53.560 --> 32:59.660] So what's the future of the framework? [33:00.300 --> 33:10.800] From a future research direction I'm going to develop more on state modeling using machine learning. [33:11.820 --> 33:15.180] Cross component analysis mostly. [33:16.180 --> 33:24.880] I try to provide formal verification for some parts in particular for the quantum in the post quantum crypto. [33:25.500 --> 33:29.420] And also hardware integration. [33:29.580 --> 33:32.560] But there is something that is really juicy here. [33:35.160 --> 33:37.280] Windows is accepting. [33:37.280 --> 33:42.660] It starts to work on ABPF integration. [33:43.840 --> 33:49.600] Means that we have another attack surface that we can use. [33:50.700 --> 33:57.560] And this is the actual scheme of the ABPF subsystem that Windows is implementing. [33:57.560 --> 34:01.820] It's a little bit different compared to Linux. [34:02.820 --> 34:16.780] But in this case, as you can see from the slides, we have an alternative way to interact with the kernel in a Windows environment using ABPF. [34:16.780 --> 34:22.080] That's something that should scare you from a certain perspective. [34:22.080 --> 34:24.680] But it's a new research opportunity. [34:26.820 --> 34:30.520] So let me conclude with some key takeaways. [34:32.540 --> 34:42.120] We develop state of the world methodologies that provide a good improvement in vulnerability discovery efficiency. [34:43.660 --> 34:47.400] The systematic exploitation framework is Leviathan. [34:47.400 --> 34:54.280] Enable reliable exploitation chain usually in a decent amount of cases. [34:56.500 --> 34:59.700] And we also have some ordering recommendation . [34:59.700 --> 35:04.680] You need to monitor it more and you need to check the usage of ABPF. [35:06.800 --> 35:13.800] That concludes our journey to ABPF exploitation chains. [35:14.620 --> 35:23.040] And the framework will be open source, will be shared at the end of the August. [35:23.900 --> 35:34.100] Because from the frameworks came out during the first run roughly half a dozen CVE on ABPF subsystem. [35:34.100 --> 35:39.560] So working with maintainer we are trying to fix it. [35:40.600 --> 35:45.820] And we are trying to provide some guidance on how to improve the ABPF security. [35:47.580 --> 35:49.440] Thank you for your time. [35:49.440 --> 35:51.060] I hope you are enjoying DEF CON. [35:51.360 --> 35:55.460] And I'm here if you want to ask some questions. [35:55.660 --> 35:56.400] Thank you.