start	end	text
2450	6550	Hey everyone, I'm Suha. I'm really excited to be here today.
6550	11190	So, let's get started. I want to talk to you about ML security.
11330	15350	Specifically, I want to talk about this new class of exploits I identified called
15350	19970	incubated ML exploits that combine backdoors and input handling bugs.
19970	23450	Don't worry if you don't know too much about ML or ML security.
23450	26310	I'll explain all the important stuff as we go along.
27490	31310	So, who am I and why am I even talking to you today?
31310	36170	I'm an engineer at Trail of Bits where I focus on AI and ML security.
36170	41550	I've been in the field for a few years now. I graduated from Georgia Tech and I'm originally from Queens.
41910	46970	Outside of work, I like Brazilian Jiu-Jitsu, trying new restaurants, making things,
46970	49690	and an obscure card game called Q-Birds.
50390	55370	So, it's becoming pretty clear with ML and AI popping up everywhere,
55370	59690	people are figuring out how to trick these systems based on how these models work.
59730	64390	Maybe you've seen someone use prompt injection to convince a chatbot to give them a refund.
64390	70250	Or maybe you've seen this story right here of protesters tricking self-driving cars with traffic cones.
70790	76310	Notice the fact that this trick is rooted in an understanding of the training data for these models.
77190	83030	So, how can we actually construct our own useful exploits against ML systems?
84670	87370	Let's play a game of pretend real quick.
87370	92270	You're a college student and you really, really want the prize money for a robotics competition.
92290	95810	So, naturally, you decide to sabotage another team.
95990	101110	Side note, I don't recommend this. I don't condone this. I've never done it myself.
101190	105970	But anyway, the competition requires teams to build a tiny autonomous vehicle
105970	110250	that uses a specific pre-trained model and stops at stop signs.
110250	114670	So, you find out that some of these stop signs have these little stickers on them.
114670	118970	And you also find some flaws with how they've stored and distributed the model.
118970	121870	Which, by the way, isn't out of the question.
121890	128490	ML artifacts are often widely shared without any meaningful or substantial trust mechanisms.
128650	135270	So, you decide to grab that file and inject a model backdoor in it using a file format RCE of some kind.
135270	136590	And then you put it back.
136590	144450	Then, on the day of the competition, you sit back and you just watch as your competitor's vehicle just plows through
144450	147410	and ignores every stop sign with a sticker on it.
147410	153090	What you just did is execute an incubated ML exploit, which is what my talk is all about.
154050	158490	So, obviously, the stakes of this story is just a lost robotics competition.
158490	164550	But the idea of attacking a real autonomous vehicle is a hallmark of model backdoor research.
164550	167110	And you can see that with the image on the left.
167110	170550	So, I'll let you use your imagination to raise the stakes.
171770	179050	So, in my talk, first I'm going to tell you about this framework that I've been using to bridge the gap between model and system security.
179050	183070	Because we can't continue to treat models as standalone objects.
183130	189610	Next, I'll tell you about these input handling bugs I found in model serialization and connect them to backdoors.
189630	193630	I'll do that by taking a page out of this subfield called langsec.
193630	200910	So, effectively, I'll be going through a bunch of examples of incubated ML exploits and use langsec to organize them.
201430	203990	But first, I need to explain some stuff.
204050	207830	What even is a model vulnerability or an ML backdoor?
218850	228290	So, super briefly, you can think of ML models as these squishy, flexible sequences of linear algebra operations that are trained on tons and tons of data.
228370	232630	There's a pretty popular saying, all models are wrong, but some are useful.
232630	235110	We're just saying that these models aren't perfect.
235110	240390	There are many different ways they can mess up or get tripped up by something that might be unexpected to us.
240390	243210	And that's the basis of such model vulnerabilities.
243210	250630	While popular examples of model vulnerabilities include model inversion and membership inference, we're zooming in on one specific type.
250630	251870	Model backdoors.
252690	261250	So, to be precise about it, a backdoor attack allows a malicious actor to force an ML model to produce specific outputs given specific inputs.
261250	266230	Now, there's a couple of things that I think make backdoors really interesting to study.
266310	271270	First up, you can use them as primitives for other model vulnerabilities, like membership inference.
271330	275510	You can also identify pre-existing, quote-unquote, natural backdoors in them.
275510	279910	And there's also some pretty strong evidence that suggests that this is an inherent threat.
281010	289790	Now, while there's a lot of awesome research on ML model attacks, they can actually be pretty hard to exploit in the real world, with some exceptions, of course.
289790	297430	While there are multiple reasons for this, one thing that really sticks out to me is the big gap between research and the real world.
299790	306430	So, for the most part, many attacks and attack frameworks and tools restrict their analysis to this formulation.
306550	310490	An ML model receives an input and produces an output.
310490	314950	But this isn't an accurate representation of what an ML system actually looks like.
314950	317490	There's so much more going on in practice.
318210	323350	Here's a software architecture diagram for an ML system reviewed by Trail of Bits recently.
323350	326690	This is a system that uses the Ask Astro tool for RAG.
326690	329630	And I've circled where the model actually is in this photo.
329630	330790	Do you see what I mean?
330790	333730	We need to be looking at all of this holistically.
333930	339270	There's a large and evolving landscape of tools being used in and for ML systems.
339270	342210	And that brings me to the exploit framework.
343070	347290	So, the title of my talk references an incubated ML exploit.
347290	354310	But there's this larger category of exploits called hybrid ML exploits that are important to think about first.
355450	361050	Specifically, a hybrid ML exploit chains a system security issue with a model vulnerability.
361090	364310	This can go in either direction, and you can see that on the diagram.
364310	368030	You can have a model vulnerability that exposes a system security issue,
368030	372270	or you could use a system security issue to exploit a model vulnerability.
373170	375630	So, this part's pretty important.
375630	382390	The big issue that I see with ML security is that model security and system security are treated separately.
382390	388690	But what I need you to understand is that if you only know model security, you're missing a big piece.
388690	393250	And if you're only covering system security, you're still missing a big piece.
393250	399150	And if you're treating the two processes completely independently, once again, you're missing a big piece.
399150	403230	You're then entirely ignoring the potential for hybrid ML exploits.
403230	404890	This is an emergent property.
404890	413310	So, your model is embedded in a system, and it's going to interact with all of the different system components in new and exploitable ways.
413530	418170	So, one thing you'll notice is that there's a lot of screenshots of paper titles on this slide.
418170	423830	That's because there have been specific instances of hybrid ML exploits in the literature and in practice.
424090	426330	They're just not called that explicitly.
426590	429530	Exploitable software gadgets have been used for backdoors.
429530	434530	The summoning demons paper up there at the top chained model evasion and memory corruption.
434530	443090	And the learn system security paper next to it has an example of a poisoning attack that caused an exponential memory blowup in an index structure.
443430	449230	But the ML security literature framework and tools are largely limited to just that.
449230	451710	Specific instances or implications.
451710	457810	What I'm trying to do here, what I want to be doing here, is treating this interaction explicitly and systematically.
457850	459870	And that's why I made this framework.
460530	465050	So, one kind of system security issue is an input handling bug.
465050	468970	And one kind of model vulnerability is a model backdoor.
469230	473230	Put that together and we get an incubated ML exploit.
473230	480230	Which is a type of hybrid ML exploit where an attacker uses input handling bug to inject a backdoor.
480230	484250	So, I made this diagram to make the distinction between the two pretty clear.
484710	487070	And here's the definition again.
487070	489390	I'm going to leave the framework here for now.
489390	495710	We did end up going into a bit of a more formal model of exploitation including this exploit schema.
495710	497630	But we'll return to that later.
498590	505710	So, to backdoor a pre-existing model, the attacker should be able to change the parameters or the architecture.
505710	511570	Now, at the level of extraction we're dealing with, we can put input and component manipulation on the side for now.
511570	515890	But how this actually plays out can vary a lot.
515890	521050	For example, sometimes the attacker has control over some element of the training process.
521050	526450	And they use that to sneak in some manipulated data that changes the model's parameters.
526450	528470	That's usually called data poisoning.
528650	533490	Or they might go a step further and fiddle with the model's source code to change the architecture.
535190	540550	Now, before we talk about exploits, I want to explain a few things about input handling bugs.
550090	552830	So, an ML model is stored as a file.
552830	555590	To process these models, you need parsers.
555590	560870	And parsing these files into objects and back is deserialization and serialization.
561350	565090	But wait, quoting Ange Albertini here,
565290	567530	a file has no intrinsic meaning.
567530	574130	The meaning of a file, its type, its validity, its contents can be different for each parser or interpreter.
574290	580730	Now, this is the reason we can make cool, potentially malicious file artifacts like polyglots and ambiguous files,
580730	582510	which I'll talk more about later.
583350	588990	So, I'm focused very specifically on bugs that arise when you parse ML model files.
589090	594130	There's also cool bugs in other parts of the pipeline, but I'm picking ML model files for several reasons.
594130	599470	The first reason is, and I'm sure you all will agree with me on this, the most important.
599470	600690	I think it's fun.
600970	607670	But more seriously, the security of ML file formats has become increasingly important.
607670	611830	Real malicious model files have been found on the Hugging Face Hub, for example.
611910	615730	And there's also just an absolute ton of ML file formats out there.
615730	619010	I've tried to list and organize them in the repository in the middle,
619010	623670	but what's important for you to take away is that there's a large set of possibilities for these exploits,
623670	626170	as well as just fun hacks with these formats.
626270	630730	And there's already a lot of great work in this area, as shown on my slide.
631530	634950	So, file format tricks are within the realm of LangSec,
634950	640210	but this field actually thinks more abstractly about inputs as a general class.
640210	643610	LangSec applies formal language theory to system security.
643610	649770	It focuses on exploring input handling bugs, or parser problems, as a big root cause for security issues.
649770	655710	After all, lots of impactful vulnerabilities like Heartbleed and Android Masterkey have been parser bugs.
655710	661450	Now, while I like formal language theory, this talk isn't Theoretical Computer Science 101.
661850	666190	So, just know that fundamentally what LangSec is saying is,
666190	669550	hey, let's treat all of the inputs as a specific language,
669550	674410	and make our code just capable enough to understand that language properly.
675050	679870	So, my work is centered around a specific taxonomy of input handling bugs.
679870	682010	And these are all the different bug classes.
682010	683710	There are eight different types.
683710	687150	Quick note, these categories aren't actually completely distinct from each other.
687150	690270	The one you choose comes from a root cause analysis.
690610	695130	So, with the exception of one, I'm going to show you multiple examples of each in ML Tools,
695130	697530	and use them to build an ML Backdoor.
698250	702530	So, I'm going to run that one more time.
702670	705930	In order to show that input handling bugs are a vector,
705930	710550	I identified issues with ML Model Serialization across these different bug classes
710550	713170	in order to construct ML Backdoors.
713910	717510	So, now we can dive into the most fun part, exploits.
717510	723690	Now, for the sake of time, I'm going to focus more on the useful gadgets for these exploits.
732240	736280	So, these are some characters that play important roles in the ML ecosystem
736280	741260	that can help us understand the impact of these exploits.
741260	747220	So, Alice, she distributes models. She takes open source LLMs and fine-tunes them.
747820	752080	The models she distributes are what everyone else in our story is going to be using.
752800	757200	Bob is a frontline user who directly uses Alice's models in his own life.
757200	760040	Maybe he has a nice chat interface pulled up.
760740	765560	There's Dave. Dave is a developer who is trying to integrate these models into products.
765980	770520	Frank is the end user who is relying on Dave's products in his daily life.
770520	774960	He might be unaware of the ML models working behind the scenes.
776340	779900	And now we have Chuck. Chuck is the attacker.
780020	785160	Our focus here will mainly be on how Chuck can impact Bob and Dave.
785160	794400	So, I'll describe some exploits involving the file formats associated with Pickle, PyTorch, TorchScript, ONX, and SafeTensors.
794980	799360	So, this first category is called Non-Minimalist Input Handling Code.
799360	805900	It sounds a little fancy, but all it means is that the code used to check and parse these inputs is too complex.
805900	809880	So, an attacker can potentially grab the necessary gadgets for their exploits.
810760	818320	So, Pickling is a serialization method that allows you to save arbitrary objects, and it's very, very common in the ML ecosystem.
818460	824600	Recently, my coworker Boyan Milanov led the development of SleepyPickle, which is an incubated ML exploit.
824620	828820	And what it does is it chains a Pickle RCE with model backdoors.
828820	833600	So, on the right, you can see an LLM that has been backdoored to phish users.
833600	841560	The blog post also has some examples of an LLM being used to spread misinformation and even steal user data.
841620	845240	But what's cool about this exploit is that it can happen on the fly.
845240	850180	So, there's more room and possibilities for an attacker than just uploading a malicious model.
851340	854280	So, what do I mean by Pickle RCE?
854280	860800	Python Pickles are compiled programs that run in a unique virtual machine called a Pickle Machine, or a PM for short.
860800	867640	The PM interprets the Pickle file sequence of opcodes to construct an arbitrarily complex Python object.
867640	877660	But it has two opcodes, global and reduce, that can execute arbitrary code outside of the PM, which makes it possible to construct malicious Pickle data.
877660	883740	Now, the underlying issue here is that the PM is more complex than something that's only parsing ML models should be.
884840	890000	So, way back in the year 2021, we released this tool called Fickling.
890000	892460	This project was led by Evan Sultanik.
892460	897400	To our knowledge, Fickling was the first Pickle security tool tailored for ML use cases.
897400	901800	It's a decompiler, static analyzer, and bytecode rewriter for Python Pickle.
901800	906080	So, it can help you detect, analyze, and even create malicious Pickle files.
906080	913400	So, the reason it's safe to run on potentially malicious files is because it symbolically executes code using its own PM implementation.
913400	920780	Relatively recently, I added a PyTorch module to it to make it easy to statically analyze and inject code into PyTorch files.
920860	923040	But Pickles are clearly bad for Bob.
923040	930200	If Alice is distributing models as Pickle files, that makes it that much easier for Chuck to inject a backdoor using a Pickle RCE.
931020	933320	So, on to the next class.
933320	938900	This term just means you shouldn't try to correct invalid input, reject it altogether.
938900	942460	I've heard it referred to as the anti-robustness principle.
943780	951400	So, to deal with the issues with Pickling, many devs write these things called restricted unpicklers.
951400	956400	Now, those are subclasses of unpickler that try to enforce an allow list or a block list.
956400	959100	The thing is, they're actually not that hard to bypass.
959220	965400	There's this methodology called PainPickle that demonstrates how to automatically bypass restricted unpicklers,
965400	970080	which would enable arbitrary code execution and, to that end, backdoors.
970080	976340	So, they identified eight different types of unpicklers and three strategies that work against the vast majority of them.
976360	983440	So, much like Pickle was bad for Bob, restricted unpickling bypasses pose a problem for Dave if he relies on them in some fashion.
984400	987100	Now we can talk about parser differentials.
987540	993340	So, this happens when different parsers in a system read the same input but interpret it differently.
993340	1000820	So, when two parsers interpret the same file in different ways, that file is known as an ambiguous file.
1000820	1004460	This is a very common exploit technique. It's pretty good for bypasses.
1004460	1011780	It means you can create an ML model file that is benign for one system or system component but backdoored for another.
1011780	1017440	There's some more bigger implications for ML system exploitation here that we'll talk a bit more about later.
1017440	1021560	But just a quick note, whether or not this is impactful at all depends on your system.
1021560	1024580	So, that's where you want to do threat modeling, of course.
1026000	1031160	So, we actually were able to create two differential proof of concepts with TorchScript.
1031320	1037200	TorchScript is a popular format to store ML models in for a couple of reasons, mainly performance and portability.
1037200	1042320	But you can make a parser differential with it and chain it to an architectural backdoor.
1042320	1047900	So, that's because you can turn a PyTorch model into a TorchScript one through tracing or scripting.
1047900	1050900	And tracing doesn't incorporate dynamic control flow.
1050900	1056280	So, all you have to do is represent the malicious components for the backdoor with dynamic control flow.
1056280	1059720	Now, the second example was found during the YOLO audit.
1059880	1065880	Last year, my team and I audited a popular open source code base for computer vision called YOLOv7.
1065880	1070160	They released standard versions of their model and TorchScripted versions for deployment.
1070160	1074220	We noticed many cases where tracing didn't capture the model accurately.
1074220	1080640	After serialization and deserialization, key information was lost and the usual PyTorch warnings didn't show up.
1080680	1087380	So, to spot this differential, we used the TorchScript automatic trace checker, TorchFX, and the TorchScript IR.
1087620	1093020	So, with what we found, we created an input that made the two versions of the model act differently.
1093180	1095180	Effectively, a backdoor attack.
1095180	1096940	So, once again, bad for Bob.
1096940	1102900	He's getting a fundamentally different model than the one Alice trained, so this breaks any pre-existing promises.
1104100	1108240	So, we also identified a parser differential with SafeTensors.
1108340	1113980	SafeTensors is another file format for ML models developed in response to the insecurity of pickling.
1113980	1123100	Last year, I was on an audit of the SafeTensors library, where we identified the inclusion of JSON in the file format as a source of parser differentials.
1123100	1129700	Now, JSON's pretty well-known to be underspecified. There's a bunch of exploits in the web security world that leverage this.
1129760	1135080	But the thing is, the reference SafeTensors implementation, the main implementation, uses a cert parser.
1135080	1137540	Which is good. It's strict. It rejects duplicate keys.
1137540	1142760	But there's a bunch of external tools that use the Python built-in JSON parser, which doesn't.
1142760	1148840	So you can use a duplicate key for the offsets to append backdoored weights and create manipulated SafeTensors files.
1148840	1153680	That are rejected by the reference implementation, but accepted by external parsers.
1153680	1158300	It has to be a weights-based backdoor, because the weights and architecture are stored separately here.
1158300	1161980	And there's a bit more details and caveats regarding the exploitability here.
1161980	1166480	But just know, the SafeTensors parser differential is more impactful for Dave.
1166480	1169540	He needs to make sure all the parsers in his product agree.
1169540	1173720	If his tool is using a more permissive SafeTensors parser than the reference implementation,
1173720	1178560	it might just accept manipulated SafeTensors files that have backdoored models.
1179820	1184920	So, one big part of my research is analyzing previous work and noticing trends.
1184920	1190480	Now, I don't want to get too into the weeds here. I'd like to say formalisms for accompanying materials.
1190480	1197000	But one thing that stuck out to me is that from parser differentials, we get these things called model differentials.
1197000	1200160	Instances where the same model is interpreted differently.
1200340	1205360	As expected, this attack is dependent on the supply chain component and lifecycle stage.
1205360	1213060	But in an ML system, you can preprocess inputs or you can apply model transformations before you deploy a model.
1213320	1218120	So, some studies have exploited parser differentials right at the preprocessing stage.
1218120	1221100	These are things like image scaling or Unicode parsing.
1221100	1224040	And those attacks often change the weights.
1224040	1230020	There have also been backdoor attacks that take advantage of model transformations like compilation or quantization.
1230020	1232640	And those usually change the architecture.
1232700	1237600	So, I think it's very possible that most transformations can be encoded in a loss function,
1237600	1241840	that can be encoded in a loss function, can result in an exploitable backdoor.
1241840	1243680	But let's move forward from here.
1256100	1258340	Next up, we have shotgun parsing.
1258340	1264560	This is just what happens when you don't fully and properly check your input before beginning to process it.
1265200	1267580	So, let's talk about polyglot files.
1267660	1272040	These are files that can be validly interpreted as two or more different formats.
1272040	1277980	Polyglot files have been used to distribute malware, bypass code signing checks, and enable other malicious behaviors.
1277980	1284180	So, for ML model serialization, you can take these, put them in model hubs, and confuse some downstream consumers.
1284180	1290020	But, more importantly, you can have two different ML pipelines that interpret the same file as different models,
1290020	1293500	so you can smuggle a backdoor model in with a benign one.
1294060	1299340	So, during our audit of a SafeTensors library, we were able to make multiple polyglots.
1299340	1304660	This includes ZIP, PDF, TF records, Keras Native, and later on, PyTorchMAR.
1304660	1309720	And the SafeTensors audit report itself is a PDF ZIP polyglot,
1309720	1313300	with a ZIP file containing all the polyglots we made during the audit.
1313300	1319300	So, you can just slap on a waste-based backdoored model to one of these formats to a benign SafeTensors model,
1319300	1321860	open it up with SafeTensors, everything's fine,
1321860	1326540	load it up with PyTorchMAR or some other system, and boom, there's your backdoor.
1326800	1330920	Now, this is a real problem for folks like Dave, who's depending on these models,
1330920	1334280	because now you've got malicious models sneaking in with benign ones, right?
1334380	1337620	The reason this is possible is because of a missing check.
1337640	1342920	Specifically, the program didn't check whether the start and end offsets corresponded with the tensor size,
1342920	1346000	so attackers could append arbitrary data to the file.
1346000	1350440	And that can be combined with the ability to change the header size to expand the number of polyglots.
1350440	1353920	Now, this issue has since been fixed with SafeTensors, however.
1355960	1359700	So, our next category is incomplete protocol specification.
1359720	1362340	Just think of it as underspecification for now.
1362340	1364560	There are multiple examples of this in the literature,
1364560	1367940	but for the sake of time, I'm just going to talk about PyTorch polyglots.
1368940	1374320	So, many people are unaware that PyTorch actually supports multiple file formats.
1374420	1377760	Some are deprecated, but still supported by external parsers.
1377760	1381000	Now, one issue is that it does lack consistent versioning here.
1381000	1383620	So, it's not that difficult to create polyglots of files
1383620	1387660	that can be validly interpreted as different types of PyTorch file formats.
1387660	1390500	So, same for ambiguous files. Side note.
1390880	1393780	So, you can just, like, add three files to get a polymock
1393780	1397960	between version 1.3 and TorchScript version 1.4,
1397960	1400840	but a bigger issue is the reliance on zip and pickle.
1400840	1403500	So, pickle is a streaming file format.
1403520	1405640	It ends once it reaches the stop code.
1405640	1409300	So, you can validly just append arbitrary data to it.
1409300	1413760	Now, on the other hand, most zip parsers don't enforce their magic at the start.
1413760	1417240	So, you can prepend to it, and one example of this is PyTorch-mar.
1417240	1420940	So, you can append a zip to a pickle file to create a zip-pickle polyglot,
1420940	1423440	and that gives you some good PyTorch polyglots.
1423860	1426040	So, Fickling now has a polyglot module,
1426040	1429520	so you can differentiate, identify, and create polyglots
1429520	1431560	for the different PyTorch file formats.
1432860	1435120	Now, on to the next class.
1435120	1438600	This one just means your input should be simple and well-defined,
1438600	1440060	so you can check it thoroughly.
1440460	1444500	Take ONNX. It's a protobuf-based way to store ML models.
1444840	1448440	Adlon Travers discovered a neat hack for the ONNX runtime
1448440	1451020	he packaged into a tool called Lobotomy.
1451240	1456180	So, ML runtimes and frameworks often let you add custom ops to a model on the fly.
1456220	1460400	And the language used for the ONNX runtime custom ops
1460400	1462660	at that point in time was complex.
1462660	1467020	So, even though the ONNX protobuf specification
1467020	1469280	officially disallowed side effects,
1469280	1473720	in the ONNX runtime, you can encapsulate arbitrary code into a custom op,
1473720	1476910	and you can use that to launch an architectural backdoor attack.
1477420	1480580	Just like Pickle, this is not good news for Bob.
1481300	1484360	So, to recap, Bob, our direct consumer,
1484360	1488540	was affected by the Pickle, ONNX, and TorchScript issues.
1488800	1491420	Dave, on the other hand, was affected by the PyTorch,
1491420	1494100	unsafe tensors, and restricted unpickling issues.
1494800	1500340	Now, what a lot of people miss is how important and how complex the ML stack is.
1500340	1503840	The model you choose changes the technologies in the stack.
1503840	1507800	So, whenever I'm assessing a system or doing some kind of vulnerability research,
1507800	1512020	I'm always trying to think about what layer of the ML stack I'm dealing with.
1512020	1515640	So, the layers I have listed here are hardware, infrastructure,
1515640	1519700	low-level, compiler, high-level, framework, model, and knowledge.
1519700	1523300	And I just described a bunch of exploits, right?
1523300	1525260	So, of the ones I told you about,
1525260	1528620	the ones that are exposed and impactful at the framework level
1528620	1533680	are the restricted unpickler, ONNX runtime, and Pickle exploits.
1533840	1537940	Now, the compiler level corresponds to the TorchScript differential.
1537940	1543060	And the safe tensors and PyTorch polyglot issues are impactful at the infrastructure level.
1543060	1544920	And this is just a starting point.
1544920	1549140	There's going to be exploits up and down this stack that impact ML systems.
1549140	1553240	So, if you want to get into attacking ML systems, this is a good place to start.
1553360	1555500	Are you really, really good at breaking hardware?
1555500	1557520	Go take a stab at a TPU.
1557540	1561340	Do you happen to know a lot about distributed system security?
1561420	1564840	Go write some hybrid ML exploits at the infrastructure level.
1566560	1570120	So, I made this schema for incubated ML exploits.
1570120	1574380	This is just one piece of a more formal model of exploitation I worked on.
1574380	1578440	I'm just going to talk about this at a very high level to shed some light on the terrain here.
1578440	1584480	If you want to pull off an incubated ML exploit, you want right primitives for the weights or the architecture, right?
1584520	1588540	And with the proof of concepts, we've seen some additional useful capabilities.
1588540	1591580	So, side note, you probably want read primitives as well.
1591660	1599140	But with the safe tensors parser differential, you saw that access to the metadata could enable both kinds of attacks.
1599860	1605820	And you also saw that there's a lot of utility in exploiting model transformations and model differentials.
1605820	1611780	With that, you can construct exploits at different stages of the pipeline that exploit existing procedures.
1612600	1619000	So, with ONNX, it also became pretty obvious that you can use malicious custom ops in serialization formats,
1619000	1622040	and potentially even in places like compiler dialects.
1622040	1625220	I'll release more details on this in accompanying materials.
1626100	1629820	But I do want to make some more explicit recommendations.
1629820	1632060	I apologize for the busy slide here.
1632060	1637040	Models should be checked for integrity, and their metadata should be well parsed.
1637040	1641060	We want good trust mechanisms. We want proper validation.
1641060	1647240	We want to minimize complexity, so we should be avoiding custom ops and separating the weights and architecture storage.
1647240	1651980	I also think we should be doing a better job of following recommended practices for file formats,
1651980	1656960	like they should have versions, and checksums, and magic signatures, and they should enforce the signature at offset zero.
1656960	1661060	And we really need to invest in just more robust specifications and tooling.
1662140	1668380	So, I'm hoping we can see hybrid ML exploits and incubated ML exploits addressed by more frameworks and tools.
1668380	1673160	I'd love to see this framework evolve and be applied to specific ML tools and contexts.
1673160	1676640	I want to see it use more bug classes and more model vulnerabilities.
1677000	1682480	I'd also like to see people investigate exploit persistence, reliability, and defense more.
1682580	1688140	And just generally, I think there's so much interesting work to be done here with ML infrastructure security,
1688140	1692800	with model differentials, and file formats, and specifications, and even reverse engineering.
1693700	1701920	But before we finish, what helps me identify and make progress on ML security problems is understanding these two root causes.
1701960	1705220	First, we're building all of these new systems for ML.
1705220	1709260	New hardware, new programming languages, new compilers, new file formats.
1709260	1713380	There are conferences dedicated just to new ways to design ML infrastructure.
1713420	1717500	And that means all of these new systems are introducing new attack surfaces.
1717500	1723680	At the same time, it's becoming increasingly clear that the ML stack and supply chain have not been subject to sufficient review.
1723680	1725800	That's why we're seeing pickles everywhere, right?
1726220	1731420	Second, simply placing an ML model into a program introduces all of these new vulnerabilities
1731420	1735320	that stem from how the model interacts with different components.
1735360	1741460	ML is not a quick add-on, but something that can and will fundamentally change your system security posture.
1743160	1750120	So, I hope you leave this talk knowing that we need to concurrently and holistically think about system security and model security.
1750240	1754300	I really recommend checking out the full audit reports for SafeTensors and YOLO,
1754300	1758020	as well as the blog posts on Fickling and the file formats repo.
1758060	1763280	I'll post more details and accompanying materials, and we're hoping to release a paper on this topic as well.
1763280	1767360	You can find my contact info on my website, or just send me a message on Twitter.
1767520	1770320	But thank you all for coming, thank you all for listening.
1770320	1773420	If you have any questions, feel free to just come up to me.
