Josh chats with Thomas Strömberg about an open source malware scanner he’s building called Atomdrift. This is a scanner that is open source, and can find malware in other software. It uses some really clever machine learning models to do this along with some other extremely clever tools. Thomas has clearly thought about this problem a ton. The discussion is fantastic, covers a ton of ground, and explains more about malware scanning than you ever wanted to know.

This episode is also available as a podcast, search for “Open Source Security” on your favorite podcast player.

Episode Transcript

Josh (00:00) Today, open source security is talking to Thomas Strömberg He’s the creator of the Atomdrift project. Thomas reached out to me when I was I put out a call for um guests on Mastodon and and he kindly reached out and I saw his project and I was like, my goodness, this is amazing. I have to talk to this person right away. So thank you so much, Thomas, for reaching out and thank you for coming to chat about Atomdrift. I’m I’m like so excited today, I can’t even I can’t even explain it. I love it.

Thomas Stromberg (00:25) Yeah.

Th thanks for having me here. I really appreciate it. I’m you know, I I am one of those people who’d be way too scared to actually like run a podcast. And so people like you who do this service for, you know, not just the security community but for the world in like bringing up these topics, it’s it’s amazing. So I think you

Josh (00:46) Well, that’s very that’s very kind of you. But

okay. So tell us I guess tell us who you are and then tell us

Thomas Stromberg (00:50) Yeah.

Josh (00:51) about Atomdrift and we’ll we’ll go from there.

Thomas Stromberg (00:53) Sure. Um well um I guess uh dialing back a couple of decades, I’ve always had a um I’ve always had a curious security adjacent streak. Uh I was one of those teenagers who you know got caught up in uh sometimes the establishment doesn’t appreciate people’s ser security curiosity. Um and

Josh (01:20) Yes.

Thomas Stromberg (01:20) I was the victim of one of those things. And, you know, it was I always swore after being the curious teenager of like, you know, when I entered a career in IT, um, you know, how do I apply those jobs or that that idea of being that curious teenager into my everyday work? How do I think more defensively than um, you know, offensively and um how do I make amends?

For all the stupid things that I did as a as a teenager. Um and uh so I’ve I’ve done a fair share of random security tools uh over over time. Um, Atomdrift being my most recent one, but I’ve done plenty for both inside companies uh and open source. Um in fact there was a a predecessor to Atomdrift that was maybe a little less

A little less complicated, but a little l much less ambitious called malcontent, um, that will we can talk about as well. But I’ve basically thought about malware detection for probably about 30 years now in various uh capacities. Um, you know, from you remember the Melissa virus, right? Yeah. We’re we’re we’re

Josh (02:38) Man, that’s like a flood of memories.

Thomas Stromberg (02:41) we’re dialing we’re dialing back a a little while.

Like one of the things that I developed at that point was um you know, sendmail plugins for, you know, figuring out um likely malware. Um and this is about the time that ClamAV actually started coming into being as well, was you know, at that point people were emailing malware to each other. Um which it’s a little less common now. There’s a lot more defenses in in point. Now we’ve now we’ve got clickfixes, which

Clickfix attacks, which I think are really wild and wonderful. um But yeah, I’ve thought about this for a long time. I at this point I have made roughly three malware scanners over my career. And this is definitely the most ambitious one, for sure. But um so yeah, I’ve I’ve done um previous to this, I was uh I I was the founder of the security team at ChainGuard. Um so

We definitely thought a lot about supply chain security there. Um, but I also worked as part of the security team at Google for a little while. Um so yeah, been messing around for a long time professionally. Um and in open source, I’ve contributed to everything from Kubernetes to FreeBSD to mostly my own projects, to be honest. Um, but also doing things like um I made a fuzzer. uh

that shipped with Chrome for a little while. Um that I actually designed for Firefox when back when Firefox was 1.0, it was like, okay, we have to figure out all the security vulnerabilities that we have in Firefox. And so I made a wonderfully crazy CSS HTML fuzzer of DOM fuzzer basically. And that ended up shipping with WebKit and Chrome for a little while. So um so yeah I’ve done a lot

Josh (04:38) Amazing.

Thomas Stromberg (04:39) of random things.

and I I really love um employing my curiosity constantly.

Josh (04:47) That’s awesome. I mean, that’s part of the fun of security, right? Is it always feels like you’re just playing with toys, I think, half the time.

Thomas Stromberg (04:52) Yeah, well

it is. And and so like yesterday I got to play with a new toy for the first time. Um have you heard of ARTEX?

Um it is this wonderful um AI-based autonomous pen testing platform. So think of it as an open source

Josh (05:10) Yes.

Thomas Stromberg (05:11) expo.

Josh (05:13) Yes, I saw your messages on Mastodon actually about this, and then I looked it up because I didn’t know what it was.

Thomas Stromberg (05:16) Yeah. Yeah.

Josh (05:18) Yes, it looks amazing.

Thomas Stromberg (05:20) It you know, it’s fun. It’s it’s like there’s nothing like the feeling of trying a new tool for the first time and actually having it work. Like that happens so rarely in the first place, especially in open source I feel. Um, that the fact that okay, I did have to patch a bad line in the setup script, but the fact that I got it up and running and actually was attacking my own infrastructure, um

Was just fantastically amazing. There is no um there is no bounds to the collective creative creativity of security engineers around the world. And I think this is one of those projects that really taps into that.

Josh (06:01) It it looks really cool. Um okay, so it’s A R T E X and do me a favor, send me a link to the one you use ‘cause I when I looked it up, the original author yanked their project ‘cause they were worried it was going to be used nefariously. And so now there’s just like a million forks. And so yes,

Thomas Stromberg (06:12) Oh. Okay.

Josh (06:16) send me the fork you’re using, I’ll put it in the show notes for anyone interested.

