start	end	text
0	660	Hi, everybody.
660	1880	Thanks for coming out.
2240	3800	How are you all doing so far today?
5400	7260	My name is Cooper Quinton, a.k.a.
7440	8160	CyberTiger.
8160	20500	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.
20640	23440	And how many of you in here have heard of the Electronic Frontier Foundation?
25020	25820	Amazing.
26100	29440	If you haven't heard of us, go check out our booth in the vendor hall afterwards.
29440	30220	We're a non-profit.
30220	35640	We've been around for 35 years, and we exist based on donations from people like you.
35680	38620	And this is my colleague on this project, Oops Bagel.
38620	39760	Hi, I'm Oops Bagel.
39760	43420	You may remember me from such talks as Huey, Louie, and the Malicious UE.
46740	50800	Wow, I'm sure glad I wiped my phone before entering the United Kingdom.
51720	57300	I'm here to talk about Rust, device porting, and how you can get involved in the project.
57300	61300	I also should mention I don't work for EFF, and this definitely doesn't constitute legal advice.
64280	70060	Also, real quick, I want to give a shout out to my co-creator on this research, Will Greenberg, who does work at EFF.
70060	75140	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...
78480	80680	so he can see it on the video afterwards.
81860	87220	So today we're going to talk about Stingrays, also known as MC Catchers or cell-side simulators.
87240	95480	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.
96040	103480	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.
103500	113340	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.
113340	122200	It can then also potentially do nasty things like downgrade your connection to 2G or intercept or inject content and other sorts of stuff.
122940	127500	And to tell this story properly, we need to go all the way back to 2016.
127960	139340	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.
139600	155860	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.
155860	171740	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.
172220	176020	So I flew down to North Dakota and spent a week at the camp.
176260	180720	I armed a couple of Android phones with MCCatcher detecting apps.
180720	187940	I brought a couple of software to find radios, tuned to look at 2G networks and the sort of band there.
188260	195440	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.
197020	201640	The apps gave me results which were best described as maybe patchy.
201640	202980	They were hard to understand.
202980	208620	It was hard to interpret whether these were actually signs of MCCatchers or just the phone network being weird.
209360	217400	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.
217400	219080	All the networks there were 4G.
219080	220620	So nothing was happening.
220900	224760	We decided that we had to get a better handle on this whole thing and do a better job.
224760	228020	So we went back to the drawing board and came up with three goals.
228360	232840	The first goal was to determine how often cell site simulators are being used.
233320	238340	We wanted to know especially how often they're being used to surveil First Amendment protected activities.
238360	243340	The second goal was to determine what kind of attacks modern cell site simulators were using.
243340	246160	Particularly ones that are operating natively on 4G.
246260	250520	And third, we wanted to figure out if we could detect modern cell site simulators more reliably.
251220	254560	So for the first question, it's fairly easy for us to answer.
254600	256940	We can answer mostly through public records.
257040	263600	We know foreign spies are using cell site simulators because of many reports about them being found in and around Washington, D.C.
263600	264580	to spy on U.S.
264580	265720	government officials.
265960	268800	It's also pretty likely, I think, that U.S.
268800	271900	spies are using these to spy on foreign government officials in D.C.
271900	273360	and other countries as well.
273400	274660	And this makes a lot of sense.
274660	277160	MC catchers are a really great tool for spies.
277680	283120	We also know that cyber mercenaries like NSO Group use MC catchers as well.
283260	294820	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.
294920	297960	So these are used in a lot of international contexts.
298320	301940	But here at home, we know that law enforcement has them.
302000	309900	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.
309900	311060	True ICE.
312180	315100	Local law enforcement also uses these.
315100	316860	To a greater or lesser degree.
316860	324220	Oakland, California, where I'm from, has reported that they only used their MC catcher three times in 2016 and 2017, respectively.
324220	333980	But a few hours down the road in San Bernardino, their law enforcement used their cell site simulator 231 times in 2017.
334160	341700	And their neighboring suburb, Fontana, California, used theirs more than 300 times between 2022 and 2023.
341980	350480	We know this last fact thanks to a sales flyer published by Jacobs Technologies that's now ended up on Document Cloud.
351220	354960	And they've purchased three cell site simulators just in the last couple of years.
355660	362340	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.
362340	363580	Without a warrant.
364660	367300	But we know that law enforcement all over the U.S.
367300	368620	has cell site simulators.
368620	375500	This map comes from our Atlas of Surveillance project, where we've collected the surveillance tools used by police all over the country.
375560	381040	And each of these yellow stars represents a law enforcement agency that has acquired a cell site simulator.
381180	389320	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.
389320	393780	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.
394900	397540	Cell site simulators are also used for scams.
397540	405000	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.
405040	410580	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.
410580	415160	And the IT department came out and took a look and figured out that she was running an MC catcher in her car.
415200	425260	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.
425260	426800	I'm not clear on the details.
427440	433200	But these are used by criminals, and 2G, the version specifically, is very useful for SMS scams.
434540	438840	Next we wanted to answer, how do 4G native cell site simulators work?
439900	443680	We had a pretty good idea of how 2G cell site simulators worked.
443720	447860	In 2G, the phone was required to authenticate itself to the network.
447860	450420	You had to prove you were a real subscriber and paying the money.
450420	451880	This is the most important thing.
452260	455720	But the network was never required to authenticate itself to the phone.
455720	462340	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.
462720	465380	4G sort of fixed this.
465800	472240	In 4G, the network does have to authenticate itself to the phone as well as the phone authenticating itself to the tower.
472400	475460	But there are still a lot of vulnerabilities in 4G.
475560	486800	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.
487020	494740	Yamna wrote this really excellent white paper called Gotta Catch Them All, which goes into depth about how 4G cell site simulators probably work.
494960	497020	I'm not going to go into detail on that here.
497020	498360	You can read it online.
498540	514860	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.
514880	519760	And this is the vast majority of LTE attacks happen in this weak spot.
520200	523960	So here's a little fun network diagram, which are always fun in presentations.
524220	529280	This is the physical layer at the bottom, which handles frame synchronization and timing.
529280	534760	And then the radio resource control layer, which has system information blocks or SIB packets.
534760	545080	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.
545080	548600	And then there's the network non-access stratum layer, or the NAS.
548600	557800	And the NAS contains things like your attach request, your authentication, your identity request, handling your temporary ID, and so forth.
559280	565780	And in the RRC and NAS layer, all of these messages are the ones that get sent before authentication ever happens.
565780	571460	So this is where you can do all sorts of nasty stuff while not being a legitimate part of the phone company.
572940	576020	And I hear you thinking , doesn't 5G fix this problem, though?
576020	577900	I thought 5G solved the whole thing.
578220	579600	No , not really.
579620	583240	The problem is that a lot of countries still don't have 5G.
583240	585280	And even a lot of places in the U.S.
585280	587180	still don't have 5G coverage.
587380	591880	Moreover, a lot of people have older phones that don't support 5G.
592200	598720	But even in cases where people do have phones and networks that are 5G compatible, 5G can be jammed.
598720	601020	Because at the end of the day, it's a radio protocol.
601020	604780	And if we shut down 5G, it's easy to get people to connect to 4G.
604800	607800	In some cases, it can also just be turned off.
607820	624960	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,
624960	629880	downgrading everybody in the area to 4G, 3G, 2G, or whatever the MC catcher is running.
631020	633380	So, no, 5G isn't the solution.
633780	635520	What did I do?
635520	636060	Oh, God.
636060	636680	Okay.
638800	641240	Then we wanted to look at detection methods.
641520	644180	There were some really good previous attempts at detection.
644180	647200	Snoop Snitch was a particularly good one.
647200	652360	But those all focused on 2G, because that was what we knew the most about.
652380	656940	The problem with that is that 2G has been out of fashion for a while.
657020	664740	Even L3Harris, who made the Stingray, stopped making the Stingray about two decades ago and had new technology that worked natively on 4G.
664900	669180	L3Harris doesn't sell to local police anymore because they kept screwing it up.
669200	675000	So now, companies like KW and Jacobs Technologies have stepped in to start selling these technologies to police.
675020	680440	And all of their Stingrays, their MC catchers, operate natively on 4G.
680540	688040	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.
689120	691860	My first attempt at this was something called Crocodile Hunter.
691860	696540	And we called it Crocodile Hunter because Stingrays killed Steve Irwin, and we wanted to take it back for Steve.
699720	711260	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.
711660	720960	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.
721580	722960	You can see the map here.
722960	726020	It was a giant pile of C and Python, which we would use to do this.
726020	727920	And then we would map out all the cell towers.
727920	731680	Every little orange dot is a cell tower that I found that I thought was legitimate.
731760	737920	According to some heuristics I had, like, does this cell tower show up in open cell ID or the Wiggle database?
738140	739340	Is this cell tower moving?
739340	742800	Have we seen this cell tower in two different parts of the city?
743200	747600	And each of the little black skulls is a cell tower that we found suspicious.
748320	750620	Now, you might already see some problems with this.
750860	760980	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.
761480	764760	My heuristics weren't very great, but they were good enough for me.
764760	773280	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.
773520	775940	So there were a few problems with this project.
776160	777440	It was too expensive.
777780	782700	Journalists and activists, who were my target audience for this, don't want to go buy a $300 SDR.
782700	785140	Even I don't want to go buy a $300 SDR.
785760	787420	It was too hard to set up.
787420	791060	You had to be the type of person that compiles Python and C programs for fun.
791060	792820	Well, compile Python, but whatever.
792820	793620	Hit me later.
794380	798880	I know you all are this type of people, but most journalists are not, and for good reason.
799820	802360	Also, it was too difficult to interpret the results.
802400	809060	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.
810260	812200	So we went back to the drawing board.
812720	814000	Can we do better?
814020	815080	Yes, we can.
815740	819560	So our next project was Rayhunter, which is what we're going to talk about today.
820100	822620	Rayhunter runs on a $20 mobile hotspot.
822720	823960	It's easy to install.
823960	825300	It has a simple UI.
825300	828360	It was written in Rust, so it's trendy and memory safe.
829120	834740	And we named it Rayhunter, because again, we're still hunting stingrays, and also it was the only thing that wasn't trademarked.
834900	838840	And this is our mascot, Big Yachty, because Orca is against yachts.
840380	843000	You can go get stickers later at the EFF table.
844840	846300	This is our web UI.
846300	849060	You can already see that it's a lot simpler and a lot less scary.
849160	851220	You can see any warnings that will come up.
851300	857900	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.
858100	861000	And it's all fairly straightforward and easy to understand.
861900	875520	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.
875540	887500	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.
888060	894080	We want to get data about what exploits cell site simulators are using in the wild, and Rayhunter can actually help us do this.
894160	900380	And most importantly, we want to clear up fear and uncertainty among activists and get more accurate threat modeling.
900580	904340	If MC catchers aren't being used to spy on protests, that's great.
904340	912720	Then activists only need to worry about license plate readers, facial recognition, fog data science, celebrite, and cops being assholes.
914360	917720	So, oopsmagle, tell us a little more about how Rayhunter works.
917720	919000	Yeah, thanks, Cooper.
919000	925140	So our software reads Qualcomm protocol messages from the modem, capturing traffic between the device and the base station.
925140	934320	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.
934320	937780	All of this happens automatically once the device is turned on.
937780	941200	All you need to do is carry the device around while you go about your business.
942040	947600	So, under the hood, we read these unparsed diag frames from the dev diag file in user space.
947620	950700	We take those unparsed frames and slap them in a QMDL file.
950700	955860	As we do this, we also analyze those files for signs of a CSS and service the results to the user.
955860	962900	On demand, users can download those parsed frames wrapped in a GSM tap header as a PCAP file for manual or offline analysis.
963180	965880	So, what kind of hardware do we run this on?
966540	977280	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.
977300	982360	But Rayhunter can run on almost anything with a Qualcomm modem, so what's in these devices that makes them a good fit?
983680	992900	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.
993140	997860	Rayhunter runs in user space on the ARM core, a nice comfortable place for software that we're most likely familiar with.
997860	1005060	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.
1005640	1012420	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.
1012420	1017740	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.
1018800	1028280	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.
1030020	1033460	Can all of these devices pictured here run Rayhunter?
1033460	1034480	Well, let's see.
1034480	1038160	Anything with a Qualcomm modem that can expose dying messages should be suitable.
1038180	1041140	So, what I see here is Qualcomm modem, Qualcomm modem.
1041140	1043540	That guy in the top, though, he doesn't have a Qualcomm modem.
1043540	1047760	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.
1048840	1052340	Ideally, we want something stealthy that remains operational as a hotspot.
1052340	1054600	Rayhunter doesn't have to be deniable, just covert.
1055460	1057020	It should pass the sniff check.
1057020	1061400	If a threat to privacy goes through your bag, and they see a hotspot, it should look normal.
1061400	1066440	This is in contrast to a Raspberry Pi with LT and GPS dongles and so forth.
1066440	1068940	That could lead to questions you might not want to answer.
1069560	1078720	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.
1078780	1082920	So, I will hand it back to Cooper now, who will talk about how we actually detect these devious devices.
1086340	1092420	So, I talked a little bit earlier about how previous detection methods had a lot of false positives.
1092540	1095360	And I don't blame those previous detection methods.
1095420	1100020	The problem is essentially that the phone network at the end of the day sucks.
1100260	1108280	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.
1108380	1115960	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.
1115960	1122080	Like, ask for your IMSI, ask for your IMEI, even when it has a perfectly good temporary identity or TIMSI.
1122080	1123760	It will do things like downgrade you.
1123780	1124800	Networks shut off.
1124800	1126700	It's all really weird and terrible.
1127200	1130200	And also, at the end of the day, what we're doing is threat hunting.
1130240	1133260	For those of you who have worked in threat hunting, is it an art?
1133260	1134380	Is it a science?
1134660	1136160	You know well that it's both.
1136540	1139900	It's really, it's somewhat detection-based, somewhat logic-based.
1139900	1141660	A lot of it is vibes-based.
1142060	1144140	Does this thing feel or look off?
1144140	1146280	Does it feel more off than it should?
1146280	1147960	Is this thing supposed to feel off?
1147960	1152060	Or does this thing feel on weirdly on in a way that it never does?
1152900	1159800	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.
1160340	1163020	We have four main categories of heuristics.
1163440	1166540	The first that we look for is a 2G downgrade attack.
1166540	1171120	This would be the attack used by the crimeware MC catchers, for example, to send SMS messages.
1171220	1178660	This would also be necessary if you want to receive or intercept content, like SMS messages and phone calls.
1178960	1183440	We monitor the messages for downgrade attacks, and this hasn't been detected in the U.S.
1183440	1184060	yet.
1184060	1188340	And that makes sense, because in the U.S., all the 2G networks have been shut down.
1188340	1193080	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.
1193540	1198680	Unfortunately, in other countries where 2G is still a thing, this is a terrible heuristic.
1198760	1204800	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.
1205460	1207780	Similarly, is null cipher use.
1207860	1215460	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.
1215520	1220520	This is useful in real life for things like making 911 calls when you don't have service.
1220520	1231040	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.
1231740	1241160	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.
1244070	1252110	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.
1252130	1268210	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,
1268210	1269270	2, and 3.
1269490	1277590	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.
1277590	1283030	If it's combined with other heuristics, we feel like this one is a dead heat, that something weird is going on.
1283690	1287230	And finally, we have MC requested by the tower.
1287230	1293590	So this looks for when an MC or IMEI is requested in NAS messages without authentication ever happening.
1293930	1303590	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.
1303590	1308450	But we also know that this one is the attack used by commercial MC catchers.
1308450	1310810	So we really want to be sure to get it right.
1312190	1317590	It happens for legitimate reasons sometimes if you're roaming and there are no towers in your home network.
1317590	1325810	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.
1326370	1328090	And this makes sense.
1328570	1341030	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.
1341590	1347950	But we felt like our first approach at this, which was just to look for the MC being requested from the tower, was naive.
1347950	1357230	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.
1357290	1359090	So now we have a better heuristic.
1359090	1365010	We look for an MC request followed up by a complete lack of authentication and then an immediate disconnect.
1365290	1380430	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.
1380430	1382170	I believe you'll find this to be in order.
1382170	1382910	All right.
1382910	1384410	I can't believe this worked.
1384450	1386510	Hey, that's not the wallet inspector!
1386650	1387770	Get back here!
1387930	1389110	Get him, goons!
1391150	1393590	That was a long call just to steal my wallet.
1393590	1394310	Jeez.
1395770	1398970	So, how do we know this all works?
1399330	1411470	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.
1411530	1415490	So this is a PCAP from a real MC catcher used by law enforcement.
1415570	1418210	And here we can see one of the attacks that it uses.
1418430	1423910	It sends out system information blocks with a tracking area on the right of one EE6.
1423930	1431090	That tracking area is different from the tracking area that is used legitimately in that network around there, 3703.
1431090	1437410	This tricks the phone into thinking that it has jumped to a new part of the country maybe several miles down the road.
1437410	1441010	This causes the phone to send a tracking area update request.
1441190	1446370	The tracking area update request lets the tower send an identity request with the type MC.
1446410	1449630	The phone then says, oh, yes, here's my wallet.
1449630	1450690	Please enjoy.
1450690	1452570	The phone hands over its MC.
1452650	1460410	The network ‑‑ the tower says score and then kicks the phone off with this message illegal UE indicating that the phone has been stolen.
1460630	1465510	The phone then reconnects to a legitimate tower and goes upon its merry way never the wiser.
1466190	1472410	So now that we have a actual PCAP, does Ray Hunter detect a real commercial MC catcher?
1472970	1474350	Yes, it does.
1475730	1477930	So here we can see connection.
1477930	1482750	This is our command line tool for analyzing PCAPs which also runs on the device itself.
1483030	1484470	And we can see, oh, you're back.
1484470	1485550	Where's my wallet?
1487930	1489470	It's mine now.
1489630	1490670	Damn.
1491130	1493790	Here we can see incomplete SIP chains.
1493790	1496370	We got SIP 1, 2, and 3 and nothing else.
1496370	1501530	And an immediate disconnect after identity request without ever an authentication handshake.
1501550	1504530	So we feel pretty good about these heuristics.
1506170	1508490	But have we seen anything in the wild?
1508490	1510190	Have we seen anything in the field?
1510710	1511490	Yes, we have.
1511490	1512670	Of course we have.
1513030	1517550	So this is a run that comes courtesy of our friend Zero Chaos.
1517550	1518530	He might be in the room.
1518530	1520570	If he's not, give him a big round of applause anyway.
1520570	1525270	He wins the award for the most suspicious fucking tower I've ever seen in my life.
1525270	1529910	This tower was even more suspicious than the real commercial MC catchers we found.
1530450	1536410	So this is from a cruise around the Caribbean, around the Turks and Caicos Islands.
1537110	1546950	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.
1547170	1551470	This could be a false positive since he's cruising around in open waters.
1551470	1553410	He's going by a lot of little islands.
1553410	1555290	A lot of new countries are popping up.
1555290	1557150	Maybe something weird is happening.
1557150	1561390	But then, he lands in the port of Turks and Caicos in the cruise port.
1561530	1568630	And we get, over the course of an hour, about every three seconds, a request for a null cipher connection.
1568730	1572630	This is the only time we've ever seen this happen in the wild.
1572790	1574330	And it was weird as hell.
1574330	1580050	There were also malformed sibs in there, more identity requests and everything else we would expect to see.
1580050	1586990	I actually accused him of setting this up to be a test of Ray Hunter because it was so damn suspicious.
1587050	1588190	But it's real.
1588650	1595230	So we really, I really love this one and I feel like 95% confident that this is a suspicious cell tower.
1596230	1598190	We also have some results in the U.S.
1598190	1600470	This comes from one of our Ray Hunter users, Ryan.
1600670	1608930	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.
1609030	1618530	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.
1618710	1622550	After an hour, it stopped happening and didn't happen again the rest of the day.
1623390	1626350	So we feel fairly confident about this one, too.
1626350	1628050	About as confident as we can.
1628570	1635530	We know that Chicago PD have MC catchers and we know that ICE is operating in Chicago and also has many MC catchers.
1635610	1637910	So we feel like this one is pretty high signal.
1637950	1640750	But the cool thing is that we have the PCAPs.
1640750	1647030	So we can actually show any LTE expert this and they can take a look for themselves and give their own determination.
1647150	1648970	Is this just the phone network being weird?
1648970	1650070	I don't think so.
1650070	1654510	Usually, like I said, when we see false positives, we see like one or maybe two.
1654570	1656450	But this is dozens in an hour.
1657690	1659770	We have another cool result from the field.
1659770	1662650	This is courtesy of one of our open source developers, Ali Rain.
1662650	1672670	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.
1673190	1675530	About a dozen of them in Penn Station.
1675710	1678930	She sent us the PCAP and we analyzed it and found this.
1678930	1682650	And then she went back two days later and none of this happened.
1682910	1689150	So we feel pretty confident that this is not just a misconfigured network node in Penn Station, which would make sense.
1689150	1690090	It's a deep station.
1690090	1691390	It's surrounded by a lot of concrete.
1691390	1692790	There's a lot of trains going on.
1692790	1698130	But we think this is most likely law enforcement, either NYPD or ICE or somebody running around there.
1698130	1700590	And again, we have the PCAPs to further analyze.
1700590	1711190	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.
1713590	1718310	Finally, we did get a lot of results from the many protests that happened over the course of this summer.
1718310	1721330	The No Kings protests and other sort of associated protests.
1721690	1726130	And on analyzing those, we didn't find anything suspicious.
1726970	1733550	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.
1733550	1738630	Facial recognition, license plate readers, location databases from .fog data science.
1738910	1745470	So maybe protesters can upgrade their throat modeling a little bit to worry less about MC catchers and more about all those other things.
1745470	1747010	At least here in the US.
1747090	1751450	But we hope that activists will continue to bring Ray Hunter to various protests.
1751450	1755310	Because in an authoritarian country, things can change very quickly.
1755310	1758370	And if we do start to see this happen, we want to know.
1760090	1762030	We have more results as well.
1762030	1764150	But they're more ambiguous, the other ones.
1764150	1767730	And we're still analyzing them and trying to determine whether or not they're false positives.
1767830	1771210	But we have some cool results that I've already talked about before in other talks.
1771430	1774450	From Embassy Row in Washington, D.C.
1774450	1775750	that a friend of ours did.
1776330	1781750	An MC catcher that we think we found at the Democratic National Committee that Wired went out and did.
1781990	1783770	And various other cities as well.
1783770	1785630	And we hope to get some from your cities too.
1787250	1789370	We still have a lot to do with this project.
1789490	1792570	We need to do more testing with simulated attack environments.
1792570	1797310	If you want to run a fake stingray at home, please don't.
1797310	1798910	You'll make the FCC very mad.
1798910	1800170	This is not legal advice.
1800170	1801290	But I'm not a cop.
1801290	1802570	I'm not telling you what to do.
1803010	1806670	We need to do more user testing and we need to get UI improvements.
1806670	1810170	Right now, it's a lot of rust heads working on this project.
1810170	1815790	And even though it's a very pretty UI, there's probably a lot that somebody who actually understands design could do.
1816050	1817990	We want more and better heuristics.
1817990	1820910	With the caveat that we really want to minimize false positives.
1820910	1826290	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.
1826870	1835250	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.
1835470	1837070	So let's take RAN or global.
1837070	1838670	How can we do that?
1838670	1839290	Yeah.
1839290	1841930	I mean, why is there even a need for more devices?
1841930	1844050	Couldn't everybody just run Anorbic?
1844390	1845390	Well, no.
1845390	1849090	Depending on the IT region you live in, your radio may not support local bands.
1849090	1859370	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.
1859590	1865770	And even within a major region, different devices will have different support for different bands as well.
1865770	1874470	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.
1874650	1876710	So broader is definitely better in this case.
1876710	1886130	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.
1886130	1888470	So together, we can make Rayhunter global.
1888510	1900270	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.
1900290	1905830	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.
1905830	1906910	I'm sure I could email...
1906910	1907970	It's all penguin-based.
1907970	1909050	It's all penguin-based, yeah.
1909050	1910990	I mean, everything's running Linux anyways, right?
1910990	1915690	So I'm sure Kim Stanley Robinson knows, I haven't emailed him yet though, but maybe he'll let me know.
1916710	1921610	Yeah, so, I mean like, one of the most useful ways is with device porting.
1921610	1929370	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.
1929610	1931530	So what is it like to port a device?
1931530	1935350	Well, first, you have to root the device, and there's many methods to do this.
1935350	1940230	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.
1940230	1942050	And search engines are definitely your friend here.
1942050	1944670	There's been lots of really good research in this space already.
1944850	1947970	Many devices already have publicly discovered backdoors or vulnerabilities.
1948510	1955170	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.
1956350	1959730	So, once you have root, establish a persistent connection over Telnet.
1959730	1963630	ADB also works, but it's more complicated and more code for us to manage.
1964150	1967450	Build a version of Rayhunter for your device using the headless display mode.
1967810	1970370	Check whether you're getting useful information out of DevDiag.
1970370	1979190	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.
1979690	1984110	If you're getting GSM RRC messages, this is probably what's happening.
1984110	1990030	So, when this is done, and you've verified Rayhunter is working, add a display method for your specific device.
1990030	1991650	If it has a screen, that's great.
1991650	1993870	You can probably use our generic frame buffer code.
1993950	2001690	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.
2001690	2004090	We have some example code you can look at as well in our repo.
2004590	2006370	Then you can go ahead and write installer code.
2006370	2009710	We have a unified Rust binary with different modules for different devices.
2009710	2017030	Implement one that will root the device, install Rayhunter, test whether Rayhunter is running, and add utilities for starting Telnet or ADB.
2017030	2019690	We don't want to leave Telnet on all the time, right?
2019690	2023770	Somebody on your LAN shouldn't just be able to get root on the device just after they connect.
2024130	2027490	So, at this point, you can open a PR, and we'll take a look at it.
2027490	2029350	We can have some back and forth on it.
2031030	2032590	So, these are the binaries.
2033950	2040530	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.
2040590	2049290	Initially, our install process was a shell script, coupled with a small Rust binary written by MJG to unlock ADB access to the ORBIC.
2049290	2063230	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.
2063230	2067310	This quickly becomes something unwieldy and much larger than just being a shell script.
2067830	2077910	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.
2077910	2079350	This is what we use today.
2080390	2088750	So, initially, for people contributing, one of the largest issues was that our tool chain required GCC for the ARM target.
2088750	2099330	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.
2099330	2102390	And this could take multiple hours, depending on the processing power of your machine.
2103070	2107430	You can use tools like Cargo Cross, but those also take a long time to build the Docker container for.
2107450	2114090	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.
2114390	2127570	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.
2127730	2129710	So, this doesn't need to be necessary.
2129710	2132450	And we're not doing anything GCC-specific in this project.
2132450	2134070	It's a pure Rust project.
2134570	2137070	We're using a static, you know, we're building a static binary.
2137070	2141270	We're not linking to anything glibc-specific, besides libusb.
2141270	2147010	So, we replaced the Rust rusb bindings for libusb with a pure Rust library called nusb.
2147010	2151550	And at this point, everything's Rust, we don't need glibc.
2151550	2153110	But the final challenge was the linker.
2153110	2159750	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.
2159750	2164350	So, we were able, with a few tweaks, to be able to just use the Rust LLVM linker.
2164350	2169130	This means that today, if you want to contribute to Rayhunter, you only need the tools installed by Rustup on your machine.
2170290	2175750	So, if you don't want to work directly with us on this project, there's still other opportunities to contribute as well.
2175750	2186350	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.
2186570	2190710	And if you don't want to write some code, there's still other ways you can help as well.
2191490	2191950	Yeah.
2191950	2198350	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.
2198350	2201430	We need people who are interested in field testing this.
2201430	2204050	We want to bring this to more cities in the US.
2204050	2205950	We want to bring it all over the world, like I said.
2205950	2210590	So, if you're interested in running one of these somewhere, please let us help you get it installed, get it running.
2210650	2220510	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.
2220670	2223830	Last but not least, we of course want more help from telephony experts.
2224010	2227870	The telephone network and telephone technologies are really weird and they're hard to understand.
2227870	2232850	And there are very few people who deliberately do understand it because it'll drive you insane.
2232850	2243030	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.
2244590	2251730	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.
2252010	2253490	So, this is my son, River.
2253490	2255230	He's six and he's very cool.
2255610	2259350	And he was asking me what my talk was about at DEF CON.
2259350	2269970	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.
2270150	2272310	And he goes, oh, and he thinks about it for a minute.
2272310	2276670	And we've invented a thing to help stop that from happening and detect it when it happens.
2276910	2285170	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?
2285870	2288950	Which I thought this was really good advice from a six-year-old.
2288950	2291890	He clearly understands the entire problem space.
2292090	2295830	So, in conclusion, DEF CON, turn off your phones.
2297770	2299430	Thank you all so much.
2304090	2307070	We want to kill the myth of security rock stars here.
2307070	2309410	None of us do this work alone.
2309410	2311350	We all stand on the shoulders of giants.
2311490	2317250	I want to thank Sangwook Bae and Rudy Wang at Cape for helping testing and providing a commercial MC catcher and thinking about heuristics.
2317330	2320570	Matthew Garrett for originally routing the ORBIC and letting us know about it.
2320570	2328210	Andy Cara, Russ Hanneman, Dragorn, Gary Miller, Yoshikono, Alex Gantman, Sobrato Day, Alex Ross, Bradley Reeves for their advice and connections.
2328430	2332830	Folks at Osmocom and QC Snooper and Snoop Snitch for paving the way on this work.
2332970	2338270	Yamna for all her amazing work at EFF and elsewhere, protecting millions of people from cell-side simulators.
2338650	2341850	And also, our open-source contributors.
2341850	2345690	Yeah, I specifically want to thank Untitaker, who's put in a huge amount of work on this project.
2345690	2350870	And also, Sasha Nora, Natalie Rain, Matej Kovacic, Movie AX, and all of the FOSS contributors.
2350870	2353990	We just had another one port a device while we were getting ready for DEF CON.
2354470	2365510	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.
2365850	2369610	And last but not least, thank you to all our EFF members for supporting this work.
2369610	2373330	We couldn't have done this without your donations, without your membership, without your love and support.
2373330	2376070	So thank you all so much for making this happen.
2378610	2380470	And thanks for coming to our talk.
2380810	2385130	I'm also looking for a better job, so if any of you have any cool opportunities, hit me up over email.
2385130	2386170	Yeah, hire them.
2388410	2389390	Thank you for coming.
