Good afternoon everyone and welcome to the Packet Hacking Village. It is now, yes, we're in the afternoon part of the session. And I'm just going to make this introduction really quick. I think I've been doing this for way too long. And it seems like every year... I remember one of the things is that when you're here, I think my introduction to the two of you gets shorter and shorter. So here we go. My absolute pleasure. Mike Rago. Shout out. Thank you. Make sure you guys can hear me okay. Sound okay? Cool. So yeah, we'll be presenting Stego Augmented Malware, which is a combination of a lot of research Chet and I have done over the years. And applied in a slightly different manner. And to really kind of preface this, Chet will talk about some of the research he's involved with a college that he's involved with, which also kind of sparked some of this additional research and really the presentation altogether. So with that, we'll go ahead and get started. So in terms of the agenda, we're going to cover a variety of different types of steganography augmented malware. Try to say that fast five times. Stats, trends, commonalities, differences. Some of the research through the college that Chet's involved with had a lot of the students focus on specific variants of malware. And then we started to look more broadly across these different variants to find commonalities, differences, better understand IOCs and TTPs and things like that. And then as a result, we wanted to better understand how we could detect a lot of these, especially based on their behaviors. And then we'll talk a little bit about our ideas really about the future and where we think this may go next. So I'll let Chet introduce himself. Yeah, hi everybody. I've been here many years so you probably know who I am, but the focus of this talk really goes to something that I've been working on for a little over 20 years now. And that's where all the gray in my beard has come from. So we're going to talk about steganography and how it's being applied to malware today. And specifically some work that we're doing at Utica College and one of the programs that I operate there. And talk a little bit about some of the student research that's there as well. And I also teach at the University of Arizona as well as Utica College and at Champlain. So if you're interested in any of those programs, please stop by and talk to me. I'll be presenting tomorrow at 6 o'clock as well. So if you want to stop by then, turn it back to me. Thanks. Yeah, like Chet, I've presented here many times and Chet and I have collaborated on a lot of steganographic and steganalysis type research over the last 20 years or so I guess at this point. And have done a few books together too around covert communications, data hiding techniques and things of that nature. And so I'd like to thank Ming for having us back again this year. So let Chet first talk a little bit about all the things they've been doing at Utica College and then that'll really preface what we're going to go through in terms of the research and analysis. Thanks Mike. We teach a class at Utica called Cyber 642 which is Data Hiding and Access Control. So the point of this particular course is to take a really in-depth look at what's happening and what is emerging from a data hiding and covert communication point of view. The focus of the course is to look at the latest malicious code that includes advanced persistent threats that are out there. Mike and I did a talk several years ago talking about the APT Operation Shady Rat which kind of started this whole gamut of technologies that are used to augment malware in order to be able to make them more or less discoverable. So the whole point of this is to incorporate steganography into malware in order to be able to conceal its existence, right, so they can communicate from that perspective. So again, in recent years there's been a lot of movement and Mike's going to walk through a bunch of those that have come out of the research that we're doing at Utica and work that we're doing together. And as Mike said, we've been studying this problem for a number of years and we've kind of looked at this from several different vantage points. So the students in this class discover, this is a master's class, discover and examine a wide range of steganography enhanced malware threats. We've looked at over 30 of these in the last year or so. And we want to do this in order to analyze vulnerabilities of the malware along with the steganography methods that are utilized. Because some of these methods actually use fairly sophisticated steg and others use very unsophisticated steg. So our interest is to understand where those techniques that they're using in order to enhance the malware are potentially vulnerable. So we can actually use those in order to either detect or disrupt that activity. So we want to develop these strategies that can be allowed to allow us to do detection, response and mitigation of the threats that are there. In several cases students have chosen to further examine these threats as part of their final capstone or their thesis project at Utica. Michael Beattie just is completing his right now. And it's just an outstanding paper that will be in public view probably in about three months when he finishes his thesis. And that thesis covers a wide range of these and the vulnerabilities that we have studied and figured out. I'm the second reader on Michael's paper and I teach the course that I'm talking about. So we spend a lot of time with a lot of different students looking at a lot of different threats that are there. So the catalyst for this presentation comes from a couple of different points of view. One, Mike and my 20 years of studying this problem and watching the evolution of steganography being used in multiple different ways. And it's interesting, one of the things that we tend to focus on is on encryption. But less emphasis, even to today, has been spent on the study of steganography and how it actually impacts and how it can evade detection. And now that it's being integrated with malware, it's the next level. But some of this has been inspired by the research that we've done and also the research the students have been doing over the last couple of years in order to be able to take us to this next level. So I'm going to turn it back over to Mike who's going to kind of walk through some of those changes and then I'll bounce back in a little bit to talk about what we're doing about it. In other words, how we can actually use what we've figured out in order to do that. So I'll turn it back to Mike. Thanks Chad. So taking a step back first and looking at ways in which we could categorize these and also determine their level of existence when they first came into play or were released or seen in the wild, just started to build out a simple timeline here where you can see a spike, an increase, especially over the last four to five years. Certainly this is a very small data set, but over time I'd like to continue to see how this evolves and emerges. But clearly there's a growing number of these and it's on the level of potentially exponential. Of the ones that we did some deeper analysis around beyond what the students had done, we started to put these into some different categories along the lines of banking trojans or crypto jacking. A lot of this was this categorization here was really based on their motives. What are they looking to do? In addition, a lot of these, as you might expect, are all related to remote control, CNC, remote access trojans, things related to data theft or espionage. And then lastly, there were some actual advertising and ad related type click throughs and promos to generate clicks and drive traffic to specific sites or specific ads. So one of the ones that was particularly interesting was one that leveraged social media. At a previous Packet Hacking Village or Wall of Sheep talk a few years back, I had presented around a lot of these risks and threats across social because it was doing a lot of research at that time across Twitter, Facebook, and a variety of other social networks. Also streaming media services and things like that. This one in particular was found on Twitter. And to give credit, this was identified by Trend Micro. The premise behind it was that outside of the scope of this, one or more systems had been, let's say, compromised and infected with this malware. But where the steganographic component of this starts to come into play is that the malware is out there on a regular basis checking a particular Twitter account. A Twitter account that had been out there for a few years. And whoever owns this account then started to post memes. And within those memes were certain types of commands. So once the meme was posted, the malware would identify it was out there and parse it. And within it would be a variety of commands that the malware would leverage to run a variety of things, including screen scraping or screen captures and a number of other things. And then additionally post this stuff to Pastebin. And so through Pastebin it would actually initially obtain a URL of where to post it. And it would either post it back to Pastebin or separate IP or URL all together related to the CMC. Just at a high level diagram here, you've got the computer reaching out to the social media. It's already infected with malware and getting updates and commands via Twitter. Not Twitter directly, but a meme posted to Twitter. And we'll talk more later about a presentation Dr. Phil Tully and I did two years ago at DEF CON 25 around neural nets and leveraging the ability to not only detect some of these things, but furthermore do predictive analysis. So in this case it went out to Twitter, parsed this particular meme and other ones that were posted beyond that to gather commands. And from there it would get information such as a URL to obtain command and control stuff. I'm glad I have this on the screen because it was not only Pastebin, but Imgur and things like that. And then as a result the files would be sent to the remote command and control URL that was provided via Pastebin or Imgur or something else. So with this were a variety of commands that were run and leveraged by the malware itself to capture screen shots of the desktop, processes that may be running, steal stuff from the clipboard, even potentially the username for the machine and documents and things like that. But it kind of begs a question here for a moment and that is, you know, if you're running an enterprise network, how frequently do you have or want to permit enterprise users to be using things like Pastebin? You know, we find in most cases when doing pen testing and network analysis and things like that that, you know, when looking at it from an ingress or egress standpoint that this is largely still allowed outbound for posting things. I'll jump into some more of the variants here, but for, you know, as sort of a stepping stone for that, I'll let Chet talk about his Raspberry Pi project, which he's actually, as he mentioned, going to present tomorrow as well. Thanks Mike. So one of the questions is how do we detect this? Do you care if we detect this? And so the issue is the whole point of this operation in augmenting malware in this fashion is so that it becomes not observable, right? Or observable is very low. So how do we actually go about detecting this? Well, there's kind of two different methods that we've actually analyzed and looked at. The first, of course, is we could analyze the images that are being posted or recovered from different sites and basically determine if they have content embedded in them, right? And as I mentioned earlier, some of them are fairly simple in embedding. They may be using a JPEG that has data appending. They may be using a JPEG that actually inserts things in the header of the JPEG to basically communicate the data, whether it be a PowerShell script or something like that that's embedded in those areas that we're not looking at or don't get displayed. But we can detect those relatively quickly and relatively easily. But if they go ahead and modify things like the quantized ECTs and actually embed that information in those areas of the image, then the image is going to be compromised and now we have to do more exhaustive analysis of that. And it causes two problems. One is we can miss things. And number two, we can issue false positives. Neither of those false negatives or false positives are a good thing. The second problem is that in the deeper analysis of those images, it takes a long time depending upon the size of the image. So it could take several seconds or even longer depending upon the size of the image that we're actually going to try to analyze that it has been compromised or information has been embedded in it. So we got thinking about this and said the second way to approach this is to look at the behavior. We never want to build signature detections anymore because they just don't work. Because as soon as the bad guys know that we're doing signature detection, they just change the signature. And it's difficult and that's why most of these things get through in the first place. So I'm not going to talk about the compromise itself of the systems. I want to talk about analyzing the behavior of the malware once it's embedded. Now remember, these are probably in most cases fileless malware. So we're talking about memory resident things that have compromised the system in such a way that these processes are running with privilege. And therefore, they're able to actually move within that environment without being detected by traditional defenses of those environments. But we do have been doing a lot of work in analyzing the behaviors of those operations. And they tend to be quite similar. I might kind of walk through a scenario for you already of how this actually works. And most of them work the same way. They have a need to go back to the internet to a public site that is not in violation. Typically the way we have done these in the past is we know what CNC sites that are out there that they're using and any connection goes to them, we basically block it. So it's a signature detection. We've got a signature that this is a bad CNC site. But in this particular case, it's not a CNC site anymore. Now it's basically Pastebin or Twitter or Facebook or anything that has an image that's going to be downloaded and information is going to be gleaned to that as to what to do. And then information is going to be posted back, again, in the form of a JPEG or something else that has the content that we want to exfiltrate from the environment in it. Again, something that's typically going to be ignored. However, when we start looking at privileged applications or privileged processes that are basically posting information to the Internet or going to the Internet and getting information, that becomes unusual. So just one simple example. But the point is the defense in depth approach here is to basically identify these behaviors, and that's what we've been studying for the last couple of years, to understand what are those behaviors. And so one of the things that I'm going to present on tomorrow evening is talking about this Raspberry Pi project that I've been working on as well that's basically a passive sensor. So basically the sensor is looking for aberrant behavior within your environment that's outside the norm. And these would be things that would be outside the norm, right? Normally systems are not going to be posting these kinds of images to these particular sites or retrieving them and then processing them. So we're basically developing ML models that will allow us to identify these even if we've never seen them before, right? Because they have these characteristics that we're analyzing. So as you know, the first step in doing any kind of ML work is to actually define what am I trying to detect, right? And number two, what are those specific features or characteristics that I want to basically identify that are either good or bad? And then basically be able to build a corpus of those in order to be able to identify those behaviors in a more intelligent system kind of approach versus a signature-based approach. And that's what we're doing with the Raspberry Pi Python sensor is basically using that sensor in order to detect this abnormal inbound or outbound behavior that is being caused by this STAGO augmented malware that we're in play. Does that make sense to everybody? Any questions about that? Any thoughts about that? I'll stop here for just a second because I'm going to be shooting out to go do another presentation, but I want to make sure that I answer any questions that are related to either how the information is being extracted from somewhere out in cyberspace to basically or being pushed there and how this is actually working, because I know we've covered a lot. Pretty simple, straightforward? Yes, sir? ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...