Thomas Stromberg (06:19) Okay.

Yeah, that makes me wonder. Like I didn’t re I I d I forgot about that. That actually happened like a couple of weeks ago or a few weeks ago. That

Josh (06:26) Yeah. Yeah.

Thomas Stromberg (06:27) I had forgotten about that and I just picked the first one that Google picked up. So Yeah, I know. I

Josh (06:31) Very safe.

Thomas Stromberg (06:33) know, yeah. I I will definitely admit to um not being the best for supply chain hygiene for somebody who is so focused on making tools for supply chain uh s security. So

Josh (06:47) What’s the saying? The shoemaker’s children have bare feet.

Thomas Stromberg (06:49) Yes.

Absolutely. This is this is very much a thing. So Yeah. Yeah.

Josh (06:55) Okay, okay, so let’s let’s jump into Atomdrift. tell

us about Atomdrift, ‘cause Atomdrift is I don’t know, it’s like an umbrella over what do you have, like four projects right now listed on the

page?

Thomas Stromberg (07:04) Yeah.

Um so the the concept behind Atomdrift, um, and yeah, it’s kind of an umbrella project. I think of it almost as my like supply chain Apache project of like here are little tools. Um and I I like that idea of small composable tools as you know the Unix philosophy goes. Um and so it’s a collection of tools that focus on

one concept uh in supply chain security. And okay, I’m gonna go back to I think twenty twenty one, the 3CX attack. Are you familiar with that one?

Josh (07:46) I remember the name, but I couldn’t tell you anything about it.

Thomas Stromberg (07:48) Okay,

this this was uh this is the one that really changed my mind when it came to supply chain security. Um so it was it was an attack where the North Koreans uh compromised VoIP software that was distributed to people’s desktops on Windows and Mac. Don’t think there was a Linux build. Um and the way that it ha the way that it worked, I really only studied the Mac sample closely because at ChainGuard we had a lot of Macs. We had no Windows machines, so I really

Focused on that one. And the thing that I found interesting, um, now there’s a couple of things interesting actually. So one thing interesting about the 3CX attack, so is the North Korean, it was a double supply chain attack. So they had actually compromised a company that distributed um trading software, and 3CX had somebody in the company had installed it, and it it had then compromised their build system.

And so then their customers um had got infected. Now, this doesn’t sound surprising today in the in the era of you know all these like GitHub action worms and things like that. You know, there were no miasma type attacks in 2021. We’re talking pre-common LLM usage. And so I study this one carefully, and so one thing I’ve noticed specifically when

looking at malware that is in binary form. And this is going back to a realization I had as a as a teenager. So as a teenager when I was studying viruses, I would actually study them with there was this wonderful piece of software called Norton Disk Editor. And it was basically a hex editor where you you look through it and you can make little modifications, um, but you could study things uh about that malware. And one of the things I noticed

probably around age 14, was that a lot of viruses and malware have curse words in them. And so it was like I I started thinking about writing scanners based on like word frequency. And so there is this wonderful command in Unix called strings that it’s you know probably shipped with Unix systems for since the late 80s. um

And what it does is if you run it on a binary, it shows you just the text strings. And one of the important things that it’ll show you uh if you run it on a binary is glibc calls. So for instance, you’ll see that it’s connecting, like it has a connect call. And mo many of these glibc calls, or libccalls, as it were, since I was looking at Mach-O Mac malware at that time.

There’s often a one-to-one relationship between a libc call and a syscall. Not always, but a lot of them are just like friendly wrappers. So the 3CX case compromised an FFmpeg library.

And when I pulled up the non-compromised FFmpeg library and ran strings on it, I would see all the normal strings that you would expect to see about like, I’m handling an MPEG stream, and I am like opening files, and like you see the libc calls up front, and it’s all the regular ones. I’m gonna open a file, I’m gonna stat a file, I’m gonna seek through a file. And then you open the compromised one. You do a strings on both.

And especially if you run the diff command to show the differences between the two, it was plain as can I curse here? Plain

Josh (11:33) Absolutely.

Thomas Stromberg (11:34) as fucking day. Like if anybody had actually looked at the diff between these, it was such obvious malware because all of a sudden this FFmpeg library is resolving hosts, connecting over the internet, um executing arbitrary, um basically doing like shell commands. Um

It is sleeping for a random amount of time. Like all of these things were like really obvious, like malware implant to me. But there’s one thing I’ve learned in security over my time, and that is if it isn’t the default, it will not ever be done. And so the thing about supply chain scanning and malware scanning is because there is no uniform system for it to be the default.

It will always the people who actually care enough to run a scanner will always be in the extreme minority. Like it’s one thing if larger marketplaces adopt this. Like the fact that NPM has had malware for so long drives me crazy because they have the resources. You know, and same with GitHub, like they have Microsoft has hundreds of billions of dollars of resources to put into malware analysis.

And the fact that they haven’t is really just an indictment about that there is no incentive for them to do it.

Josh (13:04) Yes, a hundred percent. There is the market does not care about this stuff right now, for

Thomas Stromberg (13:08) Yep.

Josh (13:09) sure.

Thomas Stromberg (13:10) So going back to Atomdrift, this idea of actually doing a diff of strings to show a supply chain attack uh kind of came out of that. And what I had thought about is that each behavior of a program is effectively an atom. And how do you see the atoms change over time in a in a program? How do you use that to

How do you apply that to supply chain detection? Eventually I started thinking about this a little bit more. Um, you know, my first naive approach was like, I just care about the atoms. Like all of a sudden, this program gained exec and this, you know, gained resolve and all these other weird things. And, you know, at ChainGuard, we started showing that diff to engineers for like packages. And it’s it became pretty clear to me that atoms were.

