0:00
–:––
React at 0:00
Black Hat USA 2025

Smashing Model Scanners: Advanced Bypass Techniques and a Novel Detection Approach

When and where

Day
Wed 6 Aug 2025
Time
16:20 to 17:00 PDT
Room
Jasmine A & E, Level 3

Speaker

  • Itay RaviaAim Security

    Itay Ravia is Head of Aim Labs, Aim Security's research department. A vulnerability and AI researcher, Itay's favorite pastime is breaking things to find out how to fix them. Itay is a Talpiot alumnus, formerly Director of Research in Unit 8200, and a recipient of the Israel Defense Award. As part of his roles, Itay has mentored up and coming security professionals and delivered talks on multiple technical subjects, including "traditional" vulnerability research, AI research in the context of life sciences, and AI agents.

Abstract

Many AI frameworks present attackers with a new attack potential by introducing unsafe serialization formats, such as Pickle and lambda functions, into their model formats. To mitigate against these kinds of attacks, several model scanners have emerged. These model scanners run through public AI repositories, such as HuggingFace, in the hope of finding a supply chain attack. Such scanners typically rely on static analysis of model files. However, this approach has inherent limitations, as static analysis alone lacks the algorithmic capability to accurately emulate the actual loading process. Consequently, relying solely on static analysis may create a false sense of security when using models from unknown third-party sources. In this talk, we will discuss the shortcomings of the static analysis approach. We start by discussing common model formats (such as Pickle and Keras) and why they can never be replaced in some popular frameworks, despite being unsafe. This means that the problem of model scanning is unfortunately here to stay and needs to be properly dealt with. We then talk about how we managed to create and identify dozens of examples that go completely undetected by current model scanners and provide several examples, including non-detected malicious models found in the wild. Based on those examples, we deep-dive into the inherent shortcomings of static scanners and why they cannot hope to provide a comprehensive solution. From these insights, we derive a dynamic approach that allows mitigating the static scanner shortcomings and shows how it does not exhibit the inherent problems static scanners have. Throughout this talk, we will discuss models' lifecycle in data-science work, and how to make sure both homegrown models and external models do not pose risks to organizations.

What you'll get from it

Model formats like Pickle and Keras can run code when a model loads, and the scanners that check repositories such as HuggingFace mostly rely on static analysis. Itay Ravia explains why static analysis can't faithfully reproduce the loading process, shows dozens of malicious models that current scanners miss, including some found in the wild, and proposes a dynamic approach that avoids those gaps. There's also advice on keeping both in-house and third-party models safe as they move through a data science team's work. Worth your time if your organisation pulls models from public repositories.

Did you find what you came for?