1 00:00:00,000 --> 00:00:00,660 Hi, everybody. 2 00:00:00,660 --> 00:00:01,880 Thanks for coming out. 3 00:00:02,240 --> 00:00:03,800 How are you all doing so far today? 4 00:00:05,400 --> 00:00:07,260 My name is Cooper Quinton, a.k.a. 5 00:00:07,440 --> 00:00:08,160 CyberTiger. 6 00:00:08,160 --> 00:00:20,500 I'm a senior staff technologist where I've been at Electronic Frontier Foundation for the last ten years working on things like Privacy Badger, state-sponsored malware, street-level surveillance, threat lab project, and, of course, mobile security. 7 00:00:20,640 --> 00:00:23,440 And how many of you in here have heard of the Electronic Frontier Foundation? 8 00:00:25,020 --> 00:00:25,820 Amazing. 9 00:00:26,100 --> 00:00:29,440 If you haven't heard of us, go check out our booth in the vendor hall afterwards. 10 00:00:29,440 --> 00:00:30,220 We're a non-profit. 11 00:00:30,220 --> 00:00:35,640 We've been around for 35 years, and we exist based on donations from people like you. 12 00:00:35,680 --> 00:00:38,620 And this is my colleague on this project, Oops Bagel. 13 00:00:38,620 --> 00:00:39,760 Hi, I'm Oops Bagel. 14 00:00:39,760 --> 00:00:43,420 You may remember me from such talks as Huey, Louie, and the Malicious UE. 15 00:00:46,740 --> 00:00:50,800 Wow, I'm sure glad I wiped my phone before entering the United Kingdom. 16 00:00:51,720 --> 00:00:57,300 I'm here to talk about Rust, device porting, and how you can get involved in the project. 17 00:00:57,300 --> 00:01:01,300 I also should mention I don't work for EFF, and this definitely doesn't constitute legal advice. 18 00:01:04,280 --> 00:01:10,060 Also, real quick, I want to give a shout out to my co-creator on this research, Will Greenberg, who does work at EFF. 19 00:01:10,060 --> 00:01:15,140 He could not be here with us this weekend, so please give him a huge round of applause so that he can hear it on the... 20 00:01:18,480 --> 00:01:20,680 so he can see it on the video afterwards. 21 00:01:21,860 --> 00:01:27,220 So today we're going to talk about Stingrays, also known as MC Catchers or cell-side simulators. 22 00:01:27,240 --> 00:01:35,480 The astute or pedantic among you might know that these are technically different things, and if you want to well actually me afterwards, you have to buy me a drink. 23 00:01:36,040 --> 00:01:43,480 For those of you who don't know how a Stingray works, essentially what it does is it pretends to be a cell tower and tricks your phone into connecting to it. 24 00:01:43,500 --> 00:01:53,340 Once your phone connects to it, it tricks your phone into giving up its IMEI, which is the hardware ID of your phone, or the IMSI, or MZ, which is the ID associated with your SIM card. 25 00:01:53,340 --> 00:02:02,200 It can then also potentially do nasty things like downgrade your connection to 2G or intercept or inject content and other sorts of stuff. 26 00:02:02,940 --> 00:02:07,500 And to tell this story properly, we need to go all the way back to 2016. 27 00:02:07,960 --> 00:02:19,340 In 2016, some activists in Mandan, North Dakota, were protesting the Dakota Access Pipeline, which was a pipeline that was going to be built across Indian reservation land and probably leak oil all over the place. 28 00:02:19,600 --> 00:02:35,860 They were out there and had a camp, and were out there for a few weeks, and a few of the more technically inclined among them were running MCCatcher detecting apps on their Android phones, things like Snoop Snitch, Android MCCatcher detector, and they had seen some signs of what they thought were MCCatchers and sent them to us. 29 00:02:35,860 --> 00:02:51,740 We thought that this was fairly plausible, because the surrounding North Dakota police departments had bought MCCatchers fairly recently, and moreover, if MCCatchers were being used to spy on protesters, we wanted to know about that, because that would be a huge violation of civil liberties. 30 00:02:52,220 --> 00:02:56,020 So I flew down to North Dakota and spent a week at the camp. 31 00:02:56,260 --> 00:03:00,720 I armed a couple of Android phones with MCCatcher detecting apps. 32 00:03:00,720 --> 00:03:07,940 I brought a couple of software to find radios, tuned to look at 2G networks and the sort of band there. 33 00:03:08,260 --> 00:03:15,440 And after spending a few days there and looking at the results, what I figured out was, I had no idea what I was doing. 34 00:03:17,020 --> 00:03:21,640 The apps gave me results which were best described as maybe patchy. 35 00:03:21,640 --> 00:03:22,980 They were hard to understand. 36 00:03:22,980 --> 00:03:28,620 It was hard to interpret whether these were actually signs of MCCatchers or just the phone network being weird. 37 00:03:29,360 --> 00:03:37,400 And the software to find radios I had brought to record 2G band recorded nothing, because of course there were no 2G networks in that area. 38 00:03:37,400 --> 00:03:39,080 All the networks there were 4G. 39 00:03:39,080 --> 00:03:40,620 So nothing was happening. 40 00:03:40,900 --> 00:03:44,760 We decided that we had to get a better handle on this whole thing and do a better job. 41 00:03:44,760 --> 00:03:48,020 So we went back to the drawing board and came up with three goals. 42 00:03:48,360 --> 00:03:52,840 The first goal was to determine how often cell site simulators are being used. 43 00:03:53,320 --> 00:03:58,340 We wanted to know especially how often they're being used to surveil First Amendment protected activities. 44 00:03:58,360 --> 00:04:03,340 The second goal was to determine what kind of attacks modern cell site simulators were using. 45 00:04:03,340 --> 00:04:06,160 Particularly ones that are operating natively on 4G. 46 00:04:06,260 --> 00:04:10,520 And third, we wanted to figure out if we could detect modern cell site simulators more reliably. 47 00:04:11,220 --> 00:04:14,560 So for the first question, it's fairly easy for us to answer. 48 00:04:14,600 --> 00:04:16,940 We can answer mostly through public records. 49 00:04:17,040 --> 00:04:23,600 We know foreign spies are using cell site simulators because of many reports about them being found in and around Washington, D.C. 50 00:04:23,600 --> 00:04:24,580 to spy on U.S. 51 00:04:24,580 --> 00:04:25,720 government officials. 52 00:04:25,960 --> 00:04:28,800 It's also pretty likely, I think, that U.S. 53 00:04:28,800 --> 00:04:31,900 spies are using these to spy on foreign government officials in D.C. 54 00:04:31,900 --> 00:04:33,360 and other countries as well. 55 00:04:33,400 --> 00:04:34,660 And this makes a lot of sense. 56 00:04:34,660 --> 00:04:37,160 MC catchers are a really great tool for spies. 57 00:04:37,680 --> 00:04:43,120 We also know that cyber mercenaries like NSO Group use MC catchers as well. 58 00:04:43,260 --> 00:04:54,820 There was a really excellent report from Amnesty International in 2020 about a Moroccan dissident who had a MC catcher used to install the Pegasus malware from NSO Group on his phone. 59 00:04:54,920 --> 00:04:57,960 So these are used in a lot of international contexts. 60 00:04:58,320 --> 00:05:01,940 But here at home, we know that law enforcement has them. 61 00:05:02,000 --> 00:05:09,900 ICE and DHS own dozens of cell site simulators and we know thanks to ACLU public reporting that they use them hundreds of times per year. 62 00:05:09,900 --> 00:05:11,060 True ICE. 63 00:05:12,180 --> 00:05:15,100 Local law enforcement also uses these. 64 00:05:15,100 --> 00:05:16,860 To a greater or lesser degree. 65 00:05:16,860 --> 00:05:24,220 Oakland, California, where I'm from, has reported that they only used their MC catcher three times in 2016 and 2017, respectively. 66 00:05:24,220 --> 00:05:33,980 But a few hours down the road in San Bernardino, their law enforcement used their cell site simulator 231 times in 2017. 67 00:05:34,160 --> 00:05:41,700 And their neighboring suburb, Fontana, California, used theirs more than 300 times between 2022 and 2023. 68 00:05:41,980 --> 00:05:50,480 We know this last fact thanks to a sales flyer published by Jacobs Technologies that's now ended up on Document Cloud. 69 00:05:51,220 --> 00:05:54,960 And they've purchased three cell site simulators just in the last couple of years. 70 00:05:55,660 --> 00:06:02,340 So it's unclear whether there's a judge there that just really likes giving out warrants for cell site simulators or if they're just using it every day for fun. 71 00:06:02,340 --> 00:06:03,580 Without a warrant. 72 00:06:04,660 --> 00:06:07,300 But we know that law enforcement all over the U.S. 73 00:06:07,300 --> 00:06:08,620 has cell site simulators. 74 00:06:08,620 --> 00:06:15,500 This map comes from our Atlas of Surveillance project, where we've collected the surveillance tools used by police all over the country. 75 00:06:15,560 --> 00:06:21,040 And each of these yellow stars represents a law enforcement agency that has acquired a cell site simulator. 76 00:06:21,180 --> 00:06:29,320 So you can see that in basically every major metropolitan area in the U.S., there are at least one, if not multiple, cell site simulators. 77 00:06:29,320 --> 00:06:33,780 So if you live in one of these towns, we hope that the project we're going to talk about will be useful to you. 78 00:06:34,900 --> 00:06:37,540 Cell site simulators are also used for scams. 79 00:06:37,540 --> 00:06:45,000 You may remember this story in 2023, a woman was driving around Paris, got pulled over, and the cops saw what they thought was a bomb in the back of her car. 80 00:06:45,040 --> 00:06:50,580 They called out the bomb squad, and the bomb squad took a look in the back of her car and called out the IT department. 81 00:06:50,580 --> 00:06:55,160 And the IT department came out and took a look and figured out that she was running an MC catcher in her car. 82 00:06:55,200 --> 00:07:05,260 She had been paid to drive around with an MC catcher that was sending out SMS messages from the French health ministry trying to scam people out of their, I don't know, French health insurance money or something. 83 00:07:05,260 --> 00:07:06,800 I'm not clear on the details. 84 00:07:07,440 --> 00:07:13,200 But these are used by criminals, and 2G, the version specifically, is very useful for SMS scams. 85 00:07:14,540 --> 00:07:18,840 Next we wanted to answer, how do 4G native cell site simulators work? 86 00:07:19,900 --> 00:07:23,680 We had a pretty good idea of how 2G cell site simulators worked. 87 00:07:23,720 --> 00:07:27,860 In 2G, the phone was required to authenticate itself to the network. 88 00:07:27,860 --> 00:07:30,420 You had to prove you were a real subscriber and paying the money. 89 00:07:30,420 --> 00:07:31,880 This is the most important thing. 90 00:07:32,260 --> 00:07:35,720 But the network was never required to authenticate itself to the phone. 91 00:07:35,720 --> 00:07:42,340 So anybody could show up and say, hey, I'm a network, and the phone would happily route calls, SMS messages, and whatever else through them. 92 00:07:42,720 --> 00:07:45,380 4G sort of fixed this. 93 00:07:45,800 --> 00:07:52,240 In 4G, the network does have to authenticate itself to the phone as well as the phone authenticating itself to the tower. 94 00:07:52,400 --> 00:07:55,460 But there are still a lot of vulnerabilities in 4G. 95 00:07:55,560 --> 00:08:06,800 My colleague at the time, Yamna, and I spent about a year reading through all of the academic literature and came up with what we thought were the most likely attacks being used by 4G native MC catchers. 96 00:08:07,020 --> 00:08:14,740 Yamna wrote this really excellent white paper called Gotta Catch Them All, which goes into depth about how 4G cell site simulators probably work. 97 00:08:14,960 --> 00:08:17,020 I'm not going to go into detail on that here. 98 00:08:17,020 --> 00:08:18,360 You can read it online. 99 00:08:18,540 --> 00:08:34,860 But the essence of it is that even though the phone authenticates to the network now, there are still dozens of messages that get sent, received, and trusted before authentication ever happens or without authentication ever happening. 100 00:08:34,880 --> 00:08:39,760 And this is the vast majority of LTE attacks happen in this weak spot. 101 00:08:40,200 --> 00:08:43,960 So here's a little fun network diagram, which are always fun in presentations. 102 00:08:44,220 --> 00:08:49,280 This is the physical layer at the bottom, which handles frame synchronization and timing. 103 00:08:49,280 --> 00:08:54,760 And then the radio resource control layer, which has system information blocks or SIB packets. 104 00:08:54,760 --> 00:09:05,080 These contain things like the ID of the network you're connected to, how to connect to the network further, what sort of timing you should use, connection requests, things like that. 105 00:09:05,080 --> 00:09:08,600 And then there's the network non-access stratum layer, or the NAS. 106 00:09:08,600 --> 00:09:17,800 And the NAS contains things like your attach request, your authentication, your identity request, handling your temporary ID, and so forth. 107 00:09:19,280 --> 00:09:25,780 And in the RRC and NAS layer, all of these messages are the ones that get sent before authentication ever happens. 108 00:09:25,780 --> 00:09:31,460 So this is where you can do all sorts of nasty stuff while not being a legitimate part of the phone company. 109 00:09:32,940 --> 00:09:36,020 And I hear you thinking , doesn't 5G fix this problem, though? 110 00:09:36,020 --> 00:09:37,900 I thought 5G solved the whole thing. 111 00:09:38,220 --> 00:09:39,600 No , not really. 112 00:09:39,620 --> 00:09:43,240 The problem is that a lot of countries still don't have 5G. 113 00:09:43,240 --> 00:09:45,280 And even a lot of places in the U.S. 114 00:09:45,280 --> 00:09:47,180 still don't have 5G coverage. 115 00:09:47,380 --> 00:09:51,880 Moreover, a lot of people have older phones that don't support 5G. 116 00:09:52,200 --> 00:09:58,720 But even in cases where people do have phones and networks that are 5G compatible, 5G can be jammed. 117 00:09:58,720 --> 00:10:01,020 Because at the end of the day, it's a radio protocol. 118 00:10:01,020 --> 00:10:04,780 And if we shut down 5G, it's easy to get people to connect to 4G. 119 00:10:04,800 --> 00:10:07,800 In some cases, it can also just be turned off. 120 00:10:07,820 --> 00:10:24,960 This slide comes from a company called Group 2000 that has a product called Lima 5G Cell Pro that they will install in the phone company's network center and then give cops an app with which they can geofence a specific area, hit a button, and turn off 5G for that entire area, 121 00:10:24,960 --> 00:10:29,880 downgrading everybody in the area to 4G, 3G, 2G, or whatever the MC catcher is running. 122 00:10:31,020 --> 00:10:33,380 So, no, 5G isn't the solution. 123 00:10:33,780 --> 00:10:35,520 What did I do? 124 00:10:35,520 --> 00:10:36,060 Oh, God. 125 00:10:36,060 --> 00:10:36,680 Okay. 126 00:10:38,800 --> 00:10:41,240 Then we wanted to look at detection methods. 127 00:10:41,520 --> 00:10:44,180 There were some really good previous attempts at detection. 128 00:10:44,180 --> 00:10:47,200 Snoop Snitch was a particularly good one. 129 00:10:47,200 --> 00:10:52,360 But those all focused on 2G, because that was what we knew the most about. 130 00:10:52,380 --> 00:10:56,940 The problem with that is that 2G has been out of fashion for a while. 131 00:10:57,020 --> 00:11:04,740 Even L3Harris, who made the Stingray, stopped making the Stingray about two decades ago and had new technology that worked natively on 4G. 132 00:11:04,900 --> 00:11:09,180 L3Harris doesn't sell to local police anymore because they kept screwing it up. 133 00:11:09,200 --> 00:11:15,000 So now, companies like KW and Jacobs Technologies have stepped in to start selling these technologies to police. 134 00:11:15,020 --> 00:11:20,440 And all of their Stingrays, their MC catchers, operate natively on 4G. 135 00:11:20,540 --> 00:11:28,040 So we wanted to figure out how we could detect natively on 4G and detect some of the attacks that Yamada and I had decided were most likely. 136 00:11:29,120 --> 00:11:31,860 My first attempt at this was something called Crocodile Hunter. 137 00:11:31,860 --> 00:11:36,540 And we called it Crocodile Hunter because Stingrays killed Steve Irwin, and we wanted to take it back for Steve. 138 00:11:39,720 --> 00:11:51,260 Crocodile Hunter ran on a Linux laptop running a fairly high-end software-defined radio either at a speed 200 or a Blade RF, a GPS dongle, and a few suspicious-looking antennas. 139 00:11:51,660 --> 00:12:00,960 And what it did was use the software-defined radio to emulate a cell phone and look for all of the cell towers around you and try to map them on this map. 140 00:12:01,580 --> 00:12:02,960 You can see the map here. 141 00:12:02,960 --> 00:12:06,020 It was a giant pile of C and Python, which we would use to do this. 142 00:12:06,020 --> 00:12:07,920 And then we would map out all the cell towers. 143 00:12:07,920 --> 00:12:11,680 Every little orange dot is a cell tower that I found that I thought was legitimate. 144 00:12:11,760 --> 00:12:17,920 According to some heuristics I had, like, does this cell tower show up in open cell ID or the Wiggle database? 145 00:12:18,140 --> 00:12:19,340 Is this cell tower moving? 146 00:12:19,340 --> 00:12:22,800 Have we seen this cell tower in two different parts of the city? 147 00:12:23,200 --> 00:12:27,600 And each of the little black skulls is a cell tower that we found suspicious. 148 00:12:28,320 --> 00:12:30,620 Now, you might already see some problems with this. 149 00:12:30,860 --> 00:12:40,980 This is a real run I did in downtown San Francisco in 2019, and I don't think that there are actually dozens of IMSI catchers running around in downtown San Francisco. 150 00:12:41,480 --> 00:12:44,760 My heuristics weren't very great, but they were good enough for me. 151 00:12:44,760 --> 00:12:53,280 And this is a classic example of a UI that works for me and my stupid brain and sucks for anybody else who doesn't think the way I do and is trying to interpret this. 152 00:12:53,520 --> 00:12:55,940 So there were a few problems with this project. 153 00:12:56,160 --> 00:12:57,440 It was too expensive. 154 00:12:57,780 --> 00:13:02,700 Journalists and activists, who were my target audience for this, don't want to go buy a $300 SDR. 155 00:13:02,700 --> 00:13:05,140 Even I don't want to go buy a $300 SDR. 156 00:13:05,760 --> 00:13:07,420 It was too hard to set up. 157 00:13:07,420 --> 00:13:11,060 You had to be the type of person that compiles Python and C programs for fun. 158 00:13:11,060 --> 00:13:12,820 Well, compile Python, but whatever. 159 00:13:12,820 --> 00:13:13,620 Hit me later. 160 00:13:14,380 --> 00:13:18,880 I know you all are this type of people, but most journalists are not, and for good reason. 161 00:13:19,820 --> 00:13:22,360 Also, it was too difficult to interpret the results. 162 00:13:22,400 --> 00:13:29,060 You would be left thinking that there were a bunch of suspicious cell towers in downtown San Francisco, which when you looked at the data, there weren't actually any. 163 00:13:30,260 --> 00:13:32,200 So we went back to the drawing board. 164 00:13:32,720 --> 00:13:34,000 Can we do better? 165 00:13:34,020 --> 00:13:35,080 Yes, we can. 166 00:13:35,740 --> 00:13:39,560 So our next project was Rayhunter, which is what we're going to talk about today. 167 00:13:40,100 --> 00:13:42,620 Rayhunter runs on a $20 mobile hotspot. 168 00:13:42,720 --> 00:13:43,960 It's easy to install. 169 00:13:43,960 --> 00:13:45,300 It has a simple UI. 170 00:13:45,300 --> 00:13:48,360 It was written in Rust, so it's trendy and memory safe. 171 00:13:49,120 --> 00:13:54,740 And we named it Rayhunter, because again, we're still hunting stingrays, and also it was the only thing that wasn't trademarked. 172 00:13:54,900 --> 00:13:58,840 And this is our mascot, Big Yachty, because Orca is against yachts. 173 00:14:00,380 --> 00:14:03,000 You can go get stickers later at the EFF table. 174 00:14:04,840 --> 00:14:06,300 This is our web UI. 175 00:14:06,300 --> 00:14:09,060 You can already see that it's a lot simpler and a lot less scary. 176 00:14:09,160 --> 00:14:11,220 You can see any warnings that will come up. 177 00:14:11,300 --> 00:14:17,900 You can stop or start the capture, download a PCAP or a zip file if you've seen something suspicious to send to somebody for analysis. 178 00:14:18,100 --> 00:14:21,000 And it's all fairly straightforward and easy to understand. 179 00:14:21,900 --> 00:14:35,520 Our goals with Rayhunter are to determine in real time whether cell site simulators are being used to surveil free speech activities, especially things like people engaging in worship, people going to protests, people getting healthcare, anything else you might think of. 180 00:14:35,540 --> 00:14:47,500 We want to get lots of people using it to determine the extent of cell site simulator use around the country, but especially outside of the US, where laws might be different and law enforcement norms might be different. 181 00:14:48,060 --> 00:14:54,080 We want to get data about what exploits cell site simulators are using in the wild, and Rayhunter can actually help us do this. 182 00:14:54,160 --> 00:15:00,380 And most importantly, we want to clear up fear and uncertainty among activists and get more accurate threat modeling. 183 00:15:00,580 --> 00:15:04,340 If MC catchers aren't being used to spy on protests, that's great. 184 00:15:04,340 --> 00:15:12,720 Then activists only need to worry about license plate readers, facial recognition, fog data science, celebrite, and cops being assholes. 185 00:15:14,360 --> 00:15:17,720 So, oopsmagle, tell us a little more about how Rayhunter works. 186 00:15:17,720 --> 00:15:19,000 Yeah, thanks, Cooper. 187 00:15:19,000 --> 00:15:25,140 So our software reads Qualcomm protocol messages from the modem, capturing traffic between the device and the base station. 188 00:15:25,140 --> 00:15:34,320 We analyze those messages for indicators of cell site simulators, using heuristics Cooper will talk about later, and report results to the user via the screen and that lovely web UI you just saw. 189 00:15:34,320 --> 00:15:37,780 All of this happens automatically once the device is turned on. 190 00:15:37,780 --> 00:15:41,200 All you need to do is carry the device around while you go about your business. 191 00:15:42,040 --> 00:15:47,600 So, under the hood, we read these unparsed diag frames from the dev diag file in user space. 192 00:15:47,620 --> 00:15:50,700 We take those unparsed frames and slap them in a QMDL file. 193 00:15:50,700 --> 00:15:55,860 As we do this, we also analyze those files for signs of a CSS and service the results to the user. 194 00:15:55,860 --> 00:16:02,900 On demand, users can download those parsed frames wrapped in a GSM tap header as a PCAP file for manual or offline analysis. 195 00:16:03,180 --> 00:16:05,880 So, what kind of hardware do we run this on? 196 00:16:06,540 --> 00:16:17,280 Well, we have pictures here of our two recommended devices, the ORBIC and the TP link, and we have three other officially supported devices listed here too. 197 00:16:17,300 --> 00:16:22,360 But Rayhunter can run on almost anything with a Qualcomm modem, so what's in these devices that makes them a good fit? 198 00:16:23,680 --> 00:16:32,900 They have Qualcomm MDM modem packages, which are socks with a digital signal processor for speaking LT and an ARM core on the same die running open embedded Linux for management. 199 00:16:33,140 --> 00:16:37,860 Rayhunter runs in user space on the ARM core, a nice comfortable place for software that we're most likely familiar with. 200 00:16:37,860 --> 00:16:45,060 We need a few megabytes of memory to run analyzers for Rayhunter and megabytes of drive space to store logs, the more the better in this case. 201 00:16:45,640 --> 00:16:52,420 It's also worth mentioning that Rayhunter doesn't directly change any settings on the DSP, although those can be configured via AT commands and MBN files. 202 00:16:52,420 --> 00:16:57,740 If you want to hear more about this kind of thing, come to our talk tomorrow at Hackerstown at noon, where we'll dive into more technical depth. 203 00:16:58,800 --> 00:17:08,280 Oh, we should also update this, because on the plane over here, I hacked a hotspot that was running Linux 5, so they're still making the same mistakes and Rayhunter will probably run on a lot of stuff for a long time. 204 00:17:10,020 --> 00:17:13,460 Can all of these devices pictured here run Rayhunter? 205 00:17:13,460 --> 00:17:14,480 Well, let's see. 206 00:17:14,480 --> 00:17:18,160 Anything with a Qualcomm modem that can expose dying messages should be suitable. 207 00:17:18,180 --> 00:17:21,140 So, what I see here is Qualcomm modem, Qualcomm modem. 208 00:17:21,140 --> 00:17:23,540 That guy in the top, though, he doesn't have a Qualcomm modem. 209 00:17:23,540 --> 00:17:27,760 I tried asking him for a PCAP, but he just brought me a ball, so we're going to have to work on that one. 210 00:17:28,840 --> 00:17:32,340 Ideally, we want something stealthy that remains operational as a hotspot. 211 00:17:32,340 --> 00:17:34,600 Rayhunter doesn't have to be deniable, just covert. 212 00:17:35,460 --> 00:17:37,020 It should pass the sniff check. 213 00:17:37,020 --> 00:17:41,400 If a threat to privacy goes through your bag, and they see a hotspot, it should look normal. 214 00:17:41,400 --> 00:17:46,440 This is in contrast to a Raspberry Pi with LT and GPS dongles and so forth. 215 00:17:46,440 --> 00:17:48,940 That could lead to questions you might not want to answer. 216 00:17:49,560 --> 00:17:58,720 And, whereas our engineering time will be focused on more affordable hotspots around that $20 mark, community-led support for more expensive devices is acceptable and totally encouraged. 217 00:17:58,780 --> 00:18:02,920 So, I will hand it back to Cooper now, who will talk about how we actually detect these devious devices. 218 00:18:06,340 --> 00:18:12,420 So, I talked a little bit earlier about how previous detection methods had a lot of false positives. 219 00:18:12,540 --> 00:18:15,360 And I don't blame those previous detection methods. 220 00:18:15,420 --> 00:18:20,020 The problem is essentially that the phone network at the end of the day sucks. 221 00:18:20,260 --> 00:18:28,280 It's a weird network, which is what you might expect from a network and protocol that was designed by a committee of 100 companies who all have competing interests. 222 00:18:28,380 --> 00:18:35,960 There are so many false positives, and so many times when the phone network does things that we might expect an MC catcher to do. 223 00:18:35,960 --> 00:18:42,080 Like, ask for your IMSI, ask for your IMEI, even when it has a perfectly good temporary identity or TIMSI. 224 00:18:42,080 --> 00:18:43,760 It will do things like downgrade you. 225 00:18:43,780 --> 00:18:44,800 Networks shut off. 226 00:18:44,800 --> 00:18:46,700 It's all really weird and terrible. 227 00:18:47,200 --> 00:18:50,200 And also, at the end of the day, what we're doing is threat hunting. 228 00:18:50,240 --> 00:18:53,260 For those of you who have worked in threat hunting, is it an art? 229 00:18:53,260 --> 00:18:54,380 Is it a science? 230 00:18:54,660 --> 00:18:56,160 You know well that it's both. 231 00:18:56,540 --> 00:18:59,900 It's really, it's somewhat detection-based, somewhat logic-based. 232 00:18:59,900 --> 00:19:01,660 A lot of it is vibes-based. 233 00:19:02,060 --> 00:19:04,140 Does this thing feel or look off? 234 00:19:04,140 --> 00:19:06,280 Does it feel more off than it should? 235 00:19:06,280 --> 00:19:07,960 Is this thing supposed to feel off? 236 00:19:07,960 --> 00:19:12,060 Or does this thing feel on weirdly on in a way that it never does? 237 00:19:12,900 --> 00:19:19,800 So, we've worked really hard on our heuristics for detecting MC catchers, and we feel like we have a pretty good grip on them now. 238 00:19:20,340 --> 00:19:23,020 We have four main categories of heuristics. 239 00:19:23,440 --> 00:19:26,540 The first that we look for is a 2G downgrade attack. 240 00:19:26,540 --> 00:19:31,120 This would be the attack used by the crimeware MC catchers, for example, to send SMS messages. 241 00:19:31,220 --> 00:19:38,660 This would also be necessary if you want to receive or intercept content, like SMS messages and phone calls. 242 00:19:38,960 --> 00:19:43,440 We monitor the messages for downgrade attacks, and this hasn't been detected in the U.S. 243 00:19:43,440 --> 00:19:44,060 yet. 244 00:19:44,060 --> 00:19:48,340 And that makes sense, because in the U.S., all the 2G networks have been shut down. 245 00:19:48,340 --> 00:19:53,080 So if you did see this go off in the U.S., it would be a pretty big red flag that something weird was going on. 246 00:19:53,540 --> 00:19:58,680 Unfortunately, in other countries where 2G is still a thing, this is a terrible heuristic. 247 00:19:58,760 --> 00:20:04,800 People are getting downgraded to 2G all the time in those countries, and so we ask users in those countries to turn this one off. 248 00:20:05,460 --> 00:20:07,780 Similarly, is null cipher use. 249 00:20:07,860 --> 00:20:15,460 With this one, we check if the base station suggests using a null cipher, which essentially means there's no encryption between your phone and the tower it's connected to. 250 00:20:15,520 --> 00:20:20,520 This is useful in real life for things like making 911 calls when you don't have service. 251 00:20:20,520 --> 00:20:31,040 If you don't have service, the network doesn't have any key material for you and can't establish an encrypted context, but you still need to route the 911 call, so you need to have an unencrypted channel to do that. 252 00:20:31,740 --> 00:20:41,160 This is fantastic for content interception or injection, as you might imagine, and we feel like this is a pretty good one since you're unlikely to be dialing 911 from your mobile hotspot. 253 00:20:44,070 --> 00:20:52,110 We also have a newer one called incomplete SIB chains, so there are about 12 different system information block messages that can be sent by the tower. 254 00:20:52,130 --> 00:21:08,210 What we've found is that in real towers, usually five, six, or seven of those tend to get sent up front by the tower, but in fake base stations, developers are lazy, and they only encode the ones that are necessary to get the phone to connect to it, usually SIBs 1, 255 00:21:08,210 --> 00:21:09,270 2, and 3. 256 00:21:09,490 --> 00:21:17,590 So when we see that incomplete chain of SIBs, we have a fairly decent indicator that somebody has built their own base station, for purposes unknown. 257 00:21:17,590 --> 00:21:23,030 If it's combined with other heuristics, we feel like this one is a dead heat, that something weird is going on. 258 00:21:23,690 --> 00:21:27,230 And finally, we have MC requested by the tower. 259 00:21:27,230 --> 00:21:33,590 So this looks for when an MC or IMEI is requested in NAS messages without authentication ever happening. 260 00:21:33,930 --> 00:21:43,590 And this one is our problem child, because like I said, requesting the MC or IMEI is something that happens legitimately in cell networks fairly often. 261 00:21:43,590 --> 00:21:48,450 But we also know that this one is the attack used by commercial MC catchers. 262 00:21:48,450 --> 00:21:50,810 So we really want to be sure to get it right. 263 00:21:52,190 --> 00:21:57,590 It happens for legitimate reasons sometimes if you're roaming and there are no towers in your home network. 264 00:21:57,590 --> 00:22:05,810 When there aren't any, your temporary mobile ID won't be recognized, so they'll have to ask for your MC to try to establish a billing and routing context. 265 00:22:06,370 --> 00:22:08,090 And this makes sense. 266 00:22:08,570 --> 00:22:21,030 Or sometimes when you attach on your first startup in a long time, your network will have forgotten your temporary subscriber ID and will ask for your ID once at the start of the connection to reestablish a temporary ID in a context. 267 00:22:21,590 --> 00:22:27,950 But we felt like our first approach at this, which was just to look for the MC being requested from the tower, was naive. 268 00:22:27,950 --> 00:22:37,230 A lot of times it would follow up with authentication which would mean that unless somebody is doing something weird with SS7, which happens, the phone network is probably legitimate. 269 00:22:37,290 --> 00:22:39,090 So now we have a better heuristic. 270 00:22:39,090 --> 00:22:45,010 We look for an MC request followed up by a complete lack of authentication and then an immediate disconnect. 271 00:22:45,290 --> 00:23:00,430 And I call this the wallet inspector attack because it kind of reminds me of that episode of the Simpsons where Homer is going to college with those nerds and the snake walks up to the nerds and goes Wallet inspector. 272 00:23:00,430 --> 00:23:02,170 I believe you'll find this to be in order. 273 00:23:02,170 --> 00:23:02,910 All right. 274 00:23:02,910 --> 00:23:04,410 I can't believe this worked. 275 00:23:04,450 --> 00:23:06,510 Hey, that's not the wallet inspector! 276 00:23:06,650 --> 00:23:07,770 Get back here! 277 00:23:07,930 --> 00:23:09,110 Get him, goons! 278 00:23:11,150 --> 00:23:13,590 That was a long call just to steal my wallet. 279 00:23:13,590 --> 00:23:14,310 Jeez. 280 00:23:15,770 --> 00:23:18,970 So, how do we know this all works? 281 00:23:19,330 --> 00:23:31,470 Well, thanks to our friends at Cape, which is a company that makes secure mobile network in a mobile phone, we have tests from an actual commercial off the shelf MC catcher. 282 00:23:31,530 --> 00:23:35,490 So this is a PCAP from a real MC catcher used by law enforcement. 283 00:23:35,570 --> 00:23:38,210 And here we can see one of the attacks that it uses. 284 00:23:38,430 --> 00:23:43,910 It sends out system information blocks with a tracking area on the right of one EE6. 285 00:23:43,930 --> 00:23:51,090 That tracking area is different from the tracking area that is used legitimately in that network around there, 3703. 286 00:23:51,090 --> 00:23:57,410 This tricks the phone into thinking that it has jumped to a new part of the country maybe several miles down the road. 287 00:23:57,410 --> 00:24:01,010 This causes the phone to send a tracking area update request. 288 00:24:01,190 --> 00:24:06,370 The tracking area update request lets the tower send an identity request with the type MC. 289 00:24:06,410 --> 00:24:09,630 The phone then says, oh, yes, here's my wallet. 290 00:24:09,630 --> 00:24:10,690 Please enjoy. 291 00:24:10,690 --> 00:24:12,570 The phone hands over its MC. 292 00:24:12,650 --> 00:24:20,410 The network ‑‑ the tower says score and then kicks the phone off with this message illegal UE indicating that the phone has been stolen. 293 00:24:20,630 --> 00:24:25,510 The phone then reconnects to a legitimate tower and goes upon its merry way never the wiser. 294 00:24:26,190 --> 00:24:32,410 So now that we have a actual PCAP, does Ray Hunter detect a real commercial MC catcher? 295 00:24:32,970 --> 00:24:34,350 Yes, it does. 296 00:24:35,730 --> 00:24:37,930 So here we can see connection. 297 00:24:37,930 --> 00:24:42,750 This is our command line tool for analyzing PCAPs which also runs on the device itself. 298 00:24:43,030 --> 00:24:44,470 And we can see, oh, you're back. 299 00:24:44,470 --> 00:24:45,550 Where's my wallet? 300 00:24:47,930 --> 00:24:49,470 It's mine now. 301 00:24:49,630 --> 00:24:50,670 Damn. 302 00:24:51,130 --> 00:24:53,790 Here we can see incomplete SIP chains. 303 00:24:53,790 --> 00:24:56,370 We got SIP 1, 2, and 3 and nothing else. 304 00:24:56,370 --> 00:25:01,530 And an immediate disconnect after identity request without ever an authentication handshake. 305 00:25:01,550 --> 00:25:04,530 So we feel pretty good about these heuristics. 306 00:25:06,170 --> 00:25:08,490 But have we seen anything in the wild? 307 00:25:08,490 --> 00:25:10,190 Have we seen anything in the field? 308 00:25:10,710 --> 00:25:11,490 Yes, we have. 309 00:25:11,490 --> 00:25:12,670 Of course we have. 310 00:25:13,030 --> 00:25:17,550 So this is a run that comes courtesy of our friend Zero Chaos. 311 00:25:17,550 --> 00:25:18,530 He might be in the room. 312 00:25:18,530 --> 00:25:20,570 If he's not, give him a big round of applause anyway. 313 00:25:20,570 --> 00:25:25,270 He wins the award for the most suspicious fucking tower I've ever seen in my life. 314 00:25:25,270 --> 00:25:29,910 This tower was even more suspicious than the real commercial MC catchers we found. 315 00:25:30,450 --> 00:25:36,410 So this is from a cruise around the Caribbean, around the Turks and Caicos Islands. 316 00:25:37,110 --> 00:25:46,950 And over the course of a couple of days, he got several identity requested without auth accept and then identity request and then disconnect without ever an auth accept. 317 00:25:47,170 --> 00:25:51,470 This could be a false positive since he's cruising around in open waters. 318 00:25:51,470 --> 00:25:53,410 He's going by a lot of little islands. 319 00:25:53,410 --> 00:25:55,290 A lot of new countries are popping up. 320 00:25:55,290 --> 00:25:57,150 Maybe something weird is happening. 321 00:25:57,150 --> 00:26:01,390 But then, he lands in the port of Turks and Caicos in the cruise port. 322 00:26:01,530 --> 00:26:08,630 And we get, over the course of an hour, about every three seconds, a request for a null cipher connection. 323 00:26:08,730 --> 00:26:12,630 This is the only time we've ever seen this happen in the wild. 324 00:26:12,790 --> 00:26:14,330 And it was weird as hell. 325 00:26:14,330 --> 00:26:20,050 There were also malformed sibs in there, more identity requests and everything else we would expect to see. 326 00:26:20,050 --> 00:26:26,990 I actually accused him of setting this up to be a test of Ray Hunter because it was so damn suspicious. 327 00:26:27,050 --> 00:26:28,190 But it's real. 328 00:26:28,650 --> 00:26:35,230 So we really, I really love this one and I feel like 95% confident that this is a suspicious cell tower. 329 00:26:36,230 --> 00:26:38,190 We also have some results in the U.S. 330 00:26:38,190 --> 00:26:40,470 This comes from one of our Ray Hunter users, Ryan. 331 00:26:40,670 --> 00:26:48,930 He was hanging out in downtown Chicago in early May and just hanging out in a cafe nearby his house when suddenly Ray Hunter went off. 332 00:26:49,030 --> 00:26:58,530 We took a look at the logs and there are dozens of requests for his identity and then a sudden disconnect without ever authentication happening over the course of about an hour. 333 00:26:58,710 --> 00:27:02,550 After an hour, it stopped happening and didn't happen again the rest of the day. 334 00:27:03,390 --> 00:27:06,350 So we feel fairly confident about this one, too. 335 00:27:06,350 --> 00:27:08,050 About as confident as we can. 336 00:27:08,570 --> 00:27:15,530 We know that Chicago PD have MC catchers and we know that ICE is operating in Chicago and also has many MC catchers. 337 00:27:15,610 --> 00:27:17,910 So we feel like this one is pretty high signal. 338 00:27:17,950 --> 00:27:20,750 But the cool thing is that we have the PCAPs. 339 00:27:20,750 --> 00:27:27,030 So we can actually show any LTE expert this and they can take a look for themselves and give their own determination. 340 00:27:27,150 --> 00:27:28,970 Is this just the phone network being weird? 341 00:27:28,970 --> 00:27:30,070 I don't think so. 342 00:27:30,070 --> 00:27:34,510 Usually, like I said, when we see false positives, we see like one or maybe two. 343 00:27:34,570 --> 00:27:36,450 But this is dozens in an hour. 344 00:27:37,690 --> 00:27:39,770 We have another cool result from the field. 345 00:27:39,770 --> 00:27:42,650 This is courtesy of one of our open source developers, Ali Rain. 346 00:27:42,650 --> 00:27:52,670 She took this reading in Penn Station and as you can see again in early May, over the course of about an hour, she got several identity requests and then a disconnect without authentication. 347 00:27:53,190 --> 00:27:55,530 About a dozen of them in Penn Station. 348 00:27:55,710 --> 00:27:58,930 She sent us the PCAP and we analyzed it and found this. 349 00:27:58,930 --> 00:28:02,650 And then she went back two days later and none of this happened. 350 00:28:02,910 --> 00:28:09,150 So we feel pretty confident that this is not just a misconfigured network node in Penn Station, which would make sense. 351 00:28:09,150 --> 00:28:10,090 It's a deep station. 352 00:28:10,090 --> 00:28:11,390 It's surrounded by a lot of concrete. 353 00:28:11,390 --> 00:28:12,790 There's a lot of trains going on. 354 00:28:12,790 --> 00:28:18,130 But we think this is most likely law enforcement, either NYPD or ICE or somebody running around there. 355 00:28:18,130 --> 00:28:20,590 And again, we have the PCAPs to further analyze. 356 00:28:20,590 --> 00:28:31,190 If we come up with better detections, if we realize one of these wasn't actually very good, we can rerun it and reanalyze these PCAPs and decide if we feel more or less confident about it. 357 00:28:33,590 --> 00:28:38,310 Finally, we did get a lot of results from the many protests that happened over the course of this summer. 358 00:28:38,310 --> 00:28:41,330 The No Kings protests and other sort of associated protests. 359 00:28:41,690 --> 00:28:46,130 And on analyzing those, we didn't find anything suspicious. 360 00:28:46,970 --> 00:28:53,550 This isn't totally surprising to me because police have a lot of other tools to spy on protesters with, like I alluded to earlier. 361 00:28:53,550 --> 00:28:58,630 Facial recognition, license plate readers, location databases from .fog data science. 362 00:28:58,910 --> 00:29:05,470 So maybe protesters can upgrade their throat modeling a little bit to worry less about MC catchers and more about all those other things. 363 00:29:05,470 --> 00:29:07,010 At least here in the US. 364 00:29:07,090 --> 00:29:11,450 But we hope that activists will continue to bring Ray Hunter to various protests. 365 00:29:11,450 --> 00:29:15,310 Because in an authoritarian country, things can change very quickly. 366 00:29:15,310 --> 00:29:18,370 And if we do start to see this happen, we want to know. 367 00:29:20,090 --> 00:29:22,030 We have more results as well. 368 00:29:22,030 --> 00:29:24,150 But they're more ambiguous, the other ones. 369 00:29:24,150 --> 00:29:27,730 And we're still analyzing them and trying to determine whether or not they're false positives. 370 00:29:27,830 --> 00:29:31,210 But we have some cool results that I've already talked about before in other talks. 371 00:29:31,430 --> 00:29:34,450 From Embassy Row in Washington, D.C. 372 00:29:34,450 --> 00:29:35,750 that a friend of ours did. 373 00:29:36,330 --> 00:29:41,750 An MC catcher that we think we found at the Democratic National Committee that Wired went out and did. 374 00:29:41,990 --> 00:29:43,770 And various other cities as well. 375 00:29:43,770 --> 00:29:45,630 And we hope to get some from your cities too. 376 00:29:47,250 --> 00:29:49,370 We still have a lot to do with this project. 377 00:29:49,490 --> 00:29:52,570 We need to do more testing with simulated attack environments. 378 00:29:52,570 --> 00:29:57,310 If you want to run a fake stingray at home, please don't. 379 00:29:57,310 --> 00:29:58,910 You'll make the FCC very mad. 380 00:29:58,910 --> 00:30:00,170 This is not legal advice. 381 00:30:00,170 --> 00:30:01,290 But I'm not a cop. 382 00:30:01,290 --> 00:30:02,570 I'm not telling you what to do. 383 00:30:03,010 --> 00:30:06,670 We need to do more user testing and we need to get UI improvements. 384 00:30:06,670 --> 00:30:10,170 Right now, it's a lot of rust heads working on this project. 385 00:30:10,170 --> 00:30:15,790 And even though it's a very pretty UI, there's probably a lot that somebody who actually understands design could do. 386 00:30:16,050 --> 00:30:17,990 We want more and better heuristics. 387 00:30:17,990 --> 00:30:20,910 With the caveat that we really want to minimize false positives. 388 00:30:20,910 --> 00:30:26,290 The last thing we want to do is give people the impression that there are MC catchers all over the place, when there really aren't. 389 00:30:26,870 --> 00:30:35,250 And most importantly, we want to do a lot more international testing and we want to support most countries around the world and all of the major IT regions. 390 00:30:35,470 --> 00:30:37,070 So let's take RAN or global. 391 00:30:37,070 --> 00:30:38,670 How can we do that? 392 00:30:38,670 --> 00:30:39,290 Yeah. 393 00:30:39,290 --> 00:30:41,930 I mean, why is there even a need for more devices? 394 00:30:41,930 --> 00:30:44,050 Couldn't everybody just run Anorbic? 395 00:30:44,390 --> 00:30:45,390 Well, no. 396 00:30:45,390 --> 00:30:49,090 Depending on the IT region you live in, your radio may not support local bands. 397 00:30:49,090 --> 00:30:59,370 That is, IT region 1 devices aren't meant to work in ITU region 2, except for a handful of bands for roaming, but you're unlikely to detect a cell site simulator with those. 398 00:30:59,590 --> 00:31:05,770 And even within a major region, different devices will have different support for different bands as well. 399 00:31:05,770 --> 00:31:14,470 So if you've ever had the experience where you're hanging out with some friends in the woods, and one of you has service but the rest don't, because they have a different carrier, that's what's going on with these different bands here. 400 00:31:14,650 --> 00:31:16,710 So broader is definitely better in this case. 401 00:31:16,710 --> 00:31:26,130 And also for regulatory reasons, these radios have to be certified as not software-defined, so different products will have different applications in every region, and threats to privacy exist globally. 402 00:31:26,130 --> 00:31:28,470 So together, we can make Rayhunter global. 403 00:31:28,510 --> 00:31:40,270 And as you can see here, specifically we're looking for a good ITU region 3 device as a recommended device, so if you have advice on that, any input on it, hit us up online on GitHub and we can get to porting. 404 00:31:40,290 --> 00:31:45,830 And side note, if any of you know how they run Telcom in Antarctica, I'm really curious, so I'd like to hear about that too. 405 00:31:45,830 --> 00:31:46,910 I'm sure I could email... 406 00:31:46,910 --> 00:31:47,970 It's all penguin-based. 407 00:31:47,970 --> 00:31:49,050 It's all penguin-based, yeah. 408 00:31:49,050 --> 00:31:50,990 I mean, everything's running Linux anyways, right? 409 00:31:50,990 --> 00:31:55,690 So I'm sure Kim Stanley Robinson knows, I haven't emailed him yet though, but maybe he'll let me know. 410 00:31:56,710 --> 00:32:01,610 Yeah, so, I mean like, one of the most useful ways is with device porting. 411 00:32:01,610 --> 00:32:09,370 You know, the Orbix is a cool hotspot, but the kerosene-powered cheese grater with a Qualcomm modem that you already own, that's a really cool hotspot too, and you don't have to spend any money. 412 00:32:09,610 --> 00:32:11,530 So what is it like to port a device? 413 00:32:11,530 --> 00:32:15,350 Well, first, you have to root the device, and there's many methods to do this. 414 00:32:15,350 --> 00:32:20,230 On the next slide, which I'll skip through quickly, there are some binaries which you can take a look at to help you find a way in. 415 00:32:20,230 --> 00:32:22,050 And search engines are definitely your friend here. 416 00:32:22,050 --> 00:32:24,670 There's been lots of really good research in this space already. 417 00:32:24,850 --> 00:32:27,970 Many devices already have publicly discovered backdoors or vulnerabilities. 418 00:32:28,510 --> 00:32:35,170 And if you come to our Hackerstown talk tomorrow at noon, I'll be talking about an ode I found to install Rayhunter on several hotspots. 419 00:32:36,350 --> 00:32:39,730 So, once you have root, establish a persistent connection over Telnet. 420 00:32:39,730 --> 00:32:43,630 ADB also works, but it's more complicated and more code for us to manage. 421 00:32:44,150 --> 00:32:47,450 Build a version of Rayhunter for your device using the headless display mode. 422 00:32:47,810 --> 00:32:50,370 Check whether you're getting useful information out of DevDiag. 423 00:32:50,370 --> 00:32:59,190 You may need to fiddle with some IOCTLs or send some AT commands to the modem to put it into LT mode, if you're not getting LT RRC messages in your log files. 424 00:32:59,690 --> 00:33:04,110 If you're getting GSM RRC messages, this is probably what's happening. 425 00:33:04,110 --> 00:33:10,030 So, when this is done, and you've verified Rayhunter is working, add a display method for your specific device. 426 00:33:10,030 --> 00:33:11,650 If it has a screen, that's great. 427 00:33:11,650 --> 00:33:13,870 You can probably use our generic frame buffer code. 428 00:33:13,950 --> 00:33:21,690 If not, if it has LEDs, come up with a stealthy but informative pattern for blinking the LEDs to indicate that Rayhunter is running, has a warning, or is paused. 429 00:33:21,690 --> 00:33:24,090 We have some example code you can look at as well in our repo. 430 00:33:24,590 --> 00:33:26,370 Then you can go ahead and write installer code. 431 00:33:26,370 --> 00:33:29,710 We have a unified Rust binary with different modules for different devices. 432 00:33:29,710 --> 00:33:37,030 Implement one that will root the device, install Rayhunter, test whether Rayhunter is running, and add utilities for starting Telnet or ADB. 433 00:33:37,030 --> 00:33:39,690 We don't want to leave Telnet on all the time, right? 434 00:33:39,690 --> 00:33:43,770 Somebody on your LAN shouldn't just be able to get root on the device just after they connect. 435 00:33:44,130 --> 00:33:47,490 So, at this point, you can open a PR, and we'll take a look at it. 436 00:33:47,490 --> 00:33:49,350 We can have some back and forth on it. 437 00:33:51,030 --> 00:33:52,590 So, these are the binaries. 438 00:33:53,950 --> 00:34:00,530 I would like to share some lessons learned from maintaining this project that I think would be helpful to other open source maintainers and developers out there. 439 00:34:00,590 --> 00:34:09,290 Initially, our install process was a shell script, coupled with a small Rust binary written by MJG to unlock ADB access to the ORBIC. 440 00:34:09,290 --> 00:34:23,230 But we quickly ran into flow control and error handling problems, such as detecting whether there were none or multiple ADB devices plugged in, and we had to rely on the output of the ADB command, and the output of LSUSB, or crawling around sysfs. 441 00:34:23,230 --> 00:34:27,310 This quickly becomes something unwieldy and much larger than just being a shell script. 442 00:34:27,830 --> 00:34:37,910 So, our developers Sasha and Marcus wrote a Rust binary that implements all of the above functionality much more cleanly, and it just links to just the parts of ADB that we need, making it a pretty small binary. 443 00:34:37,910 --> 00:34:39,350 This is what we use today. 444 00:34:40,390 --> 00:34:48,750 So, initially, for people contributing, one of the largest issues was that our tool chain required GCC for the ARM target. 445 00:34:48,750 --> 00:34:59,330 This was available in Debian as a pre-compiled package, but if you were using another distribution or operating system, this GCC wasn't necessarily available in your package manager, and you would have to build from source. 446 00:34:59,330 --> 00:35:02,390 And this could take multiple hours, depending on the processing power of your machine. 447 00:35:03,070 --> 00:35:07,430 You can use tools like Cargo Cross, but those also take a long time to build the Docker container for. 448 00:35:07,450 --> 00:35:14,090 And, yeah, you can find binaries on GitHub, but I probably don't need to explain to most of you that there are some concerns with just, like, running stuff you found on GitHub. 449 00:35:14,390 --> 00:35:27,570 So, you know, you can set up a Debian CH root, that's what I did initially, or, like, a virtual machine, but this is a lot of process for somebody who's looking just to contribute to a small bug fix, or just wants to install from source and verify they're getting the same binary we are. 450 00:35:27,730 --> 00:35:29,710 So, this doesn't need to be necessary. 451 00:35:29,710 --> 00:35:32,450 And we're not doing anything GCC-specific in this project. 452 00:35:32,450 --> 00:35:34,070 It's a pure Rust project. 453 00:35:34,570 --> 00:35:37,070 We're using a static, you know, we're building a static binary. 454 00:35:37,070 --> 00:35:41,270 We're not linking to anything glibc-specific, besides libusb. 455 00:35:41,270 --> 00:35:47,010 So, we replaced the Rust rusb bindings for libusb with a pure Rust library called nusb. 456 00:35:47,010 --> 00:35:51,550 And at this point, everything's Rust, we don't need glibc. 457 00:35:51,550 --> 00:35:53,110 But the final challenge was the linker. 458 00:35:53,110 --> 00:35:59,750 It's very common to invoke the compiler as a front-end to the linker, if you're linking to other C-shared object files, but we're not doing this. 459 00:35:59,750 --> 00:36:04,350 So, we were able, with a few tweaks, to be able to just use the Rust LLVM linker. 460 00:36:04,350 --> 00:36:09,130 This means that today, if you want to contribute to Rayhunter, you only need the tools installed by Rustup on your machine. 461 00:36:10,290 --> 00:36:15,750 So, if you don't want to work directly with us on this project, there's still other opportunities to contribute as well. 462 00:36:15,750 --> 00:36:26,350 We've got a list here of issues and upstream creates that you can fix or add enhancements to to improve both the project for us and the Rust ecosystem at large. 463 00:36:26,570 --> 00:36:30,710 And if you don't want to write some code, there's still other ways you can help as well. 464 00:36:31,490 --> 00:36:31,950 Yeah. 465 00:36:31,950 --> 00:36:38,350 So, if you're like me, and your favorite way to program is to trick smarter people into programming for you, we still want your help. 466 00:36:38,350 --> 00:36:41,430 We need people who are interested in field testing this. 467 00:36:41,430 --> 00:36:44,050 We want to bring this to more cities in the US. 468 00:36:44,050 --> 00:36:45,950 We want to bring it all over the world, like I said. 469 00:36:45,950 --> 00:36:50,590 So, if you're interested in running one of these somewhere, please let us help you get it installed, get it running. 470 00:36:50,650 --> 00:37:00,510 And if you want to distribute these to people that you know are all over the place, or especially in places that might be higher risk, we definitely want to distribute these in those places as well so we can use your help with that. 471 00:37:00,670 --> 00:37:03,830 Last but not least, we of course want more help from telephony experts. 472 00:37:04,010 --> 00:37:07,870 The telephone network and telephone technologies are really weird and they're hard to understand. 473 00:37:07,870 --> 00:37:12,850 And there are very few people who deliberately do understand it because it'll drive you insane. 474 00:37:12,850 --> 00:37:23,030 So, we really need more help from you to help us look at these PCAPs we have, help us come up with more and better heuristics, help us minimize our false positives. 475 00:37:24,590 --> 00:37:31,730 And now that we've probably scared the absolute shit out of you, I want to share you some advice from my kid that I think will make you feel better. 476 00:37:32,010 --> 00:37:33,490 So, this is my son, River. 477 00:37:33,490 --> 00:37:35,230 He's six and he's very cool. 478 00:37:35,610 --> 00:37:39,350 And he was asking me what my talk was about at DEF CON. 479 00:37:39,350 --> 00:37:49,970 And I was explaining, well, basically there's these things called stingrays and they're a tool that police or spies use to snoop on your phone and kind of get your secrets. 480 00:37:50,150 --> 00:37:52,310 And he goes, oh, and he thinks about it for a minute. 481 00:37:52,310 --> 00:37:56,670 And we've invented a thing to help stop that from happening and detect it when it happens. 482 00:37:56,910 --> 00:38:05,170 And he goes, oh, and he thinks about it for a minute and he says, Dad, yeah, why don't you just tell those hackers to turn off their phones? 483 00:38:05,870 --> 00:38:08,950 Which I thought this was really good advice from a six-year-old. 484 00:38:08,950 --> 00:38:11,890 He clearly understands the entire problem space. 485 00:38:12,090 --> 00:38:15,830 So, in conclusion, DEF CON, turn off your phones. 486 00:38:17,770 --> 00:38:19,430 Thank you all so much. 487 00:38:24,090 --> 00:38:27,070 We want to kill the myth of security rock stars here. 488 00:38:27,070 --> 00:38:29,410 None of us do this work alone. 489 00:38:29,410 --> 00:38:31,350 We all stand on the shoulders of giants. 490 00:38:31,490 --> 00:38:37,250 I want to thank Sangwook Bae and Rudy Wang at Cape for helping testing and providing a commercial MC catcher and thinking about heuristics. 491 00:38:37,330 --> 00:38:40,570 Matthew Garrett for originally routing the ORBIC and letting us know about it. 492 00:38:40,570 --> 00:38:48,210 Andy Cara, Russ Hanneman, Dragorn, Gary Miller, Yoshikono, Alex Gantman, Sobrato Day, Alex Ross, Bradley Reeves for their advice and connections. 493 00:38:48,430 --> 00:38:52,830 Folks at Osmocom and QC Snooper and Snoop Snitch for paving the way on this work. 494 00:38:52,970 --> 00:38:58,270 Yamna for all her amazing work at EFF and elsewhere, protecting millions of people from cell-side simulators. 495 00:38:58,650 --> 00:39:01,850 And also, our open-source contributors. 496 00:39:01,850 --> 00:39:05,690 Yeah, I specifically want to thank Untitaker, who's put in a huge amount of work on this project. 497 00:39:05,690 --> 00:39:10,870 And also, Sasha Nora, Natalie Rain, Matej Kovacic, Movie AX, and all of the FOSS contributors. 498 00:39:10,870 --> 00:39:13,990 We just had another one port a device while we were getting ready for DEF CON. 499 00:39:14,470 --> 00:39:25,510 I would also like to personally thank Abby, definitely A-Hills, Aldera, Alex, Amar, Cody Harris, Dager, Edwin Zajles, Nathan, Q, Rachel, Sharon, Tony, and Jolyne for the wallet. 500 00:39:25,850 --> 00:39:29,610 And last but not least, thank you to all our EFF members for supporting this work. 501 00:39:29,610 --> 00:39:33,330 We couldn't have done this without your donations, without your membership, without your love and support. 502 00:39:33,330 --> 00:39:36,070 So thank you all so much for making this happen. 503 00:39:38,610 --> 00:39:40,470 And thanks for coming to our talk. 504 00:39:40,810 --> 00:39:45,130 I'm also looking for a better job, so if any of you have any cool opportunities, hit me up over email. 505 00:39:45,130 --> 00:39:46,170 Yeah, hire them. 506 00:39:48,410 --> 00:39:49,390 Thank you for coming.