too too noisy and too kind of too low level um that it actually, you know, as soon as you have any sort of security task that introduces noise and toil, it gets ignored very quickly. Like alert fatigue is a very real thing, not just in security, but in in SRE. Like how do we do this more more thoughtfully? ah And so I as I was studying these things, I

You know, back then it was, you know, malcontent was my first thing that I a project that I donated to Chainguard that did this, that basically like digested software into behaviors and then let you diff across time for it. But where I needed to get a little crazier was how do I think in terms of compounds? Like, it’s one thing if a program gains exec, but if a program gains exec

plus resolve plus you know random and sleep like then it starts getting a little bit more suspicious. So eventually I kind of settled on this idea of um breaking software down into what I call mallocules Um I know it’s it’s genius isn’t it? Um yeah

Josh (15:24) Brilliant. I love it.

Thomas Stromberg (15:25) um yeah I have to credit one of my good friends for that that invention. But um so kind of this idea of

It’s not just suspicious atoms, but it’s the suspicious combinations of atoms. And that’s where I kind of pivoted away from this, like, I’m gonna have tens of thousands of YARA files to that tried to have all these random combinations built in and like it was a hand-crafted uh lovingly crafted giant repository of YARA files. And that that’s how Malcontent worked, where instead I’m going to have

ML models try to do the clustering for me of those atoms and try to look at like what changes over time are suspicious. Um and so I ended up collecting I I have a pretty authoritative collection of supply chain attacks um at this point. Um there are very few gap I basically have a compendium, uh supply chain compendium where I have tracked

All the supply chain attacks since like 1974 to now.

Josh (16:39) Wow.

Thomas Stromberg (16:40) And for almost all of them, I have artifacts. There is kind of a this random gap of like closed source supply chain attacks in the 90s that I don’t have things for. Um like um you know, the there are cases where IBM sent out floppy disks with Michelangelo virus. Like, do you remember when Michelangelo

Josh (16:59) Nice.

Thomas Stromberg (16:59) was everywhere? You know, anyways. Um, so I don’t have copies of those, but for

Open source attacks in the 90s? I do have those. Like, it’s hard to imagine the number of sub software, you know, we think of all these attacks as being a relatively recent thing. But if you go back to the, you know, time period of like 1997 to 2001, the list of victims is wild. Like Sendmail got hit, OpenSSH got hit, uh TCP dump IRC.

IRC2, like all of these got hit by these random, like weird people expos like hitting zero-day attacks. And they basically just got caught, similar to the XZ Utils by a curious engineer. Like none of these attacks were discovered by a malware scanner. And so I really thought about could we make one? Could we use this idea uh to make one? And so while I was inspired by 3CX, I was

completely down in the dumps when the XZ Utils attack came out. Because that one was so clever that most of my ideas it was it did not work. It we did detect it as a change that was interesting, but we did not flag it as hostile. And so that kind of sent me reeling and like I ended up having to stop basically work and think about the problem deeply for a while.

So I took almost a year off between working on Malcontent and starting the Atomdrift project because

Josh (18:40) Wow.

Thomas Stromberg (18:41) I wanted to like I knew the previous project didn’t scale. And it part of it was like XZ Utils threw me for a loop. But during, you know, when we look at AI adoption last year, attackers were starting to adopt it in a large scale. And

This idea of meticulously hand maintaining Yara rules could no longer keep up.

Josh (19:10) Yes, for sure.

Thomas Stromberg (19:11) And so back in the day when I was, you know, previous to last year, I would basically read, you know, I’d follow a hundred different like security blogs. I’d see somebody report malware, and I’d say to myself, could we detect it with our current system? And so I would spend the morning.

you know, probably four or five hours like testing, um, trying to reproduce and trying to add detections for a malware that I may not even have a sample for. Like hopefully I can get one. I don’t have a virus total subscription. So um i it’s hit or miss. But I r what ended up happening was that worked when there was, say, one or two supply chain attacks a week. But we have gotten into this rhythm where

There are multiple a day at this point that we track.

Josh (20:02) Yes. Yes.

Thomas Stromberg (20:04) How do you scale that? Like, especially as one engineer. And the the answer is really, you know, it’s difficult. Like you can have general heuristics, but there are so many new ideas that come up that I ended up realizing that I was going to have to build a reinforcement learning system that did what

Josh (20:24) Yeah, yeah.

Thomas Stromberg (20:25) I was doing, but in a uh in an automated loop. Um, and so basically building an engine that says, I’m gonna follow these blogs.

I’m going to see if I can grab a sample. If I catch the blog article fast enough, the samples might still be online. Can I automatedly test the detection? And then can I automatically improve the detection? And so it’s basically, you know, while we have traditional ML for doing that cluster analysis, we also end up with this self-learning loop that is also invoking LLMs to do that.

improvement aspect. m And that idea has worked fairly well. um It was much harder to pull off than I had anticipated. And quality is the hardest thing to maintain. um How do you manage how do you basically send LLMs to maintain a code base of rules um without it screwing everything up? um

And the answer is tons and tons of guardrails, like and quality measurements. Um and so that’s kind of what I’ve been doing for the last year is trying to build this project where we can detect not only traditional malware, but also these more subtle supply chain attacks uh through that differential analysis.

Josh (21:54) Right, right. Okay. So I’m gonna try to explain to you how I think this works because I’ve read a many things on your website and you can tell me what I get wrong, ‘cause I think this is super interesting and and

Thomas Stromberg (22:03) Okay. Yeah.

Josh (22:05) I love this topic. So you have I’m gonna skip hood because I think hood isn’t rel maybe I’m wrong, but I feel like hood is a like maybe more of the I’m I’m running this on my system, right? Versus I’m scanning for stuff. Is that uh that’s correct? Okay. All right, I got I got the first question right.

