All right. Good afternoon, everyone. And it is 1.30 Pacific time in beautiful Las Vegas, Nevada. Thank you so much for joining us today. And this next talk is sponsored by the Packet Hacking Village. And it is my absolute pleasure to introduce to you Josh Piore. Thank you. All right. So that's me. I work with Cisco Talos. Previously I worked with Zscaler, Umbrella, OpenDNS, NASA, and Mandiant and some other places and nonprofits and whatnot. So I do security research and I make music and do a bunch of other stuff. So before I get into all the details, I'm going to talk about what I want to focus on when I'm doing this kind of thing. I'm going to talk about the infection chain real quick. And it's probably very familiar to you. So hopefully I'm not going to bore everyone, but I'll just continue on. So looking at attribution, when you're looking for something, I spent most of my time as a threat hunter. When you're looking for something, you're following one thing that you see. So maybe I found a domain or a URL. In this case, I found this one at urlhouse.abuse.ch. And then I can see as part of Emotet, a lot of the samples I'm using are kind of some old samples for the moment. I have some newer stuff later on. But this is part of Emotet, part of the Epoch 4. There are various epochs, various evolutions. If I look at that in like VirusTotal, I can find a hash that's associated with this URL. And then I can follow that trail, looking for more hashes. VirusTotal makes this very easy. I can then keep on going and getting more and more attribution, finding more of this particular variation of Emotet. Maybe it's today's variant or this week's variant. I can copy the hash for that file and I can go in multiple different directions, take that to another interface and find additional things. Keep on looking, basically ending up at finding a whole bunch of different URLs. So as a threat hunter, I would do this to like find additional compromised URLs. In this case, a bunch of WordPress URLs that are dropping this specific version of Emotet at the time. Maybe I have another example, just to give you another example. I go to any.run, which is a malware sandbox that you can go to, and I grab something. I see a URL that's at this IP address. And I grab that IP address, go look for it in another place and get some hashes and get more information. Keep building up my thing. You have to know when to quit, of course, but keep building. And eventually you can do something like you can map it all together, following host infrastructure, finding what these specific threat actors are using to make their malware do what it does. But there's always patterns, as we all know, like when you look at binary analysis or anything like that, there's certain variable names that are the same because it's difficult to change your habits as anything in the world. There's a framework for this, you probably all know about it, minor attack framework to attribute various tools, tactics, procedures to things and to groups like APT29, which is a threat group and it's, you know if something belongs to them because it follows these certain procedures. They use certain techniques, you can track everything with this. It's nice, it's a little hard to automate, but it's nice. There's books about this kind of thing, this is a great book about this, I actually bought it at Defcon a few years ago. But there are levels of attribution. When I worked in the government, we were very interested in threat actors, like what threat actor is responsible for this thing and APT was the word of the day every single day, so. We were interested in individuals, other governments, the state sponsored stuff. In some cases, many places, I'm interested in campaigns, so what is the malware campaign that I'm looking at, is it Emotet or is it something like a remote access Trojan or is it ransomware or whatever. And then in most cases, like small environments, you just want to know what's inside your network, if that's your attribution level. So I'm going to talk briefly about the infection chain because it doesn't change much, just like the behaviors of all these things don't change much, making it possible to track them. Using Emotet again, it's just so easy to use and I like to make fun of it. It usually comes in via an email and then you get a link to something or an attachment to something, leads to OfficeDock with macros, PowerShell, more macros, it'll install additional components, then the C2 stuff, back then, I mean, it would lead to Cobalt Strike, but maybe it leads to remote access Trojan. This is just Emotet, but this is kind of a pattern with most things. The easiest way to compromise is, you know, get the user via some kind of email dropper or link to something or drive-by download. Usually, oh, let's see, I forgot that I made this segmented, but I just went over that. So another one, QuackBot, same kind of thing, but a little bit more complex, maybe to make it seem more authentic. Usually they get an email, which has a link, which leads to a password-protected zip file, they possibly open that file, and then they have an ISO, and they're like, what do I do with this? They open that, there's a Windows shortcut, downloads things, and then it does what it does after that. And typically you see that get request in over HTTP, maybe you see it more these days over SSL, but often you'll see it over HTTP, and then SSL traffic starts after that. When you're detecting this kind of stuff, it's harder where you get to the SSL, but I'm going to talk about that too. The problem that I'm addressing here is how do we find bad things in the network? How do we get the attribution of what's inside our environment without knowing too much? So this is just my home network, I'm just capturing stuff on a capture device. It's not very busy, but I mean, of course, networks are way busier than this, but how do you find something like this? This is just a super simple example of like a post over clear text of someone putting a username and password into a compromised WordPress site. How do you find that inside that? There are ways, obviously, we know about this, I'm sure. Intrusion detection and Yara, I'm going to talk about these. So IDS rules, this is kind of a crazy slide, but at the very top, if you're familiar with this, is an IDS rule, I'm using Emotet, it would capture what you see in this PCAP, it's going to look for things like the content being the post, it's going to look for a specific kind of post content, maybe it's looking for the user agent or some other data. And when I run this, like if I run a PCAP or I run that malware in my, when I ran it in my home environment, I triggered six alert fires through Suricata reading this rule. So there's really easy detection mechanisms for certain things. Of course, as with most things, you have to know what you're looking for. You have to have already seen it in many cases. Yara rules are typically not thought of as a streaming detection mechanism. I mean, they can be used in such a way. We use them at my work like that. But they're typically for finding strings or data in binary analysis, you can look for stuff in HTTP text and JavaScript. So it's not really thought of as a thing you can use for PCAPs or net streaming network traffic. But I did find that someone wrote a tool called Yara PCAP, I took that and I modified it, my code is going to be at the very end of this, I have a link to it. But I modified that to include it as a proof of concept if you want to play with it. So you can upload a PCAP and test it. How it works with the Yara PCAP thing is you write a Yara rule, like based off this IDS rule that I had before, it becomes really simple, much easier to read. I'm looking for a post for the user agent, certain kind of content, the refer information, and then I want to get all those things when it sees them, it triggers. So if you look at my web app that I built, you browse to something, I pull up like a test Yara, I can see that I get these two alerts, basically. So it's possible to capture stuff over network with Yara as a detection mechanism. There's just a view of it. There are some obstacles here. I'm going to talk about a lot of obstacles. Visibility, SSL, I briefly touched on this. Going back to that infection chain, usually you get an email, and that's going to be one endpoint detection, you're looking at your email detection, so hopefully you have something that's watching your email. You maybe have a going to get that link over HTTP, or you have an attachment already in the email, so, I mean, you hopefully detected it in the email. And then your endpoint detection is hopefully catching that office doc with all the macros and seeing PowerShell running and stopping it. Then installing additional components is probably going to be over SSL, you're probably not going to know that's something weird is happening, except for the endpoint that it's connecting to, if you're monitoring that, or if you're looking at DNS, you can also get some information from that, too. And the C2 is usually going to be SSL as well, and beyond. Remote access Trojan traffic, and when they drop ransomware on there, you don't have visibility into the whole thing like you did maybe 15 years ago. And here's an example, like iced ID dropper, you get it over HTTP, and then traffic starts right afterwards with SSL. So you can capture that HTTP and maybe the SSL with some kind of magical behavioral analysis, or in some cases, stuff I'm showing you kind of catches it sometimes. There are solutions for this. When I give talks, I don't do vendor talks usually, so I try to talk about free things. I think Proxifier has a fee, but enterprises like my company and other companies offer solutions to man the middle of your SSL traffic, you have to install something on the clients, so you can intercept that stuff for better detection. But you can also do it for free. So is this possible, this thing I'm talking about here? Well, let's find out. I had this idea from a talk I gave a long, long time ago, I was looking at, these are really old samples. These are, okay, I'm not a data scientist, so ignore the numbers on the left. I was plotting the time, plotting when things were happening with a sample, like over the network. When does it make a GET or a PORT request, or when's the SYN, SYNACK, et cetera. And it's a whole bunch of samples. And I've seen there's a relationship between these samples, but I don't know, maybe not. Then I looked at Emotet samples, it's different than Hansitor, it's different. And they're related, by the way, but they're, the traffic stuff is different. And then we look at TrickBot, same kind of thing, they're related to each other, very different from Hansitor and Emotet. I'm not going to show you more examples of malware, but I was like, maybe there's an idea here of something I could explore. So let's talk about finding some patterns and show, like, some examples. I'll use dropper downloads, so when you first get that dropper, beaconing out, and we'll have a little bit of SSL in there, and then benign versus malicious, because in many cases I'm wondering, is this just how networking works, the way that I'm doing this? Or is it bandwidth that's causing issues, or not causing issues? Looking at dropper downloads first, I'll take two separatized ID downloads, I'm getting these requests, I've got almost double the transactions on the top one than the bottom one, and the download is basically the same. So these, they look different, but in terms of how many transactions happen. I'll look at the timing in between these, like, so when a transaction happens, then the next transaction, and what's the timing between that? And that's what I'm going to be focusing on mostly in this talk. And despite the difference in transactions, I'm seeing that there's a sort of a pattern, just, you know, just using my meat brain. I've got a big time, and a small one, larger, small, really big, smaller, etc. So I'm seeing a pattern, I'm wondering, is this something I can work with? Let's look at beaconing. This is over SSL, cobalt strike, beaconing, two samples. Is this even, am I going to see the kind of same results, or is this just how networking works? This is what I'm always asking myself, is this stuff I don't know about? I look at it, I'm kind of seeing the same patterns where I get that big one and the small one, so it's still maybe, maybe it's just how it works. I do Emotet and Trickbot beacons, same kind of thing. So I need to find something to show me a difference. I need two samples that are alike, and I want to know if they behave differently. So benign versus malicious. I downloaded this thing called existential.exe, I found it when I was looking for a benign exe file. Someone wrote it to look like a malicious dropper download, which is usually pretty small. You can see I get it, and I'm getting it from some site, a domain that I own. And then I compared it with a malicious dropper download. I don't remember the malicious dropper, but I'm seeing there are some similarities, but it's starting to be different enough that I decided to explore further. So let's talk about the processes that I'm going to play with and use in this. I'm going to talk about averages, Levenstein distance, and some fuzziness. There's some challenges. Again, finding the parts that I'm interested in. If you have network traffic, how do you find the bad stuff? I have malware analysis sandboxes at home, we have them at work, we have them all available to us for free. So you can find this stuff. But if you have a PCAP full of stuff, how do you find it? And there's always flows in a huge PCAP file. These are the connections between all the different servers, or maybe you just do one machine in all the places it connects to. So how do you separate all these flows in an efficient manner and then operate on them? There are, as I mentioned, there are places we can go get stuff. I'm going to use a lot of examples from malware traffic analysis for the Austin site. You can download an exact, like almost a carved PCAP, sometimes there's extra data in there, but of malicious stuff. And I'm going to use that for what I'm going to build signatures out of. So once I have a viable PCAP, like I downloaded from malware traffic analysis, like I'm going to use this ICED ID with Cobalt Strike, it's old, but... Oh wait, I figured something out. Oh yeah, once I have a viable PCAP, I can use that. So I'll play with the detection ideas. I'll play with the averages and I'm going to look at co-integration. And once again, I'm not a data scientist. I'm going to talk about co-integration and I might mess it up a little bit, but I know how to make it work in the thing, sort of. So averages first. When I look at an isolated trick bot post from that viable PCAP that I download, I've got 840 queries. I'll take the queries in between the transactions and I'll put them in a big list. And this is basically the entire PCAP in terms of time from the very beginning to the end from when it runs. And then I'll find the average. So I'll add them together and I'll divide them and get the average number. So average time between is 12,748 for this one PCAP. And then take another one. I've got a different set of queries. Do the same thing. And I've got these averages that on their own don't look that similar. The number is 14,748 and 16,125 different. But I need to compare it to other stuff to see how related they might be to each other. So I'll compare this against some random traffic. I take a random PCAP just with stuff in it. And it's got 779 queries and I'm also taking one flow from that random traffic just to add another thing. Just 32 queries. So it's not that much data. And when I look at it in this context, I'm seeing that there's a little bit more of a relationship between them. And if I scale this, I'm seeing even more of a relationship between them. I don't have that as an example. So I'm feeling like I can continue on and explore this further. I'm going to talk about cointegration as another method. So cointegration as described is usually a drunk guy and a dog are walking. They're walking together. So they're co-occurring with each other. But are they actually together? So there's this model to run it against them. They start to move in a different direction. You can see that they co-occur, but they didn't co-integrate. They're not actually together. They're just doing their own thing. Basically like that. And some little parts to describe it when I show some graphs. P-value is the probability that the relationship between those series is due to chance. And then there's a spread, which is the difference between the two actually co-integrated time series to show how far they deviate from their long-term relationship with each other. Just some examples like Russia, Ukraine searches on Google. On the spread, they were together and they separated away from the spread, but they did it at the same time. So they're co-integrated and they stay together basically. These are co-integrated, co-occurring things happen at the same time. Twitter and Elon Musk around that time, I think that's around when he took it over. So they don't really... they're way off the spread. The timelines don't match up, but they come together right at the same time to zero on the spread right there. So there was a relationship because everyone's like, oh, what's going on with this? And they're Googling it or whatever. And then 5G and COVID, I just had to put this in here because people were searching it. They matched, stayed on the spread all the time, and then they both searched at the same time. Annoying. The people... whatever. So two identical PCAP files. If I take the same exact ones, they're going to definitely co-integrate. Just as a test to see if I could do it, I guess you don't. And you've got... I put a scatterplot here. The little numbers on the bottom are the times, the milliseconds. And they're on top of each other. There's a blue value underneath the orange value. Of course, they're identical. And the P value, which you want to be between zero and one, it's the probability value. They match exactly. So I want to try two different PCAP files. Doesn't matter what they are, if they're malware or not. They won't co-integrate, though. And they don't. The P value for file one is way off. And the scatterplot is just a mess. And I'm starting to think there may be some problems with co-integration. But there's maybe also a method to start finding similarities. I'll try two different PCAP files with similar traffic. So these are benign. One to DigiCert and one to Windows Update. Just some get requests. When I map them, I've got a seconds marker. I'm using seconds here. And most of this stuff, I'm going to use microseconds. And I'll mention this in a second. But at 48 seconds, then 50 seconds, then 53 seconds, then zero. And that other one, at 38 seconds, at 46, rolling through time as we go forward. And the number of transactions at those seconds. When I map them, I get similar P values, because they're kind of similar. The timing difference is a little bit off, because one started later, one started earlier. There are some problems, as I mentioned, with co-integration. Like the time value. I've got this one and I've got this other one that has a huge one. I'm going to get a scatterplot or data that the second one is going to far exceed the other one. They aren't going to match up the way I want them to. Even if I'm doing individual flows compared against each other. As you can see, that's what I did here. I forgot that I put the slide here. But the orange one keeps on going. The P values are different. So short sample size. In many cases, a flow will be very minimal. So I'm going to get something where I can't do anything with it. So let me talk about time resolution. I just briefly mentioned I talk about this. You have to decide how much time you want to work with. At the minutes resolution, you're not going to get much data. It's going to be spread out one per minute. Or all your transactions in a minute. The seconds, you're going to get some data, but it's not going to be useful. Microseconds, you get a lot more data. So I'm going to work with microseconds. Also normalization. Because things aren't starting at the same time, I want them to start at the same time. So I decided to make all PCAPs or any network transactions, I throw through this to start at January 1st, 2000, just to get them to line up. And this just sort of shows that. I don't have to really describe it, but they show how they all start at the same time. Now, talking about signatures and detection, where it's getting a little more interesting, where I'm starting to play with actually building the signatures. I want to separate the flows first. I'm going to calculate percentages. I'm going to do distance, and I'm going to do fuzziness. And I'll involve Levenstein distance and other things. So first step to separate these flows, as I showed before, it's a lot of flows inside network data. And if you're running this with Daemon logger or TCP dump, writing a packet capture to file on your logging systems, and then you're going to have tons of data, and then you have to separate those flows. So I'm going to operate against each flow individually. This is computationally intense. So in my code, I've made it so it's multiprocessing. At least there's that. So when I run it, it'll just use whatever processing power you have. I'm using it on this laptop, and it's pretty fast for a fairly large file. And so once I operate that, I get the average time between queries and the total queries, and I also get some other data. I added more after this point. And then I'm going to calculate percentages, because I'm ending up with these times and these averages, and it's kind of messy. I want it to be smaller. I'm ultimately working towards a goal of building a small list of numbers that I can make into a So when I take those frequencies, those numbers and the times in between, and I say this time is what percentage of the entire PCAP, I do that for the whole thing. There's a lot of zeros, and then there's a lot of times where it doesn't. Theoretically, this whole list should equal 100. I do some stuff to it, and it doesn't quite equal 100 after I deal with it. But if I look at just a quick look at just this raw percentage data, I'm kind of seeing the same traffic patterns between PCAPs. I add a little chaos. Like I said, I do some stuff to it. I take away those zeros. I round things. This, you add it up, it won't equal 100, but it's because I did stuff to it. But it's all in my code, which you can see. Basically, what I'm ending up with is something like this, where I have this list of numbers, and I'm thinking, well, this is... okay, this is something. It represents the time of a transaction. So we can find exact matches, like the exact same thing in other PCAP data. And that's nice, but I'm looking for variations of malware. Like when the new variant of today's hot malware drops because the last one was burned, how do we find it? So I look at percentages and distances. I talked about Levenstein distance, and let me go into that a little bit more. Levenstein distance, if you don't know, it's usually used on string data. And if you want to know how far away the word kitten is from sitting, you place that K with an S, that's one distance. You place the E with an I, that's a second distance. You add a G, that's a third distance. So it's three distance from each other. And I was thinking maybe I could use this even on small bits of data and treat those numbers not like integers, but like strings. So if we remember, I want to find this behavior, this little bad thing in this whatever thing. So I'll create my signature, which looks like this. And it doesn't look that valuable. It's a bunch of ones and twos and that one. And when I run it on something using Levenstein distance, I get a number at the very end. That number going up to 100 equals the probability that I'm finding inside a flow something that matches. But I can see there's a lot of like 58, 67. There's one that's 100. That's the one I made my signature from. So of course it matches because it's exactly identical. So I'm starting to get somewhere where I can maybe be a little looser in my searching. I'm just looking at that PCAP and seeing that's the thing I made a signature from. But I need to be fuzzier with it. I need to get a little bit looser. There was something that was called Fuzzy Wuzzy, which is so cool, but it's the fuzz now. So I'm using this to apply a different threshold based on the Levenstein distance. When I run this, I'm going to get another number that's been modified. It still has the 100 for the signature match, but it has other numbers that I'm interested in, like the 75, 67. What are these numbers and what do they represent? So I can't remember if I opened the PCAP in this one. Let's see. I did not. So the signature made from this flow, as pointed out before, got these two other ones I'm interested in. If I look at one of them, I get an exact match. If I look at another one, it's an exact match. So that's interesting. I have no match on 67, so maybe there's a number I can pick that is my magical number that's going to find this all of the time. There's some tuning involved, because different malware campaigns are different with each other. I'll talk about this in the future work I'm going to work on, but just showing tuning. I'm sorry to show you code, but basically I'm looking, as kind of described already, the partial ratio is greater than my threshold. That partial ratio is from the fuzz thing, and Levenstein distance is less than my Levenstein threshold. So I'm working with these two variables, and I just have to tune them depending on what I'm working with. And I can set that, you know, at the very top of my code. This is all in the README on the GitHub. So if I go get two things, Darkgate activity, I downloaded one from 11-30-2023 and 12-7-2023. I don't think I could find... I wasn't able to find newer stuff than that, just like last week. But what I'm going to do is I'm going to carve out the bit I'm interested in from the 11-30 one first. Let me scroll down here to post. So I'm finding this information here, this post that's suspicious, and we know it's bad. And I'm going to save this to create a signature out of it. So I'm just exporting just the displayed packets, saving it as Darkgate post, and then just showing you what it looks like. It has no other flows in it, just this one flow between these two servers. And then I'm going to upload this to create a signature. And when I upload it, it creates a really simple... like, there's three numbers. It doesn't seem like I can do much with that. But I'll show you. And then when I go and I upload the same file, I want to see... I'm tuning it right now. So I'm getting a match, of course, on my exact match. But if I look at some of the other ones below it, I'm going to see some other additional matches here. So it's not quite tuned yet. I've got 11 sign distance of four, my ratio is 75%. I click on the very top one, which is the most matchy that didn't match. It's the same one. I continue down the list and maybe go to 67% distance of four on 11 sign. And I've got another match here. So I've obviously got to fix the thresholds I'm working with. I look at 64%. Let's see what this is. And in this case, I'm not getting a match. So I'm starting to find the numbers I can work with. Now, I look at this one, 67%. It's a match. And so between 67 and 64 is where I want to be. 11 sign, five or four, somewhere on there. And so I just want to adjust those values and play with it. Then we'll try this again. So I've unfortunately got to see me carve out that part again. I'm going to carve out a little bit different part. So it's going to create a slightly different signature. And I think I ran it on... I think I ran it on the same one. Sorry. And I'm seeing my don't matches don't match and my matches match. So I've got this tuned and I can start applying it to other things. So now I'm going to upload the newest signature from 12.7. This is a later PCAP different version, basically. And I'm looking at my matches. I'm getting similar, different things happening in there. Same kind of post to a different server, basically. And the... I'll show you two of them. And then the ones that are in the not matching will show that they don't match. So I'm feeling a lot more confident about what I'm seeing here. And I can apply it to other things. So I want to try an older signature, newer variant. This is what I was saying. You have to watch me carve out the same thing again. But I'm going to carve it out from the 11.30 and make a signature out of it. And then I'm going to... I'll stalk you through it. So I open that up. I'll isolate the flow that I'm interested in. I keep on selecting that same get request. But basically I want to follow this post here. And I'll save this. And then upload that to create my signature. And this is where I'm going to have some different numbers from the last one, because it's a slightly different transaction. And I want to analyze, I guess, one from six months later, Darkgate. So I was actually able to find a newer one. And I'm getting a whole bunch of matches. So I can review those. And I can go to the very bottom, which is the least matchy of the matches. And... oh, actually, I guess I'm going to look at the top one first. No matter how many times I build these videos, I always forget what I did. But the very top one matches, of course. And I can put this... throw this in the last search if I want to. I'll get all those matches. 169 hits. When I look at the signature, the signature is based off this visit to TranslateGoogle.com, misspelled, typosquatting. And the bottom one is the same kind of post to a different place. And I'm getting 169 matches. So that's pretty cool. I thought it'd be cool to add a map, because we all love maps. Our management loves maps. And so it's thought it'd be cool. The red skulls are the bad locations. The unmapped things are black, because you can't... I couldn't put an internal IP address on a map. But I try to put them in the middle of the Pacific Ocean when they're unmapped, but there are some other ones that actually get unmapped. So I'm working on that. Production use. This is cool that you can use... you have a web app. If you're... I've been a SOC analyst, and I've pulled PCAPs down, and I'm like... I open it up, and I see what actually happened once the IDS rule fired. But it'd be cool to have something like this, where I could upload it, see what's happening, see if it compares with anything in my database of signatures. But there's other ways to do it. For example, I was talking about the daemon logger, or TCP dump, if you're writing packets to your disk. How do you run this on a rolling basis? So I wrote this as a fast API thing with Flask running on top of it. So if I start this over on the left, I'm running my fast API app. And then on the right, I have a Python script sending a PCAP. And it sends it and gets back JSON data, and then I can refresh whatever my sim is. It can be Elasticsearch, or anything else that you use, or want to use, and get those matches. So that's nice, at least for a rolling PCAP. Of course, as mentioned before, the multiprocessing happens when the flows are separated. So you want to do it on a fast machine. But generally, machines that are doing packet capture are going to be fast. Additionally, just because I thought it would be fun, you can use notify, which is N-T-F-I, to notify you. So when I run this again, I can get a notification on my phone, which is kind of cool. Kind of cool. It could also be kind of terrible. For example, you can get analyst fatigue when I did this and got a whole bunch of stuff. So I have that on my system. But you can run it if you want to. I'm going to talk about something completely impractical. I love doing research because it opens my mind to new things. I get to create and build things. I feel like security research is a creative process, and it fuels my other creative passions, like music. So I just wanted to play around with this and see if I could do something with audio. It's not practical. But let's just see what happens. So I like this quote a lot. Art is how we decorate space. Music is how we decorate time. And I painted before I made things, built things to fill up the space we live in. I also make music. And music is all based on time. You change the beat, it's completely different. You change a note, and the length of the note is different. So they're powerful things in their own areas. And I was thinking, while I'm playing with time, let's see if I can make something musical with this. So you all know about Shazam, I'm sure. I use it. If I'm at a club, I'm in the corner, like, Shazamming. So basically, if you don't know how it works, this is what it looks like. Oh, that's not what it looks like. So you press Shazam, you hear a song you want to hear, and then it tells you what it is, adds it to your Spotify playlist, you can listen to it over and over again. It's great. Sorry to rickroll here. So I was researching this. I was like, could I do this with Python and NumPy? So I found this article. I also found something called DejaVu that someone wrote, that they wanted to make their own personal Shazam server where they could store their music, and if they heard a sample of something, it would play that, it would listen for the sample, or you send it to DejaVu, and it would go, oh, yeah, that's this song. I thought, oh, I can probably do this. So I'm back to my transactions, not the percentages, but the actual times in between, the microseconds or milliseconds or whatever time I was using or want to use. And I'm looking at this, I'm thinking about pitch. Frequency is the number. So zero would be a low, like a low sound, and up high would be a high number is a high sound. So I can make audio out of this. It's not going to be beautiful. I mean, you're going to hear it right now, what it sounds like when you listen to a PCAP file. But there's patterns in there. Like I said, this is not practical. But let's play with this. Let's go same malware sample, different environments. I'm going to grab my malware. I grabbed from Malware Bazaar, agent Tesla, kind of old. I ran it in any run, downloaded the sample, just I don't know why I downloaded the sample. I always do. And I get the PCAP. And then I can see that it's doing a post. And in this case, I'm not going to be applying my Levenshtein stuff. I'm just playing with audio. But I see there's a post here. And I also want to address the idea of bandwidth. That's why I'm running this any run. And I'm also going to run it in my own very busy network environment at home. I run it on my system. This is just a picture of one of my malware VMs. And I've got the same kind of post happening. I'm going to have different transaction times because of bandwidth. And I'm going to just end it. So there's a little bit of stuff here. I have to reverse it. I'm instead going to be making a signature out of the entire PCAP, not the little bit. So like I said, not practical. And then I'm going to play my little bit and see if it finds it. If I open up this PCAP, let's see here. And we're looking at that post. I've got to create an audio file from it. So I have a little Python script I wrote to convert those frequencies into different pitches using Fourier transform and some other stuff. And in the back, you can see there's a bunch of MP3s being made. And they all disappear. Those are all the flows individually. And then they get combined into one big PCAP, MP3. And then I'm left with that thing. And then I've got a carved one. This is the little tiny bit that I want to identify in my Shazam. I'm going to do the same thing with that. I've got that MP3 file, which is huge, by the way, compared to the PCAP, which is like 500k or something. It's not that huge. But I've got others that are huger. I've got my carved one here. I'm going to make the signature from this one. And you see a bunch of... it's carved, but there's flows in there. Because I didn't carve it all the way. And I've got these two MP3 files. Let's see. So now I'm going to try to identify it. Initially, when I try to identify, it's not going to see it because I have to add it to a database. It's not like a clean app like Shazam. It's just a program you can run. So I try to recognize it. It's not going to recognize my file yet. But that's because I haven't added it. So what I'm going to do is I'm about to add it. I've got to drop it into the signatures folder, which I'm going to do right now. Slowly. Drop it in there. I'm going to run a script to help it identify that. So it sees it. It's like now there's a signature for this audio file, this song of yours. And then I want to recognize the file, just my part. And it's seeing there's a song ID recognized this traffic pattern that I was seeing. And if I apply Levenshtein to it, which I didn't do in this example because I don't want to bore you with more of this running commands. But it gets even more interesting. But of course, like I said many times, it's not practical because those pcap files can grow to huge sizes when they're mp3s. And who wants to run their network in mp3 mode? So maybe I do. I guess I kind of talked fast. I'm kind of getting towards the end here. Supposed to go for 50 minutes or 55 minutes. But you can go get some coffee. So going further, I'm going to work on some third-party APIs. Like I said, I like to, when I release stuff personally, whether that's not a work talk, I want people to be able to try it and play with it if you want to. So you can add stuff if you want integrations with VirusTotal, with my company's product, Investigate, or other things like that. I didn't add it. It's very easy to add. Then you can look at things like domain, IP, reputation, relationships. If you have a sinkhole in your environment, you can pull that data in. You can play with anything you have. To add more things for conviction. And I'll analyze various components of the PCAPs, so I can add that in the future. And I should probably learn Rust. I should learn something so it's fast. Like, you know how Snort is a C binary, or I think it's a C binary, and it uses its rules. It runs very fast streaming. I'd love to do that. The code is available. It's a long name, but if you want, I just uploaded it about two days ago. So hopefully it's okay. There's a couple things you have to do if you want to play with it. But I was very, very verbose in my documentation on the README. And there's a couple utilities, too. I added a malware traffic analysis unzipper file, because there's a password scheme. So if you want to unzip malware traffic analysis PCAPs, you can do that. You can reach me at my website, my personal site, which is pyrosec.com. Not a Twitter, because I just don't post. Don't even really look at it anymore. And I'll probably rewrite all my posts with nonsense. And Bastodon, I don't even have the app installed, but I should, because it's kind of cool. But anyways, that's my talk. And thank you for coming. There's time for questions, if you have questions. Well, a lot of the time I was working in a clean environment, for the most part. But I did run stuff over my network at home, which I know that's crazy, but I do it. And I didn't see negative results. But my network is busy. It's not a corporate environment. I have like 20 VMs and three or four servers. So it's busy. But I have a family, Spotify, Netflix, YouTube. What's that? Yeah, yeah. It shows promise. I want to keep exploring it. Yeah. Sorry, say again? No, but that's what I mentioned. I want to explore future stuff. And that's easy enough to do. Direction, that's also good to play with. I started to play with it with a mapping, like making the source changes constantly. So... Oh, yeah? That's really cool. I love to talk. Yeah. All right. Thank you very much.