1 00:00:00,000 --> 00:00:08,560 I'm Robert Edmonds. This is Paul Vixie. If you came to see him, you might be disappointed because he's got a little 10-minute thing at the end. 2 00:00:09,240 --> 00:00:18,920 The talk we're covering today involves passive DNS. Hopefully, most of the attendees here are familiar with the DNS in general. 3 00:00:19,000 --> 00:00:24,680 I see a show of hands, people who know what the DNS is. Okay. Very good. 4 00:00:24,680 --> 00:00:30,080 How many have read one or more DNS RFCs? Excellent. 5 00:00:31,760 --> 00:00:37,580 How many of you have heard of passive DNS? Okay. 6 00:00:38,160 --> 00:00:44,520 I'll probably skip over the introductory material as fast as possible because I have way too much material. 7 00:00:44,740 --> 00:00:51,760 I'd like to get to the demos, but in order to understand why the demos are so cool, you do need a certain amount of depth. 8 00:00:52,560 --> 00:00:54,460 So let's get started. 9 00:00:56,380 --> 00:01:01,320 This is the structure of the talk. There's four parts. I'll skip that. 10 00:01:02,160 --> 00:01:08,700 Okay. So the DNS maps hostnames to IP addresses. This is generally what we consider it to be. 11 00:01:08,840 --> 00:01:15,380 But in fact, it's more of a generalized system. It's basically a distributed key value system. 12 00:01:16,140 --> 00:01:20,460 More generally, it maps key type tuples to a set of unordered values. 13 00:01:21,880 --> 00:01:24,520 Yeah, so basically a multi-value distributed key value. 14 00:01:24,680 --> 00:01:25,120 And where it's for each server. 15 00:01:25,940 --> 00:01:29,080 Some terminology, we have clients, caches, and content. 16 00:01:29,200 --> 00:01:31,600 There are three fairly well defined roles in the DNS. 17 00:01:32,340 --> 00:01:34,740 Clients request full resolution service from caches. 18 00:01:36,360 --> 00:01:40,240 Caches make zero more inquiries to content servers on behalf of clients. 19 00:01:40,520 --> 00:01:41,580 And their results are cached. 20 00:01:41,580 --> 00:01:45,600 and we have content name servers which serve the DNS records that 21 00:01:45,600 --> 00:01:52,480 have been delegated to them. And here's a power point diagram 22 00:01:52,900 --> 00:01:58,920 showing the hour glass nature of this delineation. You can see 23 00:01:58,920 --> 00:02:03,420 that an ISP might have millions of clients and these clients are 24 00:02:03,420 --> 00:02:07,140 everywhere, phones, laptops, what not. And there are millions of 25 00:02:07,140 --> 00:02:08,960 content name servers because there are millions of domain 26 00:02:08,960 --> 00:02:12,020 names that people want to look up. But you have very few DNS 27 00:02:12,020 --> 00:02:17,800 caches, even the largest ISPs have around 100 DNS caches or 28 00:02:17,800 --> 00:02:24,160 less. So we have this natural choke point where we can insert 29 00:02:24,160 --> 00:02:30,040 a monitoring application. The DNS, so I just explained we have 30 00:02:30,040 --> 00:02:34,700 two different protocols, one that the cache speaks to the client 31 00:02:34,700 --> 00:02:38,520 speaks to the cache and one that the cache speaks to the content 32 00:02:38,520 --> 00:02:38,940 name server. So we have two different protocols, one that the 33 00:02:38,960 --> 00:02:39,220 cache speaks to the client and one that the content name server. 34 00:02:39,220 --> 00:02:42,680 And these are fairly different semantics but they use the same 35 00:02:42,680 --> 00:02:46,000 wire protocol. So the DNS is commonly considered to be port 36 00:02:46,000 --> 00:02:50,800 53 but it's terrifically complicated. So the two 37 00:02:50,800 --> 00:02:53,860 protocols are the client server protocol and the inner server 38 00:02:53,860 --> 00:03:00,120 protocol. Spoken between caches and content name servers. Passive 39 00:03:00,120 --> 00:03:03,840 DNS focuses on the latter because we don't want to see 40 00:03:03,840 --> 00:03:07,260 client queries or give the impression that we are spying 41 00:03:07,260 --> 00:03:08,940 on people. In fact, what we want to do is we want to look at the 42 00:03:10,240 --> 00:03:15,200 domain name system rather than clients that are requesting that 43 00:03:15,200 --> 00:03:21,300 information. So passive DNS replication was invented by 44 00:03:21,300 --> 00:03:24,640 Florian Weimer about six years ago who found a variety of uses 45 00:03:24,640 --> 00:03:28,140 for the technique. And the most impressive use of that to date 46 00:03:28,140 --> 00:03:32,080 has been in combating malware and e-crime. So domain names are 47 00:03:32,770 --> 00:03:37,360 so cheap as to be basically free. But infrastructure and 48 00:03:37,360 --> 00:03:38,920 numbering resources are not. So we want to make sure that we are 49 00:03:38,920 --> 00:03:40,760 able to do that. And the sharing of that infrastructure to 50 00:03:40,760 --> 00:03:44,540 host multiple e-crime campaigns makes it possible to track and 51 00:03:44,540 --> 00:03:49,240 link malicious uses of the DNS. And just to give one example, 52 00:03:49,440 --> 00:03:53,320 fast flux botnets light up the passive DNS like a Christmas 53 00:03:53,320 --> 00:03:59,080 tree. Passive DNS replication basically consists of a number 54 00:03:59,080 --> 00:04:02,140 of passive sensors that listen to the packets that are generated 55 00:04:02,600 --> 00:04:05,600 when a DNS cache performs a lookup. The packets are then 56 00:04:05,600 --> 00:04:07,920 forwarded to a central collection point for analysis. 57 00:04:09,260 --> 00:04:12,600 After the packets captured by a passive DNS sensor are submitted 58 00:04:12,600 --> 00:04:15,680 to the collection point, they are then parsed and analyzed and 59 00:04:15,680 --> 00:04:18,460 reduced into a stream of individual records that we then 60 00:04:18,460 --> 00:04:24,600 permanently store in a database. And here's a picture of our DNS 61 00:04:24,600 --> 00:04:28,740 architecture again where caches talk to content servers. We've 62 00:04:28,740 --> 00:04:30,860 taken the clients out of the picture since they're not 63 00:04:30,860 --> 00:04:34,200 particularly relevant to passive DNS and we've inserted a sensor 64 00:04:34,760 --> 00:04:37,840 between the caches and content showing how passive DNS 65 00:04:38,920 --> 00:04:42,600 monitors and forwards the inner server traffic to a collection 66 00:04:42,600 --> 00:04:47,540 point. And that collection point is called SIE or security 67 00:04:47,540 --> 00:04:51,100 information exchange. We'll cover that as briefly as we can 68 00:04:51,100 --> 00:04:55,320 because the main thrust of this talk concerns the database that 69 00:04:55,320 --> 00:05:01,260 we build based on that data. So there have been a number of 70 00:05:01,260 --> 00:05:04,820 different implementations of passive DNS over the years. The 71 00:05:04,820 --> 00:05:08,280 original is Florian Weimer's DNS logger whose back end was 72 00:05:08,280 --> 00:05:08,900 initially hosted on the DNS logger. He's been working with 73 00:05:08,920 --> 00:05:12,580 hosted at Rust cert and then at BFK. Florian's implementation 74 00:05:12,580 --> 00:05:17,220 uses a custom libpcap forwarder on the passive DNS sensor and a 75 00:05:17,220 --> 00:05:20,260 Berkeley DB database for permanently storing that data. 76 00:05:21,240 --> 00:05:25,140 Then we have Bojan's DNS parse out of New Zealand which uses a 77 00:05:25,140 --> 00:05:29,680 fairly primitive TCP dump-based sensor on a MySQL database. And 78 00:05:29,680 --> 00:05:32,240 the most recent and to our knowledge largest implementation 79 00:05:32,240 --> 00:05:36,540 is in ISC's security information exchange which inserts an 80 00:05:36,540 --> 00:05:38,900 elaborate distribution layer between the passive DNS and the 81 00:05:38,900 --> 00:05:43,860 of DNS sensor network and the analyzers of the capture data and we use a custom 82 00:05:43,860 --> 00:05:48,360 analyzer that is hardened and more advanced than the analyzers used in DNS 83 00:05:48,360 --> 00:05:53,020 longer or DNS parse and our storage components have been similarly hardened 84 00:05:53,020 --> 00:05:57,020 and have advanced functionality for dealing with the large amount of data 85 00:05:57,020 --> 00:06:03,340 that we collect there may be other implementations but I don't know of any 86 00:06:03,340 --> 00:06:09,860 other publicly publicly known passive DNS implementations this brings us to 87 00:06:09,860 --> 00:06:14,240 ISC SIE which we'll describe briefly and only the features that are relevant to 88 00:06:14,240 --> 00:06:18,700 passive DNS so SIE is a distribution network as I said for replicating the 89 00:06:18,700 --> 00:06:23,440 security data for multiple sources to private secure lands where the data is 90 00:06:23,440 --> 00:06:29,980 broadcast to trusted consumers including ISC itself of course one of those types 91 00:06:29,980 --> 00:06:32,320 of data is of course passive DNS 92 00:06:32,320 --> 00:06:33,320 you can see here that we've got a lot of data that we've got a lot of data that is 93 00:06:33,320 --> 00:06:33,920 we've got a lot of data that we've got a lot of data that we've got a lot of data that we've got 94 00:06:33,920 --> 00:06:38,840 passive DNS sensor operators run sensor code that captures DNS traffic and 95 00:06:38,840 --> 00:06:44,160 periodically uploads it in batches to our submission servers and our 96 00:06:44,160 --> 00:06:47,660 submission servers take care of replicating the data among physical SIE 97 00:06:47,660 --> 00:06:52,340 sites where the data is broadcast out in a standardized format on private VLANs 98 00:06:52,340 --> 00:06:57,920 sort of a poor man's multicast and we use a standardized interchange format 99 00:06:57,920 --> 00:07:01,860 called in message which we use to encapsulate the data it's an extensible 100 00:07:01,860 --> 00:07:03,300 binary format that we've used to encapsulate the data and we've used to 101 00:07:03,300 --> 00:07:03,820 encapsulate the data and we've used to 102 00:07:03,820 --> 00:07:07,160 optimize for you know real-time transmission on jumbo frame Ethernet and 103 00:07:07,160 --> 00:07:11,080 we use this format to record the raw packets that are captured by our passive 104 00:07:11,080 --> 00:07:14,800 DNS sensors and this allows us to add a you know a good deal made of data along 105 00:07:14,800 --> 00:07:18,900 with the raw messages so for instance instead of storing a flat stream of 106 00:07:18,900 --> 00:07:23,500 packets like your typical PCAP file we embed both the query and its response 107 00:07:23,500 --> 00:07:28,340 and its corresponding response into a single message which we can then process 108 00:07:28,340 --> 00:07:33,080 as a unit rather than groveling through an entire PCAP file and 109 00:07:33,300 --> 00:07:36,620 we don't really need to cover DNA message anymore but you can see our 110 00:07:36,620 --> 00:07:43,980 Google tech talk where we describe just that format at that URL and this is the 111 00:07:43,980 --> 00:07:47,460 end of our introductory material and we'll move on to some ancient DNS 112 00:07:47,460 --> 00:07:52,240 security issues and the analogs that they present in passive DNS unfortunately 113 00:07:52,680 --> 00:07:57,140 nothing short of universal DNSSEC deployment really helps us since passive 114 00:07:57,140 --> 00:08:02,940 DNS operates on a lower level than DNSSEC so we have to be able to handle signed and unsigned data 115 00:08:03,300 --> 00:08:09,600 in a secure as fashion as possible so we won't be discussing DNSSEC further so what 116 00:08:09,600 --> 00:08:15,600 DNS security issues are most important to passive DNS we have cache puraf poisoning 117 00:08:15,600 --> 00:08:21,540 which is an old easily defeated type of DNS cache poisoning from the 90s and we 118 00:08:21,540 --> 00:08:24,820 also have Kamensky poisoning which is a particular type of DNS cache 119 00:08:25,400 --> 00:08:30,520 poisoning that makes use of spoofed response packets actually spoofed 120 00:08:30,520 --> 00:08:33,000 responses in general are very harmful to passive DNS 121 00:08:33,300 --> 00:08:39,940 data collection. Let's see. Cache puraf poisoning is the name of a type of DNS cache 122 00:08:39,940 --> 00:08:45,360 poisoning that occurs when a content name server pens extra records to a response. It's 123 00:08:45,360 --> 00:08:49,980 particularly insidious because an attacker can poison any record in the entire DNS tree 124 00:08:50,640 --> 00:08:55,240 simply by running a content name server and tricking clients into looking up a DNS name 125 00:08:55,240 --> 00:09:02,340 under the control of the attacker so that's very easy to do. Here's how the attack works. The 126 00:09:02,340 --> 00:09:08,400 attacker runs a content name server and a client is enticed to look up a domain name under the 127 00:09:08,400 --> 00:09:14,880 attacker's control. And the cache contacts the attacker's name server and the attacker's name 128 00:09:14,880 --> 00:09:20,360 server provides extra records to the cache. And these extra records are inserted into the 129 00:09:20,360 --> 00:09:29,420 cache instead of being discarded. I'm going to skip the actual example because it takes a while 130 00:09:29,420 --> 00:09:32,320 to explain but the idea is that we have a malicious .example. We have a malicious .example 131 00:09:32,340 --> 00:09:39,420 .com name and we trick someone to look it up and suddenly this unrelated name www.example.net points 132 00:09:39,420 --> 00:09:46,440 anywhere we want. So the blue one and the red one. The red one is malicious. The blue one is 133 00:09:47,380 --> 00:09:55,080 suspicious but not illegitimate. Actually, let me go back. The gray record there is the 134 00:09:55,080 --> 00:10:02,320 malicious one and it gets scrubbed out by DNS caches. Modern DNS caches. So this is the 135 00:10:02,320 --> 00:10:07,520 case. Just like the ones I mentioned earlier. I think I can sort of skip this slide. I'm going 136 00:10:07,520 --> 00:10:15,380 to skip this one. And we can skip this one. Ah, okay. Now that we've covered all the background 137 00:10:15,380 --> 00:10:20,900 material, has been lead up to the meat of the talk. How is this particularly relevant to 138 00:10:20,900 --> 00:10:27,380 passive DNS? So Florian is 2005 paper identified several problems with validating the data 139 00:10:27,380 --> 00:10:32,300 collected by a passive DNS sensor. But he chose not to implement protections against the 140 00:10:32,300 --> 00:10:36,280 these problems. But we would like to fix these problems if 141 00:10:36,280 --> 00:10:41,160 possible. So we have the two problems in passive DNS that are 142 00:10:41,160 --> 00:10:47,740 sort of analogous to the two problems in active DNS. And the 143 00:10:47,740 --> 00:10:54,560 problem with cache pref poisoning in passive DNS is that 144 00:10:54,560 --> 00:10:58,020 we can't see the DNS caches internal state. So they can't 145 00:10:58,020 --> 00:11:01,860 recover what's called the bailiwick that the cache 146 00:11:01,860 --> 00:11:05,880 associated with a particular response. Bailiwick is entirely 147 00:11:05,880 --> 00:11:09,800 in the eye of the beholder. This leads to a problem called record 148 00:11:09,800 --> 00:11:15,580 injection. And the problem with spoofed responses is that 149 00:11:15,580 --> 00:11:18,400 they're treated just like normal responses by the passive DNS 150 00:11:18,400 --> 00:11:23,180 sensor. And a single spoofed response can poison the passive 151 00:11:23,180 --> 00:11:26,440 DNS database. So this kind of worries us because it makes 152 00:11:27,000 --> 00:11:28,000 passive DNS database. 153 00:11:28,020 --> 00:11:32,460 It's sort of an unreliable tool if an attacker explicitly wants 154 00:11:32,460 --> 00:11:37,700 to target a passive DNS database. So anyway, we'd like 155 00:11:37,700 --> 00:11:42,180 to make sure that passive DNS is at least as reliable as active 156 00:11:42,180 --> 00:11:46,400 DNS as far as resilience to cache poisoning goes, whatever 157 00:11:46,400 --> 00:11:50,540 that's worth, in order to avoid allowing passive DNS to itself 158 00:11:50,540 --> 00:11:57,300 become a target in addition to the DNS. So let's move on to 159 00:11:58,020 --> 00:12:01,420 protections that we've implemented on top of the basic 160 00:12:02,060 --> 00:12:06,420 passive DNS idea. It's actually relatively easy to protect the 161 00:12:06,420 --> 00:12:10,580 capture stage from spoofing. In order to make our DNS sensor at 162 00:12:10,580 --> 00:12:14,000 least as reliable as the DNS cache that it's monitoring, we 163 00:12:14,000 --> 00:12:16,480 need to capture both the outgoing queries that the cache 164 00:12:16,480 --> 00:12:20,460 is generating and the incoming responses that it gets back. So 165 00:12:21,040 --> 00:12:26,980 current generations of passive DNS only capture the responses. 166 00:12:28,020 --> 00:12:32,080 And they don't have the context or the state that is generated by 167 00:12:32,080 --> 00:12:38,160 the actual query that went out. So what we need to do is capture 168 00:12:38,160 --> 00:12:41,580 the outgoing queries and correlate them with the responses and 169 00:12:41,580 --> 00:12:46,940 verify that they fit together and form a valid transaction. In 170 00:12:46,940 --> 00:12:50,660 most cases, we need to verify that nine different fields between 171 00:12:50,660 --> 00:12:55,180 the query and response are identical. And those are the nine 172 00:12:55,180 --> 00:12:58,000 different fields that we don't have time to discuss. So we're 173 00:12:58,020 --> 00:13:01,980 going to do that. But basically we match them together and we can 174 00:13:01,980 --> 00:13:06,760 tell exactly which transactions are valid and which ones appear 175 00:13:06,760 --> 00:13:13,880 to lack the additional state to verify that they're valid. So 176 00:13:13,880 --> 00:13:18,720 ISC has released a tool called DNS QR that performs DNS packet 177 00:13:18,720 --> 00:13:25,400 capture and validates the query response pairs that are seen on 178 00:13:25,400 --> 00:13:28,000 the wire. DNS QR temporarily keeps the data from the 179 00:13:28,020 --> 00:13:29,460 database. We can see that it has each outgoing query packet in 180 00:13:29,460 --> 00:13:33,500 memory in a state table and when a response packet is received, we 181 00:13:33,500 --> 00:13:37,820 do a lookup against that state table. And then the state table 182 00:13:37,820 --> 00:13:43,200 is keyed on that nine tuple that we just skipped over. We can skip 183 00:13:43,200 --> 00:13:47,680 this. It's interesting, but we don't have enough time. There's 184 00:13:47,680 --> 00:13:53,180 blah, blah, blah. Design P reassembly, which I won't explain 185 00:13:53,180 --> 00:13:58,000 why that's cool. So now that we've eliminated this spoofed 186 00:13:58,000 --> 00:14:04,500 vulnerability in the capture stage, we can move on to the data 187 00:14:04,500 --> 00:14:09,040 that is valid or the data that has been captured and has passed 188 00:14:09,040 --> 00:14:12,840 all these checks but happens to be attempting to redirect us, the 189 00:14:13,660 --> 00:14:17,480 cache style poisoning. So cache is internally associated with 190 00:14:17,480 --> 00:14:22,300 bailiwick with each outgoing query and bailiwick is sort of 191 00:14:22,300 --> 00:14:25,140 equivalent to the zone but not really. It's a good enough 192 00:14:25,140 --> 00:14:26,360 approximation for this talk. 193 00:14:28,260 --> 00:14:31,440 Okay. So cache proof poison is pretty much identical between 194 00:14:31,440 --> 00:14:35,400 active DNS and passive DNS and the solution is we're going to keep 195 00:14:35,400 --> 00:14:38,280 track of which zone or bailiwick that we expect the answer to be 196 00:14:38,280 --> 00:14:42,320 contained and we're going to discard any response records that aren't 197 00:14:42,320 --> 00:14:47,780 contained in that zone. And of course nothing in the wire and protocol 198 00:14:47,780 --> 00:14:54,440 indicates the bailiwick that the cache is expecting. So when we're 199 00:14:54,440 --> 00:14:57,920 looking at a particular DNS query response pair, we don't see anything that 200 00:14:58,000 --> 00:15:00,920 packets to help us determine the bailiwick. So we have to 201 00:15:01,920 --> 00:15:06,840 determine it ourselves from first principles. That's a 202 00:15:06,840 --> 00:15:09,900 relatively minor point. So we have to develop an algorithm 203 00:15:09,900 --> 00:15:13,300 that operates entirely passively. It's not allowed to 204 00:15:13,300 --> 00:15:16,320 make any inquiries of its own. It has to passively process 205 00:15:16,320 --> 00:15:19,980 each message and tell us for each record name in the 206 00:15:19,980 --> 00:15:24,440 response whether the IP address that sent us this response is 207 00:15:24,440 --> 00:15:28,720 really allowed to a certain knowledge for that name. And 208 00:15:28,720 --> 00:15:31,960 this algorithm must provide a true or false value. It can't be 209 00:15:31,960 --> 00:15:35,920 a heuristic. We can tolerate a small number of false negatives 210 00:15:35,920 --> 00:15:39,300 if we have incomplete knowledge. We cannot tolerate any false 211 00:15:39,300 --> 00:15:44,560 positives. That is the, so basically that is the passive 212 00:15:44,560 --> 00:15:48,600 DNS bailiwick algorithm analyzes a DNS response and answers the 213 00:15:48,600 --> 00:15:52,720 question for each record name is the response IP address a name 214 00:15:52,720 --> 00:15:54,420 server for the zone that can be used to send messages to the 215 00:15:54,440 --> 00:15:59,500 server that contains or can contain this name. For example, 216 00:15:59,620 --> 00:16:02,540 the root name servers can assert knowledge about any domain name 217 00:16:03,000 --> 00:16:06,580 and pass the bailiwick verification algorithm. And the 218 00:16:06,580 --> 00:16:10,380 GTLD servers, the .com and the .net servers operated by 219 00:16:10,380 --> 00:16:13,380 VeriSign can assert knowledge about any domain name that ends 220 00:16:13,380 --> 00:16:17,720 in .com or .net and in fact they did so for a short period in 221 00:16:17,720 --> 00:16:21,660 2003. It's called VeriSign site finder. . 222 00:16:24,440 --> 00:16:30,060 Very good. So here's how the algorithm works. First we 223 00:16:30,060 --> 00:16:32,940 allocate a whole bunch of memory that will be used to cache the 224 00:16:32,940 --> 00:16:36,840 name server and address records after they've been verified by 225 00:16:36,840 --> 00:16:40,580 the algorithm. And we call this cache the bailiwick cache. And 226 00:16:40,580 --> 00:16:45,120 we initialize this cache using the entire root zone to give our 227 00:16:45,120 --> 00:16:47,840 algorithm knowledge of where the root and TLD name servers 228 00:16:47,840 --> 00:16:51,340 are and also will know the bailiwicks of all the root and 229 00:16:51,340 --> 00:16:52,040 TLDs. 230 00:16:54,440 --> 00:16:58,520 Then when we want to verify a given name against a given name 231 00:16:58,520 --> 00:17:02,500 server address, we find all the possible zones the name could be 232 00:17:02,500 --> 00:17:06,720 located in. And whether the name server address and the 233 00:17:06,720 --> 00:17:09,980 response packet matches any of the addresses that are name 234 00:17:09,980 --> 00:17:14,440 servers for these possible zones. And finally, each time 235 00:17:14,440 --> 00:17:18,100 the algorithm successfully verifies an NSA or quad A record, 236 00:17:19,160 --> 00:17:21,760 that record is then inserted into the bailiwick cache. 237 00:17:23,820 --> 00:17:24,420 All right. So here's how the algorithm works. First we 238 00:17:27,540 --> 00:17:29,240 want to get to the demo. We're going to skip through the 239 00:17:29,240 --> 00:17:32,640 algorithm examples because they take a really long time to 240 00:17:32,640 --> 00:17:47,200 explain. And we want to get to the demo. Okay. What we call 241 00:17:47,200 --> 00:17:51,640 DNSDB is basically a database for permanently storing DNS 242 00:17:51,640 --> 00:17:54,420 records from a variety of sources along with a set of 243 00:17:54,440 --> 00:17:56,060 data sources. We store a certain amount of metadata such as 244 00:17:56,060 --> 00:18:01,140 time stamps. Our primary data sources are passive DNS data as 245 00:18:01,140 --> 00:18:05,260 well as a number of zone files that we have access to. Each 246 00:18:05,260 --> 00:18:08,500 record is serialized as an array of bytes which we then store in 247 00:18:08,500 --> 00:18:12,020 an Apache Cassandra database. We don't have enough time to go 248 00:18:12,020 --> 00:18:15,660 over the exact serialization scheme unfortunately because it's 249 00:18:15,660 --> 00:18:19,260 really neat. We chose Apache Cassandra for a number of 250 00:18:19,260 --> 00:18:21,800 reasons. In particular, it's a distributed key value store 251 00:18:21,800 --> 00:18:24,420 which means we can scale easily. As the size of the data is, you 252 00:18:24,420 --> 00:18:27,020 know, as the database grows and its data model provides a good 253 00:18:27,020 --> 00:18:29,860 fit for the type of data that we want to store. It's also 254 00:18:29,860 --> 00:18:32,700 extremely fast and can easily keep up with the amount of data 255 00:18:32,700 --> 00:18:35,360 that we need to process. Primarily due to the fact that 256 00:18:35,360 --> 00:18:38,120 Cassandra always performs sequential writes. So it can 257 00:18:38,120 --> 00:18:43,620 make use of cheap, slow SATA storage. We then export the data 258 00:18:43,620 --> 00:18:48,880 stored in our DNS database via an HTTP API intended for bulk 259 00:18:48,880 --> 00:18:54,140 queries as well as an interactive web search interface. And since 260 00:18:54,140 --> 00:18:56,840 we started loading data about a month ago, the size of our 261 00:18:56,840 --> 00:19:01,720 database has grown to about 500 gigs out of 27 terabytes total 262 00:19:01,720 --> 00:19:05,760 storage that we've deployed. We just bought some small little 2U 263 00:19:05,760 --> 00:19:12,860 boxes to test the thing out. DNSDB consists of several loosely 264 00:19:12,860 --> 00:19:16,320 coupled components. We have a number of data sources from which 265 00:19:16,320 --> 00:19:21,040 we receive new DNS data. And that's first and most important 266 00:19:21,040 --> 00:19:24,120 source, of course, is the passive data source, which is a 267 00:19:24,140 --> 00:19:27,400 DNS. The first most important source of DNS data comes from a 268 00:19:27,400 --> 00:19:31,520 program called in-message DNS cache, which processes the raw 269 00:19:31,520 --> 00:19:34,160 passive DNS data as it comes in from our sensors. And this is 270 00:19:34,160 --> 00:19:40,700 after it's passed the query response state inspection. And 271 00:19:40,700 --> 00:19:44,480 this program is now going to perform the passive algorithm 272 00:19:44,960 --> 00:19:50,240 that we described earlier. And as that data comes in from the 273 00:19:50,240 --> 00:19:53,540 sensors. And the second source of data comes from the GTLDs 274 00:19:53,540 --> 00:19:54,120 that make daily data. And the second source of data comes from 275 00:19:54,140 --> 00:19:55,920 our data. We have some daily zone file dumps available. So for 276 00:19:55,920 --> 00:20:01,180 instance, you can go to RSI or Afilius and get access to daily 277 00:20:01,180 --> 00:20:05,400 dumps of their entire zones because of the contracts, the 278 00:20:05,400 --> 00:20:10,460 contracts they have with ICAM that requires them to do so. And 279 00:20:10,460 --> 00:20:13,100 the third source of data comes from Dena Zones, whose 280 00:20:13,100 --> 00:20:15,760 administrators allow us to perform zone transfers of their 281 00:20:15,760 --> 00:20:19,080 zones. This is currently our smallest source of data and it's 282 00:20:19,080 --> 00:20:24,060 mostly just the IC.org zone. And we're interested in adding 283 00:20:24,060 --> 00:20:27,460 adding more data via this method. It's very cheap and easy 284 00:20:27,460 --> 00:20:30,960 to process in this manner. We then have data loaders that 285 00:20:30,960 --> 00:20:34,920 process the data into batches of individual database rows and 286 00:20:34,920 --> 00:20:38,520 columns and then connect to our cluster in order to insert the 287 00:20:38,520 --> 00:20:45,660 processed data. So we have in message DNS cache, which parse, 288 00:20:45,840 --> 00:20:50,080 I'm going to quickly go through what it does and then we'll get 289 00:20:50,080 --> 00:20:53,240 into the demo as soon as possible. It's a standalone 290 00:20:53,240 --> 00:20:57,580 program that reads raw data and parse each DNS message into a 291 00:20:57,580 --> 00:21:01,340 stream of individual, what's called resource record sets and 292 00:21:01,340 --> 00:21:04,940 then we apply a series of filters before inserting each RR 293 00:21:04,940 --> 00:21:09,060 set into an in memory cache and these filters eliminate roughly 294 00:21:09,060 --> 00:21:12,640 50% of the data that we would otherwise have to store in the 295 00:21:12,640 --> 00:21:16,840 database and RR sets that pass all the filters are then 296 00:21:16,840 --> 00:21:19,580 inserted into an in memory cache which we've tuned to store 297 00:21:19,580 --> 00:21:23,220 about eight to 12 hours worth of data. And finally, we have a 298 00:21:23,220 --> 00:21:26,900 cache that's expired in a strict first in, first out order 299 00:21:26,900 --> 00:21:30,640 and these expired RR sets are sent over a socket. So the output 300 00:21:30,640 --> 00:21:34,240 can be stored for later processing and insertion into 301 00:21:34,240 --> 00:21:40,180 the DNS database. I think I covered this. So we sign up for 302 00:21:40,180 --> 00:21:46,640 the zone file programs and we then, so we get the zone file 303 00:21:46,640 --> 00:21:51,140 dumps but these are just the NS delegations. So in the dot com 304 00:21:51,140 --> 00:21:53,200 zone, we see, you know, google.com has a list of all the 305 00:21:53,220 --> 00:21:56,620 DNS nameservers but that zone doesn't include all the records 306 00:21:56,620 --> 00:22:00,660 that google.com wants to serve obviously since the DNS is 307 00:22:00,660 --> 00:22:05,960 hierarchical and distributed. And then we can use passive DNS 308 00:22:05,960 --> 00:22:09,800 to fill in those gaps in the lower, lower child levels of 309 00:22:09,800 --> 00:22:15,320 those, of those zones. And this provides us with all the, the 310 00:22:15,320 --> 00:22:18,880 TLD data provides us about eight gigs, eight gigabytes of 311 00:22:18,880 --> 00:22:23,200 DNS data every day. And the, the passive DNS is, you know, 312 00:22:23,200 --> 00:22:26,940 probably a whole lot more than that. We also operate the Adena 313 00:22:26,940 --> 00:22:30,480 server that slaves a few zones like IC.org and then we, when 314 00:22:30,480 --> 00:22:35,520 those zones get updated we, you know, by AX for or IX for, zone 315 00:22:35,520 --> 00:22:38,800 transfer. And when those zones are updated they get archived and 316 00:22:38,800 --> 00:22:43,860 processed and inserted into the database. This is a crazy, well 317 00:22:43,860 --> 00:22:46,340 that's scaled poorly but that's a crazy diagram of our 318 00:22:47,220 --> 00:22:50,940 architecture and this will not be on the quiz. We apologize for 319 00:22:50,940 --> 00:22:52,280 that slide. 320 00:22:53,300 --> 00:22:56,860 Now we can start the, the demos. How much time do we have 321 00:22:56,860 --> 00:23:04,480 left? What time is it? Thank you. I'm going to switch 322 00:23:04,840 --> 00:23:05,640 configurations real fast. 323 00:23:34,760 --> 00:23:52,720 Okay. This is the web interface. This is in pre beta mode. Okay. 324 00:23:54,760 --> 00:23:59,560 Let's see what we can find. Our domain name search allows us to 325 00:23:59,560 --> 00:24:03,420 do wild card matches, which I don't think any of the publicly 326 00:24:03,420 --> 00:24:06,720 available passive DNS, searchable passive DNS databases allow you 327 00:24:06,720 --> 00:24:11,300 to do wild card lookups. So this is kind of a neat new feature 328 00:24:11,300 --> 00:24:15,880 that we've implemented. We're going to look at star.google.com 329 00:24:16,540 --> 00:24:21,160 and we're going to only look at the records that are present in 330 00:24:21,160 --> 00:24:22,540 the top level comm zone. 331 00:24:23,200 --> 00:24:27,100 So this means essentially name server delegation records and 332 00:24:27,100 --> 00:24:30,440 address records that are necessary for reaching the 333 00:24:30,440 --> 00:24:34,160 google.com name servers. So if we see anything out of the place 334 00:24:34,160 --> 00:24:39,620 in this particular domain, in this particular TLD, we know 335 00:24:39,620 --> 00:24:44,060 something is up. So here are the four matches that we get. Note 336 00:24:44,060 --> 00:24:48,100 that we have up to four time stamps associated with each 337 00:24:48,100 --> 00:24:52,460 match. This one has four. These have two and two each. And we 338 00:24:52,460 --> 00:24:53,180 have a pair of two and a pair of two. And we have a pair of two 339 00:24:53,200 --> 00:24:55,420 and a pair of one. So we have a pair of first seen and last seen 340 00:24:55,420 --> 00:25:00,100 time stamps for data that was seen by passive DNS and a separate 341 00:25:00,100 --> 00:25:04,080 set of time stamps for data that was seen in a zone file. So 342 00:25:04,360 --> 00:25:09,420 this indicates that this first match right here indicates that 343 00:25:09,420 --> 00:25:14,460 the google.com NS delegations were seen with these records from 344 00:25:14,460 --> 00:25:20,380 both the zone file and in passive DNS. And these down here say in 345 00:25:20,380 --> 00:25:23,060 zone file. So that means that without the other two 346 00:25:23,060 --> 00:25:29,460 two time stamps, this indicates that these records were only seen in the .com zone. And 347 00:25:29,460 --> 00:25:34,680 if they weren't seen in passive DNS, that means that we might have a mismatch between 348 00:25:34,680 --> 00:25:42,280 the com servers and the Google.com name servers. So we see these three records, A, B, and F, 349 00:25:42,380 --> 00:25:47,520 which are kind of interesting because these exist in the com zone but not in the Google.com 350 00:25:47,520 --> 00:25:59,640 zone. So let's click on this. And we get matches for two domains, 20comments.com and 351 00:26:00,640 --> 00:26:08,040 antifaVLC.com. And supposedly Google is the name server for these domain names. So let's 352 00:26:08,040 --> 00:26:17,500 click on this one. And we get a NS delegation for this domain. And supposedly Google is 353 00:26:17,520 --> 00:26:23,860 the name server for this domain. And supposedly, according to the .com zone file, this domain 354 00:26:23,860 --> 00:26:30,860 is hosted by Google, gtld servers, and hroot. For all the people that know about the DNS, 355 00:26:31,060 --> 00:26:38,940 this is an incredibly unlikely event to occur legitimately. So it looks like someone has 356 00:26:38,940 --> 00:26:46,700 invented a rather creative method of parking a name. And we can do some more clicking around, 357 00:26:47,520 --> 00:26:52,200 and I'm going to skip the rest of this example so we can get into some more interesting things. 358 00:26:52,300 --> 00:26:56,780 But basically there's a bunch of weird people out there that claim the root servers and the 359 00:26:56,780 --> 00:27:04,020 .com servers themselves are hosting their zones, which they don't. They only host the delegations 360 00:27:04,020 --> 00:27:11,420 to those zones. Okay. I am not a security researcher, but some of my best friends are. 361 00:27:20,980 --> 00:27:28,980 A good friend of mine recommended that this particular audience would be interested in all of the 362 00:27:28,980 --> 00:27:36,680 names that are hosted by soft layer. Apparently it's some sort of colo hosting provider or something 363 00:27:36,680 --> 00:27:44,840 that for some reason people really dislike. So let's see what happens when we want to look up all 364 00:27:44,840 --> 00:27:47,500 the names that people really dislike. So let's see what happens. So the first thing that we want to 365 00:27:47,500 --> 00:27:53,460 do is say soft layers DNS servers serve. So we're going to put in, we're going to do what's 366 00:27:53,460 --> 00:28:00,400 called an inverse query or an inverse search. The DNS originally had something called iQuery that 367 00:28:00,400 --> 00:28:06,220 worked very poorly. And apparently you have to build giant databases to support this. So we're 368 00:28:06,220 --> 00:28:17,480 going to put in a name, NS1.softlayer.com. And we want to know which domains they host. So 369 00:28:21,220 --> 00:28:26,980 we're going to put in a name. And here are 1,000 records. This is probably tripped over the 370 00:28:27,500 --> 00:28:34,280 maximum limit that the web interface has. So they must have a lot more than that. So we see all 371 00:28:34,280 --> 00:28:41,960 these different domains hosted by them. I was going to show you another soft layer example. I 372 00:28:41,960 --> 00:28:47,480 basically need a slash 16. So we're going to put in a slash 16. So we're going to put in a slash 16. 373 00:28:47,500 --> 00:28:55,980 That belongs to someone of interest. Unfortunately, I neglected to look up that information. So 374 00:28:55,980 --> 00:29:07,140 I'm going to use ISC as an example. Okay. Let's look up an IP or network match. I'm going to put 375 00:29:07,140 --> 00:29:17,480 in ISC's slash 16. And perform a search. Now this is really cool. So we're going to put in a 376 00:29:17,500 --> 00:29:24,500 slash 16. Because it did it really fast. And it's slash 16 for breakfast. So here are a whole 377 00:29:24,500 --> 00:29:32,720 bunch of names that go into our ISC's name space. There's a whole bunch of crap here. Someone is 378 00:29:32,720 --> 00:29:40,740 hosting a lot of domains for some reason. I can't imagine why that would occur. But here is 379 00:29:40,740 --> 00:29:45,540 basically all of our all the domains that are pointed into our address space. This is interesting 380 00:29:45,540 --> 00:29:49,880 interesting because the DNS is a forward delegation tree so you 381 00:29:49,880 --> 00:29:52,240 don't really know who is pointing into your address 382 00:29:52,240 --> 00:29:56,080 space. This is a very excellent monitoring application to keep 383 00:29:56,080 --> 00:30:02,800 an eye on who is claiming to host something in your address 384 00:30:02,800 --> 00:30:13,000 space. I think that's about it for this particular set of 385 00:30:13,000 --> 00:30:22,020 demos. So I think I'll switch over to Paul Vixie. I think we 386 00:30:22,020 --> 00:30:27,740 can turn off the projector now. I don't think Paul is going to 387 00:30:27,740 --> 00:30:37,440 use slides. Thank you, Robert. It's true, I'm not going to use 388 00:30:37,440 --> 00:30:40,260 slides. I had some but they were terrible so I decided rather 389 00:30:40,260 --> 00:30:42,980 than being distracted by them and not using slides, I'm going 390 00:30:43,000 --> 00:30:50,000 to just talk. So this passive DNS stuff is very cool. I want to 391 00:30:50,000 --> 00:30:52,580 thank Florian again. He's not here but he's been here. He's 392 00:30:52,580 --> 00:30:55,880 come to DEF CON before. Some of you know him for coming up with 393 00:30:55,880 --> 00:30:59,380 this idea. I want to admit, once again, when he first told me 394 00:30:59,380 --> 00:31:02,380 about it, I thought it was a terrible, terrible idea until I 395 00:31:02,380 --> 00:31:08,260 saw the ways that it could be used by e-crime fighters, whether 396 00:31:08,260 --> 00:31:12,140 law enforcement or freelance, to go find out who is doing what to 397 00:31:12,140 --> 00:31:12,980 whom. So I'm going to stop there. 398 00:31:13,860 --> 00:31:19,840 DNS is fairly often used for bad stuff. In fact, it is universally 399 00:31:19,840 --> 00:31:22,900 used for everything that happens on the Internet, and so anything 400 00:31:22,900 --> 00:31:29,100 bad is also using DNS. It bothers me that people that are trying to 401 00:31:29,100 --> 00:31:33,680 hurt me get to use a protocol that I helped, you know, I had a hand 402 00:31:33,680 --> 00:31:37,360 in, maybe some software, and they're using a global system that I'm 403 00:31:37,360 --> 00:31:42,980 helping to keep running in order to execute e-crime. So, you know, 404 00:31:43,000 --> 00:31:49,320 last time something like this bothered me was in the mid-90s when I created 405 00:31:49,320 --> 00:31:53,280 something called MAPS, which some of you may recognize as spam spelled 406 00:31:53,280 --> 00:32:01,380 backward. It was the Male Abuse Prevention System. So it's really unlikely 407 00:32:01,380 --> 00:32:05,380 that any of you has ever before now been in a room with somebody who's been 408 00:32:05,380 --> 00:32:12,380 sued more than I have. And that's a result of me publishing reputation data 409 00:32:12,380 --> 00:32:12,980 about e-crime fighters. So I'm going to stop there. I'm going to stop there. 410 00:32:13,000 --> 00:32:18,160 I want to talk about SMTP servers and other people subscribing to that 411 00:32:18,160 --> 00:32:25,680 reputation data, which we called an RBL. And they would subscribe to that 412 00:32:25,680 --> 00:32:30,920 either by BGP or with DNS and tell their send mail or post fix or whatever, 413 00:32:31,220 --> 00:32:35,500 gee, if it appears on Vixie's list, then you can just bounce all mail that 414 00:32:35,500 --> 00:32:39,140 comes from there. And the problem is that the people that were on my list 415 00:32:39,140 --> 00:32:42,980 didn't want their mail to be bounced, and they found that some of the 416 00:32:43,000 --> 00:32:48,080 spam that was coming from their networks was hard, whereas suing me was easy. 417 00:32:51,960 --> 00:32:55,140 Anyway, my wife has assured me that this won't happen again. 418 00:33:00,420 --> 00:33:08,140 So as a result of sort of all that, 10, 12 years later, we sold MAPS and are 419 00:33:08,140 --> 00:33:12,980 still selling the old RBL. There are probably a hundred other RBL-like 420 00:33:13,000 --> 00:33:17,280 things. I guess the new name for them is the DNSBL, but it will always be an 421 00:33:17,280 --> 00:33:22,480 RBL to me because that's what we called it. And we're all getting as much spam 422 00:33:22,480 --> 00:33:27,860 as we ever got. So I've noted that e-mail is less reliable than it used to 423 00:33:27,860 --> 00:33:33,880 be. A lot of false positives. A lot of people have abandoned RBLs in place 424 00:33:33,880 --> 00:33:37,800 and put a wild card in there so that their subscribers bounce everything 425 00:33:37,800 --> 00:33:42,420 until they stop subscribing. I will tell you that the really, really oldest 426 00:33:42,420 --> 00:33:42,980 RBLs that I've ever used, I don't know how many of you have used them. 427 00:33:42,980 --> 00:33:48,860 RBL, the very first one, is called RBL.MAPS.VIX.COM. We only used that name 428 00:33:48,860 --> 00:33:53,280 for about six months. And then we got mail abuse.org or whatever and started 429 00:33:53,280 --> 00:34:01,420 using that. That's in VIX.COM. And people still send queries to it. 12 years 430 00:34:01,420 --> 00:34:06,960 later, 12 years after it was turned off. It's rather frustrating. I suppose I 431 00:34:06,960 --> 00:34:09,280 could wild card it and then they would all bounce all their mail, but that 432 00:34:09,280 --> 00:34:12,960 seems rude. So instead I collect the data and I give it to thousands of people 433 00:34:12,980 --> 00:34:23,220 with passive DNS effort. Anyway, noting, again, that e-criminals need DNS as 434 00:34:23,220 --> 00:34:27,620 much as the rest of us do. And not only do they need DNS, they need it to work 435 00:34:27,620 --> 00:34:33,140 as well for bad guys as for good guys. I have decided to try again. Except 436 00:34:33,140 --> 00:34:38,080 this time we're not going to create a reputation feed that is subscribed to by 437 00:34:38,080 --> 00:34:41,840 e-mail servers. No, no, no. We're going to create a reputation feed that is 438 00:34:41,840 --> 00:34:46,920 subscribed to by recursive DNS servers. The things we're going to black hole this 439 00:34:46,920 --> 00:34:50,560 time will not be the IP addresses of other people's mail servers. They will be 440 00:34:50,560 --> 00:34:56,280 the domain names that the bad guys need for e-crime. So if you go to our 441 00:34:56,280 --> 00:35:00,780 website, www.ISC.org, you'll see that while Robert was talking, I hit the 442 00:35:00,780 --> 00:35:05,260 publish button on a blog entry that describes all this. We're also headed for a 443 00:35:05,260 --> 00:35:11,820 Q&A room after this if you'd like to talk more about it then. But to start 444 00:35:11,840 --> 00:35:17,500 off, just to hit the high points on it, we will not be sued. ISC is a nonprofit, 445 00:35:18,360 --> 00:35:23,680 501C3. We do not like being sued. So we're not going to publish any content. I 446 00:35:23,680 --> 00:35:27,140 know where a lot of bad domains are, thanks to Robert, but I am not going to make a 447 00:35:27,140 --> 00:35:31,880 list of them and publish them because that's the way you get sued. Instead, we are 448 00:35:31,880 --> 00:35:36,420 going to publish patches. In fact, we have just published patches for bind 9. So 449 00:35:36,420 --> 00:35:40,800 if you're running a bind 9 recursive name server, you can apply what is about a 600 line 450 00:35:40,800 --> 00:35:48,540 unidiff and get a new feature, which is to subscribe to a response policy zone. Yes, we 451 00:35:48,540 --> 00:35:54,260 are going to use DNS zones as a way to propagate sort of policy and reputation information 452 00:35:54,260 --> 00:36:01,760 about other DNS names. It's a lot like the RBL in that sense. It doesn't slow the name 453 00:36:01,760 --> 00:36:07,880 server down. It has not caused any crashes or core dumps in the last couple of weeks 454 00:36:07,880 --> 00:36:10,780 anyway. It will be, you know, we're going to have to wait and see what happens. But 455 00:36:11,700 --> 00:36:22,640 no cert advisories yet. It's not my code. So let me think. What else? The spec is open. No 456 00:36:22,640 --> 00:36:28,280 patents, no license, no nothing. Anybody else, any other recursive name server operator and 457 00:36:28,280 --> 00:36:33,140 nominum, I'm talking about you, who wants to implement this can do so without having to pay 458 00:36:33,140 --> 00:36:40,380 any tithe. We have talked to a bunch of content providers. There's something out there called an 459 00:36:42,420 --> 00:36:50,860 HSBL. I guess first popularized by Jeff Chan of Serble. But it is like a RBL except it refers to 460 00:36:50,860 --> 00:36:55,540 the stuff after an at sign rather than before the at sign or whatever. I'm not sure what the 461 00:36:55,540 --> 00:36:59,780 right hand refers to. But anyway, it's lists of bad domain names. Spam house has one. 462 00:37:00,000 --> 00:37:04,880 Serble has one. Bunch of other companies have them. They didn't have a distribution channel for 463 00:37:04,880 --> 00:37:10,740 it. Now they do. They're going to be able to use this. Because we're creating a single universal 464 00:37:10,800 --> 00:37:17,220 format that any recursive DNS server could implement and any reputation provider can publish 465 00:37:17,220 --> 00:37:24,740 with in order to have it be that if somebody is doing something bad from a certain domain name and 466 00:37:24,740 --> 00:37:29,980 if any of your users are using let's say Windows and if they click on it, they will become 467 00:37:29,980 --> 00:37:35,220 infected and you can't stop them because we are all just barely evolved monkeys and we will click 468 00:37:35,220 --> 00:37:40,280 on anything that moves. You can make sure that the DNS won't work so that when they click on it, it 469 00:37:40,800 --> 00:37:48,500 nothing will happen for them. I hate that we have to do it this way, but since we have to do it this 470 00:37:48,500 --> 00:37:55,480 way, I've decided to make it possible. Make it easier. And to launch yet another multibillion dollar 471 00:37:55,480 --> 00:38:00,480 industry which I will not monetize in any way. My wife has asked me questions about that, too. 472 00:38:05,260 --> 00:38:10,000 So we have some time for questions. Either about Robert's stuff, which I think is really 473 00:38:10,000 --> 00:38:10,780 interesting. I want to know if you have any questions for Robert. I'm going to go ahead and 474 00:38:10,800 --> 00:38:18,640 share my stuff, which I think is sort of interesting. How many minutes? We've got 12 more minutes. 475 00:38:20,120 --> 00:38:25,280 So this room is much more full than I expected because the EFF party went until 4 a.m. 476 00:38:25,300 --> 00:38:30,920 so you must not have been there. And they're talking about this cool badge in some other room. 477 00:38:31,220 --> 00:38:34,820 Really, I thought all of you would be in there listening to that. Maybe there was no room. 478 00:38:35,180 --> 00:38:40,660 Anyway, I'm hoping that there are questions. We have time. Questions? 479 00:38:55,720 --> 00:39:05,120 He asked about covert channels via the DNS. We do notice what appears to be covert channels 480 00:39:05,120 --> 00:39:10,780 that are conducted over the DNS. And these happen to be really annoying for us. So we're 481 00:39:10,800 --> 00:39:16,660 finding we tend to blacklist them so they don't enter the database because they obviously have the 482 00:39:16,660 --> 00:39:25,060 potential to evade the cache because all of the names and data are unique. So we don't want to take 483 00:39:25,060 --> 00:39:35,000 anyone's YouTube downloads via DNS and shove them into a database. We haven't really tried to 484 00:39:38,160 --> 00:39:40,780 discover covert channels using the password of the DNS. So we're trying to figure out what 485 00:39:40,800 --> 00:39:44,440 we can do with the password of the DNS using the data, the raw data itself. As I mentioned, 486 00:39:44,540 --> 00:39:50,620 I'm not a security researcher. I just build tools that security researchers can use. So I'm afraid 487 00:39:50,620 --> 00:39:55,680 I don't have any really hot examples for you. Any other questions? 488 00:39:56,040 --> 00:40:02,840 Wait a minute. I want to follow up on that answer. So we've described a database that was built on a 489 00:40:02,840 --> 00:40:10,280 bunch of passive DNS stuff. It turns out that the raw data was our original product. The security 490 00:40:10,800 --> 00:40:15,860 information exchange is an Ethernet switch full of UDP broadcast traffic. So all the data that we 491 00:40:15,860 --> 00:40:22,660 get from our sensors, we play as UDP broadcasts on a sort of an Ethernet switch that's in our data 492 00:40:22,660 --> 00:40:29,620 center. And then we listen for that on another port on the same switch. And we invite other 493 00:40:29,620 --> 00:40:35,840 people to come plug their computers in and listen to that. So it's basically a tap point on our raw 494 00:40:35,840 --> 00:40:40,780 data stream. We not only take the raw data, but after we've run through the data stream, we 495 00:40:40,800 --> 00:40:47,240 run it through various filters like deduplication or this QR stuff or various filters are also 496 00:40:47,780 --> 00:40:52,340 touching down on VLANs on this private switch. So anybody who's in our data center and plugs a 497 00:40:52,340 --> 00:40:59,000 computer into our switch is able to see not just the raw data, but as we process it and rebroadcast 498 00:40:59,000 --> 00:41:04,240 it, they can see it as it gets more and more refined. The intermediate products. Thank you. 499 00:41:04,940 --> 00:41:10,340 So we hoped that that's all we would have to do and that somebody else would come build this database. 500 00:41:10,800 --> 00:41:15,360 In fact, I hoped Florian would come build a database because we have a lot more data than he had. 501 00:41:15,560 --> 00:41:21,660 And he was good at building databases. But he's kind of on to other projects by now. So we have built a 502 00:41:21,660 --> 00:41:26,480 database. But if you really wanted to look for covert channels, the raw data is right there. 503 00:41:27,620 --> 00:41:32,860 If you're a commercial entity, we will charge you a port fee. On the other hand, if you're a university 504 00:41:32,860 --> 00:41:38,500 researcher or hobbyist or whatever and we can vet you, we will probably waive the port fee. 505 00:41:39,100 --> 00:41:40,700 Because we want this data to get used. 506 00:41:40,800 --> 00:41:46,320 So as far as covert channel detection, the fact that we're not doing it should not cause you to think it cannot be done. 507 00:41:46,460 --> 00:41:51,880 We have more passive DNS data than anybody and we're going to keep doubling it every year until Moore's law explodes. 508 00:41:55,720 --> 00:41:57,140 More questions about anything? 509 00:42:04,320 --> 00:42:06,060 We have a bulk query. 510 00:42:06,420 --> 00:42:07,260 Oh, sure. 511 00:42:11,160 --> 00:42:12,300 We have automated queries. 512 00:42:12,960 --> 00:42:18,440 And we do have an interface for doing bulk automated queries. 513 00:42:18,640 --> 00:42:22,820 It's by a simple HTTP RESTful type interface. 514 00:42:23,020 --> 00:42:31,140 You construct a URL and download it and it will give you back either JSON or some binary format. 515 00:42:31,360 --> 00:42:34,640 Or we can even convert it to an ad hoc text format. 516 00:42:36,140 --> 00:42:40,440 We actually implemented that bulk interface before we did the web interface. 517 00:42:40,440 --> 00:42:47,840 And at some point we'll be able to allow external entities to query that interface. 518 00:42:49,740 --> 00:42:50,780 Any more questions? 519 00:42:53,680 --> 00:42:54,900 When will this be available? 520 00:42:56,100 --> 00:42:57,080 That's a good question. 521 00:42:58,880 --> 00:43:00,940 Yes, when it will be available. 522 00:43:02,160 --> 00:43:06,020 We will probably start up a beta period right now. 523 00:43:06,060 --> 00:43:09,660 We're interested in reaching out towards people that are interested. 524 00:43:09,660 --> 00:43:13,840 And hacking on a beta type interface. 525 00:43:15,840 --> 00:43:17,040 A fellow in the back. 526 00:43:18,000 --> 00:43:21,140 You mentioned that for your RRS that you built in 50%. 527 00:43:22,240 --> 00:43:25,440 Is that, what is in that 50% that you're building right now? 528 00:43:25,900 --> 00:43:28,760 He asked what is in the 50% of the data. 529 00:43:29,200 --> 00:43:29,680 Sorry? 530 00:43:29,880 --> 00:43:30,200 . 531 00:43:30,800 --> 00:43:31,280 Okay. 532 00:43:31,920 --> 00:43:35,360 He asked what is in the 50% of the data that we throw away. 533 00:43:36,280 --> 00:43:39,640 The big thing that I noticed when I was building this is that, 534 00:43:40,320 --> 00:43:42,780 Spamhouse.org generates a lot of data. 535 00:43:42,960 --> 00:43:49,820 Because it doesn't follow the usual distribution of data that it normally gets. 536 00:43:50,160 --> 00:43:51,340 You know, a typical DNA. 537 00:43:52,540 --> 00:43:53,100 Okay. 538 00:43:53,460 --> 00:43:59,200 You'll typically see about an 80 to 90% cache hit ratio for your typical DNS server. 539 00:43:59,380 --> 00:44:04,580 But certain zones in particular generate a huge number of unique queries. 540 00:44:04,860 --> 00:44:07,900 And Spamhouse is a very good example. 541 00:44:07,980 --> 00:44:09,160 Because it's DNSBL. 542 00:44:09,640 --> 00:44:13,220 And it's the key that's being queried as an IP address. 543 00:44:13,420 --> 00:44:18,300 And botnets are constantly generating all these different queries. 544 00:44:19,220 --> 00:44:20,860 And then once I had done that, 545 00:44:20,980 --> 00:44:26,900 I had implemented a blacklist that allows us to exclude certain domains and subdomains from further processing. 546 00:44:27,100 --> 00:44:33,400 And then I started sorting by the domains that were generating the most data. 547 00:44:33,640 --> 00:44:35,060 And I found things. 548 00:44:35,420 --> 00:44:38,520 I believe Yahoo has a load balancer. 549 00:44:39,640 --> 00:44:43,860 And it chucks a ton of address records into a query. 550 00:44:44,200 --> 00:44:47,480 And there's this combinatoric explosion of different possibilities. 551 00:44:48,000 --> 00:44:54,820 And that was such a large volume that I blacklisted that particular zone that they used as well. 552 00:44:56,320 --> 00:44:57,620 Want to tell them about Facebook? 553 00:44:58,120 --> 00:44:59,460 Oh, Facebook. That's a good one. 554 00:45:00,160 --> 00:45:02,060 Facebook has a chat feature. 555 00:45:02,780 --> 00:45:05,240 Now they have this web chat thing. 556 00:45:05,420 --> 00:45:07,040 You can instant message your friends. 557 00:45:07,040 --> 00:45:15,220 And the neat thing about Ajax is that the web browser developers have decided to implement a limit on the number of persistent connections you can make. 558 00:45:15,640 --> 00:45:16,940 And to get around this, 559 00:45:17,500 --> 00:45:24,260 web developers have discovered that you can use a wildcard CNAME record and use different names for your server. 560 00:45:25,880 --> 00:45:29,840 So someone at Facebook decided to use this in order to make multiple connections. 561 00:45:29,940 --> 00:45:33,940 Because you could have tons of Facebook profiles open in your same browser session. 562 00:45:34,040 --> 00:45:36,640 You need to chat with all of your multiple identities. 563 00:45:37,040 --> 00:45:46,020 And the fellow who wrote the code that generates the new name to use decided to use a 10 digit random number. 564 00:45:47,380 --> 00:45:54,580 So we ended up with I think around 5 megabits continuously of these Facebook records that were being looked up. 565 00:45:54,760 --> 00:45:56,100 They were totally useless. 566 00:45:56,420 --> 00:45:58,140 And they had a one hour TTL. 567 00:45:58,240 --> 00:46:01,820 So I can't imagine what's happening to the recursives that are kicking out all of those records. 568 00:46:02,060 --> 00:46:03,100 So we blacklisted that. 569 00:46:03,160 --> 00:46:05,140 That's a huge portion. 570 00:46:07,160 --> 00:46:07,880 Let's see. 571 00:46:08,020 --> 00:46:15,260 The other types of filtering that we do is we are not really interested in generically named pointers records. 572 00:46:16,080 --> 00:46:21,560 So your ADSL post 192 whatever bell south dot net. 573 00:46:21,800 --> 00:46:23,840 Well there's tons of that. 574 00:46:24,120 --> 00:46:27,780 So we use something called the enemies list to filter that. 575 00:46:27,860 --> 00:46:36,220 And there's a very nice fellow by the name of Steven Champion who maintains approximately 50,000 regular expressions that we use to filter that data. 576 00:46:36,460 --> 00:46:37,020 So that's a huge part of it. 577 00:46:37,040 --> 00:46:45,980 And that accounts for about 50% once we do the very aggressive caching. 578 00:46:46,200 --> 00:46:47,340 What was your follow up question? 579 00:46:50,060 --> 00:46:50,720 . 580 00:46:57,180 --> 00:47:02,120 TTL is not a very strong part of the uniqueness of an RR set. 581 00:47:02,340 --> 00:47:05,600 So we don't actually store that. 582 00:47:05,600 --> 00:47:11,400 In certain of our intermediate products we do maintain the TTL. 583 00:47:11,480 --> 00:47:18,560 But we don't actually insert that into the database because it can cause a lot of copies of the RR set to occur. 584 00:47:20,840 --> 00:47:21,520 This fellow. 585 00:47:22,540 --> 00:47:23,060 . 586 00:47:29,920 --> 00:47:31,200 The forward look. 587 00:47:31,280 --> 00:47:31,500 . 588 00:47:32,640 --> 00:47:40,880 He asked if we had the ability to look up quad A records in the forward interface and the ability to look up IPv6 prefixes in the reverse. 589 00:47:41,400 --> 00:47:42,340 We support. 590 00:47:42,980 --> 00:47:44,160 It's fully generic. 591 00:47:44,380 --> 00:47:47,140 We support all possible DNS RR types. 592 00:47:47,320 --> 00:47:47,980 It's just an integer. 593 00:47:48,180 --> 00:47:52,860 And the web interface has some cute little drop downs to select the most commonly used type. 594 00:47:53,260 --> 00:47:58,320 And the reverse search is done based on a byte prefix. 595 00:47:58,320 --> 00:48:02,940 So we can support IPv6 prefixes, IPv4 prefixes. 596 00:48:03,080 --> 00:48:06,500 We can start doing name prefixes and other generic data. 597 00:48:07,020 --> 00:48:08,800 I believe we're almost out of time. 598 00:48:08,960 --> 00:48:09,820 Do we have any. 599 00:48:10,700 --> 00:48:11,240 Okay. 600 00:48:11,400 --> 00:48:12,120 More questions. 601 00:48:13,640 --> 00:48:14,180 Yes. 602 00:48:14,460 --> 00:48:15,000 . 603 00:48:17,940 --> 00:48:18,480 Sure. 604 00:48:19,660 --> 00:48:21,380 You can't search for regular expressions. 605 00:48:21,560 --> 00:48:26,020 But you can certainly search for exact matches or prefixes. 606 00:48:26,640 --> 00:48:27,180 . 607 00:48:30,440 --> 00:48:30,880 . 608 00:48:35,300 --> 00:48:35,740 . 609 00:48:39,900 --> 00:48:40,340 . 610 00:48:42,180 --> 00:48:43,700 Questions about the sensor network? 611 00:48:47,320 --> 00:48:51,000 It's true that we can't name all of the parties who are giving us data. 612 00:48:52,060 --> 00:48:55,460 But on the other hand, some of you should be giving us data. 613 00:48:55,720 --> 00:48:57,240 This is all open source stuff. 614 00:48:57,240 --> 00:48:58,740 And you can see it's for a good cause. 615 00:48:58,960 --> 00:49:01,360 So take a look at our website. 616 00:49:01,540 --> 00:49:03,000 SIE.ISC.org. 617 00:49:03,100 --> 00:49:04,860 And find out if you should be running a sensor. 618 00:49:05,560 --> 00:49:07,980 Some very large ISPs are running sensors. 619 00:49:08,560 --> 00:49:10,380 Some universities are running sensors. 620 00:49:10,580 --> 00:49:15,140 I love it when we get a sensor that covers an underground dorm complex. 621 00:49:15,500 --> 00:49:17,540 Because those people really will click on anything. 622 00:49:18,500 --> 00:49:18,980 . 623 00:49:18,980 --> 00:49:21,040 But we always need more. 624 00:49:22,280 --> 00:49:25,160 I'm not going to miss this opportunity to do some outreach. 625 00:49:25,480 --> 00:49:27,120 If you have data, please share it. 626 00:49:27,120 --> 00:49:28,260 Not just recursive servers. 627 00:49:28,400 --> 00:49:31,620 If you have authority servers, we can take your queries. 628 00:49:31,780 --> 00:49:32,780 I don't care about your answers. 629 00:49:32,840 --> 00:49:34,840 Because those are predictable based on your zone content. 630 00:49:35,220 --> 00:49:37,200 But I'd love your query stream on authority servers. 631 00:49:37,360 --> 00:49:39,940 I'd love your query and response stream on your recursive servers. 632 00:49:41,480 --> 00:49:44,800 We're going to open up SIE to other data formats soon. 633 00:49:45,660 --> 00:49:47,400 We're going to be looking for NetFlow. 634 00:49:48,040 --> 00:49:48,520 DarkNet. 635 00:49:49,480 --> 00:49:49,960 Whois. 636 00:49:50,060 --> 00:49:51,600 Since we've got somebody from Aaron here. 637 00:49:52,520 --> 00:49:56,420 All kinds of stuff that should be shared in order that we can cross-correlate. 638 00:49:56,620 --> 00:49:57,100 . 639 00:49:57,120 --> 00:50:07,440 Andrew Freed last year gave a talk about how he was able to use SIE data and the passive DNS and our spam trap feed to do cross-correlation and find botnets. 640 00:50:07,740 --> 00:50:20,100 So if you have spam traps or you might be willing to start up a spam trap, talk to us and we'll help you sort of extract all the interesting body URLs and format them in the format we need and then we'll share them with the security community. 641 00:50:20,560 --> 00:50:27,100 So the answer is the sensor network is not public because people don't look at it. 642 00:50:27,120 --> 00:50:28,940 They don't like to be thought of as targets. 643 00:50:29,160 --> 00:50:30,620 They don't want to paint targets on their back. 644 00:50:31,120 --> 00:50:34,020 But we won't tell anyone who you are if you're sending us data. 645 00:50:34,140 --> 00:50:35,040 So please send us data. 646 00:50:38,520 --> 00:50:39,900 To have some concrete numbers. 647 00:50:40,180 --> 00:50:40,780 Oh, we're done. 648 00:50:40,960 --> 00:50:41,300 All right. 649 00:50:43,680 --> 00:50:44,080 . 650 00:50:45,400 --> 00:50:45,800 . 651 00:50:45,800 --> 00:50:46,340 .