Thomas Stromberg (22:18) Yeah. Yeah. Yeah. Yeah.

Josh (22:23) We’ll say. Okay,

Thomas Stromberg (22:24) Yeah.

Josh (22:24) so you’ve got I see there’s three things. You’ve got scan, cleave, and how do you pronounce Sting? What do you pronounce it? Okay, S T N G.

Thomas Stromberg (22:30) S T N G like like Star Trek.

Josh (22:34) That’s awesome. Brilliant. Really.

Thomas Stromberg (22:35) Yeah.

Josh (22:35) I’m a huge Star Trek nerd, by the way. I love Star Trek. my favorite talk I ever gave, I I don’t shut up about this when I had the chance. Um, I called it Next Generation Enterprise Security. Uh there’s a recording of it on the B Sides Las Vegas a couple of years ago. But I to I watch all of Star Trek The Next Generation and I break down all of their terrible security practices.

Thomas Stromberg (22:53) Nice.

Josh (22:53) into

the I map it to the MITRE attack framework. It was like so much fun to do. And it took me like literally years, years and years to make this talk. It was it was amazing. I loved it. And my the my favorite was some people showed up and they didn’t realize it was a joke talk. And so they were like they thought it was a talk about enterprise security. And I’m like, I’m so sorry. But they loved it. They loved it. And there’s some of them I still talk to this day, even though I kind of ruined their day. But anyway, all right. So

Thomas Stromberg (23:09) Yeah. uh

Josh (23:17) okay. So the the S T N G that’s like your strings replacement, right? That does

Thomas Stromberg (23:21) Right.

Josh (23:22) the strings magic.

Thomas Stromberg (23:22) Yep.

Josh (23:23) You also have so my understanding about Cleve from what I’ve read is this is a thing that like extracts the interesting and I feel like I I don’t know this for sure, but like Cle Cleve is using STNG, I assume, to extract kind of not just um I I don’t know, I I would almost in my brain the the analogy I have is like how with with um crap, what is the name

LLVM, sorry. I had LLM stuck. LLVM, the compiler, where it like compiles things to an in intermediary language, right, before it goes to your architecture. This feels like you’re kind of decompiling or extracting information about a binary into like an intermediary format that you then feed into your scan tool that looks for like strange behavior, we’ll say.

Thomas Stromberg (24:10) Yeah.

Yeah. Um so yeah, I can I can kind of give a little bit of the architecture. I think you you nailed it. Um yeah, yeah. So so basically

Josh (24:16) I got mostly right. All right, I’ll take that.

Thomas Stromberg (24:19) um Atomdrift is turtles all the way down. And I started at the lowest level, uh the the smallest turtle, which was the strings replacement. Um and the really how this came about was there there are languages that pack binaries. Um

like Rust and Go that pack the binaries in really weird ways where you can’t tell where strings stop. And so they’re not null terminated. They pack them hard. And so if you use a traditional s if you use traditional strings on a Go binary, it will basically give you this vomit of a long string. And you can’t tell what it really what that where the separators are. Like you know

Intuitively, you know, as people who have read a lot of English text, like we can pick apart the word boundaries, but that isn’t good enough to do strong matching on. And so where I what I ended up doing, there are basically three things that I ended up doing with STNG that are a little different ah than normal strings. So one is that it extracts specifically symbols, it knows the difference between random text and

a random text string, like string literals, and symbols. So it’s almost more similar to like an O tool command on on Mac OS, where it is, it knows the symbols. And uh for Go that’s very important. Like I want to be able to have rules that establish whether this is a Go symbol or a string literal. Because if you just say, you know, show me anything that has the word like has host name in it, like if you write that YARA rule,

you’re going to have false positives. And false positives are the most difficult part of any malware scanner. So I I needed precision. So I needed to basically take apart Go binaries and Rust binaries. And part of how that works is it’s actually following the assembly calls per platform to see how do I take apart this dictionary or string. So that’s the low level part.

but it also does automatic like XOR decoding. A lot of malware actually just has an XOR on top of it. And so how do I do some of that basic decoding and guessing of um like a common thing that the you see a lot in North Korean attacks is that the XOR key is at the bottom of the binary, like the ELF binary.

And so STNG will actually try to scan for things that look like XOR keys and apply it to the rest. So it’s like a strings plus plus kind of thing. um But it doesn’t tell you if something is malicious or not. It’s just a dump of symbols and strings. um

Josh (27:17) Yeah, yeah, yeah.

Thomas Stromberg (27:19) It tries to highlight interesting strings, but that’s it. um It is aware of like language-specific things for if.

A Go program is also embedding shell. Like it understands the difference between languages because supply chain attacks tend to be polyglots. A lot of them will, you know, invoke, you know, uh a lot of them will invoke shell, of course, but some of the weirder ones will be like JavaScript calls Python calls shell or something, you know, weird like that. Um so cleave on top of that is

Basically trying to uh

It is a rules language processor. um And it is trying to use that data from STNG to s to pick out those atoms. um Now some of the and and compounds. um So there is a database of heuristic rules that is probab about 175,000 strong at this point. And it isn’t just like here’s a hex sequence, because that’s not going to fly for cross-platform stuff.

It is a mix of regular expressions, AST matching, ah which is important for scripting languages. uh So we’re using a library called TreeSitter for that. uh And there’s also YARA rules plugged into there uh because there is a large data set of public YARA rules. So we actually include about 15,000 public YARA rules uh into that mix. uh

It is trying to tie all that together. It’s basically just a rules engine. It’s not going to tell you if a sample is malicious or not, though. It is mostly is really just going to say, here are the behaviors. um And so there was uh so MITRE had this malware behavior catalog where similar to the attack framework, there is these malware behavior IDs and like there’s a taxonomy. Um and so we tried to follow it as best as we can. Um

