Thanks for joining us here at the Wireless Village. My name is Balint Seber. I'm the Director of Vulnerability Research at Bastille, and I'd like to talk a little bit about my research into emergency warning sirens. This research is called Siren Jack, and I hope you enjoy it. If anybody has any questions, feel free to shout out. So as an overview, I'm going to talk about these systems and sirens in general and talk about the two phases of the research, finding the signal and analyzing the signal, and then the disclosure process that we went through with the vendor and suggestions to other vendors and other folks engaging in this kind of security research in the future. Emergency warning systems, put your hand up if you've ever heard a siren go off that's part of some sort of... great. So as you may know then, they're mass notifications to the public. They're used for tornadoes, tsunamis, flooding, etc. and other incidents that might occur where people over a large area need to be notified where other methods like mass texting or the like fail. So the other alternatives that are in common use are sending an alert to everyone. Unfortunately, we had a very bad example of how that didn't work out in Hawaii in the very recent past. And also there's EAS, the Emergency Alert System, that was originally created so that the president, could address the entire population, I believe, within 10 minutes. But sirens are also another great way to do it. They're independent infrastructure. They can be off the grid, so to speak, and controlled remotely. And so they're a very popular choice today. They date back to World War II, the civil defense or air raid sirens, like that one in the top right. But nowadays you mainly see the electronic kind, which is in the bottom left. Sorry, bottom right. And then the center one there are the oldest sort of mechanical siren that would rotate and produce a very loud sound. And if you're all interested in going deep into this kind of technology, the one-stop place you need to visit online is called the siren board, airraidsirens.net. You know, there's a subculture for everything. This is it for emergency warning sirens. Anything you could possibly imagine is discussed on this forum. And some of the big players in this market, are these folks here. And this entire line of research became motivated by being in San Francisco. Hands up, who knows about San Francisco's siren system and the Tuesday noon test ritual? Couple of you? Yeah. So I've got my laptop plugged in. Hopefully we'll hear some audio. No audio. Excuse me, anybody from the wireless village? Could you help me get audio out of my laptop? I've plugged in the 3.5 mil thing. Do I need to switch something on or do anything here? I've plugged it in and I've got my volume right up. Maybe, let me check if it's going through HDMI. Is your sound settings? Yeah, I'm just checking that. No, it's still the right place. Why is the master turned all the way down? Oh, master is on Soundflower, that's the problem. There we go. That's weird. Thank you. Alright, let's try that one more time. Thank you for the help. There we go. So this is the sound of the San Francisco Tuesday noon ritual, where they test the entire system. This dates back to World War II. And if you move to the city and you haven't heard this before, it's quite an experience. You don't know what's going on. But then, you have the reassuring voice that it's only a test. So this took me by surprise when I moved, and I was wondering, well, how does it work? And I noticed that on my rides to work, there would be these poles with these sirens on top. And I also noticed there were radio antennas, so I thought, maybe they're controlled by a radio. And if you looked at one part of the city in particular, you'd see the Google Maps satellite sort of footprint marker of these sirens. You could see four of them sticking out there. And I would, you know, see them on the poles, and it would have an antenna, a control box, the horns at the top. And I thought, well, a security researcher in me was wondering, I wonder whether this system is actually secure, because this kind of emergency warning system needs the public to believe that it will fire in a legitimate circumstance and not go off with a false alarm. So I took some photos. You know, the vendor left the brand sticker on the control box. So I looked them up. Interestingly, they've just revamped the website a little bit. It used to look like that. That was a nice high-res image, but with the Wayback Machine, I guess they stole low-res versions. So they spruced it up recently. And I started looking at the spec sheets, and these highlighted sentences really stood out to me. So it's saying that they use FSK, DTMF, or two-tone sequential data signaling. They have optional upgrades for digital and trunked radio networks. And it says there in the spec table that the signaling method is encrypted FSK, DTMF, or two-tone sequential. So I was thinking, well, if they have FSK, then they're probably going to be using some protocol, and if it's encrypted, then that's great. But of course, as a researcher, you want to verify that's the case. So this kind of turned into an epic fox hunt to use the ham parlance. So, you have to remember that I don't have access to the system, and I'm starting out from scratch, so I know nothing about it. So where do you start? Well, you start by collecting open-source intelligence, and also looking at the radio spectrum, unfortunately only once a week, because the test only goes off once a week, and that restricts the window and the interval at which you can look at it, so that causes things to take longer as you peel back the layers. But the system consists of these siren nodes on the poles, these two various models. They have a central controller that talks to them either directly, it can talk to them directly, or via a repeater network. And I also found a nice informational video online, actually on the vendor's website, where they came out and did a sort of piece about this system in San Francisco. So it had some choice frames. It looked like it was being run or managed by the San Francisco Department of Emergency Management. And in the video, you know, they had these pictures of where the sirens are located in the city. They actually, for a very short period in the video, follow a tech there, and they show you the inside of a box. So I noticed, oh, look, there's a Motorola radio in the top left. Looks like a conventional radio, but not quite sure what model it is. And then elsewhere, you can see the kind of control units they use. And if you remember the picture of the one on the bottom, we'll see that a little bit later on. But looking at another photo that they have online, you could look at it a little bit closer, and these were CM200 radios. And interestingly, if you look at the spec sheet, they operate in two distinct bands for the two models. And so that sort of helps you restrict your search to still a large portion of the radio spectrum, but perhaps a little bit less. The thing is that I was thinking to myself, this is a public infrastructure system, critical infrastructure, and San Francisco has existing trunked radio networks that serves the large coverage area. So I thought, well, if you're going to use that, you're probably going to use an existing network to get the footprint you need. And so it might not be in either of these ranges. It might actually use the public safety networks that have already been established that are used by first responders in the city. So you can go on radioreference.com. They have very detailed lists of all of the networks in place there. The two public safety ones there are the Motorola Type II Smart Zone, analog trunk network, as well as the P25 digital trunk network. And then you can also look up and see all the frequencies that they have allocated for all the channels there. And if you look at where the sites are, they put them in strategic locations to have a good footprint. The FCC, as you may know, has the Universal Licensing System, so you can perform a variety of searches there to try to find information related to this. And so I did a bit of searching and figured it was probably going to be one of more frequencies licensed to San Francisco City and County of. If you look at these records, they have the radio surface, so it's probably going to be something in the public safety category. And they also have station classes, and if you look that up on the Wiki on Radio reference, which is very helpful, that explains what all these station classes are. So that might give you a hint as to whether certain licenses and frequencies are maybe what we want to look out for. They also have admission designators, which are these codes that give you some form of description of the bandwidth and content of the signal. And there are a whole list of them. But again, with all this kind of open source intelligence, it quite often turns out to be inaccurate or just plain wrong. So you've got to treat all this with a grain of salt. And also control points, so they're specific addresses where radio communications on these license frequencies can take place. So maybe that has something to do with... This address is, I think, right next door at the Department of Emergency Management. So all these sort of candidates, but still a lot of combinations to look at. So again, more addresses. The Department of Emergency Management has a nice public-facing informational page about the system. You can download the map that shows you where all of the nodes are in the city, approximately. And they've had their share of false alarms, too. There was a malfunction where a couple of sirens went off in the middle of the night, and they issued a blog post about it, and then apparently looked and figured out what was wrong and fixed that up. So I set about working to find the signal on the radio spectrum, used my antennas in the then attic, and hooked them up to a variety of Edis Research USRPs. SDRs had started doing captures of the radio spectrum at around about Tuesday, at midday on every Tuesday. And so this was a little over two years ago when I moved to the city, and I was mulling all this over. So if you look on select slides, I've sort of got a date stamp in the top right. So this was in 2015. They did an initial capture here, and I'm assuming you all know how to read a waterfall, but in this case time is top to bottom, and frequency obviously on the x-axis. This is centered at 850 megahertz, and here the Motorola Smart Zone trunk network conventional analog channels are all happening on the right, plus other traffic is interleaved there. So I thought, well, maybe that's the first place to look and just get to know the radio landscape. I looked at also the P25 digital trunk network, and you can see all the traffic channels happening in there. If you zoom in, it's kind of neat, because you can then see the individual P25 transmissions coming out of the repeater there. And then, interestingly around this time, coincidentally, the Dallas siren attack happened. Who remembered Dallas? The Dallas siren attack? Was it 156 sirens went off in the middle of the night? And that was... It was purported to be a replay attack, because they were using an older system that was controlled with fixed DTMF tones. So I'm sure you're all familiar with DTMF tones on a keypad. You know, if you have a bow thing like this, you can just key up and press the buttons. So if somebody had been listening to the tests that they had been conducting, I think it was on a monthly basis there, you could either decode the tones and play them back on a radio, or you could just record them on a tape recorder or your laptop and then play them back over the air. And that's what people guess actually occurred. And just shortly after that, ATI, the vendor, released this statement... Sorry, not a statement. It was a press release entitled, Is my emergency notification system safe from hacking? And in that, this sentence caught my eye, which was, Many older systems include few, if any, of the additional security features ATI can provide. So DTMF is obviously not secure. Sounds like they're doing something fancy. All ATI command packets, including those sent over the radio, that would set the sirens off, are protected by several security features, including encryption with AES. So I thought, oh, wow, okay. Well, I might be able to find the signal if it's correlated in time, but if it's AES, then it'll look pretty random and I won't be able to find anything. But keep going. So I did some more captures, focused on that public safety trunk network. If you zoom in there, it's kind of neat, because, you know, with a good antenna and filtering on the output of the repeater, you can get really nice, strong signals. But as you might imagine, recording this at a high bandwidth to RAM disk takes up a lot of space, and there are also probably hundreds and hundreds of individual transmissions that you have to read through. I mean, this might only be a single packet that appears on the air. I had no idea. So that meant I had to go through every single one of them. So that took a long time, and I developed some tools that would automatically detect when a frequency had a transmission on it and then isolate it and then extract a separate file. So then I just basically had hundreds of WAV files and I would just, you know, open... It was a quick look in Finder on my Mac and just, you know, scroll down and listen to the content of each one just to see. And it was just mostly on this analog system, people talking, going about their business. I just remember that there were times when somebody would key up on air and just talk about something, completely unrelated to the siren system at midday, but I would actually hear their radio microphone picking up the sirens going off in the background as well, which was kind of funny. But every week then I would sort of keep a log and make a log of interesting signals that I heard. There was nothing that repeated week to week, nothing compelling, no obvious candidates. I turned my eye again to the P25 network, and in a similar fashion with the individual recordings, I used OP25, the open source decoder, to hook that up and had it decode all of the channels that were available and listen to them as well. And I had this sort of nice plotting feature where it'll actually extract the timing of the various frames that go through a P25 transmission and then color code the waterfall so I could see what was a trunking control channel, you know, what was a data transmission, what was a voice transmission there. And then I focused on the 400 to 500 megahertz band, these captures here are 50 megahertz wide, so I was using a USURP B210, streaming it to RAM disk for about a minute. And as you can see, there's a whole lot of traffic there, so even more signals to look at and potentially find. And again, I'm trying to find something that correlates with the noon event. So if you zoom in on that and look at the individual signals, they're very narrow compared to the whole bandwidth, a lot of things to analyze there. Looked further down in the 400, and what's an important point to make is if you really want to get serious, you need to have some good RF filters. So I want you to compare this picture in which there's a lot of out-of-band interference. I think it's some LTE downlink transmissions from a nearby cell tower. This is going to be the same capture but with filters. So that to that. Big difference. Highly encouraged. And as you can see, there are other strong signals being transmitted, but again, that was uncorrelated. And not repeating with the same timing from week to week. Looked online, found some more videos. This was an example of an older control unit. Just little clues to pick up about how the system might work. They have this portable box. Apparently San Francisco also has one, so if the building gets destroyed in an earthquake, they can take this portable unit and speak through it and address the population, tell them where to go. Frames from the video showed dialogs in the software that would command the system to do something, and then they filmed the screen, so you could see bits and pieces of the software, and this would suggest that the different siren nodes might have different modes or status indicators. So I did some more surveying in the city and went up to some of the hills and found other poles there, and I was interested in now the length of the antenna, because that might give you a hint as to what frequency band to look into. So this is an omnidirectional antenna. But the thing about these is that, you know, if you're designing an antenna, you know the frequency and therefore the wavelength that you want to tune to. You can pick some division of that. And, you know, you might take a guesstimate about how long that is, but that might be a collinear antenna, which is a number of stacked elements, any number of stacked elements. So it could be a completely different unrelated frequency to what you just guessed by looking at it. So that was tough too, but I thought, well, you know, give it a go. Maybe there are catalogs online where I could compare the dimensions of that. So, you know, you're not going to climb up a pole, so you have to try and figure out creative ways to guesstimate the length. So I pulled my bike up next to the pole. I tried to measure the width of the shadow that the pole was casting on the ground, use that to determine the width of the actual pole and relate that to the number of pixels, and then go up and extrapolate that as your pixel to meters ratio to figure out how long that omnidirectional antenna is. The problem that you learn quickly is that camera lenses obviously have intrinsic, I think, lens parameters that give you distortion effects, and so, you know, the pixel ratios relative to your measurement, wherever that was in the image, will be different at different extents of the image. So I did this a number of times and would just keep getting different results. So that was frustrating. And then, you know, various awkward moments of trying to actually film or take photos of the whole thing and look, because you want to look inconspicuous as well, right? So just being a little careful about that. So I did some more captures. Now, in the lower VHF band, 155 megahertz, there's a strong TV carrier to the right there. In this capture, you know, I had three or four computers that I was using capture with a bunch of usurps, so managing all that, just getting them all started in time, not having, you know, various issues crop up. Sometimes they started early, sometimes they started late. And you don't know how early they actually send the command to set them off or what happens afterward. And this one, I started, you know, early another week. So then I looked online at eBay listings, Amazon listings, various other photos to try and find antennas that looked like the ones that were deployed, because they had stickers on them at one point, but they'd worn off in the weather. So I found some candidates, and then I found some candidates in this catalog. But looking at the various combinations of dimensions and frequency, it made it even more confusing as to which one might be on the poll. So then I went absolutely nuts on Street View and went through the city and found every single one that I could find from different angles to try and get some decent average measure of potential candidate links. And still that resulted in ambiguous candidates. So then I started mapping them out, trying to remember so I wouldn't duplicate my efforts as I would go around. And, you know, this spread all over the city. And I'd seen this informational video before. At this point I'm sort of really not sure what to do because I'm not seeing anything obvious. Again, some choice frames. This is inside the Department of Emergency Management. You've got the software there running with the sirens on the map. Close-up of that. And then this dialog that they used to set it off. I think it says noon Tuesday there in the text box. Remember this was the control unit we saw earlier. So presumably this is the control unit they have there. And then I remember lying in bed at 2 a.m. looking at this video, not knowing what the next move was going to be. And I saw this frame show up for just a second. It was just a very quick transition that they made. And I... First person... Who's going to be the first person that tells me what the clue is? Ready? That's right. It's not an omnidirectional antenna in this one. It's a Yagi antenna. Yagi antennas are great because they show you the direction of the transmitter, and they also have far more visually characteristic features that can help you identify the antenna. So that's there in just the very bottom of the frame. So the question was, you know, great. They took a photo of it. Where is it in the city? There are over 100-odd sirens, and I hadn't seen any on Street View yet. So I kept searching, and I found it. And it actually happened to be one up from one of the ones that I was looking at on the Ocean Beach west side of the city. And there it was. So I went down with my camera and pretended to be a tourist taking photos. Oh, look, Ocean Beach on a lovely day. These people having fun on top of a sand dune. A big tourist ship leaving the port. Oh, look, a Yagi antenna on a pole. So indeed, lots of things you can tell here. Three elements. You've got the differing widths of the elements. And on the driven element in the middle, you've got that thicker piece that comes off the main arm. And then also there's a little sticker that might tell you information about the manufacturer. I couldn't quite see what was on the sticker. And on the way home, I took some more pictures of Omnis just in case. But using the compass bearing, these were the rays that I thought were the likely direction. And that kind of made sense because Twin Peaks is in the middle of the city. So it's an ideal point to broadcast. And if you draw the lines together, then it kind of nicely fits. And this was in Google Earth. When I pan the camera down, it makes sense that this was the only Yagi that I had seen. Because there's a bit of a hill in the way between the transmitter, the tops of the transmitter towers there at the bottom, and Ocean Beach, which is on the other side. So they needed a Yagi antenna to give them a little bit more gain to get the signal. And those two towers are the two small ones there. Not, you know, just offset from Sutro Tower. So one of them has the transmitter on there, the repeater. So then, great. Got a picture of the Yagi. What do you do now? Search through every single antenna catalog you can find from manufacturers that make Yagi antennas. And eventually, I finally found the candidates there. And if you put in the picture, it fits nicely. And what's good is now we have a very narrow portion of the spectrum compared to before where we have to look. So this is obviously VHF now. And it turns out I went back through the captures that I'd made, and I'd already captured the event. And I think there was just so many things that it was easy to overlook and not find. But this was here, and then I went back to another week. And this was the one where one of them started early, one of them started late. And again, this one I started early. And so I just caught the activity at the very end of the capture. But this is really zoomed in, so it's masked by all the other signals there. And what was interesting is if you look closer, you can tell it's a repeater system from the captures because the output frequency is on the right-hand side there. The input frequency is on the left-hand side. And if you look at the transmissions, they vary on the input side in signal strength because I'm at a static location, and there'll be each of the siren nodes, as it turned out, transmitting from closer or further away. But then the repeater that's repeating the transmissions from the central controller is always in the same location. You've got the first transmission there from the controller, the second one from the controller, and then you've got one from the controller, and they're in a much stronger response, so a siren close by. And then the controller, another one close by, another one from the controller, and then one further away because it's weak, another one from the controller, and then I didn't even get the next one because it might be across the other side of the city or it might not be working. And then the neat thing about these repeaters is that if you listen for long enough, by law, they're required to transmit their ident in Morse code, which is their call sign, which you can then look up in the FCC database. So this was great. I found the frequency, and then every Tuesday at noon, this would be my ritual. So I was also at the Baofeng there, and since this is a conventional narrowband FM network, you can just use a handheld to pick this up. So there are transmissions, and then... Hear that in the background? And then I went out to actually be there underneath one. And if you're nearby, you hear it's loud. So it gets loud. So next phase, analysis. Every Tuesday at noon, I did my captures, and then this is what the home lab would look like. I had some GNU Radio flowgraph running there, and this is obviously further along, but once I understood the packet format, it would just dump it to the screen. I could watch the status of what was going on, be recording it on my other machine. Some of you may be familiar with my GNU Radio flowgraphs. If you turn the disable blocks... You know, they're visibly off. It looks a little bit cleaner. But this was a... I implemented an optimal non-coherent 2FSK decoder with no clock recovery, because in this case, the clock drift was far slower than the total length of any particular frame, which simplifies your decoder design. Looking at the physical layer then, this is the baseband waterfall. And obviously, it was audio frequency... Shift king over FM. And you'd see at the header of the frame, there was some sort of sync or preamble, a payload, some post-amble or filler, and then the CTCSS tone that's left over to be able to get into the repeater, and then just the tail on the repeater. So if you FM demod that, then you could very clearly see the two tones there. This is already once... The band pass filter has been applied over those two tones. And then again, you have that same packet structure. And interestingly, if you look at the very faint line... I don't know if you can see in the... Oh, yeah, you can see it. The very faint line on the left side of the waterfall, that's just the CTCSS tone that's active and on the entire time during the transmission, so the repeater stays keyed up. Now, given these parameters, this is what it looks like. As the waterfall runs. And if you use a different transform size and a bit of windowing, then you can see the individual levels, they're jumping back and forth in the demodulated waterfall. Now, before I continue, given the sound and what you've seen so far, does this sound like maybe some other popular AFSK protocol that lots of people like to use? Yes. APRS. APRS. So this is not, you know, APRS or AX25, but it sounds awfully similar. But if you, you know, take a sample out, we need to figure out the board rate and deviation. If you, you know, slice around the zero point, you can very clearly recover your ones and zeros, whether your energy is above or below. And then if you do some simple cyclostation analysis, which is multiplying the signal by a lag version of itself and taking the FFT, you can find that the transmission is at 1200 board. All the things you need to know to decode. So this is the Bell 202 modem standard. It's also used by APRS. So we have the physical layer now. So once we extract the bits and do some slicing, then, interestingly, we have some structure there. But if you look carefully, it's not quite lined up between transmissions. There's a bit of change in alignment. Keep your conversation lower. Thank you. And you know that it's not clock recovery. The issue with clock recovery is I'm not using any clock recovery. But if you play in your text editor a little bit, it becomes clear that it looks like it's really just a start bit. So you've got eight bits to make a byte, and then you've got some number of, you know, idle zeros, and then you have your start bit, and then the next byte begins. This looks like a serial line protocol. And why would they have that? Well, they probably have some time during which buffers need to get filled between the controller and the modem chip, and that's just the idle time and, you know, it is what it is, and you just have to deal with finding that start bit. I thought maybe, you know, it might be some other subtle level of security, so I kept that information. And once you turn those bits into hex, then, again, clearly, some structure comes out. And this is, of course, a little bit worrying because if you expect an encrypted signal, you expect to see a very high level of entropy. Seeing this kind of repeating structure was a little concerning. Now, with the packet format, I noticed that there were these long strings of ones, or long strings of Fs, as you can see there. Usually that's a bad sign. It's usually a sign that you need to invert your bits. So when you invert your bits, then things look a little bit better. And these are actually the three transmissions before the siren would go off on Tuesday. And what was reassuring... Yeah, so these are the non-inverted three before they go off, and when you invert them, then things look better. And... Oh, I'm not there yet. I'm jumping ahead. We inverted? Yeah, so... Yeah. So we've inverted. Things are looking better. Long strings of zeros, you know, a couple of bytes changing here and there. And another week, I compared the same three packets, and what was even more concerning was that the packets were largely the same. So... The other thing I noticed is that it was approximately every 20 minutes a packet would get sent out. And so I was wondering, well, maybe there's some sort of keep-alive mechanism going on there, some periodic announcement. And what was curious here was that the periodic announcement didn't have a matching transmission on the repeater input. So that meant there was some box at the repeater that was doing these announcements. So with the packet format, you know, that happened every 20 minutes, and then I sort of kept looking at a lot of data and figuring out what fields stayed the same, what bytes changed for the announcements and what I called the trigger packets. But things didn't... still, you know, look like they were incrementing or anything obvious. So I thought, well, hang on, you can make a byte two ways. You can either pack it from the left or pack it from the right. So I thought, well, let's change the bit ordering there. And voila. You've got those incrementing digits now in the three transmissions before the sirens go off. That's pretty compelling. And I was guessing there's probably some sort of a checksum on there because I saw the last byte changing. And if you look there, the last byte changes and that also increments by one. So before I even noticed that, I thought, well, we'll try RevEng, which is a neat tool that can brute force CRCs, probably CRC8 because it's a single byte. No hits. What do you do when you get no hits? You go back to basics. You add up all the bytes in the frame, you mod it with 256, and voila, that was what it was. So looking at more data then, especially the timestamp stuff, I looked at various collections of bytes there, and... it became apparent how things were being encoded, and this was very clearly a timestamp. So you could see which column of bytes was being used to encode the minute, the hour, the second, and the day. And you just record for long periods of time and look at these patterns. And the system time did not match my war clock, so the system was running on its own independent time, but it was still proceeding with the rate of normal time, so to speak. So now this appeared to be a proprietary protocol, maybe unintentionally security through obscurity. You've got the normal features of a frame, and then no sort of Mac layer acknowledgement or anything like that. And then I mentioned the time announcements already. So very clearly there's no real security here, right? If the packets look largely the same each week and you figured out the pattern that is behind the changing bytes, being the encoding of the time, that's a security concern. What was also interesting is that after the sirens went off, the controller would then ping or request some status update from every single siren node. And then looking at the patterns there, you could figure out which field was used to address which siren. What was interesting is being privy to this, you could get a sense of the state of the overall system, which nodes were working and which ones weren't. So as the status would change, the check would happen. You have the trigger packets, and then the green would be pinging a node, and then the blue is the response from the node. I don't know what the information means, but you'd see the numbers incrementing. And then you'd also see retries. So that one there in yellow was the expiring retry. It would try four times, and then it would go on to the next one. So that node was obviously out of action. So we've got a problem here. No encryption, no secure authentication. You can extrapolate from the last time announcement, a new malicious payload that has the activation sequence and the time that would be correct at that point. And capturing these trigger packets every week over a long period of time, the final little detail there was revealed with the month-day being encoded in some more. Because if you look from top to bottom, you can see the month incrementing as you go up. Okay. And my decoder wasn't perfect by any means. Sometimes there'd be noise and what have you, and it would fail to decode the packet. So there are two issues. One is obviously a failing CRC, and it would detect that. But also, because it's a serial line protocol, you need to detect when the start bit occurs. And if you have a flipped bit in that idle and then the start, you might start too soon. But then the next byte that you get is wrong, and then every other filler start after that is wrong as well. So I tried to do this tree search to go down all the different paths of where the appropriate, if you flipped a bit, potentially you only flipped a bit back, then it would try all these paths until it might find a valid result. But putting some bounds on it so it wouldn't take all day, et cetera. Sometimes it would work. Mostly it wouldn't. But what was kind of neat too is that I took the waterfall and the output of my decoder, and then I would plot on the waterfall the result of the decoding of each transmission of each packet there, so I could very clearly see how my decoder was performing relative to the IQ that I'd recorded. There was an unfortunate break in the pattern, actually. One Tuesday they didn't go off, so my waterfall there was left quite blank. You can just see the time announcements happening there. And this was the unfortunate day when we lost our and they didn't run the tests in honor of him. So, yeah. We lost him that day. But it's a bit of a surprise, obviously, when you're so tuned to listening to this every Tuesday. So at this point we thought, well, this is an issue. And so at Bastille we have disclosure policy, responsible disclosure, draws on industry standard processes. And the gist of it is that we speak to the vendor, and then 90 days after that we inform the public. So that gives time to the vendor to create some sort of remediation and roll that out, create a patch. And then we inform the public so that they can take whatever actions they might need to to protect themselves. And we've used this in previous disclosures, too, such as MouseJack and the like. So the timeline looks like this, where we inform the vendor on the 8th of January. We also inform the city there, because this system was obviously on city premises, with a view to public disclosure on April 10th. And luckily by that time, the vendor had actually created a patch and provided it to at least one customer, being San Francisco. But as we found, the initial ramp up there can be quite slow, getting everybody's attention and entering constructive dialogue. So we first sent emails to the vendor in the city, and then we tried to call the vendor, and we were directed to a new email address. We sent more emails to the city, we tried the Department of Technology at the city via phone, we tried the mayor's press office, and then my former colleague Matt, who is right there in the rear row, he and I, we went to the Department of Emergency Management and we actually did a sit-in there to try and get a hold of who we thought would be the appropriate contact and actually physically say hi and give a hard copy there. And we ended up leaving and just leaving the hard copy. After that, though, we heard from him, and at this point also we're trying to figure out how to potentially contact ATI engineers too, but they're in a different time zone, so that made it a little bit difficult. And then we received that first email from the DM, and they told us that the Department of Technology manages the outdoor public warning system, and so our email had been forwarded to them. I also tried to contact a previously associated employee that I'd found with publicly available info and their supervisor physically via email and phone, because he'd been using the system, maybe he could provide us with the appropriate contact. Then finally, in February, we called ATI again, and they said they couldn't guarantee that our call would be returned. We sent some more emails to the city, and then in February we had our first call and our first real dialogue discussing the vulnerability, and they said they'd talk to their engineers. On the next day, we talked to the San Francisco Department of Tech, and they had said that they were in touch with the vendor, which is good, and then in February we had our first real dialogue with the Department of Tech, and then we tried to call ATI, but they just informed us that they were working on it. And then we received a letter from ATI, a formal one. We had another call, another couple of calls with the Department of Technology, and they were hoping for a patch in early March, and then later we found out that they're making updates to the software and it might be due. So we delivered imminently, which was all great news. And then we requested in the middle of March, because the public disclosure was coming up, a vendor response, first via letter and then by email, and then finally we received a statement, and we worked together to clarify that statement and improve it, and then we had the final version in early April. So some relevant excerpts from the statement are that they recommended using P25 radios that provide highly secure encrypted links, and they also created a patch which adds additional security features to the command packets sent over the radio. So that was good, that was what we were after, and they were in continuous communication with their clients. And meanwhile, while all this is going on, we were wondering, well, is this specific to San Francisco or does it exist elsewhere? So we looked at their website, this is the older version of the website, and we had a look at each of these places or potential customers to figure out whether it might be a viable place to visit and look at what kind of deployment they might have. This is the new version of the website, but again, Sedgwick County is there in Kansas, and they have a list of various other customers, and they're spread out all over the country. If you look at one of the LinkedIn pages there, it says that thousands of worldwide installations of ATI equipment are in operation today. So just doing a bit more research, I found this in Sedgwick County, a news report after some of the sirens had malfunctioned there as well. And what was interesting is that if you play the video and listen... Which is what the manager says caused them to malfunction. Hmm, that sounds familiar. And also, you know, cameras have pretty decent zoom lenses. So I thought, well, you know, it sounds similar, but let's really do a little bit of analysis here. I took the video... Sorry, I took the audio track out of the video, did a little bit of DSP, and what do you know, the same frame format is there. You can very clearly see the three repeated payloads in the filler. Unfortunately, I couldn't decode it because when you compress a video for the web, it goes through an audio codec, and that will obviously destroy your FSK. But this is just looking at the response of one of the... The mark or the space, I don't recall which. Sedgwick County also had a map of their sirens. If you try and find it now, it's 404. I think that was on the news website, actually. But looking up that information that's in that video, it's in the ULS. If you look up the address, there's a big honking antenna there, so they probably have a small transmitter up there. And so I flew out there, and knowing where the radio antenna was, I stayed at a hotel and specifically asked for a room that faced that antenna so that I could optimize my SNR. And sure enough, they had a bunch of these signs around the place with the same kind of antenna, and you always want to be inconspicuous, especially if there are big warning video sirens around. And they do weekly testing here, so I was there prepared in the morning, and they have a different sounding siren, which is a constant tone. You can hear that? And then I had a couple of laptops doing captures for redundancy there, just in case. And unfortunately, it looked like it was vulnerable as well. There were slight differences here, but overall it was the same packet structure, same three bytes incrementing before the test. So I thought, well, we should inform them. I actually called the guy, and amazingly, when you dial the number, the guys responsible for the system is actually listed there. So I tried to get in contact with him directly. But as you might imagine, cold calling somebody in this manner and just saying there's a problem with your system, you don't usually get very far. And so they requested that we send them a hard copy, and we did, very, very quickly. And so they were informed, and we later found out that they were in touch with the vendor, and we respected their security posture on that. And then also, we managed to get some. So it's not every day you have a delivery like this at your front door. But obviously, needed to keep the noise down, both in terms of audio volume and RF volume. And since these are licensed frequencies, I wasn't going to transmit them. I was going to transmit over the air. So I got a big honking attenuator to connect between the Motorola radio and my USRP. And I got an 8-ohm speaker. I thought, well, maybe the, who knows, it's a huge amplifier, but maybe it senses there's a smaller load on there or something, and it'll adjust itself. And funnily enough, I did some tests, and I had two of these speakers, and I hooked the second one up to another unit. There are buttons on there you can press to do calibration. And the magic smoke came out of the speaker. You know, that's not unexpected. But it never came out of the first one. So for the longest time, I assumed that when I actually heard things coming out of this, it was coming out of the speaker. So for example, when I actually managed to make it do my own thing... I thought, you know, the speaker was hooked up, and I was like, oh, great. It's got a live PA mode, so you can get on there and talk, and your voice or music will come out of the speaker. And in fact, the audio was being generated by what I believe are the thermal changes in the transformer or the capacitor or some passive components on the board, because there's so much power going through the amplifier. So the speaker had burned up a long time ago. I never even realized. But it's just, you know, the components on the board were vibrating with the, you know, emission that was supposed to go out through the speakers. So we did an outdoor proof of concept with the full rig just to test it out at a low volume. And what was interesting is that toward the tail end of our disclosure window, I would keep monitoring every Tuesday, and then something utterly unexpected... Well, I mean, we were hoping for it, but I wasn't sure how it would manifest. But this is what I heard. So they were going around, and they were visiting all of the SIR nodes, which is great, because we had imagined that if there's an update to the protocol, the firmware has to be updated and flashed on the SIR nodes, so they would be aware of the new protocol. And completely coincidentally, a mate of mine was visiting the protocol, and he was visiting from Australia, and he happened to be walking through Union Square when they had the SIR in Union Square open, and they had, you know... I guess they were flashing the firmware or doing the test. And so, you know, these transmissions, I think, maybe might come from the home base, and then they would listen on the radio there to make sure that the voice would come through. And in those final few weeks, interesting things started to happen on the waterfall. Green is a packet that is validated by my decoder with what I understood from the format. This is a CRC failure, but I knew that in this case, the signal strength was good enough to get correct bits out of my decoder. So this was actually now a different frame format. And if you look at the text, it's kind of in triplicate, so it's blurred. The raw bytes in the frames now look rather random. So that's a new protocol, which is great. If you zoomed in, though, this was during a transitionary period, and the siren still kept going off. So they would have had to transmit both the unencrypted and the new protocol. And so the green ones are still the activation, the trigger frames there, and the red ones are the encrypted ones. And then on the 10th, I believe, which was the date of the public disclosure, you can see it's all red. So it looks like the system upgrade is complete. And through timing calculations, I suppose they were the three trigger ones, but they were the new format that looked pretty random. We also worked with ICS cert and informed them of the vulnerability. So they provided an advisory for that. And just recently, it was nice to see in the Wichita Eagle that all 150 sirens in Sedgwick County will be tested through Friday as part of software upgrade made for, quote, enhanced security, end quote, according to an email statement from the county emergency management. So it looked like they were rolling out the patch as well. So some suggestions. RF, as we all know, because I'm preaching to the crowd here, RF security needs to be designed in from the ground up. The tools, SDRs open to the software, they're cheap and accessible, so anybody we hear as security researchers and enthusiasts, but also the bad actors can have access to this. Critical infrastructure that has radios in it has to be scrutinized. And if you actually maintain or run or any of this falls under your responsibility, you need to have an obvious and secure way to receive vulnerabilities like all the big networking companies and what have you. Obviously, the radio spectrum is a shared medium, so if you've been communicating on a cable over copper and then you make the jump to the air using radio modems, those radio modems might not be secure. And so anything that you've been transmitting is now free to grab from the air. Security through obscurity is no longer, definitely not viable anymore. And if you are a researcher, then you need to come up with and strictly adhere to a robust, responsible disclosure process. Thank you for your attention. If you want more information, you can visit the website or the ICS advisory. Just a quick thank you to Jay Branscombe. He was my boots on the ground on the East Coast helping me collect some information over there. And I also want to shout out to Neil Pandy and Nate Temple. Where are you guys? Up the back there, they spoke earlier today. Nate actually did a blood sacrifice yesterday to get me a new power supply hooked up here because the one I brought had failed on me. He injured himself. It was a lot of blood, but we made it work because I presented this a black hat yesterday. So thank you guys for your help. And Neil actually brought all this gear out to Vegas from San Francisco, so thank you. And I also want to thank you, thank my colleagues at Bastille, especially during the disclosure process. Yeah, that's it. Any questions? No questions then? Yes, question. Any indication of whether the new protocol is actually sensibly designed? The question is, is there any indication whether the new protocol is sensibly designed? I've not really looked at it. It was looking different. It's much better than having something sent in the clear than it was before. You know, hopefully they've done a decent job. That can be someone else's work if they're... really, truly interested. Yeah. So you noticed that the plaintext transmissions disappeared from over the air. Yes. Do you know that they're still... they're actually invalidated? Uh, I don't know. I'm not going to test it. But, you know, again, you'd hope that that's the case. It would be a bit of an oversight if the old protocol still worked. I'm guessing... You know, I... Yeah. I mean, they would have had... Because they would have had that transitionary period and they were transmitting both to address both, you'd hope that they did that because the new one only understood the new one. So... So this is just a little flow... the flow graph. I'm going to say fro graph for somebody that understands that. But this is receiving... This is the interface that I've got connected to a B200 Mini here. So... And... I've got that cabled in, again, not to transmit over the air on a licensed frequency, through that big attenuator to the Motorola radio here. And I've got the board that's connected to the siren. I've just constructed my own, quote-unquote, malicious payload and sent that over the air to activate the live PA mode. I don't know. Maybe here in the front row a moment ago you heard the little tone come out of the radio. That was me transmitting the command there. And so now it's waiting for a new... a new transmission. So it's waiting for the squelch to show up and then whatever comes out of the... the radio at that point... Um... Whatever comes out of the radio at that point will actually come out of the siren horn. So in this way you can broadcast your own message. So I'm going to pop open the other flow graph that actually transmits things. Which is this one. Um... And then... Let's crank the volume up a little bit. I'll hold your ears in the front row. So it's pretty loud. So there's Siren Jack. Thank you very much. I'll get off stage as quick as I can. Thank you very much to the Wireless Village folks again. Um, and I know I've totally screwed up the schedule now but I appreciate that and thank you again for turning up. Stick around for more exciting talks. Thank you!