1 00:00:00,000 --> 00:00:01,460 Our next speaker is Dr. 2 00:00:01,460 --> 00:00:05,480 Ethan Rudd, Senior Data Scientist at Sophos. 3 00:00:16,860 --> 00:00:18,400 Hello, everybody. 4 00:00:18,520 --> 00:00:20,100 Yes, my name is Dr. 5 00:00:20,100 --> 00:00:21,240 Ethan Rudd. 6 00:00:21,300 --> 00:00:24,280 I'm a Senior Data Scientist at Sophos. 7 00:00:24,540 --> 00:00:31,200 And the title of my talk is, Loss is More, Improving Malware Detectors by Learning Additional Tasks. 8 00:00:31,880 --> 00:00:43,720 So, before I go into the meat of the talk, I just wanted to let you guys know a little bit about who I am, so that you know that I'm not just some random guy that sort of stumbled in here off the street. 9 00:00:43,760 --> 00:00:45,700 This is my first time at DEF CON. 10 00:00:45,700 --> 00:00:48,220 Very excited to be giving a first DEF CON talk. 11 00:00:52,570 --> 00:00:54,150 And thank you. 12 00:00:54,150 --> 00:01:00,350 I've been on the Sophos data science team for about two and a half years in a research capacity. 13 00:01:00,590 --> 00:01:06,570 Prior to that, I worked on several projects in several areas of applied machine learning. 14 00:01:06,590 --> 00:01:12,370 My PhD research was funded by the IARPA Janus project, face recognition project. 15 00:01:12,490 --> 00:01:17,370 I did a project at Google with their advanced technologies and projects team. 16 00:01:17,430 --> 00:01:21,750 And then I've been involved in several other small business and university projects. 17 00:01:21,910 --> 00:01:28,870 So, I mentioned the face recognition stuff because we're also running a great facial recognition demo at the Unwind session. 18 00:01:28,870 --> 00:01:30,510 So, please check that out. 19 00:01:30,510 --> 00:01:38,090 And you can check me out on Twitter or Google scholar for various research if you like this talk. 20 00:01:39,030 --> 00:01:41,190 So, what is this talk about? 21 00:01:41,190 --> 00:01:49,290 Well, as we've seen, there have been several great talks on machine learning for information security prior to this one. 22 00:01:50,310 --> 00:02:00,830 But for many machine learning malware detectors, we're looking at training on a single malicious or benign label when there's actually lots of additional information available. 23 00:02:00,830 --> 00:02:04,530 Lots of additional labels, lots of additional metadata, etc. 24 00:02:04,890 --> 00:02:15,410 And so, really the question that we answer in this talk is, can we train and craft a bunch of auxiliary labels to train on rather than just having a single malicious or benign label? 25 00:02:15,410 --> 00:02:17,950 And can we get better performance? 26 00:02:18,010 --> 00:02:20,190 Well, as it turns out, we can. 27 00:02:20,510 --> 00:02:27,310 And interestingly enough, we also find that these performance gains can be attributed to a better informed classifier. 28 00:02:27,310 --> 00:02:29,750 And I'll explain what I mean by that a little bit later on. 29 00:02:29,750 --> 00:02:38,830 So, in before and after photos, if you will, what we're talking about is adding additional loss functions during the optimization. 30 00:02:39,310 --> 00:02:44,170 So, on the before side, you'll see that we have only a single loss function. 31 00:02:44,170 --> 00:02:48,290 This is how many malicious and benign detectors are trained. 32 00:02:48,390 --> 00:02:49,910 And they work pretty well. 33 00:02:49,910 --> 00:02:52,190 There are a lot of them that are commercially deployed. 34 00:02:52,450 --> 00:02:54,270 You can get good performance. 35 00:02:54,370 --> 00:03:07,170 But if you add a bunch of auxiliary loss functions on a bunch of labels, hence the after loss part of this before after thing, we get way, way better performance, as it turns out. 36 00:03:07,770 --> 00:03:16,830 So, before I dive into exactly how we formulate this, I'll just give a brief review of machine learning for malware detection. 37 00:03:17,430 --> 00:03:24,750 So, up until about 2015, most malware detectors were largely signature driven. 38 00:03:24,750 --> 00:03:29,770 There were a few machine learning, but ML really took off around then. 39 00:03:30,050 --> 00:03:34,250 Now, actually, a lot of the detectors consist of hybrid ML and signature. 40 00:03:34,330 --> 00:03:37,930 They use signature largely for blacklisting. 41 00:03:38,050 --> 00:03:50,950 And one can really triage detection as this diagram here, where ML and signature detectors actually both work on static and dynamic features. 42 00:03:51,570 --> 00:03:54,590 For ML, static is a little bit more common. 43 00:03:54,590 --> 00:03:57,590 And we focus largely on static detection in this talk. 44 00:03:57,590 --> 00:04:05,550 The reason, by the way, that static features are more common is to get ML to work well, it requires lots and lots and lots of data. 45 00:04:05,570 --> 00:04:08,970 And it's easier to collect a lot of static data. 46 00:04:09,870 --> 00:04:13,950 So, we find that we can actually do very, very well with that. 47 00:04:14,570 --> 00:04:23,310 So, a typical detection pipeline is built on some sort of a binary classifier, deep neural network, or maybe a gradient boosted machine. 48 00:04:23,650 --> 00:04:28,390 I'll discuss the deep neural network use case for this talk. 49 00:04:28,730 --> 00:04:35,970 And we're talking about training on millions to hundreds of millions of labeled malicious and benign samples. 50 00:04:36,610 --> 00:04:43,770 And we're also talking about classifiers that are periodically retrained to be able to reflect current threat landscapes. 51 00:04:44,490 --> 00:04:47,350 These can be deployed in a lot of different contexts. 52 00:04:47,350 --> 00:04:49,990 They can be deployed actually on endpoints. 53 00:04:49,990 --> 00:04:51,390 They can be deployed in the cloud. 54 00:04:51,390 --> 00:04:54,310 They can be deployed in security operations centers. 55 00:04:54,490 --> 00:04:57,010 It really doesn't matter for the purpose of this talk. 56 00:04:58,010 --> 00:05:16,350 Now, as far as labeling sources that a lot of vendors use, they rely on vendor aggregation services or threat intelligence feeds, which basically take a bunch of vendors or different labeling sources throughout the industry and submit malicious and benign samples to those and say, 57 00:05:16,350 --> 00:05:19,290 okay, how do these label the samples? 58 00:05:19,330 --> 00:05:23,910 And then some sort of an aggregate label is generally derived. 59 00:05:24,010 --> 00:05:35,850 Often there's also a little bit of time lag between the time at which the samples are submitted to the vendors. 60 00:05:35,850 --> 00:05:45,210 And there's a little bit of time lag that's left to basically let vendors update their blacklists and let the scores settle down. 61 00:05:45,210 --> 00:05:56,890 But long story short, most approaches take an aggregate malicious or benign label that is obtained from these threat intelligence feeds. 62 00:05:58,690 --> 00:06:15,450 Now, these detection engines also, because they use ML, they need to convert the malicious and benign samples to some sort of an ML-friendly numerical representation. 63 00:06:15,510 --> 00:06:18,290 There are a variety of ways to do this. 64 00:06:18,450 --> 00:06:21,990 Some try and do something that's closer to raw bytes. 65 00:06:21,990 --> 00:06:26,930 Some use various types of feature vector representations. 66 00:06:26,930 --> 00:06:28,230 We presume a specific one. 67 00:06:28,230 --> 00:06:33,670 And we use a portable executable malware and benignware in this work. 68 00:06:34,150 --> 00:06:40,390 But the approach is fairly broad and can be done in a lot of different ways. 69 00:06:41,130 --> 00:06:50,830 So the way that a typical neural network will look is you'll have features that are extracted from malicious and benign samples during training. 70 00:06:50,850 --> 00:06:53,490 A forward pass is done through the network. 71 00:06:53,630 --> 00:06:56,630 The output of the classifier is taken. 72 00:06:56,630 --> 00:07:06,030 And then some loss function along with the associated label is used to correct the representation so that we have a good representation that we can then later deploy. 73 00:07:08,090 --> 00:07:11,650 At deployment time, we take this learned representation. 74 00:07:11,650 --> 00:07:16,870 And here I just want to highlight we don't have any labels on the malware samples. 75 00:07:16,870 --> 00:07:19,010 That's what our classifier serves to do. 76 00:07:19,010 --> 00:07:26,370 We deploy that to wherever we're deploying, whether we're deploying on endpoints, whether on socks, whether we're deploying to clouds. 77 00:07:26,370 --> 00:07:36,730 And then we submit our feature vectorized forms of our files in realtime to the classifier. 78 00:07:36,730 --> 00:07:38,890 And in this case, our classifier is a neural network. 79 00:07:38,890 --> 00:07:42,210 It could be whatever, but we're dealing with neural nets in this work. 80 00:07:42,590 --> 00:07:49,630 And we use the predicted output basically as a score that says, okay, how malicious is this file? 81 00:07:49,630 --> 00:07:54,790 A maliciousness score, if you will, that one can threshold in a variety of ways. 82 00:07:56,810 --> 00:08:02,030 So this is how things are currently done or commonly done, I should say. 83 00:08:02,790 --> 00:08:12,510 However, just a little bit more on these threat intelligence feeds, they have lots and lots more information than just whether a given file is malicious or benign. 84 00:08:12,510 --> 00:08:16,330 In fact, that's even a simplification from what they're providing. 85 00:08:16,670 --> 00:08:20,730 They also provide information on individual vendor detections. 86 00:08:20,890 --> 00:08:24,330 They provide, of course, the net number of vendor detections. 87 00:08:24,330 --> 00:08:30,490 And then they provide some string information on the detection names per vendor at the very least. 88 00:08:30,490 --> 00:08:31,950 Some provide a lot more. 89 00:08:32,270 --> 00:08:41,970 So really revisiting the original question that I posed, can we craft and learn from auxiliary labels and get a better detector? 90 00:08:42,170 --> 00:08:45,110 And the answer is yes, in fact, we can. 91 00:08:45,770 --> 00:08:59,570 The technique that we've derived to do this, we refer to as ALOHA, or Auxiliary Loss Optimization for Hypothesis Augmentation, hence the nice Hawaiian art here on the side. 92 00:09:02,650 --> 00:09:08,290 So in short, we've got all this auxiliary information that we want to utilize. 93 00:09:08,290 --> 00:09:15,470 And as we saw in the case of just a malicious and benign label, well, we have this loss function that we use here. 94 00:09:15,470 --> 00:09:18,310 So why not just add more loss functions? 95 00:09:18,770 --> 00:09:23,270 And that is really the crux of what ALOHA does. 96 00:09:23,270 --> 00:09:26,690 We have more labels, more loss functions. 97 00:09:26,690 --> 00:09:29,410 And this has a couple of nice advantages. 98 00:09:29,770 --> 00:09:41,570 First, although we have more labels and we use more network outputs during training, we do not actually have to use these during deployment time. 99 00:09:41,570 --> 00:09:47,590 So we can notionally get a much better network representation during training. 100 00:09:47,590 --> 00:09:52,570 But at deployment, we don't have to update our infrastructure at all. 101 00:09:52,710 --> 00:09:58,890 Now, alternatively, we can use the additional auxiliary outputs to do certain additional tasks. 102 00:09:58,890 --> 00:10:20,590 So if we want to do things that are, I'll say, specific to like an EDR or an MDR type application, where we're getting more fine grained information about the particular malicious samples, say maybe in a SOC, but maybe not on our endpoints, we can sort of dual purpose this training and use the learn models in a variety of ways. 103 00:10:21,470 --> 00:10:33,210 So for our labeling sources in this work, we selected nine vendors from our aggregation feeds and used detection labels from each of the respective vendors. 104 00:10:33,870 --> 00:10:36,650 We also used the net number of vendor detections. 105 00:10:36,650 --> 00:10:38,170 And there were more than nine in our feed. 106 00:10:38,170 --> 00:10:39,910 There were tens. 107 00:10:40,390 --> 00:10:46,770 And used the integer value of the number of vendor detections as an auxiliary target as well. 108 00:10:47,550 --> 00:10:52,790 We also use our main target of this aggregate most benign label. 109 00:10:53,390 --> 00:10:59,530 And then we also use 11 semantic malware attribute tags. 110 00:10:59,530 --> 00:11:05,150 So these describe the content of malicious and benign samples. 111 00:11:05,150 --> 00:11:09,950 These are derived from the detection names within our feeds. 112 00:11:10,150 --> 00:11:13,950 The derivation process I can speak a little bit more to at the end. 113 00:11:14,170 --> 00:11:19,330 But I would actually refer you guys to a, in my opinion, very good paper that we wrote on it. 114 00:11:19,570 --> 00:11:22,110 And I'll include a link for that in the end. 115 00:11:22,110 --> 00:11:26,990 But basically these tags are not mutually exclusive. 116 00:11:26,990 --> 00:11:33,890 And they summarize the content of most benign samples in ways that a human can understand. 117 00:11:35,590 --> 00:11:42,810 So for each of these additional labels and network outputs, we have additional loss functions. 118 00:11:43,070 --> 00:11:59,370 And so our main aggregate loss function is actually a binary cross entropy loss taken between the output of the network and the aggregate most benign tag or aggregate most benign label. 119 00:11:59,710 --> 00:12:06,610 Now this is a pretty common loss function for a lot of neural networks that are doing malware classification. 120 00:12:06,670 --> 00:12:18,010 But with respect to our auxiliary losses, we have a loss function that is specific to the vendors, one for the tags, the semantic tags, and then one for the counts. 121 00:12:18,730 --> 00:12:27,230 And for the vendor loss functions, we actually take a sum of binary cross entropy losses for each individual vendor response. 122 00:12:27,290 --> 00:12:33,770 For the tag losses, we take, we do a very analogous thing, but for each of the attribute tags. 123 00:12:33,770 --> 00:12:39,010 Now I would again point out that none of these tags are mutually exclusive. 124 00:12:39,630 --> 00:12:49,110 So we use binary cross entropy here rather than say a softmax categorical cross entropy and take the sum. 125 00:12:49,310 --> 00:12:55,890 Then for the count loss function, we use a Poisson loss on this. 126 00:12:56,070 --> 00:13:08,630 Now prior to that, we do an exponential activation to constrain our count range from zero to, well, basically to be non-negative as counts can't be non-negative. 127 00:13:08,630 --> 00:13:12,650 So our total loss is written at the bottom here. 128 00:13:12,650 --> 00:13:22,850 And this consists of the most benign loss with all of our auxiliary losses just summed and multiplied by a constant. 129 00:13:22,850 --> 00:13:27,650 Now the constant in this case, we use 0.1. 130 00:13:27,730 --> 00:13:32,010 We didn't explore good values of this in depth, but other work has. 131 00:13:32,010 --> 00:13:39,130 And so we did this sort of in a principled manner consistent with some other work that I'll reference towards the end here. 132 00:13:40,090 --> 00:13:53,510 So during training, and you've seen this at the beginning of the talk, but basically we have all these aggregate loss functions where we have a main malicious and benign loss that's what we're trying to ultimately optimize for and detect. 133 00:13:53,610 --> 00:14:03,130 But with respect to the aggregate loss functions, we have our vendor counts, our individual vendor detections, and our attribute tags. 134 00:14:04,030 --> 00:14:19,950 Now aggregating all of these losses together, we can use all of these or just one or two of these auxiliary losses, or we could even potentially add more if we had more information in our feed. 135 00:14:19,950 --> 00:14:28,930 I would very much point out that this is sort of a proof of concept model, a very general sort of architecture that I'm describing. 136 00:14:29,830 --> 00:14:35,950 But the point is that adding these auxiliary losses theoretically helps. 137 00:14:36,830 --> 00:14:44,130 At inference time, however, absolutely nothing has to change whatsoever with respect to the network outputs. 138 00:14:44,130 --> 00:14:56,050 You'll see that in the prior slide, we had all these different outputs that we added, but we pruned those, we pruned the associated model parameters at inference time. 139 00:14:56,250 --> 00:15:00,570 And so our deployment infrastructure can remain entirely the same. 140 00:15:00,570 --> 00:15:04,970 We don't have to change that at all, which is nice from an engineering perspective. 141 00:15:05,490 --> 00:15:11,950 So I've made these claims that the Aloha model works very well. 142 00:15:11,950 --> 00:15:15,490 Now I intend to actually provide some evidence of that. 143 00:15:15,830 --> 00:15:28,850 And to do that, we collected a data set of approximately 9 million training samples, 100,000 validation samples, and 7.7 million test samples. 144 00:15:28,850 --> 00:15:37,390 And the training and validation split was taken temporally before the test split to ensure basically a fair evaluation. 145 00:15:37,390 --> 00:15:48,550 I mean, we can't fit... in order to ensure temporal consistency, we ordered our samples as follows. 146 00:15:49,190 --> 00:16:07,190 And for our aggregation, for our aggregate malicious benign label, we used what we call a one minus five plus criterion here, which basically means that for one or fewer vendor detections, we label as benign, and for five or more, we label as malicious. 147 00:16:07,290 --> 00:16:10,390 And then we ignore those with two to four labels. 148 00:16:11,230 --> 00:16:15,090 Now I'd mentioned there are more sophisticated ways to do this. 149 00:16:15,090 --> 00:16:21,250 This is just the one we chose largely for simplicity, but there are more sophisticated ways to do this. 150 00:16:21,250 --> 00:16:23,430 But this works pretty well. 151 00:16:23,430 --> 00:16:25,330 It's a fairly standard practice. 152 00:16:27,550 --> 00:16:37,790 When we look at actually the vendor counts across our data set, and looking at this was one of the reasons why we chose the one minus five plus. 153 00:16:37,990 --> 00:16:50,490 But what you'll see is that there are a disproportionate number of one minus and specifically zero, and then a lot that have many, many, many vendor counts. 154 00:16:50,690 --> 00:16:54,430 And bear in mind, these are taken over a logarithmic scale. 155 00:16:55,110 --> 00:17:08,030 However, we still see, and this was one of our motivations for using account loss initially, that just taking these basic thresholds washes out a lot of finer grained information. 156 00:17:08,030 --> 00:17:11,330 So this was actually one of our motivations for the account loss. 157 00:17:11,810 --> 00:17:22,130 And as you can see, it's not a, it's not really a common occurrence, but we might be able to say something about relative sample difficulty by adding that. 158 00:17:23,530 --> 00:17:35,450 We also looked at the respective vendor agreements with one another, and these are plotted in this confusion matrix here for each of our nine selected so-called high coverage vendors. 159 00:17:35,450 --> 00:17:42,570 And as we can see, we can, we see an agreement that occurs most of the time, but not all the time. 160 00:17:42,570 --> 00:17:51,170 I mean, vendors are consistent approximately 85 to 95 percent of the time, but they don't always agree. 161 00:17:51,250 --> 00:17:56,130 So perhaps there's some independent auxiliary information that we can glean from these. 162 00:17:57,670 --> 00:18:09,170 As features, we use the same features as Saxon Berlin did in their work, deep neural network malware detection using two-dimensional binary program features. 163 00:18:09,170 --> 00:18:17,630 In full disclosure, Sax is my boss, so that's one of the reasons why we chose to use these features. 164 00:18:17,630 --> 00:18:22,990 We used the features that he and others within our group derived. 165 00:18:23,310 --> 00:18:30,210 And I won't go into these in depth, but I leave the paper there, and I just want to give sort of a semblance of what these are. 166 00:18:30,210 --> 00:18:36,150 So basically they fall into three different camps. 167 00:18:36,510 --> 00:18:56,650 So 512 of the dimensions of our net 1024 dimensional feature vector are based on windowed byte statistics and basically aggregate histograms of, sorry, windowed byte statistic histograms, which are basically aggregate statistics over the entire file. 168 00:18:56,890 --> 00:19:08,610 We then have 256 dimensions devoted to a two-dimensional string length hash histogram, or basically across a logarithmic scale of different lengths. 169 00:19:08,670 --> 00:19:11,090 We apply the hashing trick. 170 00:19:12,230 --> 00:19:22,570 And then we also have specific P metadata fields, like the exports, like the imports, et cetera, that are hashed into another 256 dimensional vector. 171 00:19:22,570 --> 00:19:24,830 And all these get concatenated. 172 00:19:24,830 --> 00:19:29,060 So that's our representation of individual files. 173 00:19:30,090 --> 00:19:33,410 So that's how our dataset breaks down. 174 00:19:33,550 --> 00:19:45,070 When we compare performance here, so we tried using different combinations of our main malicious and benign loss with different auxiliary losses. 175 00:19:45,070 --> 00:19:50,630 So we used one, just our malicious and benign loss as our baseline. 176 00:19:50,630 --> 00:19:55,990 So that's sort of tantamount to a lot of types of models that are currently deployed. 177 00:19:56,290 --> 00:19:59,230 Then we applied each individual loss type. 178 00:19:59,230 --> 00:20:05,750 Then we applied everything combined, which I guess you might say is the full Aloha model. 179 00:20:06,330 --> 00:20:12,270 And we fit each of these classifiers for each different loss combination. 180 00:20:12,270 --> 00:20:14,430 Actually, we fit five different classifiers. 181 00:20:14,430 --> 00:20:27,090 And we report our results in terms of mean and variance statistics over receiver operating characteristics curves to be able to gauge statistical significance. 182 00:20:28,130 --> 00:20:35,090 Now, for those, I know that there's a lot of talent in the room with a lot of different backgrounds. 183 00:20:35,090 --> 00:20:51,330 So for those of you that might need a refresher on receiver operating characteristics curves or ROC curves, basically we look at this false positive rate across the x-axis, then a true positive rate or a detection rate at that false positive rate across the y-axis. 184 00:20:51,590 --> 00:21:07,570 And so typically what's done in the industry is at various false positive rates that are deemed sort of acceptable to the user, a threshold is chosen, and then you'll get the true positive rate at that threshold. 185 00:21:07,950 --> 00:21:25,630 So what we see when we add our count loss is that we do, in fact, get better performance in terms of both the area under the receiver operating characteristics curve, which is basically a gauge of how good is the curve overall. 186 00:21:25,630 --> 00:21:39,290 But specifically, we see also at higher false positive rate regions, or sorry, lower false positive rate regions, we see a particular bump. 187 00:21:39,290 --> 00:21:42,970 And this becomes a bump in detection rate. 188 00:21:42,970 --> 00:21:52,350 Now, this becomes relevant because as we get to lower and lower FPR regions, there are more deployment scenarios that we can address with our models. 189 00:21:53,790 --> 00:22:07,450 Similarly, for the vendor loss, when we add that to our baseline, we see a boost in the receiver operating characteristics curve or ROC curve at the relevant region. 190 00:22:07,570 --> 00:22:12,350 We don't see quite as much of a boost in terms of the area under the curve. 191 00:22:14,270 --> 00:22:17,170 In statistically pretty similar. 192 00:22:17,770 --> 00:22:21,910 And that's not to say that this isn't still a very significant result. 193 00:22:22,590 --> 00:22:29,730 In fact, again, the AUC is a net statistic on the on the curve. 194 00:22:29,730 --> 00:22:37,190 But we don't really care so much about the higher false positive rate regions, because the detection rates there are very, very good already. 195 00:22:37,190 --> 00:22:40,830 And so we can deploy those very easily. 196 00:22:41,870 --> 00:22:49,730 But as we're getting down, you know, although the AUC is relatively similar, we still see this as basically a win. 197 00:22:50,290 --> 00:22:53,770 The tags loss gives us similar results. 198 00:22:54,130 --> 00:23:16,110 And I'd mentioned that actually both of these loss functions, the tags and the vendors loss functions, not only do they assume sort of a similar functional form, but they also give us an even better result than the Poisson loss function or the count loss at the lower false positive rate areas. 199 00:23:16,170 --> 00:23:20,890 But they are slightly worse in terms of in terms of AUC performance. 200 00:23:22,110 --> 00:23:28,190 When we combine everything together, what we find is that we get even better results. 201 00:23:28,190 --> 00:23:37,310 And we find that not only are our results far better, but our variance between different model instantiations is reduced. 202 00:23:38,230 --> 00:23:41,450 And we see basically there are two modes of improvement here. 203 00:23:41,450 --> 00:23:46,510 There's an improvement at the higher false positive rates that is above 10 to the negative third. 204 00:23:46,510 --> 00:23:50,630 And then there's an improvement below that. 205 00:23:51,290 --> 00:23:59,610 And basically the higher FPR improvements, these are really what are driving the area under the curve improvements. 206 00:23:59,670 --> 00:24:05,270 But again, the lower FPR ones are still quite relevant. 207 00:24:06,110 --> 00:24:13,330 So in summary, we see that yes, adding additional losses does seem to improve performance. 208 00:24:13,470 --> 00:24:20,250 And notably it also reduces variance across different instantiations of the model. 209 00:24:20,750 --> 00:24:32,070 We suspect that this is actually occurring, this variance reduction is occurring, because as you have more things to optimize for, you're inherently sort of constraining your optimization process. 210 00:24:32,070 --> 00:24:36,750 So there aren't as many different types of ways that parameters can vary. 211 00:24:38,150 --> 00:24:43,110 We also see that there are similar behavior for similar loss types. 212 00:24:43,110 --> 00:24:49,870 So both of the vendor losses and tag losses consist of sums of binary cross entropy losses. 213 00:24:50,950 --> 00:24:58,090 And again, these seem to drive different things with respect to our ROC curve. 214 00:24:58,090 --> 00:25:11,170 We suspect that we see these higher FPR gains in detection for the count loss, because it actually does communicate something about the difficulty of samples. 215 00:25:11,230 --> 00:25:25,870 And then with respect to the tag losses, perhaps the network's able to correlate some sort of information between when, say, just one or two of these vendor tags trigger versus when, say, all of them trigger. 216 00:25:25,970 --> 00:25:31,090 And so it drives things really at lower FPRs. 217 00:25:32,530 --> 00:25:43,150 So, okay, we've presented, or I've presented some evidence, hopefully, that the ALOHA model is able to deliver better detection performance. 218 00:25:43,150 --> 00:25:49,530 But now I'll just really briefly discuss what's driving this performance gain. 219 00:25:49,750 --> 00:25:58,230 Is it some sort of a smoother optimization service that's brought due to a regularization effect of multi-objective optimization? 220 00:25:58,230 --> 00:26:06,770 Or is it perhaps due to a more informed representation from all of these different auxiliary label sources? 221 00:26:06,770 --> 00:26:11,730 And going into this, we sort of suspect the latter of these two. 222 00:26:11,730 --> 00:26:16,830 But we want to actually make sure and then see what's going on here. 223 00:26:16,830 --> 00:26:23,970 So in order to test this, we used auxiliary loss functions on so-called non-informative targets. 224 00:26:23,970 --> 00:26:29,570 So we employed various mechanisms of duplicating labels. 225 00:26:30,230 --> 00:26:40,390 One of the ways that we did this was, or using or providing labels that delivered no additional information about the sample. 226 00:26:40,670 --> 00:26:49,490 One way that we did this was with a pseudo-random label, where we took the hash of the file contents and just took the sign of that as an auxiliary target. 227 00:26:49,490 --> 00:26:58,590 For a given file, you're going to be looking at the same label, but the labels are just pretty much randomly there. 228 00:26:59,130 --> 00:27:03,750 We also tried adding a duplicate target and optimizing for that. 229 00:27:03,750 --> 00:27:08,730 And then we also applied a duplicate target with a different type of loss function. 230 00:27:08,730 --> 00:27:12,250 So we scaled and shifted a copy of the target label. 231 00:27:12,330 --> 00:27:17,910 And then we used a mean squared error loss on this, which is a common regression loss. 232 00:27:17,930 --> 00:27:20,690 And so from these, what did we find? 233 00:27:20,690 --> 00:27:29,230 Well, we found that adding these non-informative losses did not improve our performance in a noticeable manner at all. 234 00:27:29,230 --> 00:27:41,970 In fact, it was statistically identical, if not worse, when we added auxiliary targets to our original target as well. 235 00:27:42,510 --> 00:27:49,970 So this suggests that, yes, the Aloha network gains are actually coming from additional information from the additional labels. 236 00:27:49,970 --> 00:27:57,170 The network's doing what we want it to do, and it is learning a better representation, a better informed representation. 237 00:27:59,570 --> 00:28:13,670 So overall, what we find is that, yes, our Aloha technique works well, and it seems to be a result of the neural network's ability to actually correlate information from auxiliary labeling sources. 238 00:28:13,670 --> 00:28:16,190 It's not just simply an artifact of regularization. 239 00:28:17,350 --> 00:28:25,630 We also have the advantage that the network can be trained and deployed with minimal changes to existing infrastructure that's out there. 240 00:28:25,630 --> 00:28:33,250 So no re-engineering of anything on the endpoint, on the SOC, anything in the cloud has to take effect. 241 00:28:33,490 --> 00:28:40,810 And then also there are additional applications that these outputs can be used for, like EDR and MDR. 242 00:28:40,810 --> 00:28:52,450 So one additional application, as an example, is since we have outputs that describe the content of the malware, we can actually group malware by the predicted tags. 243 00:28:52,770 --> 00:29:03,050 And we might have an application where we might want to deploy that sort of for internal use or say as a service, but yet still be able to deploy our model. 244 00:29:03,050 --> 00:29:12,110 Well, we can do that all under this one training regime just by pruning our losses and pruning our outputs respectively. 245 00:29:12,790 --> 00:29:24,010 So before I take some Q&A here, I just wanted to also mention some related research and some directions for future work if you found this topic interesting. 246 00:29:24,230 --> 00:29:30,950 There's been a lot of research by our group and also by other groups that is related. 247 00:29:30,950 --> 00:29:35,950 It's interesting to look into and it can perhaps be leveraged in some very similar ways. 248 00:29:36,690 --> 00:29:41,590 So first, I'd also mention that Aloha is a USENIX paper now. 249 00:29:41,590 --> 00:29:44,950 So I'll be presenting this at USENIX next week. 250 00:29:45,670 --> 00:29:49,090 But interestingly, oh yeah, and it's available on archive as well. 251 00:29:49,090 --> 00:29:52,830 So feel free to check it out if you want more information. 252 00:29:53,910 --> 00:30:14,410 Interestingly, a gentleman by the name of Jason Trost actually did a nice blog post where he used Aloha architectures for a much different problem using Endgaming's domain generation algorithm detection code. 253 00:30:14,410 --> 00:30:20,130 He tailored that to use basically these Aloha losses. 254 00:30:20,130 --> 00:30:23,670 And anyway, he did a nice blog post about his results. 255 00:30:24,310 --> 00:30:28,270 There's also a paper out of Microsoft Research called MTNet. 256 00:30:28,830 --> 00:30:33,730 And this paper actually is similar to ours in a variety of ways. 257 00:30:33,850 --> 00:30:40,890 It uses an impressively large data set of dynamic features and it largely substantiates a lot of our findings. 258 00:30:41,090 --> 00:30:45,490 However, they use only one type of loss function. 259 00:30:45,490 --> 00:30:50,310 They use multiple loss functions, but only a categorical cross-entropy softmax. 260 00:30:50,910 --> 00:31:03,210 They do something sort of similar to a tagging approach that we do describing the content of each sample, except they use a Microsoft malware family names. 261 00:31:03,210 --> 00:31:07,770 And so they actually do employ some sort of a mutual exclusivity assumption here. 262 00:31:08,610 --> 00:31:18,430 But anyway, it's another great paper and it's very cool to see that they're also able to sort of substantiate our findings with a much different data modality. 263 00:31:18,430 --> 00:31:21,790 It's also PE files, but it is dynamic features. 264 00:31:23,050 --> 00:31:27,770 I'll also mention the paper on malware attribute tagging. 265 00:31:27,770 --> 00:31:39,470 So smart semantic malware attribute relevance tagging is a paper that we also put out there, which will pretty much tell you everything about everything that you want to know about malware tagging. 266 00:31:39,470 --> 00:31:46,890 It is the approach, the tagging approach is the same as we employ in this work. 267 00:31:47,110 --> 00:31:52,850 So please see that for details on the tagging problem and the tag prediction problem. 268 00:31:52,930 --> 00:31:58,310 There are several other models that we employ in the smart paper as well. 269 00:31:58,630 --> 00:32:01,230 So if you're interested in that, check it out. 270 00:32:02,870 --> 00:32:09,470 I will also mention another paper that moon a mixed objective optimization network. 271 00:32:09,470 --> 00:32:15,430 The reason why I bring this up is while this is applied to facial attributes, it has nothing to do with malware. 272 00:32:15,710 --> 00:32:23,490 It is actually the approach that I use in my face recognition demo, which again, please, please stop by during the wind down session. 273 00:32:23,490 --> 00:32:36,530 If you want to see basically how this type of optimization can be employed very powerfully in action, the approach is fundamentally the same as Aloha, but with a much, much different data modality. 274 00:32:37,890 --> 00:32:45,810 One final work that I'll mention that I promise I'm done is a work paper that we did called learning from context. 275 00:32:45,870 --> 00:32:57,990 It uses multi-view learning or multi-input learning in contrast to our approach using multiple labels and multiple loss functions. 276 00:32:58,110 --> 00:33:04,970 But using this approach, we are able to include extra information in the representation. 277 00:33:04,970 --> 00:33:10,350 Just in a different way, we're sort of turning the Aloha approach on its head. 278 00:33:10,350 --> 00:33:15,490 And this type of approach could be trivially combined with Aloha, I would mention. 279 00:33:15,890 --> 00:33:19,210 So that's maybe a nice direction for future work. 280 00:33:19,210 --> 00:33:33,550 Having multiple PE file features and also other auxiliary information, like we took embeddings of the PE file on disk and concatenated those together. 281 00:33:33,770 --> 00:33:42,570 But also potentially multiple labels, you know, just adding multiple other sources of information into the representation. 282 00:33:42,570 --> 00:33:44,470 It seems to work well. 283 00:33:44,470 --> 00:33:48,330 So it's definitely an avenue for future research. 284 00:33:48,330 --> 00:33:51,590 I'll finally close with an obligatory Sophos pitch. 285 00:33:51,590 --> 00:33:54,710 So I'm with the Sophos data science team. 286 00:33:54,770 --> 00:34:04,350 We do really cutting edge research and we're always interested in transparency and collaboration and in hopefully, I've communicated, publication. 287 00:34:04,690 --> 00:34:17,290 And while we're not the only one, we are one of the only research teams in the MLSec industry that is getting papers accepted at some of the top tier academic venues like USENIX. 288 00:34:17,450 --> 00:34:19,790 Our group consists of about 10 to 15 people. 289 00:34:19,790 --> 00:34:23,610 We're split about half between research, about half in development. 290 00:34:24,250 --> 00:34:28,550 And so check out our group if you're interested. 291 00:34:28,810 --> 00:34:35,270 You can talk with me or you can talk with Rich Horang, who's also here, who's one of our directors of data science. 292 00:34:36,090 --> 00:34:37,830 Here's a picture of our team. 293 00:34:37,830 --> 00:34:39,930 Lots of great colorful characters. 294 00:34:40,610 --> 00:34:44,670 There's some more Sophos presentations going on this week. 295 00:34:44,670 --> 00:34:48,030 As I said, I have a facial recognition booth. 296 00:34:48,590 --> 00:34:52,910 Rich has a talk on hacking facial recognition on the 10th. 297 00:34:53,110 --> 00:34:57,810 And then he also presented a talk on security data science at B-Sides. 298 00:34:57,810 --> 00:35:00,690 So if any of you saw that, there's just a name to correlate. 299 00:35:01,930 --> 00:35:07,030 And then I'd like to thank Sophos for funding and for promoting this research. 300 00:35:07,410 --> 00:35:12,790 And I'd particularly like to thank my collaborators and my co-authors here for all the work that they did. 301 00:35:12,790 --> 00:35:14,750 This was definitely a team effort. 302 00:35:15,110 --> 00:35:18,590 So with that, I'll open it up for questions. 303 00:35:28,370 --> 00:35:29,410 Yes. 304 00:35:30,270 --> 00:35:31,430 Thank you. 305 00:35:49,380 --> 00:35:52,060 Yeah, so that's a great question. 306 00:35:52,060 --> 00:36:04,520 The question is, so this talk was about incorporating these auxiliary losses on neural networks, but have we tried other classifiers like ensemble models, random forest boosting, et cetera? 307 00:36:04,520 --> 00:36:15,180 And while I would say that we don't have concrete results here on those, there's nothing that would preclude a person from doing so. 308 00:36:15,180 --> 00:36:21,420 The representation that's learned by an ensemble model is a little bit different. 309 00:36:21,780 --> 00:36:33,860 So I guess that in say a random forest or in a boosted model, I guess the question is how you would do shared splits in a way that works well across data. 310 00:36:33,860 --> 00:36:38,540 So I'd say that the technique could be very well applied. 311 00:36:38,620 --> 00:36:41,180 I don't know how well it would work. 312 00:36:41,180 --> 00:36:57,960 I can say that I've looked at some of the libraries that are out there for this, like light GBM, like XGBoost, et cetera, and they generally assume that you're going to be using only one loss function, but there's nothing that would preclude somebody from implementing it. 313 00:36:57,960 --> 00:36:59,500 I just don't know how well it would work. 314 00:36:59,840 --> 00:37:00,520 Thank you. 315 00:37:01,480 --> 00:37:03,120 Let's see more questions. 316 00:37:03,700 --> 00:37:04,500 Yes, please. 317 00:37:11,880 --> 00:37:14,980 So what are some of the next steps in the process? 318 00:37:15,640 --> 00:37:18,060 And some of the features that we want to develop? 319 00:37:18,060 --> 00:37:27,680 So features in terms of representation of the malware fed to the classifier or features in terms of just like extra things to tack onto the classifier? 320 00:37:30,320 --> 00:37:31,040 Sure, sure. 321 00:37:31,040 --> 00:37:31,320 Yeah. 322 00:37:31,320 --> 00:37:35,620 So extra additions to this overall technique. 323 00:37:35,640 --> 00:37:57,600 So I would certainly say that the approach that I'm most interested in is actually having a unified multi-input and multi-output model that's really able to learn multiple labels or learn from multiple labels, but also have multiple just heterogeneous inputs. 324 00:37:57,600 --> 00:38:04,960 Like you could have, as an example, the character embeddings of the file path. 325 00:38:04,960 --> 00:38:10,480 You could also apply this, I would say, to a lot of different malware types. 326 00:38:10,940 --> 00:38:20,440 I've been talking about P files this entire time, but there are a lot of different types of malware that one could apply this to. 327 00:38:20,900 --> 00:38:28,000 So I'd say that those are two different avenues that I'd certainly like to go down. 328 00:38:28,000 --> 00:38:36,860 And then I'd also say that there are other sources of data that are on some of these threat feeds. 329 00:38:36,860 --> 00:38:41,040 And so I think that looking into those would be very interesting as well. 330 00:38:41,320 --> 00:38:42,220 Yes, please. 331 00:38:57,330 --> 00:38:58,150 Yes. 332 00:38:58,150 --> 00:39:05,570 Well, so yeah, I mean, I'd say that not only does it not do worse, I mean, it does, on an aggregate, it does better. 333 00:39:05,570 --> 00:39:18,570 And I would say that, yeah, if you have multiple inputs, yes, we do see, in fact, and we have seen that, I'd actually point you to that learning from context paper, that, yeah, we do get a nice performance bump. 334 00:39:18,690 --> 00:39:26,090 But actually, yes, having missing data is a little bit more of a problem with that. 335 00:39:26,250 --> 00:39:34,750 So for our loss functions here, if we have a missing label, we can just zero that entry out in the loss. 336 00:39:34,850 --> 00:39:43,610 But if we have a missing, and just back propagate that, but if we have a missing input, well, that becomes a lot more, a lot more hairy. 337 00:39:43,610 --> 00:39:48,530 And that's an area of research that I'd really like to see addressed a little bit better. 338 00:39:49,210 --> 00:39:51,950 Let's see, I think we have time for one more. 339 00:39:52,370 --> 00:39:53,510 One more question. 340 00:39:54,290 --> 00:39:55,210 Yes, please. 341 00:40:07,920 --> 00:40:10,080 Yeah, yeah, that's a really good question. 342 00:40:10,080 --> 00:40:17,880 So the question is, which inputs are most prominent in terms of the respective output response? 343 00:40:17,880 --> 00:40:21,620 And so this goes back to a lot of the model interpretability literature. 344 00:40:21,700 --> 00:40:37,280 So I'd say the LIME SHAP values, layer-wise relevance propagation, a lot of the literature in that area would be very good to look at, or techniques like activation maximization. 345 00:40:38,000 --> 00:40:46,380 Yeah, those are a few techniques, it's definitely an area where I think that not only I am, I think that not to speak for the entire industry, but I think that they're interested in that. 346 00:40:46,460 --> 00:40:49,400 So anyway, I can chat more after on that. 347 00:40:49,400 --> 00:40:50,840 But yeah, thank you. 348 00:40:50,840 --> 00:40:52,580 Thank you for the question. 349 00:40:52,580 --> 00:40:53,360 Good question.