Unfortunately, MITRE, I I think they forgot they wrote this, uh, because it hasn’t been updated in years, and it was very focused on Windows malware. And so we did end up having to change some of it because I am more focused on general supply chain. Um so I follow it when I can and would diverge when I can’t. Um so Mandiant has this tool called Kappa ah that also does something very similar.

But it is using uh it’s basically just for PE and I think ELF. Um it’s very slow, but it has the same idea of try to analyze an app application and figure out what the behaviors are.

So there are two bits of turtles. there’s actually a couple of turtles in between there, um, but uh you know, people get lost in the details. So scan is the engine that tries to apply uh uh local ML uh umto those behaviors that we extracted in the cleave side. Um and so I had this naive idea that if

If I could extract the behaviors for all of these file formats, and this is actually an important realization I had while I worked at ChainGuard was most malware scanners didn’t care about the the file formats that I did. ChainGuard ships a lot of C and a lot of Go. And almost no malware scanners out there process either.

There are very few that actually look at C code or Go code and say, is this malicious or not? Um they may look at the artifacts generated by that. And I do want to look at that too, but I also want to look pre-build to say, is this C program likely to be malicious?

Josh (31:30) So you’re

talking about the actual source code for the C, not the built binary. Okay.

Thomas Stromberg (31:32) Yes. Yes. Yes. I am talking about

yeah. So I want to check both. Um because you may get different signals depending on which phase you’re looking at. Sometimes malware is easier to s to notice in source code, and sometimes it’s easier to notice in compiled form. Um it really depends on like have they applied a lot of obfuscation in the binary.

Maybe they’ve applied the obfuscation in the source code. I don’t know. But ChainGuard, we focused on ingesting source code and emitting binaries. And so we wanted to scan both ends and look for those behavioral differences. And every vendor I talked to, as soon as I mentioned C, they’re like, well, you know, we don’t really scan for malware in C. And I’m like, but we’re a Linux distribution company. Most of what we distribute is C code. So

That kind of sent me on this whole realization is while I started with YARA eventually I realized that I needed something like an AST analyzer.

Josh (32:39) Yeah, yeah. And I I wanna back up for one second and make sure I’m my assumption is correct. And to clarify for the audience

Thomas Stromberg (32:43) Right. Yeah.

Josh (32:45) is when you’re talking about malware scanners, a lot of the we’ll say malware scanners today are very focused on things like NPM and Python and like a lot of those like the the registry ecosystems, right? Yeah, okay, okay, good, good. Which there’s no C registry, right?

Thomas Stromberg (32:57) Yep. Yep, absolutely. And and so am I. Yeah, there’s

no C registry. But there are, if you think about Linux distributions as registries, which we do, they there is a huge corpus. Um so as part of Atomdrift, uh we wanted to track all of this, um, all of the different eco um open source ecosystems. Um and so

We follow like if NetBSD publishes a package or a new release of source code, we’re analyzing that. We’re trying to pick as much data as possible across all these languages because you don’t know what flavor a supply chain attack comes into. Like if we go back to XZ Utils like that was a great polyglot of it was um awk, make file, uh shell obfuscated elf.

Like it’s got all these random parts. Um, and so if you want a good supply chain scanner, in my mind you have to support many formats, and nobody was at the time, which is kind of where we ventured out on this crazy experiment. And so I had this, I had this idea. If I build a taxonomy of behavior, like say, you know, network DNS resolve, like, you know, operating system behavior, network, DNS resolve. Like I am, if I had made it general.

And applied it to all of these file formats, then I could just have one ML model that’ll figure out if this is malicious or not. That was my naive hope. Um it turned out to be a lie. It turned out to be so bad. Like I was I hit a wall. Um and uh then I, you know, I I hit a wall and I generally don’t look at academic papers. I don’t

like to poison myself with that knowledge. I like to come up with my own ideas. But I hit a wall with the ML models where I was like only at at a you know low false false positive rate, I was only getting like a 40% hit rate for malware. Like clearly this sucks. Nobody I would say nobody would ship that, but ClamAV does. Like they have like a 25% hit rate. But um so I well I would didn’t want to sh

To do that. But then I ran into this, there was this wonderful paper, the Ember paper, where they talk about doing these ensemble models. And basically what this I am not the ML expert in the room, ah but I had to do some studying and I I talked to some ML experts that happen to live here. uh And what I came up with was instead of one model to rule them all, what if we did one model per file type?

And then one model for the type of file that it is. Like, is it a runtime script? Is it is it a source code language that gets compiled? Is it a portable executable format, like a you know, Java class or.NET class? Or is it a local binary? So um so I have models for those. And then I have my general model. And what it what the ensemble tries to do is it we try to find the right blend for, you know.

For instance, Perl script. Like we have a model for Perl scripts. uh And if it can’t find a high, if if it’s if the certainty is too low, uh it’s also gonna look, it’s gonna ask for a second opinion from this scripting languages model. And then it’s gonna ask for a third opinion from the general model. And basically, if there is any agreement between the models, ah how that agreement works, it really depends on the file type.

because some of them are ands and some of them are ors. Um but uh then all of a sudden I was seeing the rates I was looking wanting, like that 75, 85% rate. Um like for ELF, all of a sudden I was talking like 95, 97% detection rates. And then I was just like, I was floored because finally after months of staring at this wall of 40%, I got past it.

So that is effectively how the scan tool works is that ensemble of ML models. We publish the ML models. uh It’s called Azoth sitting in our in our repository for ML people to study if they want. um And to add a little cherry on top, we also add LLM analysis as a second opinion. And so we use this here where I have

machine with a GPU sitting down here, where it if it’s not quite certain in the ML model, we will try to route a percentage of uh based on the uncertainty to an LLM. Um so in this case, uh Quen 3.8 uh 27B. So you need a fairly sizable GPU for it, but that actually also ended up boosting our rates another like 10% for some of the edge cases.

