00:00:00.234 --> 00:00:04.705 I'm Luke young, I'm a mastered student at a big university that 00:00:04.705 --> 00:00:10.711 has nothing to do with this talk. I currently work in the 00:00:13.881 --> 00:00:19.887 Bay area. Is this better? Sorry about that. I'm the founder of 00:00:25.325 --> 00:00:30.864 hydro-labs which has funded this research. It's funny how you can 00:00:30.864 --> 00:00:36.403 do that when you're the only employee. In case you didn't 00:00:36.403 --> 00:00:40.941 catch that, it means I'm not hiring unless you want to work 00:00:40.941 --> 00:00:44.011 for a 19 year-old kid for minimum wage. If you do, there 00:00:44.011 --> 00:00:50.083 is my email address. If you have questions about the research or 00:00:50.083 --> 00:00:53.754 want to send me legal threats or both. That's my email. Or you 00:00:53.754 --> 00:00:58.158 can snail mail on the project domain information which is at 00:00:58.158 --> 00:01:05.365 the end. A quick run down. I'm going to talk about a bit flip 00:01:05.365 --> 00:01:09.336 and the history of exploitation. After that bit squadding. 00:01:09.336 --> 00:01:16.977 Finally move into my research on bit flips via bit squatting and 00:01:16.977 --> 00:01:24.518 finish up with complete code release -- followed by Q and A. 00:01:24.518 --> 00:01:28.155 A bit flip occurs when a bit flips from a 1 to a 0 or 0 to 1. 00:01:28.155 --> 00:01:35.128 It can happen for a variety of reason, heat, electrical 00:01:35.128 --> 00:01:38.799 problems, radio active contamination, I'm not going to 00:01:38.799 --> 00:01:43.804 focus on what causes it but how we can exploit them. In 2003 a 00:01:43.804 --> 00:01:45.806 paper was published by Princeton, they took a 50-watt 00:01:45.806 --> 00:01:47.808 lightbulb to intentionally produce bit flips and escape the 00:01:47.808 --> 00:01:50.510 VDM. In 2014 a paper was published (audio blipped) 00:01:50.510 --> 00:01:56.516 flushing and induce bit flips. You may have heard of this by 00:02:14.434 --> 00:02:20.440 Roman. They showed it possible to obtain a bit flip to get -- 00:02:23.543 --> 00:02:29.549 privileges. Bit squatting was a named coined by DINANBERG. It's 00:02:37.758 --> 00:02:41.194 the purchasing domains which are one bit away from the legitimate 00:02:41.194 --> 00:02:48.635 domain in the hopes that a bit flip will occur and end up in 00:02:48.635 --> 00:02:53.507 your domain instead of the original intended domain. We 00:02:53.507 --> 00:02:58.745 take CMN dot update com. If the last 0 in the first end flips 00:02:58.745 --> 00:03:06.486 from a 0 to a 1 it changes to CON.COM. Normally these do mains 00:03:06.486 --> 00:03:11.391 aren't registered and they will fail or the user will never 00:03:11.391 --> 00:03:13.393 notice that something happened. The bit squat purchases these 00:03:13.393 --> 00:03:20.801 domains. How do you come up with all the possible bit squats. If 00:03:20.801 --> 00:03:27.474 we take a legitimate domain, you can see the binary 00:03:27.474 --> 00:03:30.610 representation of one of the letter, E for example. We can 00:03:30.610 --> 00:03:34.347 throw away bit flips that occur in the first bit flip because 00:03:34.347 --> 00:03:40.153 it's always going to be 0 and we can throw away flips that occur 00:03:40.153 --> 00:03:45.959 in the third bit. That's because this represents the case of the 00:03:45.959 --> 00:03:49.896 character and in domain names this is irrelevant. 00:03:49.896 --> 00:03:53.633 Unfortunately this doesn't leave us with 6 possible bit flips. 00:03:53.633 --> 00:03:57.003 Domain mains only have several valid characters. In the case of 00:03:57.003 --> 00:04:03.443 E this gives five possible flips. There are exceptions to 00:04:03.443 --> 00:04:09.449 the rule. If a flip word occurs it changes to a different 00:04:12.986 --> 00:04:15.889 character. An M to a dot or a slash to an 0. These can happen 00:04:15.889 --> 00:04:19.493 where a flip occurs and it completes to a valid domain or a 00:04:19.493 --> 00:04:25.499 sub domain can change to dub dub dub and DEFCON dot org. These 00:04:25.499 --> 00:04:30.670 are researched at DEFCON 21 by Jason from Cisco. He explored 00:04:30.670 --> 00:04:32.672 this in dot exchange and dot cloud. So using this 00:04:32.672 --> 00:04:38.545 information, we can find there is 43 possible top level bit 00:04:38.545 --> 00:04:44.551 squats of dub dub dub DEFCON.ORG. I generated a -- of 00:04:54.094 --> 00:05:00.333 look up. It's linked on the project site at the end. Quickly 00:05:00.333 --> 00:05:03.804 note the previous bit squatting before my research. During 00:05:03.804 --> 00:05:07.474 DEFCON 19, the term bit squatting was termed and more 00:05:07.474 --> 00:05:13.580 recently -- there was more extensive research into bit 00:05:13.580 --> 00:05:18.952 squatting. What is project bit flip? My research into how do 00:05:18.952 --> 00:05:23.223 you exploit a bit squat. It makes sense (audio blipped) and 00:05:23.223 --> 00:05:27.160 how it's sent to potentially the wrong person. How do you exploit 00:05:27.160 --> 00:05:32.999 that to pivot somewhere. Let's take an example. Let's imagine 00:05:32.999 --> 00:05:36.870 an internal site, a corporate Wiki or system that includes the 00:05:36.870 --> 00:05:39.039 J query. Since you're browser is loading this page for the first 00:05:39.039 --> 00:05:41.241 time, it doesn't know who code dot J query is. It's going to 00:05:41.241 --> 00:05:43.710 initiate a request to the dissolver. This is Google GMS, 00:05:43.710 --> 00:05:46.580 Comcast, et cetera. Now a bit flip occurs. Co-dot J query has 00:05:46.580 --> 00:05:54.187 become queasy. This can happen in memory on the device running 00:05:54.187 --> 00:06:00.193 the browser or in the memory of the NIC or in transit or in the 00:06:13.506 --> 00:06:18.111 memory of the DNS resolver itself. The DNS resolver doesn't 00:06:18.111 --> 00:06:20.947 know who is in charge of D queasy so it's going to have a 00:06:20.947 --> 00:06:23.750 name server look up and send that and the DNS answers with 00:06:23.750 --> 00:06:29.756 NS1 and NS2 bit flip. What is this do main. It's the domain I 00:06:32.392 --> 00:06:38.265 purchased to act as the control domain for the entire site. It 00:06:38.265 --> 00:06:45.872 has a one in it because someone owned bit flip .com. These 00:06:45.872 --> 00:06:51.311 answers get sent (audio blipped) going to use to send a query to 00:06:51.311 --> 00:06:56.049 the project bit flip server. It's going to ask for J 00:06:56.049 --> 00:07:01.588 queasy.com. This deviates from a standard DNS question and 00:07:01.588 --> 00:07:06.660 answer. We send back two answers. One for code dot J 00:07:06.660 --> 00:07:11.598 query and one for queasy. We don't know where the bit flip 00:07:11.598 --> 00:07:16.436 resolves. We send both back and let the resolver pick the 00:07:16.436 --> 00:07:20.807 correct one and ignore the other. The resolver sends this 00:07:20.807 --> 00:07:25.645 back to the browser which (audio blipped) get request. If you're 00:07:25.645 --> 00:07:29.749 attentive you may have noticed two different answers had 00:07:29.749 --> 00:07:35.755 different IP addresses. This is because it allows us to 00:07:39.059 --> 00:07:42.829 determine which type of bit flip occurs most commonly. This get 00:07:42.829 --> 00:07:47.767 request is different depending on which was accepted by the DNS 00:07:47.767 --> 00:07:53.239 resolver. Get request gets sent to the project server. Instead 00:07:53.239 --> 00:08:00.914 of answering this with a 404 or 200, we're going to be needy and 00:08:00.914 --> 00:08:05.285 send back a 301 moved permanently. This permanently 00:08:05.285 --> 00:08:11.858 caches the bit flip in the browsers cache. It goes to the 00:08:11.858 --> 00:08:18.431 server even when a bit flip didn't occur. It's a unique sub 00:08:18.431 --> 00:08:25.405 domain. The browser doesn't know who is in charge of the sub 00:08:25.405 --> 00:08:29.509 domain. When it gets the request it issues another GNS question 00:08:29.509 --> 00:08:37.016 and sends it through to project bit flip. This allows me to tie 00:08:37.016 --> 00:08:41.921 a user's browser with the DNS resolver. There is no way to 00:08:41.921 --> 00:08:49.596 tell which browser initiated a specific query. Following this 00:08:49.596 --> 00:08:52.532 we have a standard path. The answer goes back to the browser. 00:08:52.532 --> 00:08:58.538 And issues a -- and we find the answer with a 200 and send back 00:09:00.974 --> 00:09:07.847 this tracking Java script. I didn't ask for that. Too bad. 00:09:07.847 --> 00:09:11.785 Instead we're going to send back this which the browser believing 00:09:11.785 --> 00:09:16.623 that it originated from J dot query .com is now from the 00:09:16.623 --> 00:09:23.029 internal site. Internal Wiki. Anything with important data on 00:09:23.029 --> 00:09:26.566 it. Or any site that a user is tricked into believing 00:09:26.566 --> 00:09:32.572 credentials are on the original site. How do you build all this? 00:09:34.641 --> 00:09:40.647 The second tool is BFDNS, a DNS server designed to answer bit 00:09:45.318 --> 00:09:51.324 squad queries and BF dub dub dub. It has a bunch of PHP 00:09:56.896 --> 00:10:00.767 scripts used to answer the tracking java script. What does 00:10:00.767 --> 00:10:05.205 the java script tract? Everything that you can track. 00:10:05.205 --> 00:10:09.008 It pulls the users installed plug ins, time zone, language, 00:10:09.008 --> 00:10:14.314 document title, screen size, do not track cookie, the installed 00:10:14.314 --> 00:10:18.118 fonts and the local IP addresses on the system via web RTC. Some 00:10:18.118 --> 00:10:24.123 of you may have seen this from the beef talk. There is a way to 00:10:26.192 --> 00:10:31.598 pull the protocol and it contains all the local IP 00:10:31.598 --> 00:10:35.568 addresses on the system and java has access to those. These are 00:10:35.568 --> 00:10:41.241 internal LANIPs. In addition to external IPs if your computer is 00:10:41.241 --> 00:10:46.446 directly connect today the internet. It pulls the cookie 00:10:46.446 --> 00:10:51.417 names. You can pull the cookie values, I don't want to get 00:10:51.417 --> 00:10:57.423 screwed so I just pull the 256 hash of them. We need a place to 00:10:59.692 --> 00:11:03.329 host this. We need somewhere that supports multiple addresses 00:11:03.329 --> 00:11:07.567 so we can answer each question with a different address. We 00:11:07.567 --> 00:11:10.537 want IPV6 support. And somewhere that bandwidth is cheap incase 00:11:10.537 --> 00:11:17.176 of a spike. If a big DNS resolver caches a results like 00:11:17.176 --> 00:11:24.617 Google DNS or Comcast. Because it would serve it to a lot of 00:11:24.617 --> 00:11:28.755 customers. I wanted a smaller company incase there were 00:11:28.755 --> 00:11:32.025 letters or legal threats. I settled on ram node. 3 terabytes 00:11:32.025 --> 00:11:38.031 of bandwidth, 15 bucks a month. We need domains. Other than the 00:11:47.907 --> 00:11:51.477 project domain. I don't know how many of you know a college 00:11:51.477 --> 00:11:53.479 student but we're lazy. Whatever option that requires the least 00:11:53.479 --> 00:11:58.918 amount of work is the one we take. Unlike doing a list of 00:11:58.918 --> 00:12:06.426 domain sets, I fired up a web proxy and browsed the internet 00:12:06.426 --> 00:12:11.331 for a day. At the end of the day I looked at the top sites and 00:12:11.331 --> 00:12:17.337 looked for ones with interesting data. I took care to only grab 00:12:27.246 --> 00:12:30.083 sites that would yield interesting data and avoid sites 00:12:30.083 --> 00:12:35.755 that would have data such as HIPAA or PCI. The first site I 00:12:35.755 --> 00:12:39.626 bought is Google user.com. Serves images for Google sites. 00:12:39.626 --> 00:12:45.765 It's a really long domain name. There is a lot of opportunities 00:12:45.765 --> 00:12:51.904 for a bit flip to occur in memory when browsers copy the 00:12:51.904 --> 00:12:56.042 domain name multiple times. In fact here is all of the possible 00:12:56.042 --> 00:13:02.448 bit flips or the 72 of them I was able to buy. There are 79 00:13:02.448 --> 00:13:07.153 valid ones. I hadn't set up a proper server. So I pointed to 00:13:07.153 --> 00:13:13.292 the VPS and ran net cat on port 80. If you're in IT you have an 00:13:13.292 --> 00:13:18.898 oh shit moment. Run on the wrong server. Shut down all but the 00:13:18.898 --> 00:13:20.900 server you wanted to. If you can't read the tiny text that is 00:13:20.900 --> 00:13:22.902 an attachment for Google user content. It serves all mail 00:13:22.902 --> 00:13:28.908 attachments for Google and Google apps. Oops. By their very 00:13:42.755 --> 00:13:46.693 nature the links are valid without session cookies. Each 00:13:46.693 --> 00:13:50.229 misdirected request I can grab that attachment myself if I 00:13:50.229 --> 00:13:56.002 wanted to. I decided to look more at the domain I bought and 00:13:56.002 --> 00:13:59.872 what else is served on it at this point. It serves not just 00:13:59.872 --> 00:14:04.143 mail attachments but the authentication for Google fonts 00:14:04.143 --> 00:14:06.979 and translated pages. There is no valuable data on that. I 00:14:06.979 --> 00:14:09.349 looked at Amazon. Cloud front dot net. It serves a lot of 00:14:09.349 --> 00:14:11.350 really popular sites like ESPN, Amazon itself and more. 43 00:14:11.350 --> 00:14:13.352 possible bit flips. 40 were registered and I registered the 00:14:13.352 --> 00:14:15.354 rest. I looked at Amazon AWS.com. Sub domains of Amazon. 00:14:15.354 --> 00:14:17.824 Elastic load bouncing and EC2. This is one of the few domains I 00:14:17.824 --> 00:14:20.393 came across in research that a lot of the bit flips were owned 00:14:20.393 --> 00:14:22.962 for. The other one is IKIMI who owned all of their bit flips. 00:14:22.962 --> 00:14:25.331 Amazon owned 33 out of possible 38 bit flips. The rest were 00:14:25.331 --> 00:14:27.333 registered by someone else. Amazon ask .com. Of course I 00:14:27.333 --> 00:14:29.635 wasn't satisfied with the single bit flip so I decided to decide 00:14:29.635 --> 00:14:33.172 where the dot changes to N. Moving on from there, I decided 00:14:33.172 --> 00:14:39.178 to take on doubleclick dot net. If you're familiar with ad 00:14:48.755 --> 00:14:54.761 network, this serves Google's ad network and serves them over 00:15:34.567 --> 00:15:40.573 java script. 19 were registered and I registered the other 26. I 00:15:43.342 --> 00:15:49.949 hit apple.com. A lot of these flips were valid sites and not 00:15:49.949 --> 00:15:57.690 owned as bit flips. So I grabbed one of them. Apple G.com. I took 00:15:57.690 --> 00:16:04.831 a look at I club.com next. If you have an I operating system 00:16:04.831 --> 00:16:10.369 device, it checks in here regularly for back ups, contacts 00:16:10.369 --> 00:16:14.006 and more. Additionally most apple accounts have an I 00:16:14.006 --> 00:16:18.077 cloud.com email address delivered to this domain. I 00:16:18.077 --> 00:16:24.016 looked at web dub. I don't know how many of you heard of J query 00:16:24.016 --> 00:16:29.155 it's a compatibility layer that makes IEs suck less. Used by 70 00:16:29.155 --> 00:16:36.362 percent of the top 10 --> 000 sites making it a good target. I 00:16:36.362 --> 00:16:41.267 registered the 15 available of that. I hit DISCUS.com. And 00:16:41.267 --> 00:16:48.040 finally the peak, there is 24 purchased. The peak of my web 00:16:48.040 --> 00:16:54.380 Deb is Google analytics.com. I guess you know what this is. 00:16:54.380 --> 00:16:58.484 Serves analytics for every site ever. The most widely used 00:16:58.484 --> 00:17:04.457 statistics website service in the world. I wasn't the first 00:17:04.457 --> 00:17:09.262 person to have this idea. 53 of the bit flips were registered by 00:17:09.262 --> 00:17:15.034 another party but I grabbed the remaining 10. Moving on, 00:17:15.034 --> 00:17:22.575 static.com the sales force CDN. 42 bit swaps, I bought all of 00:17:22.575 --> 00:17:29.248 them. I'm going to pick up the pace. MS8067 Ajax, serves a lot 00:17:29.248 --> 00:17:35.254 of Microsoft sites. 38 domains. Google API, java script, another 00:17:40.526 --> 00:17:46.132 22 out of 39 registered. G static.com. This is fun. Google 00:17:46.132 --> 00:17:49.769 static content hosting. The chrome internet conductivity 00:17:49.769 --> 00:17:53.039 test. When chrome says you're online now, it's hitting G 00:17:53.039 --> 00:17:59.045 static.com. It is the Chromecast login page and other stuff. The 00:18:03.582 --> 00:18:05.585 thing that makes this interesting is this is one of 00:18:05.585 --> 00:18:09.155 the domains purchased by -- in their research and it was freely 00:18:09.155 --> 00:18:15.161 available. I was able to grab 19 out of 30 possible. Finally, 00:18:18.164 --> 00:18:24.170 Facebook CDN, YouTube, Twitter and there we go. Now, that was 00:18:26.572 --> 00:18:29.842 337 domains. I know you were counting. You're asking yourself 00:18:29.842 --> 00:18:32.244 how did I pay for all of those? Coupons. I don't know if you 00:18:32.244 --> 00:18:34.246 have seen the TLC show extreme couponing. That was the 00:18:34.246 --> 00:18:36.749 documentary of my life for a month. I ran out of coupons and 00:18:36.749 --> 00:18:42.021 found one on one. Ninety-nine-cent domain names. 00:18:42.021 --> 00:18:48.027 The first one is 99-cents and when you try to buy the second 00:18:56.836 --> 00:19:04.043 one it charges you $11. If you start the process in an in cog 00:19:04.043 --> 00:19:09.348 knee toe window and login half way through, it's still 00:19:09.348 --> 00:19:14.687 99-cents. After that, five minutes per domain. I got this 00:19:14.687 --> 00:19:20.526 email. You have exceeded the limit of our special offer. The 00:19:20.526 --> 00:19:24.764 rest will be canceled. Security team. And that's when I stopped 00:19:24.764 --> 00:19:32.171 buying domain names. I bought 89 domains from GoDaddy. 255 from 00:19:32.171 --> 00:19:39.211 one in one. At an average cost of 162 per domain, 500 and $45. 00:19:39.211 --> 00:19:45.217 The next thing I realize is I was missing out on a lot of 00:19:47.586 --> 00:19:54.427 data. This traffic was coming in over SSL. I decided to buy SSL 00:19:54.427 --> 00:19:59.131 certificates, too. If you're familiar, you know that I need a 00:19:59.131 --> 00:20:04.537 wildcard SSL certificate. I don't know the sub domains that 00:20:04.537 --> 00:20:09.608 are going to requested for each. Wildcard SSL certificates can be 00:20:09.608 --> 00:20:15.214 expensive. $595. You get bulk discounts and other things. If 00:20:15.214 --> 00:20:22.421 you do easy math that is over 200 grand which I done have 00:20:22.421 --> 00:20:27.359 lying around for a fun side project. I was able to find a 00:20:27.359 --> 00:20:30.062 solution. Some of you may have heard of them from other talks. 00:20:30.062 --> 00:20:36.001 Start SSL is a unique model. A one time fee and get SSL 00:20:36.001 --> 00:20:39.739 certificates from them at no additional cost. At a cost of 00:20:39.739 --> 00:20:45.745 $60 I got wildcard SSL certificates. Because this is a 00:20:48.080 --> 00:20:53.052 unique model, start SSL has a very manual process. No API for 00:20:53.052 --> 00:20:55.955 requesting certificates or anything like that. It makes 00:20:55.955 --> 00:21:00.960 requesting them really annoying for 337 domains because you have 00:21:00.960 --> 00:21:04.764 to do domain verification on all. It's more likely that 00:21:04.764 --> 00:21:10.069 someone is going to notice what you're doing. 17 of the domains 00:21:10.069 --> 00:21:14.807 were flagged for manual review by star SSL who then approved 00:21:14.807 --> 00:21:20.312 all of them. By four different employees of the company I might 00:21:20.312 --> 00:21:26.352 add. 103 certificates that I was issued. You might have noticed 00:21:26.352 --> 00:21:32.391 that I bought 337 domains and only got 103 certificates. There 00:21:32.391 --> 00:21:38.164 is a good reason for that. On August 25th I received this 00:21:38.164 --> 00:21:41.700 email. My login certificate was revoked for abuse. Please 00:21:41.700 --> 00:21:45.738 contact us. Reaching out to start SSL I received the 00:21:45.738 --> 00:21:49.375 following quotes. For high profile names only the name 00:21:49.375 --> 00:21:53.479 owner should be able to get certificates for it and those 00:21:53.479 --> 00:21:56.649 resembling them closely never issued. Most certificates 00:21:56.649 --> 00:22:03.322 shouldn't have been issued to start with. Oops. Here is the 00:22:03.322 --> 00:22:06.225 actual excerpt from the certificate policy. Star come 00:22:06.225 --> 00:22:12.231 will not infuse domain names for misleading or ... (reading from 00:22:16.635 --> 00:22:21.073 board) ... I guess the fact that I owned domains with their 00:22:21.073 --> 00:22:25.077 example in it is probably not so great. I went back and forth 00:22:25.077 --> 00:22:28.814 with the CTO of star COM letting them not about the project and 00:22:28.814 --> 00:22:32.885 suggesting only the Google certificates. Here was the time 00:22:32.885 --> 00:22:38.924 line on that. I don't know how many of you have been to a stand 00:22:38.924 --> 00:22:43.362 up comedy show. You don't take your phone out during someone's 00:22:43.362 --> 00:22:49.435 set. We get made fun of by the comedian but it's rude. I was at 00:22:49.435 --> 00:22:54.440 a comedy show and my phone started vibrating and kept 00:22:54.440 --> 00:23:01.247 vibrating for five minutes straight. When the set ended I 00:23:01.247 --> 00:23:04.183 took out my phone and saw this. They revoked 81 certificates 00:23:04.183 --> 00:23:08.020 with two emails for each one. Now I'd like to note that I had 00:23:08.020 --> 00:23:13.192 full wildcard certificates for all these domains for two months 00:23:13.192 --> 00:23:18.897 before they were added to the revocation list. Not that that 00:23:18.897 --> 00:23:24.603 matters. A lot of browsers like Google chrome doesn't check. If 00:23:24.603 --> 00:23:29.275 I were malicious I could continue to use these 00:23:29.275 --> 00:23:34.446 certificates at the risk of being sued. They left 22 00:23:34.446 --> 00:23:37.883 certificates unrevoked. When I inquired about why, I received 00:23:37.883 --> 00:23:41.253 the response everything we haven't revoked so far is 00:23:41.253 --> 00:23:44.490 considered not problematic and left them to expire naturally. 00:23:44.490 --> 00:23:50.696 All the domains remaining seemed to not contain the trademark 00:23:50.696 --> 00:23:55.567 name of the company that is it. I don't know that for a fact 00:23:55.567 --> 00:24:00.372 that's the reason they were left behind. The future. The EFF 00:24:00.372 --> 00:24:04.777 announced the free automated certificate authority called 00:24:04.777 --> 00:24:06.812 let's encrypt. Using that it may be easier to do exploitation. 00:24:06.812 --> 00:24:12.117 It's an automated process and you don't have manual review. 00:24:12.117 --> 00:24:16.755 They don't support wildcard certificates but I'm looking 00:24:16.755 --> 00:24:24.363 into it. You can use a larger provider at a much higher cost 00:24:24.363 --> 00:24:29.601 depending on how much money you have. Those certificate 00:24:29.601 --> 00:24:35.140 revocations begged the question, did anyone else even notice? 00:24:35.140 --> 00:24:38.577 Well, the first and only public case of someone notices was by a 00:24:38.577 --> 00:24:43.382 third party. Noted that all the bit flips of G static.com were 00:24:43.382 --> 00:24:49.722 registered by the same individual with name servers at 00:24:49.722 --> 00:24:53.959 bit flip.com. I thought that was it. I went to a friend's house 00:24:53.959 --> 00:25:00.399 and I checked on the site and saw this. I logged in to the 00:25:00.399 --> 00:25:06.071 server console and found out it was allow and well. I figured I 00:25:06.071 --> 00:25:11.243 broke the DNS server or it was handling packets wrong and I hit 00:25:11.243 --> 00:25:17.249 the Google DNS check and it worked. After a bit of further 00:25:29.561 --> 00:25:33.365 investigation and panicked calls to friends in other states, I 00:25:33.365 --> 00:25:35.834 wasn't crazy. Comcast DNS server was refusing to answer requests 00:25:35.834 --> 00:25:39.004 for bit flip.com. Only for A and quad A records. Here is the 00:25:39.004 --> 00:25:41.473 weirdest part. The requests for forwarded to the server, the 00:25:41.473 --> 00:25:43.675 answers were not getting forwarded back to clients. This 00:25:43.675 --> 00:25:47.646 makes it hard to pinpoint when they put this block in place and 00:25:47.646 --> 00:25:50.349 I still don't know. I tried to reach out through the business 00:25:50.349 --> 00:25:55.187 class support line and never got an answer. Short while after 00:25:55.187 --> 00:25:58.891 noticing the Comcast incident I got a notice that my credit card 00:25:58.891 --> 00:26:03.662 payment didn't go through. I called the bank. They were 00:26:03.662 --> 00:26:09.468 approving the transaction and I had adequate funds. I reached 00:26:09.468 --> 00:26:12.538 out to the CFO and he received the response that we have reason 00:26:12.538 --> 00:26:17.676 to believe that card has been associated with fraudulent 00:26:17.676 --> 00:26:25.250 activity. This is odd, that card was only used with five vendors. 00:26:25.250 --> 00:26:31.523 And only one of them, this server was purchased through 00:26:31.523 --> 00:26:38.096 stripe. Stripe not the bank was refusing the transaction. I 00:26:38.096 --> 00:26:41.667 reached out to stripe on my own and they said we are blocking 00:26:41.667 --> 00:26:46.839 due to the level of risk on this card that we're not willing to 00:26:46.839 --> 00:26:50.943 take. This is a very vague reason but for security purposes 00:26:50.943 --> 00:26:55.013 I'm limited to how much information I can give out. I 00:26:55.013 --> 00:26:59.852 paid for the month on another card and paid through the end of 00:26:59.852 --> 00:27:04.523 August ahead of time in case it were to occur again. I want to 00:27:04.523 --> 00:27:08.093 take a second and have everyone look at this slide and tell me 00:27:08.093 --> 00:27:15.567 what is wrong with this slide? I put my bank on there. About two 00:27:15.567 --> 00:27:19.805 hours after the DEFCON CD slides came out, I started getting 00:27:19.805 --> 00:27:25.844 password resets. Whoever is doing this, I don't bank with 00:27:25.844 --> 00:27:30.716 them anymore. Nice try, though. Now, moving onto the part that 00:27:30.716 --> 00:27:34.920 you're all probably here for. The data. The first question 00:27:34.920 --> 00:27:39.491 people ask when I tell them this is, is this actually a problem? 00:27:39.491 --> 00:27:44.196 Is there traffic to these bit flips? Let's start with a graph. 00:27:44.196 --> 00:27:49.468 This is the traffic I received during a section of the time the 00:27:49.468 --> 00:27:53.338 server was running. Some of you probably can't see that because 00:27:53.338 --> 00:27:56.909 it's small. I'll give you a number. I received over 1 00:27:56.909 --> 00:28:02.748 million DNS queries every 24 hours for over a month. Notice 00:28:02.748 --> 00:28:07.319 the graph is all over the place. There are a lot of reasons for 00:28:07.319 --> 00:28:11.590 that. Different servers caching the results for longer. It's not 00:28:11.590 --> 00:28:19.398 the cleanest data set. Of the million queries 4.8 resulted in 00:28:19.398 --> 00:28:25.404 TCP connections. Of those TCP connections, 85 percent of the 00:28:29.441 --> 00:28:32.611 initiated SSL connections completed the handshake and 00:28:32.611 --> 00:28:38.450 issued an ACDP request. You might have noticed I had 22 00:28:38.450 --> 00:28:43.288 certificates out of the 337 domains. Those numbers don't add 00:28:43.288 --> 00:28:48.527 up. The best answer I can give you on that is a lot of people 00:28:48.527 --> 00:28:52.331 have misconfigured systems that are accepting SSL certificates 00:28:52.331 --> 00:28:56.268 that are for the invalid names. These are valid SSL certificates 00:28:56.268 --> 00:29:02.774 just not for the domain that the user requested. What about the 00:29:02.774 --> 00:29:07.846 HTTP access logs. The server handled 2.4 million requests. 00:29:07.846 --> 00:29:12.784 Repeat users, they cached the results. After a flip occurred, 00:29:12.784 --> 00:29:18.790 where it occurred in the request process, you continue to try to 00:29:26.265 --> 00:29:32.270 access J query for the next 4.3 times you visited that site. I 00:29:35.440 --> 00:29:41.113 can tell you interesting things from this tract. The most common 00:29:41.113 --> 00:29:45.684 languages that users had on their system. The graph on the 00:29:45.684 --> 00:29:49.388 left is the HTTP accept language header. And the graph on the 00:29:49.388 --> 00:29:52.891 right is the languages returned from the java script. It seems 00:29:52.891 --> 00:29:56.061 like the java script executed on Chinese machines more than any 00:29:56.061 --> 00:29:59.398 other language. Not sure why. It's interesting that most of 00:29:59.398 --> 00:30:04.703 the traffic was coming from a Chinese language set and this 00:30:04.703 --> 00:30:10.142 doesn't match up with standard data sets of what most common 00:30:10.142 --> 00:30:13.311 accept language headers are. Bit flips were occurring more 00:30:13.311 --> 00:30:21.086 commonly on Chinese computers. I the tell you the most common 00:30:21.086 --> 00:30:27.426 screen resolution or IP6 adoption. Which is 1.67 percent 00:30:27.426 --> 00:30:34.232 of queries. I wasn't forcing users to try IPV6. I can tell 00:30:34.232 --> 00:30:39.738 you things like browser use. You can see the Wiki media. 00:30:39.738 --> 00:30:44.676 Wikipedia's traffic on February is on the left. Versus the 00:30:44.676 --> 00:30:49.114 traffic I received is on the right. It's a significantly 00:30:49.114 --> 00:30:53.518 larger chunk is coming from chrome. Because maybe chrome is 00:30:53.518 --> 00:30:57.956 doing more memory copies in each request. Maybe more of the users 00:30:57.956 --> 00:31:01.359 happen to be running chrome. Along with a larger proportion 00:31:01.359 --> 00:31:05.397 of IE. I can tell you operating system usage. Same statistics, 00:31:05.397 --> 00:31:10.469 Wiki Media on the left and my traffic on the right. A large 00:31:10.469 --> 00:31:15.107 portion of traffic from Windows 7 and XP. A smaller from 00:31:15.107 --> 00:31:21.546 operating system X and I operating system. I can tell you 00:31:21.546 --> 00:31:27.486 cookies. I acquired 240 --> 000 cookie names and values. These 00:31:27.486 --> 00:31:31.790 could be anything from Google Analytics tracking data to 00:31:31.790 --> 00:31:37.963 session tokens for say your gmail login. The top were from 00:31:37.963 --> 00:31:44.102 Google Analytics and Vidoo and weather.com. I have thousand of 00:31:44.102 --> 00:31:52.077 users ZIP codes they look up weather for in my data set. I 00:31:52.077 --> 00:31:58.216 can tell you here is someone browsing Amazon.com looking for 00:31:58.216 --> 00:32:05.223 an iPad. And their session codes were sent to me. We can look at 00:32:05.223 --> 00:32:09.494 here is someone trying to log into Olaf and their session 00:32:09.494 --> 00:32:15.500 cookies sent to me. Or iPhones checking in to download in this 00:32:18.570 --> 00:32:21.406 case checking into the app store, or in this case 00:32:21.406 --> 00:32:26.211 downloading an app from me. Some of you may have seem the hacking 00:32:26.211 --> 00:32:33.785 team there, research was into serving malicious applications 00:32:33.785 --> 00:32:36.955 to users. That could be utilized with this. As long as it's 00:32:36.955 --> 00:32:40.692 signed with a valid certificate I operating system will accept 00:32:40.692 --> 00:32:43.895 and install it. Or have I operating system devices asking 00:32:43.895 --> 00:32:51.770 for software updates. I did research into this and you can 00:32:51.770 --> 00:32:57.008 serve them different software updates instead. I do things 00:32:57.008 --> 00:33:02.514 like the HTTP refer value. Here were the top Google searches 00:33:02.514 --> 00:33:07.519 from the referred values. For some reason a lot of people 00:33:07.519 --> 00:33:13.525 really want to know about wood birthday gifts for their wife. I 00:33:20.966 --> 00:33:22.968 have no idea. Another thing is local IP addresses. I was able 00:33:22.968 --> 00:33:24.970 to pull 158 --> 000IP addresses. 12 percent were non-private. That 00:33:24.970 --> 00:33:28.240 means those systems were directly connected to the 00:33:28.240 --> 00:33:32.611 internet or using a lot of them are IPV6 addresses which by 00:33:32.611 --> 00:33:37.282 their very nature don't go through an app. The most common 00:33:37.282 --> 00:33:43.521 local IP addresses. 192.168. Primarily consumers. We look at 00:33:43.521 --> 00:33:50.495 other traffic. For example here is the SMTP traffic my server 00:33:50.495 --> 00:33:57.168 received. You can't see it, it's small text. The numbers on the 00:33:57.168 --> 00:34:01.740 side are 20 --> 000, 40 --> 000 and 60 --> 000. That's how many requests 00:34:01.740 --> 00:34:06.344 I was receiving each day. That's someone trying to send an email, 00:34:06.344 --> 00:34:10.248 a bit flip occurs and it gets sent to me instead. If you have 00:34:10.248 --> 00:34:15.887 worked on mail systems you know that SMTP doesn't work well with 00:34:15.887 --> 00:34:20.859 TLS. Everyone uses self-sign certificates and if you weren't, 00:34:20.859 --> 00:34:25.096 I actually own the certificates for these sites as well. It 00:34:25.096 --> 00:34:28.300 doesn't make a difference. And you'll notice that big jump 00:34:28.300 --> 00:34:32.704 there at the end up to another 60 --> 000, that was June 19 where 00:34:32.704 --> 00:34:38.710 hot mail cached the mail and sent all the mail to me instead. 00:34:43.581 --> 00:34:46.851 Oops. I was looking at the traffic and I set up a query 00:34:46.851 --> 00:34:49.354 that would show where the origin VGP route came from. I found 00:34:49.354 --> 00:34:56.895 that 38 percent of the traffic is from AS3134 owned by Twitter. 00:34:56.895 --> 00:35:02.901 And you'll notice that pie chart is for what the DNS requests for 00:35:06.571 --> 00:35:11.576 coming from them. They are all for I cloud.com. These are AX 00:35:11.576 --> 00:35:17.582 and record look ups and resulted in connections. 390 connection 00:35:22.320 --> 00:35:25.557 attempts per day and based on this info I'm guessing a bit 00:35:25.557 --> 00:35:28.860 flip was occurring and Twitter was trying to send password 00:35:28.860 --> 00:35:33.298 resets and other things to users with an I cloud email address 00:35:33.298 --> 00:35:36.134 and sending them to me instead. I reached out to Twitter and it 00:35:36.134 --> 00:35:40.872 said we're trying to restrict information going to bit flip 00:35:40.872 --> 00:35:44.376 domains. This should outline the specific problems you pointed 00:35:44.376 --> 00:35:50.382 out. I wrote a tool called BS flunk. Source types for spelunk 00:35:56.254 --> 00:36:00.525 and a bunch of queries. It's listed at the end. Now, how do 00:36:00.525 --> 00:36:02.661 you remediate this? Buy your bit flips. You buy the typos, buy 00:36:02.661 --> 00:36:08.667 the bit flips as well. It's not that expensive and can save the 00:36:12.604 --> 00:36:18.610 users problems. Own them so someone else doesn't. You can 00:36:26.217 --> 00:36:30.455 use memory and set up an RPZ for internal flips. It protects 00:36:30.455 --> 00:36:37.028 users within your network. Before I get into data release I 00:36:37.028 --> 00:36:39.531 want to talk about the domains. I reached out to all the 00:36:39.531 --> 00:36:42.200 companies and offered to transfer the domain to them for 00:36:42.200 --> 00:36:46.471 free. The first company was sales force. I want to give them 00:36:46.471 --> 00:36:51.142 props. They gave me authorization to transfer the 00:36:51.142 --> 00:36:58.183 domains in under 2 hours and it transferred within 24. The next 00:36:58.183 --> 00:37:04.622 domain is apple, two days. And Amazon AWS, transferred in two 00:37:04.622 --> 00:37:11.629 weeks due to scheduling issues on my end. Facebook, a tad over 00:37:11.629 --> 00:37:16.367 two weeks. Microsoft is being transferred now. Those are the 00:37:18.436 --> 00:37:21.706 companies that accepted the transfers. Some companies like 00:37:21.706 --> 00:37:26.478 Twitter, said, they didn't want the domains. Here was the exact 00:37:26.478 --> 00:37:31.649 quote. We don't try to prevent bit flipping attacks due to the 00:37:31.649 --> 00:37:36.821 fact these attacks are rare and we own quite a few domains. 00:37:36.821 --> 00:37:40.692 We're not interested in acquiring the domains you have. 00:37:40.692 --> 00:37:44.596 Please maintain possession of them until they expire. The next 00:37:44.596 --> 00:37:48.299 company is Google. They had a similar response. Not interested 00:37:48.299 --> 00:37:54.305 in purchasing them. 154 domains are up for purchase. The 00:37:56.307 --> 00:38:00.879 companies that did want to buy them, some of them doesn't do it 00:38:00.879 --> 00:38:05.150 right. The name servers are still pointed to me even though 00:38:05.150 --> 00:38:11.956 they own the domain. I get the user traffic even though they 00:38:11.956 --> 00:38:15.393 own the domain. I'm not going to call out the companies they are. 00:38:15.393 --> 00:38:19.230 Because I just noticed this and I'm didn't give them a heads up 00:38:19.230 --> 00:38:25.236 yet. Complete DNS logs for every query, the source, the port, the 00:38:29.974 --> 00:38:36.548 Q name, type, all that. The info is self-explanatory on the site. 00:38:36.548 --> 00:38:40.151 Anonymized web server logs, the user agent, the accepted 00:38:40.151 --> 00:38:45.190 language header, the host they were intending, the method. Do 00:38:45.190 --> 00:38:51.196 not contain the URL or the query and a hash of the source 00:38:53.264 --> 00:39:00.071 address. I'm releasing SSL and SSMT logs which contain the same 00:39:00.071 --> 00:39:04.442 hashed source IP. And finally my contact info along with the 00:39:04.442 --> 00:39:09.514 project website with the data dumps. At this point I think I 00:39:09.514 --> 00:39:12.383 have a short period of time for some questions. Anyone have one? 00:39:22.427 --> 00:39:26.965 >> Did anyone offer a bounty to help you cover the cost? >> No 00:39:26.965 --> 00:39:30.735 and I wouldn't have accepted it if they did. It's already a gray 00:39:30.735 --> 00:39:35.707 area legally and that can push you if you're accepting money 00:39:35.707 --> 00:39:39.811 for it, it can push it even more. I did get some care 00:39:39.811 --> 00:39:47.585 packages from the companies though. >> Did you look for 00:39:47.585 --> 00:39:54.592 double bit flips? >> You're referring to when two bit flips 00:39:54.592 --> 00:39:58.363 occur. >> You can figure out the one bit flips and 0. >> I did 00:39:58.363 --> 00:40:05.770 not. If you look at the data. A lot of the queries I got where a 00:40:05.770 --> 00:40:13.611 bit flip occurred, lots of other bit flips occurred in the query. 00:40:13.611 --> 00:40:20.785 In the URL is malformed as well. Indicating those users have 00:40:20.785 --> 00:40:28.593 messed up memory. I don't have statistics on it. It would be 00:40:28.593 --> 00:40:35.466 very interesting to look at that. Any other questions? >> 00:40:35.466 --> 00:40:38.269 Does enforcing name server bailiwick have any effect on 00:40:38.269 --> 00:40:44.275 your responses? >> I do not know. Any other questions? >> 00:40:57.588 --> 00:41:03.594 How did you figure out who the contact in these companies to 00:41:06.464 --> 00:41:10.234 get a quick response? How do you know who to email at Google or 00:41:10.234 --> 00:41:16.174 Microsoft about this, just being someone on the outside? >> So 00:41:16.174 --> 00:41:20.078 all of these -- all of these contacts out to the company were 00:41:20.078 --> 00:41:26.317 sent to the security@LES or whatever information they had 00:41:26.317 --> 00:41:30.321 listed. If I googled the company name and security, a few of them 00:41:30.321 --> 00:41:32.890 had to get pinged through personal connections to make 00:41:32.890 --> 00:41:38.896 sure they got handled. All right. Thank you very much.