DSS 2026 — The Attestation Gap: Securing Private AI and TEE-Backed DeFi Rahul Saxena Source video: https://www.youtube.com/watch?v=WoXWnORKZSs Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: c4424621b3334d9b43bb2dc7df9daa14ad84f325db34f7f33ae2f878bc446544 [0:02] Hello. [0:03] Hey everyone. [0:04] So it was a great follow-up talk to [0:08] start speaking at because [0:11] privacy is the need of the hour and for [0:13] privacy you can have a bunch of PETs, [0:17] privacy enhancing technologies and the [0:19] world is a efficient place. It will find [0:22] the best solution [0:23] between ZK, FHE, MPC, TEEs and what not. [0:28] So [0:30] let's talk about TEEs today. [0:31] I'm Rahul Saxena. [0:33] I'm the founder of Bluethroat Labs and [0:35] we kind of specialize in TEE security [0:38] amongst other things. [0:40] So let's dive right in. [0:43] The attestation gap, securing private AI [0:45] and TEE backed DeFi. [0:47] So this talk is necessary because I [0:52] I feel that there is a huge [0:55] education/awareness [0:58] gap in the market around what TEEs offer [1:01] and when people say that we use TEEs [1:04] that they simply assume that it's [1:07] completely private. Something is running [1:10] in a computer where the computer itself [1:11] doesn't know what is going on. So it's [1:14] private and it can be inferred on chain [1:17] as an oracle. So you know a complete [1:20] privacy solution is up for grabs. [1:23] But there is a huge amount of infra that [1:28] needs to go to make this happen. There [1:31] is a huge amount of steps that need to [1:34] be taken to make sure that TEE usage is [1:36] actually safe or not. [1:39] And that is the attestation gap. Company [1:42] A saying that they use TEEs and use [1:44] attestations for privacy [1:46] versus company B saying that they use [1:48] TEEs for attestations [1:50] for privacy [1:52] can be two completely different claims [1:54] and let's now figure out why. [1:56] And right now private AI and TEE backed [1:59] DeFi is [2:01] privacy focused DeFi are the two main [2:03] topics where T's are being used very [2:05] heavily. [2:07] So [2:09] when you say that you are using T's, [2:11] what are your users trusting? [2:13] For private AI you are assuming that all [2:16] the data that you are sending to the [2:18] models, the inference that is private, [2:20] right? [2:21] And for T backed DeFi, what are your [2:24] users assuming? For example, you cannot [2:26] be copy traded. Like let's say you run a [2:29] matching engine inside of a TE and [2:32] settle things on chain on Hyperliquid, [2:34] you get a [2:35] private uh market uh [2:38] private trading place in Hyperliquid. [2:41] So [2:44] we will now [2:45] take a look at the bunch of research [2:47] that we have done in Blue Throat Labs [2:50] for writing our TE research T security [2:52] handbook and figure out what exactly can [2:54] go wrong when you're using T's. [2:57] So the first thing, [2:59] the attestation gap, the gap between [3:01] what attestation proves and what your [3:03] protocol promises. [3:04] So [3:05] when you get an attestation, that is [3:08] simply a promise about the environment. [3:11] Something ran in a TE, [3:14] something was executed and you get a [3:18] attestation certificate of that. That is [3:20] it. That does not imply anything less, [3:23] anything more. Your policy on how to [3:26] handle that is the main blocker for how [3:29] secure your applications are going to be [3:31] because after your policy you do take a [3:34] decision on who to give access, who to [3:36] give money, who to send information, [3:38] etc. etc. etc. So your software owns the [3:41] decision to trust. [3:43] The evidence, the attestation is simply [3:45] an artifact on which you decide you want [3:48] to trust further or not. [3:51] So [3:52] let's see. This is one of the first few [3:55] bugs that we found in uh [3:58] Fala/Dstack. [3:59] So they had an offering for [4:02] private AI, and of course in private AI, [4:05] what you're assuming is that your [4:07] attestations I mean [4:09] your [4:10] inputs are private. Nobody can read it [4:12] and the output you get, nobody is [4:15] reading them. [4:16] So the software, the logic for that runs [4:20] in the CPU and the models themselves run [4:22] inside of the GPUs. So both the CPUs and [4:26] GPUs need to provide attestations to [4:28] prove that [4:29] they're running privately. They are [4:30] inside of TEs. [4:32] And what we found that the CPUs were [4:35] secure. They had their attestations. [4:36] They were being checked correctly. [4:38] But for the GPU report itself, it was [4:41] simply getting passed. There was no [4:43] checks against the kind of attestation [4:45] being received from the GPU. [4:48] So without any checks, the users were [4:51] getting their back their command. So [4:53] technically there was no guarantee that [4:56] the prompts that they were giving that [4:58] the private AI they were using was [4:59] actually private because without the GPU [5:02] being [5:04] proven to be in a secure enclave, you [5:06] can never say that you are running a [5:07] private DeFi [5:09] private AI. [5:10] So passed is not verified. Even if you [5:14] get the attestation, the attestation [5:16] needs to be checked against certain [5:17] fields to make sure that the attestation [5:19] is valid. [5:21] So again, this was a public finding was [5:25] remediated. Falla Security thanked us. [5:27] Great. [5:29] So this was another finding that we had [5:32] in Falla again. So this was the library [5:35] that they use called Dcap QVL. [5:38] And [5:39] here again, what happened was [5:42] they were fetching a collateral from the [5:45] Intel signatory [5:46] and they did not check a bunch of fields [5:50] that need to be checked. For like [5:51] basically the [5:53] coating enclave identity was not being [5:55] matched. So even though the collateral [5:58] was being fetched, even though a lot of [6:00] data from the collateral [6:02] I mean a lot of data from the [6:03] attestation was being checked. It is the [6:05] collateral. [6:07] The main thing [6:08] who has who is the quoting enclave [6:10] identity, that was not being checked. So [6:12] there are fields like MR signer, ISV [6:15] ECN, etc. etc. that was not being [6:17] checked. So again, even when you get the [6:20] collateral and you are doing the checks, [6:22] if you do insufficient checks, you do [6:25] not even know which kind of T or even if [6:27] it is a T [6:28] that is giving you attestation [6:29] certificates. [6:31] So partial verification can still return [6:33] valid and you can still be in a facade [6:35] that [6:36] your stuff is running inside a T, it is [6:39] secure, it is private, but it is not. [6:41] Again, a public finding, we got a CV for [6:43] this. [6:44] Thanks to part of the security team. [6:47] Next. [6:49] So this is a very interesting thing that [6:51] I want to speak directly to the protocol [6:53] owners in the room and [6:55] on YouTube directly. [6:57] So [6:59] this is a KMS and app applied [7:02] differential TCB gates. So what I want [7:04] to focus on here is that [7:07] when you think about TC when you think [7:09] about [7:11] T's, it's all about [7:14] how many layers of security do you want [7:17] to get it to? How much paranoia do you [7:19] want to give into? And I think [7:21] technically that should be defined by [7:23] the kind of [7:25] TVL that you're supporting or the kind [7:27] of [7:29] of service that you're offering. [7:30] But [7:32] there comes a time where you have to [7:34] just [7:35] stop digging because like it it it comes [7:37] to a place like you just cannot [7:41] simply just do everything by yourself. [7:43] You have to trust at some places. [7:45] But it's very important that you figure [7:48] everything out like what are all the [7:51] things that can go wrong? What are all [7:53] the threat [7:54] threat actors if they lie, if they [7:56] behave maliciously, [7:58] our protocol can fail. [8:00] For example, here [8:02] there was there's something called TCB, [8:04] the trusted computing base, and Intel [8:07] can sign a [8:08] certificate, it can give an attestation, [8:10] but also give your status that the TCB [8:13] for this attestation is out of date. [8:15] So the trusted computing base from which [8:17] this attestation was generated was out [8:19] of date. So it is now up to you whether [8:22] you want to process this attestation, [8:25] pass it through your status check, your [8:27] policy and take actions or not or or not [8:30] accept it. [8:31] So [8:33] why I want to bring this up is that [8:36] in the ideal world you will be doing [8:38] everything by yourself, you will be [8:39] setting up your own infra, you will be [8:40] setting up your own [8:42] policies and whatnot, but in the [8:45] beginning in the real world you would [8:47] you will depend on some [8:49] TE provider [8:51] and then you have to figure out all [8:53] these checks whether they are being done [8:54] by the provider itself or they are being [8:57] left to the app developer as your own [9:00] policy advice as your own policy [9:04] choice. [9:05] So you have to figure out what are the [9:06] decisions that are in your hand. [9:09] Take it and do not assume that the TE [9:12] provider is doing it for you. [9:14] So again, this was not [9:16] a bug per se, but [9:19] the [9:20] team at Dstack and Falu, they took care [9:22] of it and [9:24] it made it more secure. [9:28] Now we come to the next level of TE [9:31] bugs. [9:32] So just because something is running [9:34] inside of a TE does not mean that the [9:37] software inside it is bulletproof. [9:39] If the software inside the TE itself is [9:42] buggy and those bugs can be triggered, [9:45] then the TE does not protect you. [9:47] For example, this is one of the bugs [9:50] that we found in an audit of Secret [9:52] Network. Secret Network is an L one and [9:55] it uses Intel SGX TEs in its nodes. [9:59] [snorts] So [clears throat] [10:02] an active validator during its proposal [10:04] slot can use that particular byte, just [10:08] 0 x FF, that single value [10:10] and its proposal slot send propagate it [10:13] during its proposal slot and then when [10:16] all the honest validators try to decode [10:19] it [10:20] they would hit a panic and then they hit [10:21] a panic they cannot reach final T [10:23] leading to a chain halt. [10:25] The T attestation were completely fine [10:28] that attestations were being checked the [10:30] policies were correctly implemented the [10:32] trust model was completely fine but the [10:34] code itself was not able to handle [10:37] malicious input so this is what [10:39] happened. [10:41] The enclave passed bytes before normal [10:43] decoding so in in in the time of the [10:46] proposal [10:47] the active validator set one of the [10:51] Byzantine validators [10:52] can put the 0x ff value there [10:56] it can reach the consensus and the [10:58] consensus software typically does not [11:00] care about the payload that you have it [11:02] wants to take care of [11:04] the consensus guarantees consensus [11:05] property so it does not read it [11:07] and it forwards it to the SGX parser [11:09] directly SGX parsers [11:12] tries to parse 0x ff [11:15] protobuf cannot figure out what to do [11:17] and it panics which leads to [11:20] a chain halt. [11:22] So this was a chain halt bug that we [11:24] reported in secret network and this is [11:26] all just to point out that we use T's do [11:30] not make you secure T's is just a part [11:33] of the equation and there is a lot of [11:35] surrounding work that you have to do to [11:37] make it actually secure. [11:41] Yeah and also this is a very cool [11:44] way to tell you that [11:47] the boundaries of T's and some other [11:50] systems is a place where a lot of bugs [11:53] are found typically [11:55] because [11:56] any boundary should be treated as an [11:58] oracle no matter how trusted that [11:59] boundary is and if you do not trust it [12:02] I mean if you trust it and you just you [12:06] let your T's get any inputs you kind of [12:08] get end up getting wrecked. [12:13] Cool so [12:14] we had a lot of findings. You can [12:17] find them at bluetoothlabs.com/releases. [12:20] But from these four main findings, what [12:22] I can tell you are the four checks for [12:25] your T [snorts] integration in your [12:26] protocol. Okay? [12:28] So, [12:29] it's pretty simple. Alter or remove [12:31] required evidence, which is rejected [12:34] invalid or missing evidence. [12:36] Basically, if the evidence coming in is [12:38] not actually coming in, it's not [12:41] correctly coming in, it's not [12:43] fresh, it's not by the correct entity, [12:46] reject it. [12:48] Present a disallowed entity or status. [12:50] Now, check the status of the signature [12:53] itself. Like the attestation might be [12:54] valid, but what are the values inside of [12:57] the attestation? What is the collateral [12:59] in the attestation? Check all of them. [13:01] If they are correct, let it through. [13:04] And it's not always going to be binary. [13:06] You have to make decisions based on your [13:08] protocol requirements, whether you want [13:10] to [13:11] let a certain attestation do a certain [13:14] state change in your protocol or not. [13:16] So, again, do it. [13:18] Third is no acceptable evidence [13:20] available, [snorts] which is [13:22] if nothing is present that authorizes [13:25] something from a T, do not process it. [13:27] And [13:29] send hostile enclave input, which is [13:32] always be mindful of all the inputs that [13:34] are coming into your T's from any [13:36] boundaries whatsoever. Nothing is [13:38] trusted for a T. [13:40] So, [13:41] apart from this, like for the T itself, [13:43] there are a bunch of other things. For [13:45] example, [13:47] how do you make sure that the code that [13:49] you audited is the actual code running [13:50] inside of a T? How do you make sure that [13:53] the [13:54] clock that the T software is is relying [13:57] on is actually correct because the time [14:00] can be supplied by the hypervisor, which [14:02] is not trusted in the T model, etc., [14:04] etc. But overall, in a general sense, [14:06] for T integrations, this is a pretty [14:09] cool checklist. [14:13] And finally, I would say that we have [14:15] written a really cool T security [14:17] handbook, [14:18] which covers all the bugs that we have [14:21] found, all the knowledge that we have [14:23] gained around T's. You can scan this QR [14:26] code if you want to read it. This is the [14:29] URL and we have also applied for [14:32] a grant and in the DAO fund [14:35] Ethereum funding. So if you like the [14:37] book, please donate anything that you [14:40] can. [14:41] Thank you. Have a nice day.