Um so it helped fix some of the false positives, uh, but also helped improve our true positives. I don’t want to have to rely on LLMs. Not everybody has a GPU capable of running an LLM. And this is an open source tool. It’s local first. So it is not the default. We do not default to LLM, but if you have it, it’s great. Um it it does add, you know, some

Some amount of specificity. I don’t expect anybody on a laptop to run it, but let’s say you’re running a farm where you care about malware analysis for your company, you’ve got GPUs, you can get this like higher grade model running uh in for your for your organization. So

Yeah, that’s the long and short of it. Um

Josh (39:01) That’s

i I mean, that sounds super cool. And I I will say the thing that floored me the most when I found your project was the offline ability of it because I think an enormous number of malware scanners, or just kind of all scanners now, they you have to phone home in many instances because they have these like obnoxiously huge databases of stuff.

Right, that they’re looking where they have known good, known bad, whatever, looking at file hashes. It it’s completely bananas how big this data can get.

Thomas Stromberg (39:33) yeah,

it is. There is so much data. And that’s actually

Josh (39:35) Yeah.

Thomas Stromberg (39:36) the most expensive part of running this project. Um is in fact I have uh another JBOD that I need to rack up after this call because I’m running low on storage. we have 275 terabytes of data here um that we analyze and not everybody we can’t ship that, you know, to everybody.

Josh (40:00) Yeah.

Thomas Stromberg (40:00) It wouldn’t it wouldn’t make sense to ship it.

Um so we use a technique, are you familiar with the safe browsing uh technique that uh Chrome and Firefox use?

Josh (40:12) I don’t know if I am or not. Why don’t you tell me?

Thomas Stromberg (40:14) All right. Well,

okay. So so first of all, I hash based detection of malware is something that we used to do twenty-five years ago, uh, and something that Clam AV still does. Um and it made sense in a world where there was like one new malware attack a week. And you could ship this hash and you knew that everybody who got the Melissa virus, it would match this exact hash.

And that is not the world we live in in 2026 at all. Um so we do to to save people a little bit of processing time, and really it’s I think a lot about efficiency, um not just in terms of time, but also like how much uh electricity is consumed. And it’s so the original model everybody scanned you you is purely local, and it still is local, but everybody if you

If you scan /bin/ls every Mac user would spin up and process /bin/ls the same way. And they would all waste all these resources in scanning something that there are a hundred million people or you know more that have that same program. So what I ended up doing was distributing Bloom filters, which is this really interesting um file format of you can think of it almost as like.

A lossy collection of SHA-256 sums. I’m not going to ship everybody every SHA-256 of known bad or known good, but I can ship something that it is statistically unlikely to that it’s a false positive. Um I don’t remember basically I’m I’m using 32-bit, 32 bits out of the hash at this point and combining them all.

So when you when you run Atom Scan, when you update the rules for the first time, one of the things it installs is this Bloom filter database. And this was an idea I don’t uh it didn’t start at Google, but the first place I saw it was Google Safe Browsing. They wanted to have, they wanted to distribute to people a database of known bad sites, like phishing sites. And they didn’t want to encode like every URL because there’s like hundreds of millions of them.

So if you basically have this like sieve type model, you you have a a data structure that works like a sieve that is like looking at the bits of a URL or the bits of a SHA 256 and saying, you know, how many times do I, you know, do I make it through this sieve with it intact? Um so it’s like a really hyper-efficient data structure for having long lists of of strings. so we ship those um to skip um basically to help people skip.

Duplicate work, there’s always the chance that it goes wrong. So there are a bunch of checks around it where we basically we issue multiple Bloom filters of like, you know, there’s one for known bad, one for NSRL, one for known good. Um and so we look for the we actually parse through all of them for every file to see if we can maybe save somebody time uh or call attention to a file that might be in our hash database, but the local rules don’t catch for some reason.

So

Josh (43:34) Yeah.

Thomas Stromberg (43:34) um so yeah we do that. Um local first is definitely very important for us. we do offer a API. Uh we haven’t really publicized this much, but some people we’ve talked to prefer an API to check for hashes, um, where they’re um they don’t want to distribute the software everywhere. They just want a simple JSON API where they know the check the the SHA 256 locally and they can ask, or they they know the PURL

like the package URL or a URL um and they can ask for that to be scanned. We haven’t publicized this very much, but it’s it’s up there um as a public API. Um it’s something that we’re gonna invest more in in the coming weeks.

Josh (44:19) Nice. Nice. I mean this is this is so cool. And and I wanna bring up one other thing you mentioned. You you mentioned ClamAV and like twenty five years ago using,

Thomas Stromberg (44:24) Yeah. Yeah. Yeah.

Josh (44:28) you know, s the signature based scanning approach they have. There’s another, I think, really important aspect to that is there are I mean, you mentioned what would you say two hundred and fifty eight terabytes of of stuff you have now? Like so ClamAV distributes a database and it’s like a cut it’s a gig or two now, I think.

Thomas Stromberg (44:47) Yeah.

Josh (44:48) But something they’ve done

is they’ve started removing old signatures from their data because it’s just it’s got it got too big. And I don’t blame them for that. But also

Thomas Stromberg (44:54) Yeah, I’ve I have been.

Josh (44:56) now obviously you can imagine you’ve got all this malware falling off a cliff on on that end and people might say, but it’s old, who cares? But like I mean have you paid attention at all?

Thomas Stromberg (45:06) Yeah, so I this is something I’ve been I’ve thought about. I I saw that announcement and thought have considered it for myself. We have not done that yet. What we have tried to do is make it very efficient so that specific rules only get looked at if there’s a matching file type. Um so for instance, is this a DOS executable versus a Windows executable? If

