1 00:00:00,000 --> 00:00:11,860 Hello there. Good afternoon. Thank you for coming. I understand that there is a long line at the airport, so you're probably safer here than there if you're hoping to get on a plane. 2 00:00:14,660 --> 00:00:19,480 We are the last talk on the last day, or at least we're in the last slot. 3 00:00:21,200 --> 00:00:32,860 We will go over, as in the other times I've talked, yesterday and the day before, we'll go through our material relatively quickly and try to get to questions. 4 00:00:35,060 --> 00:00:42,900 And then we'll be trying to get out of town since I'm driving to San Francisco after I finish here. We are driving. 5 00:00:44,960 --> 00:00:47,700 I'm Paul Vixie. This is Dave Dagan. 6 00:00:48,440 --> 00:00:49,420 I am from... 7 00:00:50,560 --> 00:00:52,700 ISC. He is from Georgia Tech. 8 00:00:54,180 --> 00:01:01,980 As with most of us, there are lots of other affiliations and other sort of things, ways which you might know me or you might know him. 9 00:01:02,160 --> 00:01:06,940 Those are the primary things, and those are the organizations being represented by this work. 10 00:01:09,820 --> 00:01:19,460 I'm going to give some introductory remarks, and then David's going to get up here and explain the hard stuff, which is how we usually divide the... 11 00:01:19,480 --> 00:01:19,980 the labor. 12 00:01:26,060 --> 00:01:31,380 So this is my part, the sort of political details and the economic details. 13 00:01:33,120 --> 00:01:39,260 We're going to explain how malware gets to the people who are interested in it, right? 14 00:01:39,320 --> 00:01:47,680 We all know how malware gets to the places where nobody's interested in it, but it also gets to places where it's welcome, or at least where it is interesting content. 15 00:01:47,940 --> 00:01:49,220 I will explain how it gets there. 16 00:01:49,480 --> 00:01:52,000 And then what those people do with it. 17 00:01:53,580 --> 00:01:56,380 I'm going to talk about what I would like them to do instead. 18 00:01:57,640 --> 00:02:16,900 And David is going to talk about sort of ways that you can take a piece of malware and torture it to make it revealed with secrets, some of which are very interesting, as much as I wish it had the malware's ICBM coordinates, the authors' ICBM coordinates, or at least the... 19 00:02:18,380 --> 00:02:22,660 Gestapo coordinates that stuff's not in there but there is other interesting 20 00:02:22,660 --> 00:02:33,700 information that it will reveal once you pull it apart and pin it down so there 21 00:02:33,700 --> 00:02:39,520 are a lot of people who run honeypots and they collect malware sometimes 22 00:02:39,520 --> 00:02:45,780 they'll let it go so far as to penetrate some VMware instance and execute some 23 00:02:45,780 --> 00:02:49,140 number of instructions or system calls until it reaches the point where they 24 00:02:49,140 --> 00:02:53,440 sort of pull out the plug and say well no that's about far enough I think you 25 00:02:53,440 --> 00:02:58,380 have unpacked yourself and I think I can now take copies of you and figure out 26 00:02:58,380 --> 00:03:05,660 what you're trying to do to me generally these will be antivirus companies whose 27 00:03:05,660 --> 00:03:12,560 principal interest is to figure out what they can make is there a pattern file 28 00:03:12,560 --> 00:03:15,760 for this is there something they can publish to 29 00:03:15,760 --> 00:03:20,320 their customers that will cause this piece of malware to now be recognizable 30 00:03:20,320 --> 00:03:26,180 without having to do all that work obviously the authors of the malware 31 00:03:26,180 --> 00:03:30,720 know that this is going to be attempted and so there's a struggle to try to 32 00:03:30,720 --> 00:03:37,940 obfuscate and try to make that sort of pattern difficult now there have been 33 00:03:37,940 --> 00:03:43,400 some high-profile mistakes made by various antivirus companies where they 34 00:03:43,400 --> 00:03:45,440 will put something into a pattern file that 35 00:03:45,760 --> 00:03:52,140 will mistakenly also match all the excel files on somebody's computer and then 36 00:03:52,140 --> 00:03:56,660 they have to do an emergency release and so that tends to mean that even if 37 00:03:56,660 --> 00:04:00,920 they're not going to share the samples that they collect with their competitors 38 00:04:00,920 --> 00:04:07,920 they will they'll still have to spend a lot of time doing quality assurance on 39 00:04:07,920 --> 00:04:12,720 whatever patterns they think they're pulling out of this because it's kind of 40 00:04:12,720 --> 00:04:15,280 a front-page event in in meat space 41 00:04:16,360 --> 00:04:20,780 you know the ideal position for an antivirus company to be in is that no 42 00:04:20,780 --> 00:04:25,540 one ever got fired for buying your stuff and the only way to hold on to that is 43 00:04:25,540 --> 00:04:30,240 to not make mistakes and you can however hold on to that without 44 00:04:30,240 --> 00:04:37,720 actually doing your customers much good so there's a bit of tension there and to 45 00:04:37,720 --> 00:04:43,460 the extent that they share at all they do not share openly because if you have 46 00:04:43,460 --> 00:04:45,400 a malware sample 47 00:04:45,760 --> 00:04:50,100 that came into one of your honeypots then maybe you can build a pattern for it and get 48 00:04:50,100 --> 00:04:54,520 it to your customers faster than your competitors can do the same thing and get it to their 49 00:04:54,520 --> 00:05:00,500 customers and you know so to the extent there is any sharing at all it's after I've 50 00:05:00,500 --> 00:05:08,340 had a head start then maybe I'll give it to my competitors and that's that's unfortunate 51 00:05:08,920 --> 00:05:14,140 because the ultimate losers are the victims the people who would like to have their laptops 52 00:05:14,140 --> 00:05:14,640 protected 53 00:05:15,760 --> 00:05:21,520 or their whatever it is that you're running and that is susceptible to malware you'd like that 54 00:05:21,520 --> 00:05:26,500 protected and to have all of this sort of brinksmanship going on amongst the people you're 55 00:05:26,500 --> 00:05:34,740 paying to protect you does you no good so fair number of people feel that it is in their best 56 00:05:34,740 --> 00:05:41,060 interest to run more than one antivirus package on their Windows machine sometimes as many as 57 00:05:41,060 --> 00:05:45,280 three or four my experience with the factory installed 58 00:05:45,760 --> 00:05:54,380 Windows that came on my laptop was that before I installed SUSE Linux was that the antivirus stuff 59 00:05:54,380 --> 00:05:59,740 slowed it down and I can only imagine that running three at once would slow it down three times as 60 00:05:59,740 --> 00:06:05,020 much but nevertheless that's what people feel like they have to do because they know that if 61 00:06:05,020 --> 00:06:09,500 they're only buying their pattern files from one source they're not getting them all or they're not 62 00:06:09,500 --> 00:06:11,580 getting them all on time in a timely basis 63 00:06:14,300 --> 00:06:15,420 there's also some 64 00:06:15,760 --> 00:06:23,520 incompleteness built into this methodology not every piece of malware is going to attack every 65 00:06:23,520 --> 00:06:35,140 honeypot so we started with the assumption of well what if it was economically unfeasible for 66 00:06:35,140 --> 00:06:43,440 antivirus companies to to hoard what if we caused it to be in their best interest to share and to 67 00:06:43,440 --> 00:06:45,400 join a community where sharing was the norm 68 00:06:47,320 --> 00:06:56,760 I believe we would get much better coverage of censored bias I just want to say that every talk I've given at 69 00:06:57,840 --> 00:07:04,220 DEF CON I've been next to a room where they're having more fun than us and so I apologize for that I 70 00:07:04,220 --> 00:07:13,640 seem to be a bad luck charm anyway there's just there's the open source philosophy of share for 71 00:07:13,640 --> 00:07:14,520 the benefit of both 72 00:07:15,820 --> 00:07:24,560 it could be applied here and that was when I got talking to David and he said well there are some details about how the 73 00:07:25,120 --> 00:07:42,740 scheduling works and sort of how the economy works and how the technology works and let me tell you how much harder that is than you think it's going to be and then many pints of beer later we had this presentation in these slides and the work that David will now demonstrate 74 00:07:49,120 --> 00:08:11,460 okay so thanks Paul I I wanted to start off by asking just people in the audience if you how many people here run honeypots or run something of that sort okay how many people of those running honey pots also the extra step of doing reverse engineering maybe some unpacking work so you may do it professionally if you're in that category or or maybe you have a war sense of entertainment. 75 00:08:12,700 --> 00:08:15,740 Well, so as it turns out the data that we came up with on the AI market is it really what we're really trying to do is to find out how many people do wanna get a job in the country. 76 00:08:15,760 --> 00:08:23,880 that you collect from honeypots is, as you know, an imperfect collection. The honeypots 77 00:08:23,880 --> 00:08:29,260 that you'll often see being run is a waiting game. You'll set up an intentionally vulnerable 78 00:08:29,260 --> 00:08:34,480 machine and you sit around and wait. And then a couple months go by perhaps, some time 79 00:08:34,480 --> 00:08:38,820 goes by, and then something happens. You get an alert and you look at what's in your traps 80 00:08:38,820 --> 00:08:44,620 and you say, oh gosh, another SD bot. I'm sick and tired of getting these. And it's 81 00:08:44,620 --> 00:08:50,220 sort of a waiting game. And what's happening here is that there is, as many of you who 82 00:08:50,220 --> 00:08:55,620 are running honeypots have intuited, a need to have a very wide collection field. I'd 83 00:08:55,620 --> 00:09:00,580 be interested to know who here has actually the largest network block that they're monitoring 84 00:09:00,580 --> 00:09:07,980 over. But it actually works out to be the case that malware authors are aware of the 85 00:09:07,980 --> 00:09:12,920 different policy frameworks that people are collecting malware under and the inefficiencies 86 00:09:12,920 --> 00:09:14,600 that come about from sharing and from collecting. 87 00:09:14,600 --> 00:09:17,200 And so we've been doing a lot of research and putting these together in a collective 88 00:09:17,200 --> 00:09:23,920 sample set. And they've actually adapted many of their practices to accommodate just the 89 00:09:23,920 --> 00:09:28,440 time it takes for us as researchers to communicate ideas and even share samples. 90 00:09:30,780 --> 00:09:36,480 Another particular problem is that of illuminating sensors. Of those of you who had honeypots, 91 00:09:36,540 --> 00:09:42,860 if you could raise your hand again, how many people here who are running honeypots take 92 00:09:42,860 --> 00:09:43,780 the trouble to just… 93 00:09:44,600 --> 00:09:44,880 I'm sorry. 94 00:09:44,880 --> 00:09:50,180 …to determine whether or not those honeypots have also received samples that other honeypots 95 00:09:50,180 --> 00:09:54,540 have found? So in other words, do you just run what you get or do you first check with 96 00:09:54,540 --> 00:09:57,520 your friends to see if they also got something like what you found? 97 00:09:59,380 --> 00:10:06,400 So many malware authors are suspicious. And of course, there's a very large IP reputation 98 00:10:06,400 --> 00:10:11,460 scheme being run by Black Hats where they try and essentially to map out the Internet 99 00:10:11,460 --> 00:10:14,580 space and figure out where the honeypot sensors are. It's actually very simple to do. It's 100 00:10:14,580 --> 00:10:20,080 very easy to do. There's actually been some recent work in the academic circles. Bethancourt 101 00:10:20,080 --> 00:10:25,500 had a great paper at the recent USNIC Security Conference on mapping Internet sensors where 102 00:10:25,500 --> 00:10:30,080 he basically figured out who was working with DShield by sending low rates of packets, 103 00:10:30,260 --> 00:10:34,280 pings, and seeing what happened on DShield's reporting service. And then he knew which 104 00:10:34,280 --> 00:10:36,580 IPs were affiliated with that reporting system. 105 00:10:36,960 --> 00:10:42,760 So it's actually very possible that the malware collection system you have is known by bad 106 00:10:42,760 --> 00:10:43,080 guys. 107 00:10:43,080 --> 00:10:48,960 And what you're getting is lower tier, lower grade, random stuff that might be run from 108 00:10:48,960 --> 00:10:54,600 kits. Additionally, there's also this problem of automated victims updates that I'll get 109 00:10:54,600 --> 00:10:54,760 to. 110 00:10:55,700 --> 00:10:59,180 So in order to illustrate this problem, I need to actually tell a little bit of a story. 111 00:10:59,360 --> 00:11:03,840 And here, this gets controversial because people often want to get precise numbers on 112 00:11:03,840 --> 00:11:08,580 this graph. But sort of bear with me about how I describe the conceptual lifetime of 113 00:11:08,580 --> 00:11:12,500 a piece of malware. There's probably four important phases that happen. 114 00:11:13,080 --> 00:11:16,280 And they're all on a critical path with each other. So they have to happen in this order. 115 00:11:16,580 --> 00:11:21,720 There's the authorship of the malware, the release of it, and here we can call zero day 116 00:11:21,720 --> 00:11:27,220 in that sense, the release. And then there is D-day, detection day, which I describe 117 00:11:27,220 --> 00:11:31,960 as the first opportunity for detection. It's the first moment when that malware that's 118 00:11:32,330 --> 00:11:37,680 propagating shows up in somebody's sensor log in an IDS alert or in a honeypot somewhere. 119 00:11:37,820 --> 00:11:41,600 There's the first chance that there could have been a discovery of this malware, followed, 120 00:11:41,680 --> 00:11:42,520 of course, by a response. 121 00:11:42,520 --> 00:11:48,040 Now, we'll, of course, disagree about how long apart these different phases of the 122 00:11:48,040 --> 00:11:52,140 cycle are. And there's probably, of course, no correct answer in all cases. But certainly 123 00:11:52,140 --> 00:11:53,420 these have to happen in this order. 124 00:11:55,080 --> 00:11:58,560 Now let's sort of look back at the history of what antivirus companies have been doing. 125 00:11:59,280 --> 00:12:04,300 If you read old copies of the virus bulletin, you'll see some early studies on how long 126 00:12:04,300 --> 00:12:10,380 it takes antivirus companies to update their signature lists for new known viruses. And 127 00:12:10,380 --> 00:12:12,140 in 2004, that was measured. 128 00:12:12,140 --> 00:12:16,540 It was measured on the order of weeks and days. And nowadays, this can be measured 129 00:12:16,540 --> 00:12:21,900 often in the case of minutes. And that's not to say updates and patches and new signatures 130 00:12:21,900 --> 00:12:26,060 arrive immediately within minutes. But rather, they're available, and then large corporate 131 00:12:26,060 --> 00:12:29,920 infrastructure takes over. And it may take another week after that to actually deploy 132 00:12:29,920 --> 00:12:33,900 the signatures. But at least we can think of the response time as having actually moved 133 00:12:33,900 --> 00:12:38,760 a little bit closer to the detection time. And now we often speak of things in terms 134 00:12:38,760 --> 00:12:42,120 of minutes. And if they're not, of course, there are instances where they're not. And 135 00:12:42,140 --> 00:12:46,060 this is where it takes days and even weeks for antivirus signatures to be updated. They 136 00:12:46,060 --> 00:12:50,100 should be measured in minutes. We can conceptually think of this as a very short time frame. 137 00:12:51,960 --> 00:12:57,360 So how can we, as a group, move detection a little bit closer to the release day, to 138 00:12:57,360 --> 00:13:03,240 zero day? Well, there's actually two countervailing factors that prevent this from happening. 139 00:13:03,920 --> 00:13:09,540 The first is that malware authors actively avoid known sensors. If you've just been running 140 00:13:09,540 --> 00:13:12,120 a honeypot on the Internet and not taking a look at the data, you're not going to get 141 00:13:12,120 --> 00:13:12,140 anything out of it. You're not going to get anything out of it. You're not going to get 142 00:13:12,140 --> 00:13:14,700 anything out of it. If you're not taking care to look into how you've structured it and 143 00:13:14,700 --> 00:13:18,680 coordinate with others, there's a very good chance that what you're doing is already 144 00:13:18,680 --> 00:13:22,900 known and mapped by somebody. Maybe not by all bad guys, but somebody out there is certainly 145 00:13:22,900 --> 00:13:27,140 aware that what you're running is a honeypot. And they've recorded where at least the network 146 00:13:27,140 --> 00:13:33,280 block that you're in. An additional factor that prevents D-Day from being moved a little 147 00:13:33,280 --> 00:13:38,720 bit closer over to the release day is that repositories don't share. If you can think 148 00:13:38,720 --> 00:13:41,400 of the entire IPv4 space as this flat line. 149 00:13:41,400 --> 00:13:47,840 And each of us own, perhaps, someone has a slash 8, someone has a slash 16, maybe hobbyists 150 00:13:47,840 --> 00:13:53,740 might have a slash 32, maybe a few more IPs. You can think of these as buckets that are 151 00:13:53,740 --> 00:13:59,420 collecting raindrops that would randomly fall in. Perhaps malware is analogous to a 152 00:13:59,420 --> 00:14:04,900 storm in that respect. And if we don't actually correlate all of the information that we have 153 00:14:04,900 --> 00:14:09,920 together, your detection potential is really just the limit of the largest collection block 154 00:14:09,920 --> 00:14:10,540 that you have. 155 00:14:10,540 --> 00:14:14,840 So if you're running a slash 32 and you're not working with other honeypot researchers, 156 00:14:15,220 --> 00:14:19,460 what you know about what's happening on the internet is one out of two to the 32 chances 157 00:14:19,460 --> 00:14:23,200 that it will show up in a timely manner. That's not to say you won't see things. There's 158 00:14:23,200 --> 00:14:29,120 a lot of activity out there. But there certainly isn't an ability to reason about how you can 159 00:14:29,120 --> 00:14:34,060 move that detection day further over by aggregation, simply because repositories don't currently 160 00:14:34,060 --> 00:14:34,400 share. 161 00:14:34,940 --> 00:14:40,000 Now, sensor illumination is actually very simple and very sophisticated. What malware 162 00:14:40,000 --> 00:14:40,420 authors 163 00:14:40,540 --> 00:14:47,400 will often do is compile a single unique virus, a one-off version. They may take an 164 00:14:47,400 --> 00:14:52,560 existing source kit, modify it, throw in some source code for some other programs so 165 00:14:52,560 --> 00:14:56,500 the signature is completely different, pack it with something unusual and send it out. 166 00:14:56,660 --> 00:15:01,540 They'll send it not to just anybody, but to one sensor in particular, just one IP. 167 00:15:02,060 --> 00:15:06,460 They don't spray it into their botnet. They don't inject it into an existing infected 168 00:15:06,460 --> 00:15:09,320 cloud. They send it to one IP that they're testing. 169 00:15:09,320 --> 00:15:14,980 Or perhaps a slash 24 in a network that they suspect is collaborating with antivirus companies. 170 00:15:15,260 --> 00:15:19,400 And then they look at their watches, and they wait to see how long it takes for the antivirus 171 00:15:19,400 --> 00:15:24,800 companies to update their signatures. And if it turns out that that IP later caused 172 00:15:24,800 --> 00:15:29,980 the event of an update for an antivirus signature particular to that virus, then they know that 173 00:15:30,460 --> 00:15:34,940 this must be Symantec's IP block. This must be some researcher's. And then they'll try 174 00:15:34,940 --> 00:15:39,160 and of course figure out who does this. If you were around for the early days of the 175 00:15:39,160 --> 00:15:45,580 world, there was a site called Mazafaka, M-A-Z-A-F-A-K-A dot C-C. And I guess the joke is that 176 00:15:46,040 --> 00:15:50,060 whenever you have to talk about this, you say the name of the site. 177 00:15:51,500 --> 00:15:56,220 And they had a rather extensive bulletin board, some of it in Russian, some of it in English, 178 00:15:56,700 --> 00:16:03,540 listing an astounding range of IPs on the internet, basically noting who they work 179 00:16:03,540 --> 00:16:08,700 for, who they collaborate with, where if you send your samples to there, which sensor 180 00:16:09,160 --> 00:16:15,360 will be updated most quickly, and what other sensor tools will follow in tow. And so malware 181 00:16:15,360 --> 00:16:20,020 authors who are actually trying to make something that's really valuable in a very smart, routed 182 00:16:20,520 --> 00:16:26,700 worm or virus will simply build in this list into the propagation logic of the virus, and 183 00:16:26,700 --> 00:16:31,220 simply not send itself to those honeypots. There's no value in it. It's simply going 184 00:16:31,220 --> 00:16:32,020 to help the researchers. 185 00:16:33,100 --> 00:16:37,380 So this has been something that's been going on. It's been going on so long that academics 186 00:16:38,040 --> 00:16:39,140 actually notice this problem. And I think that's really important. You can see the 187 00:16:39,140 --> 00:16:43,520 problem and wrote about it in USENIX. So that's an indication of how pervasive it is. 188 00:16:46,420 --> 00:16:52,700 Now let's sort of reason about what this means to have detection measured in days and response 189 00:16:52,700 --> 00:16:57,940 measured in minutes. And by the way, I think the AV industry, you know, we owe them some 190 00:16:57,940 --> 00:17:02,620 gratitude for having changed response from something on the order of days down to minutes. 191 00:17:03,060 --> 00:17:06,860 But what does it mean now that we have this differential between days and minutes between 192 00:17:06,860 --> 00:17:13,080 detection and response? Well, what will happen is that there will be queen bot programs that 193 00:17:13,080 --> 00:17:18,480 are aware of the fact that it takes days for detection to occur. Think about it this way. 194 00:17:18,780 --> 00:17:26,260 What if you had a program whose purpose was to compile other programs, viruses, and send 195 00:17:26,260 --> 00:17:30,860 them out? And it did this on an automated basis. And every version that it spat out 196 00:17:30,860 --> 00:17:35,520 was somehow different. It would take random functions, it would insert dead code, it 197 00:17:35,520 --> 00:17:36,840 would obfuscate it, it would change the code. 198 00:17:36,860 --> 00:17:39,440 It would change the key for the packer. It would change the order of packing. It would 199 00:17:39,440 --> 00:17:44,740 do recursive packing. Very simple things to programmatically script up. This queen bot 200 00:17:44,740 --> 00:17:50,740 program is then spitting out unique child programs that don't match any existing signature. 201 00:17:51,940 --> 00:17:58,580 An existing botnet can be told, download this new binary, delete the old one, and start 202 00:17:58,580 --> 00:18:02,460 running this new one that you've downloaded. Now many of you have probably noticed that 203 00:18:02,460 --> 00:18:05,900 a lot of bots have this update feature built into them. 204 00:18:06,300 --> 00:18:06,840 Yeah. 205 00:18:06,860 --> 00:18:13,920 Right. And, you know, Rick Wesson at his talk today went over some of these same SOCKS 206 00:18:13,920 --> 00:18:17,700 update lists that are out there. There's actually very nice web interfaces for controlling 207 00:18:17,700 --> 00:18:22,300 large botnets. And you can tell them, download this new binary, delete the old one, and keep 208 00:18:22,300 --> 00:18:26,220 running this new one. And they may connect to a new domain or probably the same domain. 209 00:18:26,680 --> 00:18:33,780 This is done on such a rapid basis, six-hour windows, that the chance of an AV company 210 00:18:33,780 --> 00:18:36,840 actually catching up with that storm of new, unique, unique, unique, unique, unique, 211 00:18:36,840 --> 00:18:38,140 unique viruses is almost nothing. 212 00:18:39,960 --> 00:18:44,320 So here's what happens. If we look at this graph that we have before, we have the malware 213 00:18:44,320 --> 00:18:50,760 running in the wild for maybe under a day. It will be days before detection occurs. And 214 00:18:50,760 --> 00:18:55,560 then at this point, the virus will be told, delete yourself, download this new version, 215 00:18:55,680 --> 00:18:59,940 and run it instead. It's completely different and doesn't match the signature of the previous 216 00:18:59,940 --> 00:19:04,420 old one, should a signature ever arrive. The bot runs for about a half day and repeats 217 00:19:04,420 --> 00:19:05,500 the cycle over again. 218 00:19:05,500 --> 00:19:12,660 And so what ends up happening is that you have this perpetual window of zero-day binaries. 219 00:19:13,300 --> 00:19:19,740 The botnet, the infective cloud of victims, is perpetually being told, delete all the 220 00:19:19,740 --> 00:19:24,400 evidence of any prior infection with a signature that may later show up in an AV tool and get 221 00:19:24,400 --> 00:19:25,740 this new stuff in here right away. 222 00:19:26,120 --> 00:19:29,960 Now, this Queen Bot program will just spit these out all day and update them. And I've 223 00:19:29,960 --> 00:19:34,300 seen things on the order of six hours in some cases as the lower threshold. But obviously, 224 00:19:34,460 --> 00:19:35,360 this can scale. 225 00:19:35,500 --> 00:19:39,460 It can scale quite nicely. All you have to do is compile programs. And that doesn't take 226 00:19:39,460 --> 00:19:39,960 much time. 227 00:19:41,500 --> 00:19:46,420 Now what does this have in terms of an impact? Well, some of you who follow trends in the 228 00:19:46,420 --> 00:19:51,000 AV industry have probably heard that we're experiencing the death of signature systems, 229 00:19:51,120 --> 00:19:56,680 that signature-based detection no longer has the lift that it used to have. And if you 230 00:19:56,680 --> 00:20:02,780 talk to people in the AV industry, they're all, of course, working on a new, better behavioral-based 231 00:20:02,780 --> 00:20:03,200 approach. 232 00:20:03,640 --> 00:20:05,480 Other types of analytics. 233 00:20:05,480 --> 00:20:08,620 There's a lot of analytical tools that will actually give them the same type of lift that 234 00:20:08,620 --> 00:20:12,720 they enjoyed before. But if you just look at some of the things, for example, that VirusTotal 235 00:20:12,720 --> 00:20:17,820 has to offer, there's about, I think that's less than a 1% detection rate for samples 236 00:20:17,820 --> 00:20:23,880 that are being submitted to VirusTotal. So what we're seeing is that there's an era where 237 00:20:24,840 --> 00:20:29,880 viruses are propagating. There is a limited ability of AV companies to keep up with this 238 00:20:29,880 --> 00:20:35,100 flood of automatically produced binaries. And the end result is that signature-based schemes 239 00:20:35,100 --> 00:20:39,220 have very low detection. Now, I also have to qualify that the VirusTotal is based on 240 00:20:39,220 --> 00:20:44,780 user-submitted samples, and the base rate of infection in that red part may actually 241 00:20:44,780 --> 00:20:49,900 be populated with false positives. For example, there may be a lot of benign programs in there 242 00:20:49,900 --> 00:20:55,240 that makes the average look quite low. But just based on experimentation in the lab and 243 00:20:55,240 --> 00:20:59,540 hearing other academic researchers report on this, the trend we've noticed is that you 244 00:20:59,540 --> 00:21:05,080 get anywhere from 10% to 25% detection rate for a new virus that's been tested. And that's 245 00:21:05,100 --> 00:21:09,440 the size that you found. And it's unknown, of course, how old that virus is. We've seen 246 00:21:09,440 --> 00:21:14,800 it what we think is a very early time as propagation based on different collection heuristics, but 247 00:21:15,140 --> 00:21:19,640 it may be that even the detection that we're getting is based on the fact that it's probably 248 00:21:19,640 --> 00:21:27,520 a day or two old before our sensors saw it. Now, one of the primary problems involved 249 00:21:27,520 --> 00:21:34,860 in this is that if the queen bot's behavior is to simply pack and repack binaries, maybe 250 00:21:35,100 --> 00:21:39,620 one way to reason about solving this is to come up with a way to automatically unpack 251 00:21:40,080 --> 00:21:43,760 the binaries that come in. For example, if the queen bot merely changes the packing key, 252 00:21:44,640 --> 00:21:48,520 automated unpacking might keep up with this flood of new binaries that are being pushed 253 00:21:48,520 --> 00:21:55,300 down. We have to sort of think about what were the motivations behind the malware author 254 00:21:55,300 --> 00:22:00,080 first to engage in packing. Well, first there's the reduced malware size. We can sort of discount 255 00:22:00,080 --> 00:22:05,080 that. They're not too concerned about, you know, Agobot having, you know, a bunch of 256 00:22:05,100 --> 00:22:11,060 megs and megs and megs of size and capabilities. The fat bot as well, you know, extremely large 257 00:22:12,160 --> 00:22:16,840 binaries. But packing certainly does help in that regard. There's also a, primarily 258 00:22:16,840 --> 00:22:23,320 an obfuscation transformation occurs. And this is where binaries show up in your mail 259 00:22:23,860 --> 00:22:28,900 traps and your spam traps. And they're completely opaque. You know that there's something wrong 260 00:22:28,900 --> 00:22:34,980 with them, but you can't really tell much more beyond that. And there's, malware authors 261 00:22:35,100 --> 00:22:39,440 are keenly aware of an information differential that occurs. Somewhere in your organizations 262 00:22:39,440 --> 00:22:47,040 you probably have an MX wizard, a mail deliverability wizard, who could stop a flood of malware that's 263 00:22:47,040 --> 00:22:52,280 being sent. Or a firewall wizard who could stop victims from contacting a rallying domain. 264 00:22:52,460 --> 00:22:57,720 If they only could find out where in that binary the domain name is hidden. But since 265 00:22:57,720 --> 00:23:01,520 it's packed, it's obfuscated, it's difficult for them to look at it. They have to hand 266 00:23:01,520 --> 00:23:05,080 it off to a colleague who does RE. This is often somebody who works in the field, and 267 00:23:05,100 --> 00:23:08,840 works in an anti-virus company, so there's often different companies involved. This 268 00:23:08,840 --> 00:23:15,860 takes time. Additionally, there's more opacity that comes from having invalid PE32 headers 269 00:23:15,860 --> 00:23:23,260 to complicate reverse engineering. And so, but the general idea is that there is a skill 270 00:23:23,260 --> 00:23:28,260 set of those people who raise their hands, who know about unpacking and reverse engineering. 271 00:23:28,460 --> 00:23:34,060 And you know how painfully, painful that can be. How difficult it can be at times. And 272 00:23:35,100 --> 00:23:39,060 it's certainly not something that your firewall engineer is particularly familiar with. 273 00:23:39,780 --> 00:23:46,120 Now currently, it would be a great practice if all of us could share the various samples 274 00:23:46,120 --> 00:23:52,000 that we get from our honeypots. The current practice that's being handled by the AVE 275 00:23:52,000 --> 00:23:56,320 industry is often analogized to that of a hostage exchange. You know, they'll share 276 00:23:56,320 --> 00:24:00,540 samples only if other people share samples back. I've seen a lot of arrangements, private 277 00:24:00,540 --> 00:24:05,080 arrangements between groups. And the deal is always struck. It's always struck that 278 00:24:05,100 --> 00:24:09,420 where somebody says, I'll give you something, provided I see value back. I'll send you 279 00:24:09,420 --> 00:24:13,200 a few days' worth of samples, and you do the same. And if I feel like I'm getting value 280 00:24:13,200 --> 00:24:18,280 back, I'll continue to share. Well, obviously, there's some competitive reasons for doing 281 00:24:18,280 --> 00:24:26,720 this. There's IP issues at stake here. But we really have to question whether this sort 282 00:24:26,720 --> 00:24:31,160 of competitive advantage really translates into advantage to the AVE shareholders. Because 283 00:24:31,160 --> 00:24:35,080 by not being able to see the full panoply of viruses that are out there, they're going 284 00:24:35,100 --> 00:24:36,720 to be able to see the full panoply of viruses that are out there. Antivirus researchers 285 00:24:36,720 --> 00:24:38,600 are prevented from creating timely signatures. 286 00:24:40,820 --> 00:24:44,720 Now, so actually, in this particular set of slides here, Paul, I had a note saying that 287 00:24:44,720 --> 00:24:48,800 this would be something that you would talk about, because it gets more into the policy 288 00:24:48,800 --> 00:24:51,660 aspects of it. If you, this would be a good point to interject. 289 00:24:54,880 --> 00:25:02,060 Sure. So I mentioned this in my initial remarks. In the free and open source world, we have 290 00:25:02,060 --> 00:25:05,080 learned that sometimes it is better than never. And I think that's a good point. And I think 291 00:25:05,100 --> 00:25:05,280 that's a good point. 292 00:25:05,280 --> 00:25:06,320 I think that it's, you know, I'm going to start off by saying that even for a commercial 293 00:25:06,320 --> 00:25:13,100 competing organization to share stuff, it doesn't mean that they can't compete or they've 294 00:25:13,100 --> 00:25:19,180 become communists. What it means is that, gee, if we all started on the same kernel, 295 00:25:19,380 --> 00:25:25,620 then we could maybe compete on how good our distro was on top of that. And if I fix something 296 00:25:25,620 --> 00:25:29,100 in the kernel, I certainly don't want to be in the position of maintaining it forever 297 00:25:29,600 --> 00:25:34,780 after. So I really need to send that back so that somebody else can be stuck with maintaining 298 00:25:34,780 --> 00:25:36,580 containing whatever bug fix I've come up with. 299 00:25:37,120 --> 00:25:43,660 So we have seen a development, and I'm looking through the room here, and some of you don't 300 00:25:43,660 --> 00:25:49,080 know that it was ever any other way unless you've read a history book, but there was 301 00:25:49,080 --> 00:25:55,900 a time when once the people at CSRG would cut a BSD kernel, Sun and DEC would never 302 00:25:55,900 --> 00:25:57,840 talk to each other about fixing bugs in it. 303 00:25:58,100 --> 00:26:02,620 And so sort of everything that goes on now with the different BSD distros and the different 304 00:26:02,620 --> 00:26:11,860 Linux kernel developers and so forth is new in the last 20 years, and it's become somewhat 305 00:26:11,860 --> 00:26:13,800 obvious even in the commercial field, right? 306 00:26:13,960 --> 00:26:21,540 A Fortune 500 executive has pretty much stopped arguing about the benefit of sharing for certain 307 00:26:21,540 --> 00:26:24,240 types of things, this not yet being one of them. 308 00:26:26,240 --> 00:26:32,600 We want to find the part of malware that is beneficial to competitors. 309 00:26:32,620 --> 00:26:37,220 We want the competitors to share with each other and give them a way to do that, and 310 00:26:37,220 --> 00:26:39,040 then teach them that that way exists. 311 00:26:39,920 --> 00:26:46,980 And in some cases, that'll mean a certain amount of arguing, sort of debate, companies 312 00:26:46,980 --> 00:26:49,640 that just really don't want to let go of the old ways. 313 00:26:50,200 --> 00:26:51,340 That's where I come in. 314 00:26:51,440 --> 00:26:52,080 That'll be fine. 315 00:26:57,080 --> 00:27:02,600 Now, obviously, whenever you set up one of these sorts of coopetitions, you're going 316 00:27:02,600 --> 00:27:05,360 to have a lot of competition arrangements between different corporations. 317 00:27:05,820 --> 00:27:11,360 There's a fairly good chance that they will try and spoof it, and they will share enough 318 00:27:11,360 --> 00:27:14,780 that you think they are sharing everything, but they're actually keeping the goodies 319 00:27:14,780 --> 00:27:15,260 to themselves. 320 00:27:16,160 --> 00:27:22,300 I haven't worked out yet how we're going to do the verification of compliance, but 321 00:27:22,300 --> 00:27:27,280 I think it'll end up so that problem will solve itself because the value of hoarding 322 00:27:27,280 --> 00:27:27,940 will go to zero. 323 00:27:29,120 --> 00:27:29,820 Go ahead. 324 00:27:30,000 --> 00:27:30,420 Okay. 325 00:27:34,600 --> 00:27:40,320 So that's a very high-level perspective on policy, and I wanted to translate these down 326 00:27:40,320 --> 00:27:43,900 into specific requirements for what a malware repository would do. 327 00:27:44,040 --> 00:27:46,360 I think it should not help illuminate sensors. 328 00:27:46,600 --> 00:27:50,600 So if people are sharing information, you don't want to accidentally turn in your friend 329 00:27:50,600 --> 00:27:52,580 who gave you a sample that was hot. 330 00:27:52,700 --> 00:27:56,660 You perhaps want to hold onto that sample, use it for your own internal purposes, do 331 00:27:56,660 --> 00:27:57,400 static analysis. 332 00:27:57,540 --> 00:28:00,320 Don't do interactive network-based interactions with it. 333 00:28:00,360 --> 00:28:00,400 Okay. 334 00:28:00,400 --> 00:28:03,980 Until you're sure that there's enough of it out there in the wild that you're not 335 00:28:03,980 --> 00:28:06,620 being set up to see if your sensors are being illuminated. 336 00:28:07,340 --> 00:28:11,820 And also, I think another fundamental point is that any malware repository you set up 337 00:28:11,820 --> 00:28:14,320 should not become a virus amplification service. 338 00:28:15,240 --> 00:28:20,020 Viruses should not go out and simply be told, download these viruses from this malware repository 339 00:28:20,020 --> 00:28:22,360 and run them because they're useful. 340 00:28:23,880 --> 00:28:28,280 I also think that a repository absolutely should help automate the analysis of malware 341 00:28:28,280 --> 00:28:28,520 flood. 342 00:28:28,520 --> 00:28:32,440 The fundamental question that I've been asking myself are there are many people out there 343 00:28:32,440 --> 00:28:43,640 who are running these Data Center Fisheries, where they're working, using their DLM's, 344 00:28:43,640 --> 00:28:43,740 and they're running a DLM, and they're collecting it and it's getting deleted. 345 00:28:43,740 --> 00:28:46,680 You know who's going to use a DLM? 346 00:28:46,860 --> 00:28:47,120 Do you? 347 00:28:47,280 --> 00:28:47,720 Do you do anything? 348 00:28:47,720 --> 00:28:48,140 And so I think you need to understand that. 349 00:28:48,140 --> 00:28:49,120 I think, again, that once you've gotten your DLM, you need to have a database where you 350 00:28:49,120 --> 00:28:51,180 can put it in a folder. 351 00:28:51,180 --> 00:28:51,520 You don't want to use your . 352 00:28:51,520 --> 00:28:53,500 You don't want to use a . 353 00:28:53,500 --> 00:28:57,860 Because sometimes you can use a database where you have a database and it's going to 354 00:28:57,860 --> 00:28:58,500 be your own database that's going to have a lot of information about you and following 355 00:28:59,040 --> 00:29:03,820 engineers and don't really want to spend their life studying structured exception handling, 356 00:29:04,480 --> 00:29:09,640 they would much rather have a list, an automated list. And I think the way to do this is by having 357 00:29:09,640 --> 00:29:13,700 automation on a back end for the repository, which I'll get to in a second. I'll show you 358 00:29:13,700 --> 00:29:19,900 some examples of that. And additionally, this would help coordinate different analysts, 359 00:29:20,220 --> 00:29:26,800 reverse engineering gurus, mail gurus, snort rule writers, people who work at different layers of 360 00:29:26,800 --> 00:29:32,240 the protocol stack who would like some help from the reverse engineer community to speed up some of 361 00:29:32,240 --> 00:29:38,820 their work would be useful. So the idea we proposed was a service-oriented repository. And this is 362 00:29:38,820 --> 00:29:45,000 where users, and we'll get to what users means in a second, would upload samples. And downloads are 363 00:29:45,000 --> 00:29:49,740 restricted to classes of users because we, of course, don't want just arbitrary people, perhaps 364 00:29:49,740 --> 00:29:54,680 even scripts, downloading viruses into the wild and perhaps using this as an amplification service. 365 00:29:55,140 --> 00:29:56,780 And the repository should also be able to do a lot of the work that we're doing. And I think 366 00:29:56,780 --> 00:30:00,300 it's really important that we also provide binaries and analysis. There's enough binaries out there, 367 00:30:00,380 --> 00:30:04,620 really, for everyone to do research on. We're not really sure if we have enough of them to do 368 00:30:05,200 --> 00:30:10,240 coordinated signature creation. But I think a more important aspect is that we can get a lot of 369 00:30:10,240 --> 00:30:15,880 other people who are extremely talented into the game if we simply provided them a way of 370 00:30:15,880 --> 00:30:20,020 transparently looking at binaries after they've been unpacked, after they've been analyzed, 371 00:30:20,220 --> 00:30:26,200 and say, this binary is attempting to make my users on my network contact this evil domain. 372 00:30:26,780 --> 00:30:32,220 I will make an appropriate firewall rule entry to stop anyone who is incidentally infected until the 373 00:30:32,220 --> 00:30:36,180 AV companies can come up with the patch set that we need to prevent further infection. 374 00:30:36,800 --> 00:30:41,180 There's also some value in PE32 header analysis and longitudinal detection data. 375 00:30:41,380 --> 00:30:45,220 What did the AV tool know and when did it know it? There may be some interest in people 376 00:30:45,220 --> 00:30:49,020 understanding which AV tools have different capabilities compared to others. 377 00:30:49,840 --> 00:30:56,180 And a future to be done later is a malware similarity analysis or family tree. This will be based on some 378 00:30:56,980 --> 00:31:03,000 multiple class clustering analysis. And quite frankly, a lot of the work you saw in some of the other 379 00:31:03,000 --> 00:31:09,500 track talks are excellent candidates for that. The structure and layout of the repository is quite simple. 380 00:31:10,280 --> 00:31:17,800 There is a web server that will take in analysis samples. It will immediately go through PE32 header 381 00:31:17,800 --> 00:31:22,620 analysis, unpacking, and AV analysis. This will be placed into a database and people who have 382 00:31:22,620 --> 00:31:25,960 contributed these samples can get back information. 383 00:31:26,780 --> 00:31:30,320 There are probably a lot of you out there who have said, I wish I knew what was inside this binary. 384 00:31:30,520 --> 00:31:36,740 If only someone could unpack it for me, I might want to play with Pearl and try and lock down my users a little bit better during this storm. 385 00:31:37,300 --> 00:31:43,980 And so having this round trip where if you submit something, you're able to learn a little bit more about what you submitted is something that we want to facilitate. 386 00:31:45,180 --> 00:31:52,200 The individual workflow that we have is that we have this fire hose and we would hope to get it down to something the size of a garden hose. 387 00:31:52,360 --> 00:31:54,680 We have a very large number of samples coming in. 388 00:31:55,060 --> 00:31:56,680 And there's a couple of trivial reductions. 389 00:31:56,780 --> 00:32:04,740 For example, an MD5 checksum can be performed on them so the duplicates can be thrown out. 390 00:32:04,900 --> 00:32:13,780 Of course, noting that they came from different samples and different areas and reported by different people is important because this goes back to the sensor illumination problem. 391 00:32:14,040 --> 00:32:18,200 But we can certainly reduce the workload that we have to analyze in the next test by throwing those out. 392 00:32:18,860 --> 00:32:26,360 Additionally, if you simply put this through a battery of AV tests, if the AV companies already know about this or have a signature for it and aren't just saying, 393 00:32:26,360 --> 00:32:37,140 it looks fishy, if they really know something particular about it, this is probably an old sample that's being recreated or recirculated by somebody who downloaded a kit and is trying it out on the internet. 394 00:32:37,380 --> 00:32:40,260 So we can actually further reduce the workload through those trivial steps. 395 00:32:40,520 --> 00:32:44,200 The harder part is through a payload recovery service. 396 00:32:45,040 --> 00:32:49,380 And you can think of these as a loss function. 397 00:32:49,680 --> 00:32:54,540 There's not every single sample, of course, can be put through this automated process. 398 00:32:55,480 --> 00:32:58,240 Unpacking is directly analogous to the halting problem. 399 00:32:58,500 --> 00:33:02,180 And there will be questions as to when you sufficiently unpack to say that you're done. 400 00:33:02,380 --> 00:33:05,960 That is a direct mapping in many ways to the halting problem. 401 00:33:06,180 --> 00:33:09,300 So there will be some things that cannot work in a virtualized context. 402 00:33:09,540 --> 00:33:10,680 There will be evasive binaries. 403 00:33:10,740 --> 00:33:14,540 There will be operating system conflicts and others that fall out because of those reasons. 404 00:33:14,700 --> 00:33:21,560 The PolyUnpack layer takes those and then crafts a custom-built PE32 header for the binary, 405 00:33:21,700 --> 00:33:23,480 reconstructs the tables. 406 00:33:23,880 --> 00:33:24,520 . . . 407 00:33:24,540 --> 00:33:28,220 and hands back both the binary and the unpacked version of the binary. 408 00:33:28,640 --> 00:33:31,380 And then this is actually where something really fascinating begins. 409 00:33:31,560 --> 00:33:36,140 We take these unpacked binaries and we push them back into the cycle again. 410 00:33:36,660 --> 00:33:39,520 We give these unpacked binaries to the AV tools. 411 00:33:39,700 --> 00:33:41,460 And they actually start detecting viruses. 412 00:33:42,680 --> 00:33:45,700 These are binaries, packed binaries that the AV tools set. 413 00:33:45,840 --> 00:33:46,640 These are absolutely fine. 414 00:33:46,820 --> 00:33:49,120 We don't have any problems with these or we don't know about them. 415 00:33:49,440 --> 00:33:52,480 And when you unpack them, they become trivially identifiable. 416 00:33:52,560 --> 00:33:54,520 We've had ranges from a 10-digit number. 417 00:33:54,520 --> 00:33:59,280 We've had a 10- to 40-percent lift rate in improvement of detection just simply based on unpacking. 418 00:33:59,400 --> 00:34:04,580 And this also gives you some intuition into the extent of these QueenBot programs 419 00:34:04,580 --> 00:34:09,680 that are simply changing packing keys to generate new and different binaries. 420 00:34:09,940 --> 00:34:15,500 Trivially identified when unpacked, but evasive when they're recursively packed, for example. 421 00:34:16,060 --> 00:34:19,300 Those that further fall out from that should deserve hand analysis. 422 00:34:19,480 --> 00:34:21,500 Obviously, this is one of those 80-20 splits. 423 00:34:21,740 --> 00:34:23,720 If you have tens of thousands of samples, 424 00:34:23,720 --> 00:34:27,280 getting it down to a smaller number means that those of you who raised your hands 425 00:34:27,280 --> 00:34:30,200 indicating you do reverse engineering will have a job, 426 00:34:30,280 --> 00:34:32,400 but will not have an impossible job. 427 00:34:35,020 --> 00:34:40,140 The unpacking itself is done by a series of dynamic analysis steps. 428 00:34:40,520 --> 00:34:44,400 How many people here saw Joe Stewart's talk for Ollie Bone? 429 00:34:45,040 --> 00:34:47,800 So we started out with a similar approach that he took. 430 00:34:48,760 --> 00:34:52,840 And I think at the end of the talk he said there's this private tool out there 431 00:34:52,840 --> 00:34:54,460 that someone was doing with Ollie. That was us. 432 00:34:55,880 --> 00:35:00,800 And the heuristic is actually very different from what Joe was doing, 433 00:35:00,920 --> 00:35:02,720 involving memory page reads and writes. 434 00:35:02,940 --> 00:35:08,300 But essentially, we can look at a binary and statically analyze, 435 00:35:08,480 --> 00:35:14,200 create basic blocks for that portion of the binary that is still transparent, 436 00:35:14,660 --> 00:35:19,700 the unpacking portion, as well as taking note of any DLLs that are loaded 437 00:35:19,700 --> 00:35:22,820 and required by the binary. 438 00:35:23,440 --> 00:35:25,760 Entries and jumps into those memory addresses, 439 00:35:25,880 --> 00:35:31,800 either known as being part of a static flow analysis or part of a known DLL address, 440 00:35:32,380 --> 00:35:34,840 and those we consider to be whitelist. 441 00:35:34,880 --> 00:35:38,520 Those jumps are part of some loop infrastructure that's continuing to run. 442 00:35:38,760 --> 00:35:45,280 If it's not, we can simply infer that at this point the binary has finished unpacking itself. 443 00:35:45,700 --> 00:35:47,680 So it's actually a very simple heuristic. 444 00:35:49,060 --> 00:35:51,520 In addition to this general approach, 445 00:35:51,520 --> 00:35:54,400 there are about 60 different other heuristics to handle. 446 00:35:54,960 --> 00:36:01,100 Structured exception handling, to check for people doing red pill awareness checking, 447 00:36:02,180 --> 00:36:06,560 to make sure that all of the other gotchas that people are now building into binaries 448 00:36:06,560 --> 00:36:08,200 and malware out there are handled appropriately. 449 00:36:08,420 --> 00:36:14,980 So we can get a 70% to 80% reduction in the number of viruses that we have 450 00:36:15,360 --> 00:36:17,420 and turn those into fully unpacked versions. 451 00:36:17,640 --> 00:36:20,480 Those become a direct feed to people who want to make use of them. 452 00:36:21,740 --> 00:36:25,220 As I mentioned before, the static analysis model behaves in this way. 453 00:36:25,940 --> 00:36:27,140 We have some malware. 454 00:36:27,780 --> 00:36:32,980 We perform a static analysis to get a flow graph, reduce this into a basic block structure. 455 00:36:34,240 --> 00:36:39,660 We then perform dynamic single-step analysis, and each point we look for jumps and branches. 456 00:36:40,000 --> 00:36:43,700 If it's a branch to an area that we've previously mapped in memory 457 00:36:43,700 --> 00:36:48,900 as part of a known whitelisted basic block because it's from the static view or from a DLL, 458 00:36:49,120 --> 00:36:50,660 we say we're in a loop. 459 00:36:50,660 --> 00:36:55,680 We can actually even prove using basic compiler optimization techniques that we are in a loop 460 00:36:55,680 --> 00:36:57,140 and continue on our merry way. 461 00:36:57,720 --> 00:37:03,980 Eventually, though, we see that there is an execution of code that has been unpacked and created, 462 00:37:04,120 --> 00:37:06,780 and at that point we say we haven't solved the halting problem, 463 00:37:06,960 --> 00:37:11,220 but we're done fiddling with the halting problem, and we're going to say that this is unpacked. 464 00:37:11,500 --> 00:37:13,800 And it works surprisingly well. 465 00:37:15,680 --> 00:37:18,340 There's an example of this going on rolling in an OLLI debug, 466 00:37:18,440 --> 00:37:20,640 and I'm actually a little confused. 467 00:37:20,660 --> 00:37:22,140 I'm a little bit embarrassed now to show you this, 468 00:37:22,240 --> 00:37:29,340 because Joe had a far superior sample. 469 00:37:34,060 --> 00:37:39,920 But the general insight is that, of course, there is some honeypot somewhere that starts up. 470 00:37:40,000 --> 00:37:42,520 This is a video that's running of a startup phase. 471 00:37:42,780 --> 00:37:45,440 It can also start from a previously saved value, 472 00:37:46,300 --> 00:37:49,600 a previously saved cache state in a VMware instance. 473 00:37:49,600 --> 00:37:55,080 And as the unpacker executes and walks through using the OLLI engine, 474 00:37:55,360 --> 00:37:59,520 unlike Joe's approach, which would occasionally prompt you and try and get your input, 475 00:37:59,740 --> 00:38:02,420 because his tool is geared towards reverse engineering experts, 476 00:38:02,780 --> 00:38:09,700 this will simply bluster through looking for the mapping of this heuristic onto the binary. 477 00:38:09,960 --> 00:38:12,280 As you can see here, we're getting some disassembly, 478 00:38:12,280 --> 00:38:15,120 and the binary itself is unpacking and being created. 479 00:38:15,600 --> 00:38:18,920 This continues on for some period of time. 480 00:38:20,360 --> 00:38:23,920 And eventually, the virus, even though it attempts to delete itself, 481 00:38:24,100 --> 00:38:30,480 attempts to remove itself, is unpacked and handed back to the user. 482 00:38:30,940 --> 00:38:34,200 So we have batteries and batteries of these wood chippers 483 00:38:34,200 --> 00:38:38,140 that take in large numbers of these binaries that are flowing down every day, 484 00:38:38,260 --> 00:38:42,040 and it actually reduces quite a bit the number of samples that you have to analyze. 485 00:38:42,480 --> 00:38:45,240 In terms of performance, it's not so bad. 486 00:38:45,400 --> 00:38:48,140 There's a lot of binaries that give up the goods real quickly, 487 00:38:48,140 --> 00:38:53,940 and actually what we're seeing here is actually a one-class classifier for a virus type. 488 00:38:56,660 --> 00:38:58,780 There's some very simple packers that work, 489 00:38:58,880 --> 00:39:03,220 and you'll see them have individual spikes and peaks in terms of run times. 490 00:39:03,500 --> 00:39:08,140 And I've truncated this, but the VMware instance can be made to run out continuously, 491 00:39:08,480 --> 00:39:11,180 suspend, come back, perform a work queue management 492 00:39:11,180 --> 00:39:16,880 so that there's continuously new viruses being prioritized into the analysis stream. 493 00:39:19,040 --> 00:39:21,620 We have some analysis and results with these, 494 00:39:21,800 --> 00:39:25,900 taking just a small 6K sample set, about a day's worth of malware 495 00:39:25,900 --> 00:39:29,260 for some of the people out there doing malware collection, 496 00:39:29,480 --> 00:39:31,020 and compare these with PEID. 497 00:39:32,380 --> 00:39:35,500 The repository found that about 63% were packed, 498 00:39:35,660 --> 00:39:40,540 whereas PEID, which I think is a fantastic, wonderful user tool, 499 00:39:41,520 --> 00:39:44,220 found about 43% were packed. 500 00:39:44,720 --> 00:39:47,260 So we had a higher capability to detect, 501 00:39:48,140 --> 00:39:51,200 I wasn't of course using all the latest PEID plug-ins, 502 00:39:51,260 --> 00:39:54,700 which do things like entropy analysis and might give some more lift in there, 503 00:39:54,780 --> 00:39:56,400 but just using the out-of-the-box settings. 504 00:39:56,660 --> 00:39:59,200 We said, yeah, you know, we're actually fairly competitive 505 00:39:59,200 --> 00:40:00,960 in terms of identifying these pieces of malware. 506 00:40:01,560 --> 00:40:05,100 In terms of the steps, we took in some 6,000 samples, 507 00:40:05,380 --> 00:40:07,980 AV scanned, reduced a large number of those, 508 00:40:09,360 --> 00:40:14,840 then focused on those portions that the AV scanner said were okay, 509 00:40:15,140 --> 00:40:17,520 performed some unpacking, and then did a rescan, 510 00:40:17,520 --> 00:40:22,920 and found, this is one result, we've actually validated this with further testing, 511 00:40:23,100 --> 00:40:25,760 a 10 to 24% improvement over the old stuff. 512 00:40:25,900 --> 00:40:27,760 And of course it depends on the AV tool you're talking about. 513 00:40:28,740 --> 00:40:30,740 ClamScan tends to get a really big lift. 514 00:40:31,420 --> 00:40:35,760 Other AV companies are a little more judicious about what they claim is a virus, 515 00:40:36,020 --> 00:40:38,180 a little more aggressive, and they don't get as big a lift. 516 00:40:38,260 --> 00:40:41,940 But they still find, across the board, great improvement in value. 517 00:40:43,600 --> 00:40:46,300 In terms of users who get access to this, 518 00:40:46,300 --> 00:40:50,880 I obviously don't want just malware authors to use this as a drop-off point, 519 00:40:51,000 --> 00:40:53,260 but I would certainly like people who run honeypots 520 00:40:53,260 --> 00:40:56,340 and who do research like me in academia or do research in industry 521 00:40:56,340 --> 00:40:57,980 to be able to make use of this. 522 00:40:58,700 --> 00:41:04,180 So there'll be, for example, a class of user known as random unknown users, 523 00:41:04,320 --> 00:41:06,200 humans, and authenticated users. 524 00:41:06,360 --> 00:41:07,840 We'll define these as different groupings. 525 00:41:07,900 --> 00:41:11,300 We may alter this on final deployment. 526 00:41:11,680 --> 00:41:15,640 But the unknown users will be allowed to upload, look at aggregate statistics, 527 00:41:15,640 --> 00:41:20,580 and basically get your sort of simple virus total type experience out of the deal. 528 00:41:21,280 --> 00:41:23,140 Humans, of course, can upload. 529 00:41:23,340 --> 00:41:26,080 If we know that you're a real human being and you found something that's interesting 530 00:41:26,080 --> 00:41:30,000 and you want to show it to us, we'll let you download an unpacked version. 531 00:41:30,180 --> 00:41:32,080 That may help you in what you're doing on your network. 532 00:41:32,480 --> 00:41:36,900 If you're an authenticated user, you'll be able to upload, download, 533 00:41:37,060 --> 00:41:41,320 access further analysis and be able to coordinate with other reverse engineering researchers. 534 00:41:42,860 --> 00:41:45,340 So this basically creates a hub-spoke architecture. 535 00:41:45,640 --> 00:41:48,780 At the hub is the collection of malware that people submit. 536 00:41:48,900 --> 00:41:52,480 We have various feeds that are coming in now and are scaling this up in size. 537 00:41:53,120 --> 00:41:56,760 The various spokes are things like unpacking services, analysis partners. 538 00:41:57,220 --> 00:42:03,920 If you're a researcher and want to contribute rows to a SQL table 539 00:42:03,920 --> 00:42:06,900 that you would like to design and have visible to other users 540 00:42:06,900 --> 00:42:09,500 and want to manage a spoke, you can say, 541 00:42:09,600 --> 00:42:14,280 I would like to have your stream and selectively share back for certain classes of users 542 00:42:14,280 --> 00:42:15,320 but not all users. 543 00:42:15,640 --> 00:42:17,060 The types of findings I've found. 544 00:42:17,280 --> 00:42:20,200 The theory is that you might find something that other people will find useful 545 00:42:20,200 --> 00:42:22,700 and users just simply don't know who they are yet. 546 00:42:23,160 --> 00:42:27,220 So this becomes much like this conference serves as a clearinghouse for information. 547 00:42:29,480 --> 00:42:34,000 In terms of economic goals, here again is another point where I said, 548 00:42:34,040 --> 00:42:36,820 Paul has really got to pick this one up and bring it home. 549 00:42:38,760 --> 00:42:45,420 Okay, so there's a lot of shit and we are here to disturb it. 550 00:42:48,300 --> 00:42:56,820 So the AV companies that are selling the pattern files and the various engines for them 551 00:42:56,820 --> 00:42:59,760 are making a healthy living doing what they're doing, 552 00:42:59,900 --> 00:43:04,480 but I think if we really do have a 20% infection rate 553 00:43:04,480 --> 00:43:08,700 with hundreds of thousands of new infected nodes every day, 554 00:43:08,840 --> 00:43:12,520 then I think I can say that the AV industry is failing. 555 00:43:12,860 --> 00:43:14,780 I don't want to say that they have failed, 556 00:43:14,780 --> 00:43:17,480 but they are certainly failing to address the problem. 557 00:43:18,500 --> 00:43:22,180 I think this is one of the reasons that they are failing to address the problem. 558 00:43:23,380 --> 00:43:27,360 So once we have this up and running, 559 00:43:27,500 --> 00:43:32,420 I will start knocking on the doors of various CEOs in the industry 560 00:43:32,420 --> 00:43:38,040 and running a shorter pointy-haired boss version of these slides by them 561 00:43:38,040 --> 00:43:43,480 to start to get them to understand that if they hoard, they're going to be alone soon. 562 00:43:45,140 --> 00:43:53,860 Early indications are that the old ways, I think, will part pretty easily this time. 563 00:43:56,020 --> 00:43:59,320 So we can take this up with Q&A if we can get done. 564 00:43:59,600 --> 00:44:02,740 All right, so with about 10 minutes left, I just got the warning. 565 00:44:02,860 --> 00:44:04,220 If people want to queue up for questions, 566 00:44:04,280 --> 00:44:08,240 I'm going to go into the phase of the talk where I repeat myself in a conclusion. 567 00:44:11,740 --> 00:44:12,780 So the... 568 00:44:13,480 --> 00:44:15,760 The general idea is that we'll have a service-oriented repository, 569 00:44:15,920 --> 00:44:20,760 not merely a collection of malware on the net that's private. 570 00:44:20,980 --> 00:44:24,660 You can't join, you can't have it unless we like, love, or trust you in some ways. 571 00:44:25,420 --> 00:44:29,960 It will be oriented towards providing information into the hands of people 572 00:44:29,960 --> 00:44:34,280 who can take operational actions to stop active infections, 573 00:44:34,920 --> 00:44:36,920 doing blocking and things of that sort. 574 00:44:37,260 --> 00:44:40,840 And further details will be available at TISF.net. 575 00:44:40,920 --> 00:44:43,000 I believe Malfeas.org is now the... 576 00:44:43,480 --> 00:44:45,820 The domain that's been set up, but we'll... 577 00:44:45,820 --> 00:44:47,080 Wrong on both counts. 578 00:44:47,200 --> 00:44:50,020 It'll be Malfeas.org.net. 579 00:44:50,560 --> 00:44:53,420 But it's not there yet, so don't look for it. 580 00:44:54,100 --> 00:44:56,980 There will be an announcement on some mailing list that you're frequent. 581 00:44:59,700 --> 00:45:01,240 So we should take questions. 582 00:45:01,360 --> 00:45:02,980 I really want to hear from people about this. 583 00:45:03,180 --> 00:45:03,460 Yes. 584 00:45:04,620 --> 00:45:08,280 So I'm curious as to how well you think the offensive computing site 585 00:45:08,280 --> 00:45:10,240 matches your design already. 586 00:45:12,560 --> 00:45:13,000 So... 587 00:45:13,480 --> 00:45:16,940 There's actually a large number of people who have tried this 588 00:45:17,480 --> 00:45:19,800 and are trying this in different contexts. 589 00:45:20,300 --> 00:45:24,140 And what I have to do is sit down with the authors 590 00:45:24,140 --> 00:45:28,800 and discuss what other aspects they have, 591 00:45:28,900 --> 00:45:30,360 what other aspects we have. 592 00:45:30,500 --> 00:45:33,520 I actually don't see this as a comparison, 593 00:45:33,640 --> 00:45:35,420 but rather something that should be combined. 594 00:45:35,720 --> 00:45:38,200 I can certainly provide a feed to them and them to us. 595 00:45:38,520 --> 00:45:43,300 And if header analysis is something that people particularly need, 596 00:45:43,300 --> 00:45:45,100 or find useful for a particular problem, 597 00:45:45,960 --> 00:45:47,120 we'll have strength in that. 598 00:45:47,160 --> 00:45:48,480 Automated unpacking as well. 599 00:45:49,880 --> 00:45:52,180 There is also a cat and mouse game to this. 600 00:45:52,340 --> 00:45:54,780 And there will inevitably be a phase where, 601 00:45:56,180 --> 00:45:58,240 for example, the heuristic we are using 602 00:45:58,240 --> 00:46:00,280 becomes less and less sensitive over time, 603 00:46:00,420 --> 00:46:01,360 and more evasion occurs. 604 00:46:01,640 --> 00:46:06,740 And Joe Stewart's approach becomes a little bit cruftier, 605 00:46:06,760 --> 00:46:08,620 but then people will reinvigorate them 606 00:46:08,620 --> 00:46:10,600 and do more analysis and back ends. 607 00:46:10,720 --> 00:46:12,740 It may shift back and forth between different sites. 608 00:46:12,740 --> 00:46:14,940 So I'm looking forward to work with the authors. 609 00:46:15,040 --> 00:46:18,020 I don't have a comparison in mind at this point with bullet points. 610 00:46:19,960 --> 00:46:23,640 David, I was wondering if you could tell us two things. 611 00:46:23,820 --> 00:46:27,320 One, if bogons had ever been identified as something 612 00:46:27,320 --> 00:46:30,580 that they didn't want to deliver malware to 613 00:46:30,580 --> 00:46:33,420 because it might have a honeypot on it. 614 00:46:33,540 --> 00:46:38,960 Or if hijacking routes that were known to actually not contain 615 00:46:38,960 --> 00:46:42,700 any address space was a viable option for keeping some of 616 00:46:42,740 --> 00:46:43,860 it in circulation. 617 00:46:46,920 --> 00:46:51,940 So Rick is referring to a particular problem with people 618 00:46:51,940 --> 00:46:53,920 announcing routes that they should not be announcing. 619 00:46:54,320 --> 00:46:56,480 And we have seen that for spam runs. 620 00:46:56,900 --> 00:46:59,820 I have not in this particular context for this project seen 621 00:46:59,820 --> 00:47:00,840 it done for malware distribution. 622 00:47:01,160 --> 00:47:03,580 Others have told me, yes, it's done that way, 623 00:47:03,640 --> 00:47:06,180 not only for spam, but also for malware distribution. 624 00:47:07,180 --> 00:47:09,460 And your second part was about containment. 625 00:47:09,820 --> 00:47:12,120 I was actually asking the reverse. 626 00:47:12,740 --> 00:47:18,100 Are bogon sites excluded from a distribution? 627 00:47:19,060 --> 00:47:25,140 I will have to check to see the old Mazzafaka repository 628 00:47:25,480 --> 00:47:30,080 listing to see what particular ranges have been identified. 629 00:47:30,540 --> 00:47:34,200 And I would not be surprised to see if there isn't some 630 00:47:34,200 --> 00:47:35,000 notation in there. 631 00:47:38,660 --> 00:47:42,720 Probably a naive question, but what percent of executable 632 00:47:42,740 --> 00:47:46,780 samples come packed that are benign? 633 00:47:47,100 --> 00:47:50,080 And then secondly, is there a triggering mechanism to say 634 00:47:50,080 --> 00:47:55,160 this is an obfuscated packer, therefore do not download this 635 00:47:55,160 --> 00:47:57,000 product, known or unknown? 636 00:47:57,500 --> 00:48:01,180 So what you're getting at is something that's known in 637 00:48:01,180 --> 00:48:03,700 academic circles as the base rate fallacy. 638 00:48:05,400 --> 00:48:09,380 There are a large number of benign packed programs out there. 639 00:48:09,500 --> 00:48:12,620 And I absolutely don't want to suggest that packing itself is 640 00:48:12,620 --> 00:48:14,900 not, you know, packing is not a crime, man. 641 00:48:16,280 --> 00:48:20,100 And now in terms of what percent, well, it depends on 642 00:48:20,100 --> 00:48:20,700 what you're sampling. 643 00:48:20,860 --> 00:48:24,840 If you take a pristine install of a machine, you may find some 644 00:48:24,840 --> 00:48:28,540 user-installed programs that come in a packed form. 645 00:48:28,960 --> 00:48:31,260 And what you're sampling over there is a very large 646 00:48:32,380 --> 00:48:35,420 denominator, and so the percent would be quite low. 647 00:48:35,700 --> 00:48:38,440 In terms of the samples that we see that people have identified 648 00:48:38,440 --> 00:48:42,600 as suspect, that they think is fishy, 70 to 80 percent of them 649 00:48:42,620 --> 00:48:43,860 arrive in a packed form. 650 00:48:44,240 --> 00:48:47,120 And again, that merely reflects the sampling bias of the streams 651 00:48:47,120 --> 00:48:47,700 that we're getting. 652 00:48:48,380 --> 00:48:52,880 The unknown omega of the overall population of infected machines 653 00:48:52,880 --> 00:48:55,900 on the Internet is still not something that has been worked out, 654 00:48:56,020 --> 00:48:59,060 and so it's impossible to say what percentage of viruses out there 655 00:48:59,980 --> 00:49:02,000 are, you know, in this form. 656 00:49:03,360 --> 00:49:06,060 And could you restate your second question? 657 00:49:06,480 --> 00:49:11,480 Yeah, is there any sort of triggering mechanism for the extremely 658 00:49:11,480 --> 00:49:16,080 paranoid to say if this hits this trigger that I'm just not going to 659 00:49:16,080 --> 00:49:16,980 bother downloading it? 660 00:49:17,900 --> 00:49:20,880 That'll be something that I would encourage you to investigate by 661 00:49:20,880 --> 00:49:26,700 looking at PE32 header dumps by saying invalid fields, fields that 662 00:49:26,700 --> 00:49:31,600 don't exist, fields that have invalid offsets, zero date times, and 663 00:49:31,600 --> 00:49:34,120 things of that sort are things that you would not want to trust. 664 00:49:34,440 --> 00:49:38,280 And now whether that yields a sufficient detection system for you is 665 00:49:38,280 --> 00:49:40,000 something that you'll have to determine. 666 00:49:40,000 --> 00:49:44,280 But I would venture to guess that you need this type of information 667 00:49:44,280 --> 00:49:48,260 conveniently presented to you so you can do the type of clustering 668 00:49:48,260 --> 00:49:50,260 analysis to arrive at that. 669 00:49:50,440 --> 00:49:50,880 Thank you. 670 00:49:53,320 --> 00:49:54,760 Let's take one last question. 671 00:49:56,300 --> 00:49:59,940 You raised an interesting point at the beginning of your talk where 672 00:49:59,940 --> 00:50:05,560 you said that some of these sensors that are out on the Internet are 673 00:50:05,560 --> 00:50:08,700 known, discovered by the virus folks. 674 00:50:08,840 --> 00:50:09,360 Right. 675 00:50:10,100 --> 00:50:14,060 Whether I run a single honeypot or whether I work for one of the large 676 00:50:14,060 --> 00:50:21,020 antivirus companies that advertises 25,000 sensors out on the Internet, I 677 00:50:21,020 --> 00:50:25,560 guess my question is, number one, how do I know if my sensor has been 678 00:50:25,560 --> 00:50:25,980 discovered? 679 00:50:26,180 --> 00:50:29,860 And number two, if it has been discovered, what can I do to mitigate 680 00:50:29,860 --> 00:50:32,580 that so I can get back and start capturing good stuff again? 681 00:50:33,240 --> 00:50:37,320 So you're asking about the spy versus spy game of counter-counter 682 00:50:37,320 --> 00:50:37,800 intelligence. 683 00:50:38,240 --> 00:50:38,740 Right. 684 00:50:38,740 --> 00:50:40,700 What can you do to know if you've been illuminated? 685 00:50:41,000 --> 00:50:44,680 Well, you have to get fortunate enough to visit some of the sites that 686 00:50:44,680 --> 00:50:45,760 list known sensors. 687 00:50:46,060 --> 00:50:50,000 If you have reverse engineering talent in your, I'm assuming you're from 688 00:50:50,000 --> 00:50:54,800 an antivirus company, look at the propagation logic of the malware that 689 00:50:54,800 --> 00:50:58,880 you see to see if they avoid propagating into spaces that you might 690 00:50:58,880 --> 00:51:00,020 perhaps run a sensor in. 691 00:51:00,860 --> 00:51:05,240 In terms of recovering from being listed in that sense, a lot of people 692 00:51:05,240 --> 00:51:08,160 are now moving into the dynamic address space of ISPs. 693 00:51:08,160 --> 00:51:13,620 Buying large blocks, making arrangements for having DHCP leases appear in the 694 00:51:13,620 --> 00:51:15,260 normal victim population pool. 695 00:51:15,900 --> 00:51:21,040 Tor is another approach that people have been using as well. 696 00:51:21,260 --> 00:51:26,400 Basically, anonymization or looking like you're a real victim based on where 697 00:51:26,400 --> 00:51:28,240 you are on the Internet is something that people are attempting. 698 00:51:29,180 --> 00:51:29,920 Thank you. 699 00:51:30,800 --> 00:51:31,980 Thank you very much. 700 00:51:38,160 --> 00:51:38,280 Thank you.