Hi, my name is Cooper Quinton and I'm here to talk to you today about detecting 4G base stations in real time. First, a little bit about me. I am a senior security researcher with the Electronic Frontier Foundation. I have a toddler and a new baby who is less than one week old, which should explain the bags under my eyes because I'm very tired. And it should also explain the dad jokes in this presentation. I'm also a former teenage phone freak. I spent a number of years building strangely colored boxes to do nefarious things to the phone system, which might explain why I got into the work that I'm going to present here today. I work for EFF or the Electronic Frontier Foundation. If you're not familiar with us, our work can be found at EFF.org. We're a member supported non-profit and we defend civil liberties as they intersect with technology. We think things like freedom of speech, the right to assembly, and the right to privacy exist online as well as offline, and when you interact with technology as well as when you don't. And we've been defending these rights worldwide for more than 30 years. I work for the EFF Threat Lab specifically, and I'm going to talk about that in a second. But before I do, I want to take a moment to thank my colleague Yamina. She's no longer at EFF and has joined a new company, but this work is as much hers as it is mine. She's a really amazing and smart person, and if you like this work, you should check her out at Rival Elf on Twitter. None of this would have been possible without her. So what is Threat Lab? Threat Lab looks at technology that targets at-risk people, specifically activists, human rights defenders, journalists, domestic abuse victims, immigrants, sex workers, minority populations, and political dissidents. Anybody who is at risk of violence for doing the work they do or simply being who they are. And the technology that we look at usually shares a few similar goals. To gather intelligence on political opposition, to spy on people illegally or when they've left the country, to locate, capture, extort, and harass people whose views you disagree with, and generally to stifle their freedom of expression and prevent them from speaking out and doing the work they do or even just living their lives. We look at a couple of different types of technology in this work. One of the main types of technology that we look at is state-sponsored malware and spyware. This is malware used to spy on people through their phones or their computers, and that's a big part of what we do. But another part of what we do is look at the technologies that law enforcement use to spy on people on the streets when they're going about their daily lives. And one of those technologies is known as a cell-site simulator. So what is a cell-site simulator? A cell-site simulator is a transmitter or receiver that intercepts metadata and location information from cellular phones, often by masquerading as a legitimate cell tower. The terms MCCatcher, Stingray, Hailstorm, fake base station, and cell-site simulator are all pretty much interchangeable, and for the purposes of this presentation, we will use them interchangeably. So they all mean the same thing. So how did we get interested in cell-site simulators? Well, it all started back around Thanksgiving of 2015, when I started getting messages from people at the Standing Rock Indian Reservation in North Dakota. At that time, there was a large series of protests going on at Standing Rock to protest a pipeline which was being built through the reservation to deliver oil. And people at those protests had started seeing strange things which they thought might be indicative of the presence of a cell-site simulator. Some of them had installed applications on their Android phones which reported to detect cell-site simulators, and they sent me the screenshots of the detections. I thought that these screenshots were suspicious enough that I thought it was worth going out to Standing Rock to see if I could detect these for myself. So I loaded up a few different apps on my phones, and I grabbed a couple of $20 software-defined radios, and off I went. When I got to Standing Rock, I started running the apps, I started scanning the 2G GSM cellular spectrum for any anomalies with the software-defined radios, and set about to see what I could learn. And what I learned is that I have no idea what I was doing. The apps were showing me some results, but I couldn't really figure out what those results meant. Did they mean there was actually an MC catcher around, or did they just mean that they that the cellular network was having a hard time and failing in the normal ways that cellular networks fail all the time? Furthermore, I looked at what the 2G spectrum was producing from my software-defined radios, and realized quickly that there were no 2G GSM towers anywhere in the area, real or fake. There was nothing going on on that spectrum at all. All of the connections in the area were over 3G or 4G. So this was very confusing. I didn't know what to make of this. I certainly hadn't found any hard evidence of MC catchers, and it seemed like the methods that I was using wouldn't quite work. Up until that point, all of the knowledge that we had about MC catchers was based on an older model called the Stingray, as shown here. The Stingray is made by a company called Harris Corporation, and it is perhaps the most famous MC catcher. It works natively on 2G, and it takes advantage of vulnerabilities in the 2G specification, two trick phones into connecting to it and giving up their location and metadata for their calls. Now, since there was no 2G anywhere in the area of Standing Rock, we figured that any MC catchers that were out there must be operating natively on 4G or LTE. What's more, we had just discovered that the city of Oakland, which is a major city in California, had upgraded their Stingray to a new model of MC catcher called the Hailstorm. The Hailstorm purported to operate natively on 4G and have all the same characteristics, all the same capabilities that the Stingray has. This was interesting to us, because up until now we had assumed that 4G LTE had fixed all of the vulnerabilities that the Stingray could take advantage of, and therefore might be impervious to MC catchers. But clearly, this was not the case. So we figured that the best thing to do was figure out how 4G LTE native cell site simulators, such as the Hailstorm, could possibly work. And more importantly, could we be able to detect them? Yamna and I set about reading all of the academic papers we could for the next year about vulnerabilities in the 4G LTE protocol. And what we found are that there are several different vulnerabilities that next generation CSS could be taking advantage of. Yamna wrote all these up in a really excellent white paper called Gotta Catch Em All, which is a nice high level summary of all of the vulnerabilities and how they work. I'm not going to get into this here, because Yamna's paper is really excellent, and you should really just go read that. But suffice to say, we found several ways, and we feel like we have a pretty good understanding of how a Hailstorm or a similar cell site simulator might work. So now that we've found out how they work, how often are they being used? Well, in the US, we can use Freedom of Information Act requests to figure that out, at least from government usage. So the Immigration and Customs Enforcement wing of the US government used their cell site simulator 466 times between 2017 and 2019, according to documents obtained by the American Civil Liberties Union. In local law enforcement, the city of Santa Barbara used their cell site simulator 231 times in 2017, roughly equaling the number of times that the cell site simulator was used by ICE, a federal agency, but for one small city in California. On the other hand, Oakland, California, which I talked about earlier, only used their cell site simulator 3 times in 2017, 4 times in 2018, and once in 2019. And we think that the reason for this difference is that Oakland has strong privacy laws about when the police can use the cell site simulator, why they can use the cell site simulator, and what sort of reporting they have to do after they use it. And we think this is evidence that those privacy laws actually work very well. But of course, not everybody can be... we can't request freedom of information documents from everybody. For example, we think that foreign spies are using MC catchers around Washington, D.C. and the U.S. Capitol. And we think this because the Department of Homeland Security put out a report saying that they had found several MC catchers in the area, which they assumed were operated by foreign spies. We also think that cyber mercenaries, such as the NSO Group, are using MC catchers. There was a report from Amnesty International about how NSO Group had used MC catchers to spy on a Moroccan journalist, presumably on behalf of the Moroccan government. Also, we think that criminals are using MC catchers. There's some body of evidence that Mexican drug cartels are using MC catchers to keep tabs on the Mexican federal forces that are going after them. And this makes sense. It only costs a couple of thousand dollars to build a really nice MC catcher. And this is certainly within the budget of a well-funded crime group such as a cartel, or even a smaller crime group such as a robbery ring. So, since we can't FOIA everybody, we also want to figure out how we can detect 4G MC catchers. There are a couple of previous attempts at this, and two schools of thought, which I'll call app-based and radio-based. The app-based school of thought, such as Android MC catcher detector and Snoop Snitch, usually is a free Android application that can be downloaded from the Android Play Store. They're easy to use, but they can only get data about the transmitters or base stations that your phone is connecting to. They also get a lot of false positives and false negatives, because a lot of the things that might look like MC catcher activity are also things that happen often in the cellular network, and you have no way to tell whether this is a normal glitch or something that's actually suspicious. On the other hand, there is a school of thought called radio-based MC catchers, and these are things such as the Seaglass project out of University of Washington, or the Sitch project by Ash Wilson. The advantages of these are that you can get better data. You can get data about all of the transmitters or base stations in an area, not just the ones that your phone is connecting to, and you can get lower level information. The cons are the downsides are that they're harder to set up and use. You have to know Linux, you have to know some programming, and you have to buy some hardware, so it's not as cheap. So after looking at these, we thought can we detect 4G cell site simulators? How can we improve on these previous attempts? Well, one thing we can do is to collect lower level data. We like the radio-based approach to be able to see all the towers in the area, not just the ones that our phone chooses to connect to. And we can also compare that data over time to look for changes and suspicious new events. But the most important improvement that we can make is to not look at 2G or GSM towers, which all the previous technologies do, but to look at the 4G spectrum and to look at the anomalies we expect to see in 4G MC catchers. And the other really important thing we can do is verify the results, meaning to actually track down suspicious towers and see them with our own two eyes. If the suspicious base station is on top of a normal cell tower, that's probably fine. If it's on top of an embassy belonging to a foreign government, that is more suspicious. And if it's in the back of an unmarked van, that is extremely suspicious and most likely to be an MC catcher. So me and Yamana set out building our detector, which we call Crocodile Hunter. Crocodile Hunter is an open source software stack which is based on SRS LTE. SRS LTE is an open source LTE implementation which implements not only the base station and back end of LTE, but also the mobile phone equipment itself. It can be an LTE client as well as an LTE server. We also use Python for the database and front end and heuristics and number crunching about whether something is a suspicious base station or not. The hardware stack is a laptop or Raspberry Pi running Linux, a USB GPS dongle, a software defined radio, and two LTE antennas. This is very small and can easily fit into a backpack or into your car for concealability. So this is an example of the Crocodile Hunter user interface. Each of the orange dots and black skulls are a base station. This was collected in downtown San Francisco in 2019. The black skulls are base stations that we think are suspicious, but of course not every one of them. In fact, in this case, probably none of them are cell site simulators, but they are all base stations that Crocodile Hunter found suspicious and we should probably follow up on. The way that Crocodile Hunter works is we use SRS-LTE to scan a list of the 4G frequencies for information blocks. These are packets which are sent out by the base stations fairly frequently, which contain information like a cellular ID, a unique ID for the base station, and a few other pieces of interesting information. SRS-LTE decodes the system information blocks and sends them back to the Python server over a local socket. The Python server then does a few things. The first thing we do is try to map out the antennas in real time. We use a method called trilateration, which is similar to triangulation, and some radio physics to estimate where all the base stations are located. We then can compare this to a public open source database, such as Wiggle or OpenCellID, to see if this transmitter has a history. Is this transmitter regularly seen in that area? Is this transmitter one that's been in that area for a while? And this is predicated on the idea that cell-site simulators will tend to be mobile and only show up for a little bit and then leave, and not stationary sitting in one place for months or years. Then we can look for anomalies, now that we have the base stations and we've mapped them out. We look for things like base stations that move, base stations that are in two places at once, base stations that are new and haven't been seen before, or base stations that are only seen once and then never seen again. Things that are changing parameters or missing parameters, all of these things are suspicious. And when we find a suspicious base station, we don't immediately assume it's a cell-site simulator or an MC catcher. That's why we have to go physically verify it and take a look at it with our own two eyes, to see if this is a false positive or to see if this is the real thing. So what have we found so far? One of our earliest tests was in Washington, D.C., where we found a really interesting base station. Normally, it would give the mobile country code and mobile network code of 310 and 410, which correspond to the United States and AT&T, respectively. There was another base station, similarly, giving the country code and network code of 310 and 410. But in one instance, those base stations, one of them, suddenly started broadcasting a country code and network code of 350 and 490. 350 is the country code for Bermuda, and 490 is a network code which is not used by any network provider in Bermuda, but which is used by Sprint or T-Mobile in the United States. But notably, not AT&T, which is who this base station belongs to. It even had the same base station ID. In the other case, the base station suddenly started broadcasting the country code and network code of 308 and 451, which belong, respectively, 308 to Saint-Pierre-en-Miquelon, which is a small island off the coast of Nova Scotia, and 451, which is not used by any network anywhere in the world. So this is really interesting, and why the heck is this happening? We have no idea. This is certainly not a result we expected to see, and although it is suspicious, we're not really sure what's going on here. So we kind of wrote that off as an anomaly and meant to investigate it later. Later that summer in Oakland, California... Later that summer in Oakland, California, there were a series of Black Lives Matter protests, during which we ran Crocodile Hunter between June 3rd and July 15th. And for most of that time, saw what we would expect to see. Base stations from T-Mobile, AT&T, Sprint, and so on. But in two instances, what we found were really strange base stations suddenly broadcasting. Sorry, in one instance, what we found were three different base stations suddenly broadcasting different country codes and network codes. And these were all seen on June 19th, which was the of a large protest in downtown Oakland, which marched from the port of Oakland, one of the biggest shipping ports in the world, to Oakland City Hall. In one case, the base station was broadcasting a country code of 213, which is used by the country code of Andorra, and 688, which is not used by any network in Andorra. In another case, the country code was 710, which is used by the country of Nicaragua, and 738, which is not used by any mobile network provider in Nicaragua. And in the third case, it was broadcasting the country code of 319, and a network code of 59, which isn't used by any country or network anywhere in the world. So these are, again, very suspicious. And we only saw them that one time, despite doing scans for for three different scans over the course of a month and a half in the same area. This is pretty similar to what we saw in DC, and we still don't know what to make of it, but we think it's very suspicious, and we're hoping to collect more data. Finally, what's with the name? Well, there is a man, Steve Irwin, who used to run a show called The Crocodile Hunter. And unfortunately, he was killed by the animal, the stingray, while he was swimming in Australia. You may remember, the stingray was the name of one of the original MC catchers. So we named this Crocodile Hunter to pay our respects to Steve Irwin. Thanks, Steve. Much love. So what is our future work here? Well, we have ongoing tests in Latin America with the FADE project, in Washington DC, in New York City, and hopefully in your hometown and in countries around the world. The project is open source, and we would love for you to download it, take a look, and run it yourself. We would like to get more data. We think that this can only be improved with more data. We want to see if those strange networks with strange country codes pop up again in other places and try to figure out what that means. And we also want to improve our heuristics as we see what MC catchers look like in the wild. Finally, how can we stop cell site simulators? Unfortunately, there's not much that we as individuals can do. And unfortunately, 5G doesn't solve the problem. In fact, it leaves many of the same security problems that 4G has still open. One thing we can do is end 2G support on iOS and Android. 2G allows some of the worst abuses of MC catchers, such as listening to the content of phone calls. And if we stop 2G, that would at least make the problem a little bit better. We can also eliminate some of the vulnerabilities in 4G, and there are some amazing proposals for how to do that, which I can't get into now, but will be linked to in the slides. We can get more data about the threat that cell site simulators pose and how to detect them, which will help us pressure our governments to pass stronger privacy regulations and to pressure standards orgs, carriers, manufacturers to care more about user privacy and take this threat seriously. None of these are foolproof solutions, but we're not even doing the bare minimum yet, and I think that we could do better. The final takeaway is here. We have a pretty good understanding of the vulnerabilities in 4G which commercial cell site simulators might exploit. None of the previous MC catcher detector applications really do the job anymore, but we've proven that the same principles which worked for previous cell site simulator detection apps should work for the next generation of cell site simulators. Finally, the problems of CSS abuse can be solved, but it's going to take a lot of work, not only engineering work, but political work as well. Thank you for your time. Again, I'm Cooper Quinton. I'm with the EFF Threat Lab, and I'm a senior security researcher there, and you can find me on Twitter at CooperQ or email cooperq at EFF.org, and Crocodile Hunter can be found on our GitHub page here as well. Thanks, and I hope you enjoy the rest of the conference. Bye-bye.