Security by obscurity is dead: How LLMs can take over hardware
Devcon·Sun, Nov 15, 2026, 12:00 AM
Transcript
[music] [music] Hey everyone. So, it's um oo echo. It's kind of exciting to be the last talk of the conference. And no pressure. Uh probably if you've been hanging around Twitter for the past few days, you've seen that in Europe, we have this constant stream of being hacked like refrigerators and stuff like that.
And you know, it's kind of scary. We don't really know what's happening and uh if we don't understand it, it's like well this AI this evil thing is just breaking everything. But uh is it or is it not? Well, let's take a bit of a look inside. If you were an AI, how would you actually hack things?
Well, let's start with a computer. This is a completely generic compute module. It could be your refrigerator. It could be your secure wallet. It could be anything.
And uh usually if it's important for a computer not to be hacked then it will have some a feature called secure boot. Secure boot essentially says that every operating system is digitally signed and the computer simply refuses to boot something that is not signed. And what happens if we try to look at the firmware? Well uh yeah uh cloud and and openai will flat out refuse. Um, LLMs are super good at looking at stuff and they are restricted a lot.
However, luckily we have a very nice Chinese model called Kimmy which is more than happy to talk to us about uh, you know, exploring things. So let's take a closer look. Uh, at a very very high level every computer essentially you have a CPU, you have RAM, you have a few extra other components but all of these are kind of internal. So these are controlled by the chip. Could you attack them?
Yeah, if you start soldering, if you start connecting, but realistically these are safe. However, we have another set of components which are the storage. That's kind of it can be an SD card, it can be an NVME drive, a USB stick or just remotely booting an operating system. Now this is what's external, what lives outside of the computer. And this is the interesting part where you know you can't really control it that well.
And in between the trusted environment and the untrusted environment, there's this little magic thing which is called the firmware. And every single hardware has a firmware baked in somewhere on some little chip on it. And this firmware is responsible for booting the hardware, for configuring stuff, for the drivers, for all of these little external devices. And most importantly it's also contains the secure boot code the code that keeps the entire system safe or at least tries to. So you know that thing is the entire protection mechanism for a hardware which you know means that uh that's a very very interesting thing to take a closer look at.
Now one challenge is that getting the firmware off of a device is messy. I mean, if it's, you know, it's in a tiny chip, you would need to solder it off. You would need to put it in a chip reader. You need to pass it through a logic analyzer. And yeah, it's a lot of process.
It's it's kind of hard to it's very easy to mess up. So, yeah, we'll probably mess it up. Luckily, we live in the world of internet of things that everything gets an update every second day. So, you know, we don't really care about the firmware on the device. Rather we care about the firmware on the update server which very often is on GitHub because you know why not put it on GitHub.
So Kimmy is very very happy because it doesn't need to look at the device at all. We can just look at the firmware. I mean look at the object server. So let's take a closer look at what's inside one of these firmwares. Ooh, there's binary.
Lots and lots of binary. Even more binary. So if we actually want to make heads or tails of this doesn't look like anything to me. I mean I can't process that meaningfully. And the answer is very very simple.
You know just disassemble the thing. Okay. Um yeah we have a lot of assembly. It doesn't really help us. And modernday security is based on we not understanding that thing.
However, things kind of change when these little blue guys or purple guys or whatever guys start appearing. Now, let's see. We can't make heads or tails off a firmware. But what would LLM do with a firmware? How would an LLM look at the firmware?
Well, it would do exactly the same thing that we just did. Can we disassemble it? And if we'll spin through the entire firmware and see that, oh what what are those red blocks? We try to disassemble it and half of the firmware or most of the firmware is hidden. It cannot be just split apart.
Okay, but the firmware is still running on the device. So the fact that there are these red things that are hidden, that's nice, but something needs to split it open. So, you know, let's take a look at what's in the blue part that we can interpret. And look at there, there's a LZ4 decompression algorithm. So you know just yolo run it the algorithm against the other data sets and does it access it?
Oh yes. So somebody went through a lot of pain to turn those little sections red and it took the LLM approximately 5 seconds to turn it back into green. Well, it still has some sections that were hidden that somehow it cannot access. No problem. We'll just look at whatever there is still and we find a completely proprietary data transformation algorithm.
Uh what do you know? We can just run that algorithm against the last red section and the entire proprietary hidden firmware is cracked open. It probably were at the five minute mark of starting to touch the firmware. Now the thing is that now we have a big assembly but still trying to find vulnerabilities in a big assembly file is very very hard. How where do we start?
Where do end what happens? So what an LLM will do is well firmwares are written for people. Libraries are written for people because if things go wrong we want to tell people what went wrong. They have these error messages embedded. So the first thing the LLM will do is scan the little disassembly for error message and it will find an error message that hey there's an HTTP error message, a DNS error message, various error messages from different modules.
So all of a sudden we know that hey this section of the code is an HTTP server. this section of the code is a DLS server. This section of the code is something else. And then based on that, we can actually piece together a core graph. We can say that well these this is the flow of information that goes across the firmware.
And the purple ones we know what they do. The greens one, we have no idea. We don't even care about them for now. But if you look at this, it is a boot process and there's a secure boot. So there's a bottleneck somewhere in it which does which ensures that bad input from the outside cannot do bad stuff on the inside.
Well, it's pretty clear where that bottleneck is. So anything that's after it's we don't care about because it's simply already a secure booted operating system. But anything before it, that's our ball. That's that's where we play game. That's that's the input that we can actually control.
So the LM can look and try to map it that okay these are the code segments in the firmware that we may have control over and do we have inputs that actually have control over them and it can map out that yes the SD card gets mapped into the top part the NVM into the middle part and etc etc the problem is that if we still try to find vulnerabilities like this the code complexity is too big there are too many things that can go wrong we need to restrict it we need to make it somehow smaller So one important thing to keep in mind that when you want to break a hardware essentially what you need to do is convince the hardware to execute stuff it's not supposed to execute. So somehow you need to get user input into the hardware's memory. So you need to find some buffer overflow some programming error when where things get overwritten that shouldn't be overwritten. And to do that there are like five six classes of bugs that can cause this. So we will just simply look for instructions where there's a buffer overflow.
We have no idea whether it can be actually uh abused. We just find them or we look for other instructions where that could introduce infinite loops or some special weird cases where the loop doesn't get called. We can look for instructions where you have an if clause but some parts aren't handled. We can look for PL instructions where you know it seems that there's some logical errors or that's components we know that this is the HTTP component and it it's called weird. And last but definitely not least, since we have all those little purple parts mapped out and we based on the arrow strings, we knew that this is HTTP, this is DNS, we can actually look at the common vulnerabilities and exploits database.
And basically we know that this library has this specific bug in it. And this way what we ended up with is a very very nice list of potential issues. Now it is much much smaller than our initial firmware but it's you know it's randomly inside we have no idea is it reachable is it abusable what can happen there. So what we will do next is line the whole thing up just pull out all these vulnerabilities and see that if somehow we could get to that bad part of the code what will happen and for the most parts what will happen is that your processor will crash. So maybe there will be some buffer overflow.
It overrides some bad place. The whole process crashes and uh because of this if you try to for example remotely attack a device it's very very hard because you can never know which pathways succeed and which pathways just crash. The moment the device crashed, game over. You can't hack it anymore. However, this way we try to figure out what would crash before even calling it.
And that kind of manages to filter out like let's say half of our potential uh vulnerability sites. Now still the task is how can we somehow map the inputs to those potential output sites. It's not trivial because again the problem space is too big. So if you want go from inputs and try to reach the outputs it's very very hard. But what if we do it in reverse?
What if we take the output path and try to do a reverse call? Try to see okay what code reaches the orange spot okay what code reaches that spot what code reaches that spot and when you go backwards you will have certain spots that there will be a validation which kind of kills off that branch either because there's an if check or it's simply not reachable it's code a lot of firmware have a lot of that code in them and eventually certain pathways will lead back to input that came from the user side and that allows you to have a list of actual vulnerabilities. The thing is up until this point, the only thing the fir the LLM did was some static analysis of the code. It didn't execute absolutely anything. It just looked at the code at here's a jump, here's a jump, here's a jump.
It created a small Python library or whatever model to model these jumps, but it didn't have to actually touch the code at all. The problem is that sometimes there are certain instructions I know math instructions uh move operations which make these pathways non-executable. Maybe they crash it, maybe they transform it in an unexpected way. So the LLM will actually this is the first point when the LLM will take the actual code from the firmware simulate the whole thing in Python because why would it run the actual firmware and then try to step through the entire process and see which of the exploits can be uh weaponized and most of them will be some of them will turn out that okay these are duds and at that point we have let's say five potential vulnerabilities that are legitimate vulnerabilities. Now, there's a catch.
This thing, what it allows us to say is that, well, if the user can control DNS, it can go bad. If the user can control PCI Express, it can go bad. But it's unclear how to make the hardware ask the user for a DNS name or how to make the hardware ask the user for PCI Express. For example, if I if my boot loader is configured to only boot from an SD card, obviously it will not ever touch the NVME driver. But this is where the interesting things this is where kind of the the the brute forcing comes in.
If we have a list of potential vulnerabil sorry if we have a list of actual vulnerabilities this is where the the uh the LLM will start you know to just try to recombine them and try to figure out whether can you somehow create an actual exploit chain and uh eventually it will end up with something like this. So it will say that well we have the compute module which can which can do network boot. network boot is essentially we can request the operating system from HTTP. Great. So we run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run run and since HTTP comes from our laptops or what wherever network the device is plugged into we can have the HTTP server say sorry error.
No, normally an HTTP server doesn't say error, but since it's untrusted, it can say error. And then the compute module is like, wait, wait, wait. So, we errored, so we need to go into some retry mode, which is a completely different implementation. Ooh, now we're in the second exploit. So, that implementation starts running and then the HTTP server says, "Ooh, how about we don't give you the data, we just redirect you."
So now all of a sudden the bootloadader went into yet another implementation pathway. These pathways are in the firmware because they just pulled in a library from GitHub. These pathways should not be in the firmware. This the firmware should not do a DNS lookup. But you know nobody ever cared to delete that part.
Why would they? So once you're in the DNS pathway, what the firmware does is, hey, can you please resolve this domain into an IP address? you know, an IP address is either four bytes or eight bytes if it's IPv64. So, what the firmware does is, well, let's copy the answer into a buffer that's 64 bytes long. And if the DNS server returns a 5 kilobyte thing, then yeah, surely it won't return a 5 kilobyte answer.
So we return a 5 kilobyte answer and basically override the entire memory of the firmware leading to a memory overwrite, a remote code execution and full secure boot bypass. And um the question is how much effort I mean how probable is that something like this could be pulled off against potentially a hardware produced by a very very high value um company. And what would be the cost of pulling this attack off? Well, um I had Kimmy run against the hardware. It found I was completely expecting it to find zero on all of those.
It found 15 zero day vulnerabilities. Now these zero days are somewhat some are maybe exploitable, some just crash, some are bad. We don't know. It also found three secure boot escapes. Now in a hardware project, a secure boot escape is catastrophe.
That's the critical game over. So having one is a huge problem. Having three is like dudes what are you doing? And uh at least if it would be expensive you would say that you know it has a cost but no unfortunately no it doesn't have a cost. So doing the whole um whole scan took approximately one hour on a $100 Kim sub.
And interestingly, after I managed to find these vulnerabilities with LLM, it took me an entire day to reproduce it on hardware. So essentially, I was absolutely the bottleneck on uh on the entire vulnerability hunting process. And um yeah, it's um it is a problem because this is the actual this is the reality that we live in currently that LLMs simply can very very quickly restrict the problem space just to a handful of potentially vulnerable positions and they can keep grinding it and recombining it until it they get through and uh so what is the solution? How can we actually avoid all of this? And the answer is that um I think Matthew Green at some point had a post on Twitter that if you have a firmware update on the internet, delete it like immediately.
Just hide it, which is like the worst thing a security researcher can say, but it's also the best thing that you can do today. You're just if an LLM has access to your firmware, it doesn't matter that it's proprietary. It doesn't matter that it's hidden. It doesn't matter encrypted, that's whatever. It will eventually crack it open.
[snorts]
So, um, yeah, that really doesn't work. So, option A, you hide it. You never show it to anybody and hope for the best. Or option B is that you really lean into open and verifiable stuff like the PQ1 what they are doing and hope that LLMs ground your initial firmware enough so that once it's out in the wild, it doesn't really get uh owned. And um, that's it.
Thank you very much. The links are if you're interested in other stuff that we're doing, feel free to check otherwise happy to answer questions.
Thank you. Thank you, Peter. And I'm here to help you with the questions for sure. Uh could you please come in closer here. Alrighty.
Um so let's start with the first one. And just a reminder, there's so many of you and there are just four questions there. We should we should fix that. Go scan the curl code while we are dealing with that one. What is is LZ4 error?
So LZ4 is a compression algorithm and um every time so it's it's kind of like a compression library nothing fancy it just makes data smaller just obiscates data and the error is just any error string that you can find in uh in a library. So whenever you're doing development software development all the libraries usually have a lot of userfriendly error strings. So when things go wrong, the developer has a clue what happens. And these error strings are always they always end up in the firmware because why would you delete them? Except since they are in there, they are these super valuable anchor points from where you can start your investigation on splitting a firmware open.
All right. From a serious question to a funny question, which devices in your own home have you already hacked? Um the only device I hacked is a completely generic blue compute module which does not exist in the world. [snorts] Um basically that's saying that I should not say it's u most of the issues that I have talked about have already been published and fixed some of them not. So I would uh it would be probably more ethical if I didn't detail it further.
Okay. Um the next one pretty much describes the mood that you might end up with after your talk. So cipher funk and p or privacy is over.
No, I think we are living in the renaissance of cippher punk and privacy. Just we realize that everything we built until now was bit crappy. But now we've given a second chance to you know rebuild from the ground up. Yes, this might mean that any internet connected device you have in your home that you cannot update might end up in the garbage can. But I think the world we built will be much closer to the cipher punk vision than the world we have currently.
Okay, we have two questions that are competing with each other. I'll have to choose one because otherwise my eyes will go like that. Do you think smart devices should be dumped down to reduce white dependencies? Um I mean um I guess the question I am not entirely sure I will interpret the question correctly. If by dumb down I mean to cut features.
I mean why does your washing machine has a Wi-Fi? I mean if you have a washing machine yes please dumb it down. If the question is do we want to get rid of dependencies so we have more dependencies inhouse and less potential outside vulnerabilities. I think this is a temporary problem that everything is vulnerable but once libraries start being secure it will probably be safer to rely on battle tested libraries again. So
okay um the next one what evidence do we need to determine if hardware can survive and large language model exploit like this in this context is there any perfectly safe hardware?
No. Um if [laughter] this is a personal opinion if you ask me um security is a spectrum. I mean there's always there always ex exists enough effort enough money to break something. The question is is it worth it? If for example you have a hardware wallet and you have a million dollars on it the effort is worth I mean you can invest a lot of money and still make it worthwhile to break it.
If you have a refrigerator at home, you know, maybe for shits and giggles, somebody might break it, but it's not really a valuable target. So, can you make it ever perfectly safe? The the reason I would say no is because math is evolving, physics evolving, and we can never prove that there will never exist some new theorem, some new force uh interference which we haven't accounted for. That will be the breaking thing. Okay.
And we are at our final question because we're running out of time. So the last one for today will be why Kimmy?
Because Kimmy likes us. Kimmy Kimmy told me that it's my hardware. So it's fun to break it. It's fine to break it. You know, it's we like Kimmy.
Kimmy is cute. But but just just maybe to to do add one note. Kimmy is not the best. So, for example, OpenAI as Astra is definitely better at breaking stuff. It just doesn't want to help you.
So, ideally, the way I use them, I talk with Kimmy and then sometimes I'm like, "Hey, Astra, can you just do this little bit, please, please, please?" And then you can you can play with it.
Okay. And on this note, the hugest round of applause to our final speaker today, Peter. [music]
Automatic transcript — names and jargon may be misspelled.