Josh (45:30) Sure. Yeah, yeah.

Thomas Stromberg (45:31) it’s DOS, then

I have all these like random DOS rules that really don’t matter in 2026, to be honest. But because I had that goal of wanting to detect everything that has had a known supply chain attack, out of my own curious, I was hoping it would improve the model. I don’t think it has, to be honest. I think the attacks that we saw in the 90s are different in many respects to now. Like, you know, again, Michelangelo virus, different.

But if you look at the early open source attacks, like Sendmail and TCPdump those are spitting images for attacks that you might see today. so those are relevant. Uh but the DOS executables, I’m gonna leave for the moment until it there’s not that many DOS rules that we have, but um we just wanted full coverage. So

Josh (46:24) So what I’m hearing is if I’m a if I’m a malware author, I just have to make DOS executables and then I’m I’m golden, I’m invisible, right?

Thomas Stromberg (46:32) You know, I think it would work. I I think there’s

Josh (46:34) Yeah.

Thomas Stromberg (46:35) so there’s actually that that is a strategy that are is often employed. If you look at Go based malware today, um so we manage the we monitor the Go package registry. So every new Go package that gets published, we take a look at. And almost all Go malware is not actually written in Go. It is written in Lua. Because who’s writing a malware

Josh (47:00) that’s funny.

Thomas Stromberg (47:00) scanner for Lua?

So what they end up doing is they’ll ship the Go package and a Lua interpreter and have this Lua script. And that’s the magic, is the malware attackers know this. And they’re going to use everything possible to evade detection. So one of the popular things, you know, one of the discussions that I’ve had at, you know, previously is like, why don’t you just upload it to VirusTotal

I’ve j just upload the the malware there. There’s a lot of scanners on VirusTotal. um And of course, if VirusTotal doesn’t see it, it’s probably not malware. Well, the attackers are doing that too. They’re gonna they’re gonna, before they distribute it to an organization, they’re gonna make sure that it passes the the known scanners. Um so that’s not very helpful. Um so they’re gonna use these random techniques to try to like bypass a scanner by

Manipulating a bit on a PE binary, for instance, that freaks out a PE scanner or like library. So there is like uh a good example of it is so most of the code base is Rust. um All the client-facing code base is Rust. And so there’s this wonderful library called Goblin that parses executables. And smart malware authors will code their, make their PE binary in such a way that Goblin rejects it.

But Windows still runs it. And so these little differentiations between what can actually be executed and what can be detected, malware authors are going to use. Which has me think a lot about hey, I’ve open sourced a rule set. The entire engine is open source, the rules are open source. Are malware authors going to use that against me?

Josh (48:57) Hope so. I mean if they’re a competent attacker they will, right?

Thomas Stromberg (48:58) I if they

were, but this but we we gotta go back to a thing that we said earlier, which is because it’s not the default, nobody is going to use it. And so as popular as no matter how much I work on this project, I know there’s only gonna be a small amount of people on the planet that care enough to run the scanner. And so malware authors do not generally have to worry about these esoteric scanners.

If you are not in like the top two scanners, they probably don’t care about you. And I don’t I don’t think they test against ClamAV Like why would they bother?

So instead, you know, what we do is, and one thing I’ve, you know, of course, it’s an open source project, um, but I also want to be able to feed my family while I work on it. So one of the things I’ve done both as a security miss feature in a way, but also as a way to maybe steer people into paying me, um, is that we only basically the the rules feed that’s open source is delayed by a couple of days.

Josh (50:11) Okay, I gotcha.

Thomas Stromberg (50:12) So that hopefully if a malware attacker does, you know, if a new attack comes out, they can’t just see my signature update immediately and like change around it. Like there’s a couple of days of delay unless they pay me. And then if they pay me, then I don’t care. Like that would be wonderful. But if I get paid by malware authors, um that would be a wonderful uh wonderful, you know, weird twist. So yeah, it’d be

Josh (50:39) It’d be validation, right?

Thomas Stromberg (50:41) validation.

So yeah. Um so yeah, it turns out

Josh (50:44) Okay, that’s cool.

Thomas Stromberg (50:45) that malware scanning is really hard is one is probably been the lesson for the last year. And it’s not it’s detecting it at low false positive rates is the really hard.

Josh (50:55) Yes, yes. It is

Thomas Stromberg (50:57) And

Josh (50:58) very difficult.

Thomas Stromberg (50:58) it is very difficult. One of the things that I’ve tried to work around, um

Not the false the same false positive rate really is not it’s not universal in how you apply it. You may have a different false positive rate that you care about for software you ingest versus software you publish. Like you may want to be more

Josh (51:19) Yes, yes.

Thomas Stromberg (51:20) sensitive about the part that you publish. Um so I took some inspiration from Gzip, the command line. You know how you can do like gzip-9?

Josh (51:30) Yes.

Thomas Stromberg (51:30) Yes. So the scanner has basically that.

capability as well. So that actually is another thing that makes it harder for malware authors to use the tool because they don’t know the setting that that person may have. They don’t know how paranoid that person might have set it. So the default is it’s in terms of false positive rate per hundred million samples. So the default is 25, which is a comfortable uh it’s

Unlikely to cause false positives for you, but it actually catches a fair amount of malware. But for some people, like they don’t want any false positives ever, and they may set dash L0. but some people might be want want to be more paranoid and set like 2500 or something like that. So um that’s another little bit of a defense because you get to tune how paranoid you are.

Josh (52:26) That’s interesting. And that’s fair because if you’re using an ML model, right, you can just twist some knobs to

Thomas Stromberg (52:30) Mm-hmm.

Josh (52:32) turn to change how it’s going to trigger or not trigger on certain things. That’s brilliant. I love that.

Thomas Stromberg (52:36) Yeah, absolutely. Thanks.

Josh (52:38) I hadn’t even thought of that as an angle there, but yeah, you could totally do that. Which is the beauty of ML. And and we should also

Thomas Stromberg (52:45) It is.

Josh (52:45) clarify, your models, these aren’t like LLMs, like we’re kind of used when we see AI now, which

Thomas Stromberg (52:52) Right.

Josh (52:52) I hate the

Thomas Stromberg (52:53) Yeah. Yeah.

Josh (52:53) that word’s

been co I we we lost crypto and now we lost AI.

Thomas Stromberg (52:57) Okay.

Josh (52:57) But these are like s very built to task machine learning, I mean uh functionally neural networks, I assume. I well I don’t know what you’re using on the back end.

Thomas Stromberg (53:02) Yeah. Yeah. It it it isn’t

uh so it is um so I’m using something called Lite GBM, which is a gradient

Josh (53:12) Okay.

Thomas Stromberg (53:12) boosting model or machine, I guess is what they call it, actually. But um this is uh it it’s a technology that Microsoft came up with. I did try neural networks, uh and I never got

I never got where I wanted with the with the rates. And I think part of it is that the taxonomy might be just I felt like maybe it was too wide to be effective. Like there are too

Josh (53:38) That could be.

Thomas Stromberg (53:39) many options. Um so I fought against neural network neural networks. I chose strictly because it was actually my first option. Strictly because it sounds so cool.

And after banging my head in PyTorch to do the model development for a couple of weeks, I was like, you know, we’re we’re gonna try something else instead. And so I tried a hand a handful of things. LiteGBM is ultimately the the tech ML technology that I got the best data out of. and so that’s what we distribute, but yeah, it is not it is not an LLM model. Um

Because again, I want to be able to run this all in CPU. I want somebody who has a Raspberry Pi to be able to run this scanner. So things small.

Josh (54:29) Awesome.

Okay. Okay, Thomas. I holy cow, what a fire hose. Like

Thomas Stromberg (54:33) Yeah.

Josh (54:33) this has been amazing. Okay, so for anyone listening who’s interested, like what’s what’s next? Like what’s what’s the call to action to use the marketing term, right?

Thomas Stromberg (54:41) Um

check out atomdrift.org. uh

Josh (54:44) Link in the show notes.

Thomas Stromberg (54:48) check out our scanning tool. We’ve got a a really simple way to install it. Just uh, you know, of course, because curl bash is the safest way to install

Josh (54:56) Yes.

Thomas Stromberg (54:56) software in the s software supply chain. we we have that invocation. But you can also just check out the get repo and run make. And there you go. Uh supports uh any 64 bit operating system you can throw at it.

Even a Lumos, if you’re that weird guy who likes a Lumos. Uh

Josh (55:13) wow.

This has been my goodness, it’s been so much fun. Like I just want

Thomas Stromberg (55:17) Thank you. Thank you, Josh.

Josh (55:19) to thank you for your time and and I’ve learned a ton and like holy cow, the trips down memory lane you’ve like sucked out of my brain

Thomas Stromberg (55:25) Yeah.

Josh (55:26) have been amazing. I’m gonna be thinking about some of this all day, but this has been awesome. Thank you, Thomas. I I I love it.

Thomas Stromberg (55:29) Yeah. Thank you so much, Josh.

I really appreciate it. It’s it’s nice to have I suck at marketing. I hate marketing. And this is why I’m going to fail as a solo business person. Um is I don’t like talking about the things I build. Um in I don’t like being I don’t like the bo b being the person boasting about how awesome something is. So having this kind of venue um is really great because I can actually talk about it without feeling guilty.

Josh (55:58) Awesome. I love it. And and yeah, you’ll have to come back in a little while and tell us what new and crazy things you’ve done. So I look forward to

Thomas Stromberg (56:04) Yeah.

Josh (56:04) it.

Thomas Stromberg (56:05) Yeah. We’re I’ve got some I I the crazy idea that I is that we’re looking at in the future is an open source version of VirusTotal

Josh (56:16) That would be amazing. And for anyone who doesn’t know, like Virus Total has this enormous collection of viruses, but you have to pay an ungodly amount of money to get access to it.

Thomas Stromberg (56:23) Yeah.

Um so I I want one that uses open source scanners. And that anybody can just curl a little SHA two fifty six over to say, is this you know, have scanners picked this up as malware? Have they not? So I figure I have all the data already.

Josh (56:41) Right.

Thomas Stromberg (56:42) Why not? So

Josh (56:43) Then you get to start keeping every everything. no, you said SHA two fifty sixes though. ‘Cause ‘cause part of the trick to Virus Total is people upload stuff to them and then they keep it forever.

Thomas Stromberg (56:51) Yeah, well I have to keep

I I have I basically have a copy of every open source artifact produced in twenty twenty six. And that

Josh (56:59) Wow.

Thomas Stromberg (56:59) is where the twenty two hundred seventy-five terabytes is. And so I do

Josh (57:04) my goodness.

Thomas Stromberg (57:05) have it available for download because I have to constantly retrain the models as we change the rules around. I have to retrain on those bits. And so I have to keep them, which is terribly unfortunate. Um

I will say not everybody in my family is supportive of the rack of machines that I have. Um but uh yeah.

Josh (57:25) Well and storage

is so affordable right now.

Thomas Stromberg (57:29) That is biggest the biggest cost by far in this project is storage. Yep. All right. Yep. Sounds great. No problem.

Josh (57:33) Yeah. Unbelievable. my goodness. Okay. All right. I’m gonna cut us off because I think we could talk for another hour if I don’t. But thank you again, Thomas. This has been amazing, my friend.

Thomas Stromberg (57:43) Thank you so much, Josh. I really appreciate it.