[00:00.000 --> 00:04.680] Today's presentation, Exploration of Cellular Based IoT Technology. In this particular [00:04.680 --> 00:11.580] presentation, in this research that me and Carlotta did, we did not focus on the cellular [00:11.580 --> 00:17.760] comms. We focused on figuring out how and what data is going out of cellular comms by [00:17.760 --> 00:24.180] doing interchip communication analysis via USB and UART and also how to control the cellular [00:24.180 --> 00:29.520] environment and cellular module to do cool things via direct interaction in the circuit [00:29.520 --> 00:39.430] board level. There we go. So my name is Daryl Hyland. I'm a research lead at Rapid7 working [00:39.430 --> 00:46.930] on IoT technology. And my name is Carlotta Bindner and I'm a lead security researcher at [00:46.930 --> 00:57.150] Thermo Fisher Scientific. So I just want to do a quick shout out to a friend of mine, Damian [00:57.150 --> 01:02.490] out of France. Some of the stuff that he did at this conference in Paris a number of years [01:02.490 --> 01:08.990] ago dealing with circuit board overlay to track out circuit runs at interesting points to tap [01:08.990 --> 01:13.690] into the circuit board was kind of cool and I've used it ever since. So let's go ahead and [01:13.690 --> 01:20.530] start off with the presentation and turn this over to Carlotta. So while Daryl mentioned that [01:20.530 --> 01:25.430] we are focused on the interchip communications, just to give you an idea about the type of [01:25.430 --> 01:31.050] technology that's being in use by the cellular devices that we picked, we focused on NB-IoT and [01:31.050 --> 01:37.510] LTE-M devices. These two protocols in particular have been developed specifically towards IoT [01:37.510 --> 01:46.370] there and we're going to step quickly through these two. Oh, there we go. So NB-IoT is also [01:46.370 --> 01:53.890] known as narrow band IoT. As you can see on the download and upload speeds, it's relatively low. [01:53.890 --> 02:01.450] It also only supports half duplex communication. This is intended because instead of using the [02:01.450 --> 02:07.590] high bandwidth that would cost a lot of money and also power, it's geared towards the IoT [02:07.590 --> 02:14.230] devices that are going to be deployed remotely or battery powered. I got to point it in the [02:14.230 --> 02:20.150] right direction. And then we have LTE-M which is machine type communication. Again, it has [02:20.150 --> 02:27.230] slightly higher speeds available than NB-IoT and supports full duplex communication. So this [02:27.230 --> 02:32.610] is best used in cases where like we're going to be transferring large amounts of data like [02:32.610 --> 02:38.230] video, audio, as opposed to NB-IoT which is popular for like sensors where the small amounts [02:38.230 --> 02:46.530] of data are being transferred. Now, the original NB-IoT and LTE-M were released in release 14 [02:46.530 --> 02:51.910] from the three GPP. And in consecutive releases, they've done things to improve the [02:51.910 --> 02:58.870] efficiency to help extend battery life. The original release only supported 4G so they've [02:58.870 --> 03:07.030] added 5G support. And then they've added small cell support which is these are small cellular [03:07.030 --> 03:11.930] nodes that would be deployed in a sort of mesh type network that allows for high bandwidth [03:11.930 --> 03:21.100] via like volume deployment. And now I'll hand it over to Daryl for interaction with hardware. [03:22.360 --> 03:29.960] Okay, I'll take a clicker. So when we're getting ready to engage cellular based technology, the [03:29.960 --> 03:40.400] actual hardware, Damian had demonstrated this at Hack in Paris. And what we want to do is we want [03:40.400 --> 03:46.780] to figure out how to interact in circuit. And often tracing out the key components, key [03:46.780 --> 03:52.940] locations, whether it's runs, circuit runs, various ways we can tap into the communications [03:52.940 --> 03:59.460] on the device, we think about it actually doing overlay. So we take images of both sides, [03:59.460 --> 04:06.260] reverse one of them and overlay it on the device. So that we can actually see all the [04:06.260 --> 04:11.480] components at the same time. It's really helpful for understanding at least the external [04:11.480 --> 04:17.640] layers of an actual circuit board. And then when we get into the cellular modules, the ability [04:17.640 --> 04:23.740] to overlay the cellular module in the orientation of the land grid arrays and we can see the [04:23.740 --> 04:29.540] land grid array structure. In this land grid array structure we can see the areas that are [04:29.540 --> 04:35.040] yellow and kind of coral color are kind of the key areas we want to see. The serial comms, [04:35.040 --> 04:40.960] the USB comms. And by doing that it gives us the ability to start thinking of where are the [04:40.960 --> 04:47.500] most likely points of access for these devices. Versus just randomly checking everything [04:47.500 --> 04:52.160] around the board, trying to figure out where it's at. By figuring the orientation on the [04:52.160 --> 04:58.260] circuit board, we can be more logical in our efforts to identify where to hook to everything. [04:58.850 --> 05:07.220] And also notice that as I mentioned the yellow and the actual coral color, the items of the [05:07.220 --> 05:15.280] most interest are always out around the outer edge. And how does that play out? So here is a [05:15.280 --> 05:19.800] circuit, a cellular module that's been pulled off. In this particular case we can see [05:19.800 --> 05:24.680] everything running around the outer edge. All the stuff that's inside is typically ground [05:24.680 --> 05:33.000] planes are not connected in almost every case. So what happens when we engage a device where [05:33.000 --> 05:37.540] there's nothing on the surface of the board and they've managed to route all the most [05:37.540 --> 05:43.940] critical communication underneath a sub layer in the circuit board? So I started playing [05:43.940 --> 05:49.380] around with that idea. How would we look at this? So what we did is we noticed on a lot of [05:49.380 --> 05:55.380] these cellular modules, if we turn it on the edge and magnify it, we kind of quickly see, we [05:55.380 --> 06:01.260] can see up underneath the edge of it. We can see some of the land grid arrays. So what we did [06:01.260 --> 06:07.580] was we went out and bought acupuncture needles. And using acupuncture needles, we [06:07.580 --> 06:15.980] literally inserted them underneath the edge of the chip to engage the communications that we're [06:15.980 --> 06:23.000] after. Making it possible for us to not need to actually chip off or cut through the layers of [06:23.000 --> 06:28.140] the board or other things in that particular case. And it came to be very effective. Now it [06:28.140 --> 06:33.260] doesn't necessarily work on all modules. This particular module, the critical connection [06:33.260 --> 06:38.440] points are only about a quarter millimeter or half a millimeter from the edge of the actual [06:39.000 --> 06:44.880] cellular module device. Some of the larger modules we found out it was three or four [06:44.880 --> 06:50.640] millimeters up underneath the edge, which is really not that far. But the problem is the [06:50.640 --> 06:55.720] larger the module, it has a tendency to have more of a cupping effect. So it closes down that [06:55.720 --> 07:00.760] edge so you can't always get to it. So if you're going to look at a cellular module on a board and [07:00.760 --> 07:05.500] you're thinking about needing to do this, just roll it up on edge. Is there a gap there? If [07:05.500 --> 07:12.180] there's any gap between that cellular module's board and the circuit board you're looking at, [07:12.180 --> 07:18.200] use acupuncture needles. Now also note acupuncture needles, you can't solder to them. [07:18.200 --> 07:24.140] They're stainless. So, uh, I found out that you can get some good crimp, crimping units and, [07:24.140 --> 07:30.080] and, and butt connectors and connect them up pretty good so they will be electrically sound. [07:30.420 --> 07:35.800] So we're going to go ahead and move on to AT commands Carlotta's going to talk about. [07:36.680 --> 07:41.040] So now that you have, if you have hardware access to the cellular module, how do you [07:41.040 --> 07:47.900] communicate it with, with it? Uh, cellular modules you, much like many other modems use AT [07:47.900 --> 07:53.080] commands. So AT commands were originally created for the HACE 300 modem back in the 1980s. [07:53.080 --> 07:58.640] And as technology, you know, continued to advance dial up and cellular, they continue to use AT [07:58.640 --> 08:04.360] commands. AT stands for attention and these commands are used for the debugging configuration [08:04.360 --> 08:10.040] of the modem, you know, making it connect up to the cellular network. When looking at AT [08:10.040 --> 08:15.140] commands, there are sort of four categories of how you can use AT commands. First there's the [08:15.140 --> 08:20.020] test command. The test command is sort of like a help menu for an AT command. You issue an AT [08:20.020 --> 08:25.040] test command to, with a equals and a question mark. And the cellular modem will respond with [08:25.040 --> 08:30.600] the parameters and the values that you can then submit to the cellular module to run the [08:30.600 --> 08:35.080] command. Then you have the read command. Uh, the read command will actually return the [08:35.080 --> 08:39.240] current values and the configurations if you, for that particular command, if you were to [08:39.240 --> 08:44.460] issue it to the cellular module. Uh, then you have write commands. These are how you [08:44.460 --> 08:49.120] actually perform configurations after learning how to, you know, use the te- using the test [08:49.120 --> 08:54.680] command on that AT command. And finally you have execute which would be to actually cause [08:54.680 --> 09:03.460] the, uh, cellular module to perform some sort of action. Now, during our research, we [09:04.140 --> 09:08.060] reviewed various different modules from different manufacturers and most manufacturers [09:08.060 --> 09:14.240] actually release AT command manuals specific to the act- the version of cellular module that [09:14.240 --> 09:20.280] you're using, uh, for development purposes and configuration. Um, in the ma- manuals, we, uh, [09:20.280 --> 09:24.120] notice that a lot of the different manufacturers, they have the sort of standard AT [09:24.120 --> 09:28.860] commands that are out there, but then they also have their custom syntax that usually used [09:28.860 --> 09:32.240] for configuration of specific features that are available with the module that the [09:32.240 --> 09:40.920] manufacturer has, you know, configured. So, what can we do with AT commands? Well, one of [09:40.920 --> 09:44.340] the big things at the beginning was just being able to perform information gathering and [09:44.340 --> 09:49.120] enumeration against the cellular modules that we had access to. Um, one of the most [09:49.120 --> 09:53.700] interesting commands that we did find, and it's a generic one and available on all of the [09:53.700 --> 09:58.200] cellular modules that we interacted with, was the AT clock command. And what this does is [09:58.200 --> 10:02.760] literally ask the cellular module, what AT commands do you- I have access to? What do you [10:02.760 --> 10:09.200] support? Um, although I- we will- I will, uh, circle back to that one in particular. Then, I [10:09.200 --> 10:13.580] mean, the AT commands you can get the manufacturer information, the model, the firmware [10:13.580 --> 10:18.920] version that the cellular module's running. And just to give you an idea, we have a quick [10:18.920 --> 10:31.620] demo on AT commands. There we go. So, we booted up the device, it responded with a ready. [10:33.160 --> 10:38.420] And here's that AT clock command. As you can see, it spit out a ton of AT commands that are [10:38.420 --> 10:42.860] available with this particular module. So, then you could go start doing- running test [10:42.860 --> 10:51.450] versions of those commands to get more information. Then we issued- this particular [10:51.450 --> 10:56.470] command returns the IMEI, so just like in your cell phone, there's an IMEI associated with [10:56.470 --> 11:00.990] every cellular device. And then the next one was the IMSI, which is used for like [11:00.990 --> 11:09.370] authentication up to the APN, billing, location. Um, this command returns the information [11:09.370 --> 11:15.750] about what band and channel the device is currently running on. So, it's running on LTE4. [11:16.570 --> 11:21.030] And then here's a custom command from QuackTel. And it's used for actually configuring [11:21.030 --> 11:28.470] this- the more advanced features available on the device. And one of the things about, like, [11:28.470 --> 11:32.630] these more advanced commands, or even just basic commands, especially the custom ones from [11:32.630 --> 11:37.790] the manufacturers, the manuals provide so much information about what each of them does and [11:37.790 --> 11:43.430] what the responses will be. So, in this case, we're checking if the web services are on when [11:43.430 --> 11:49.290] the device boots up and they are not indicated by the 0 at the end of the web services. And [11:49.290 --> 11:54.630] then we checked the WLAN services. So, and the 1 indicates that it is on when the device [11:54.630 --> 12:02.810] boots up. So, in addition to information gathering, we can also open sockets. Uh, cellular [12:02.810 --> 12:13.590] modules support HTTP. They support FTP and various other TCP IP protocols. So, as part of our [12:13.590 --> 12:18.270] research, we actually created some scripts to make it easier to get through all the AT [12:18.270 --> 12:23.150] commands available. Um, one in particular is the ATquery.py script, which is available on [12:23.150 --> 12:29.610] Daryl's GitHub. Um, this particular script allows us to either run a test or a read on a file [12:29.610 --> 12:34.970] containing all, a whole list of AT commands. So, we scraped AT command manuals, AT clock [12:34.970 --> 12:39.370] output, and combined that and then we're able to actually just iterate quickly through all [12:39.370 --> 12:44.370] the various commands to determine, okay, what does the cellular module actually support? Um, [12:44.370 --> 12:49.370] because we did find that in some cases, while the AT clock output was there and even the [12:49.370 --> 12:53.950] cellular, uh, the manual associated with that module has, you know, AT list, AT commands [12:53.950 --> 13:02.000] listed, some of them were not included in either of those resources. So, here's a quick demo [13:02.000 --> 13:15.620] of the AT command query script. So, we're going to check and make sure that the device, that [13:15.620 --> 13:20.840] we have a FTDID USB device connected, which is then connected to that, uh, it's a field [13:20.840 --> 13:27.240] camera. And then in the AT query script, you can actually configure the, you know, the [13:27.240 --> 13:35.280] FTDI USB device that's there and the baud rate associated with the, uh, the cellular modem. And [13:35.280 --> 13:40.780] our script does, we did add a quick help menu. Uh, you can configure the version, the [13:40.780 --> 13:48.300] manufacturer of the cellular module, whether you want to run a read or a test on it. And [13:48.300 --> 13:53.340] here we're just confirming that the device is on and ready to go before running the script. [13:53.340 --> 13:59.680] Otherwise, you're not going to get anything. And as you can see, it starts outputting the, [13:59.680 --> 14:04.100] uh, you know, results to the screen. It also saves it to a file that you could then parse [14:04.100 --> 14:09.840] through. In this case, we ran a test, so it's going through the whole list of AT, uh, commands [14:09.840 --> 14:16.640] that are in the text file and checking to see which ones are valid. And if you get, you know, [14:16.640 --> 14:21.180] an error that it's an invalid command, the, the module doesn't support it and doesn't know [14:21.180 --> 14:28.830] what to do with it. So, what types of communications are actually supported by cellular [14:28.830 --> 14:34.250] modules? During our research, uh, we found that with the, especially the field camera that [14:34.250 --> 14:39.930] we've been using for the demos, uh, it actually primarily used US high, high speed [14:39.930 --> 14:46.530] interchip USB to actually perform the AT commands issued. But it still had an active UART. [14:46.530 --> 14:51.270] So, these are the two main communication methods that cellular modules are going to use to [14:51.270 --> 14:56.230] try and, to be able to take in commands. Um, and in the case of UART, there's usually an [14:56.230 --> 15:01.290] external UART used for debugging. Uh, during research we found that the output of that [15:01.290 --> 15:05.770] would just indicate sort of the cellular modem booting up, but wouldn't actually take type, [15:05.770 --> 15:10.830] any type of input. And then the interchip UART, which would be between the cellular module [15:10.830 --> 15:16.510] and a CPU, would actually be the place that you would possibly see, uh, you know, it [15:16.510 --> 15:21.330] would be a primary use case for receiving AT commands. But during our research we found [15:21.330 --> 15:26.730] that all we saw was on boot up, we'd see a ready, and then during power down there would be [15:27.350 --> 15:31.450] a message that it was being powered down. The AT commands were not actually being sent via [15:31.450 --> 15:41.890] the UART. And now I'll hand it back to Daryl for USB capture and decoding. Thank you. So, [15:41.890 --> 15:47.650] we're still on time, which is good. So, um, the field camera she was talking about is kind of [15:47.650 --> 15:53.050] like one of these. Uh, one that you put out in a field to capture, uh, wildlife photos and [15:53.050 --> 15:57.990] stuff like that that we were using. Uh, in this particular case. So, one of the things I [15:57.990 --> 16:04.070] always wanted to do is, uh, capture, uh, USB. And there's a number of tools out there for [16:04.070 --> 16:08.830] capturing USB, but most of those are in line. So I had to start hunting around and try to [16:08.830 --> 16:15.050] find one, because what we want to do is sniff USB in circuit. And there's very few devices [16:15.050 --> 16:22.650] that do that. So, um, on this particular device, this interchip device, we kind of map out the [16:22.650 --> 16:27.970] USB from the actual cell module. We need to figure out where it's at. I've opened up a number [16:27.970 --> 16:33.830] of devices that utilize USB and found that, uh, not all of them, but many of them, they [16:33.830 --> 16:39.050] actually were bringing the USB to the surface and putting terminator resistors in there. And [16:39.050 --> 16:43.430] we got a, got a picture here showing those terminating resistors, impedance matching [16:43.430 --> 16:48.050] resistors. Uh, at least that's what they appeared by. I eventually ended up measuring them, [16:48.050 --> 16:54.030] found out they were really zero ohm resistors. So they were actually purely as a pass [16:54.030 --> 17:02.370] through. So, uh, what we needed to do is to be able to attach into a USB bus, you can rarely [17:02.370 --> 17:07.050] connect straight into it. You will actually load the circuit down and communications will [17:07.050 --> 17:13.070] fail. With a particular manufacturer of device that we used to sniff this data, they [17:13.070 --> 17:18.990] recommended using a 20 to 40 ohm resistor. So in this case, we actually soldered straight to [17:18.990 --> 17:25.870] the, to the circuit board a 32, 33 ohm resistors so that we can tap into. And we were able to [17:25.870 --> 17:32.650] tap into those devices. And, uh, the device we happened to use was a Beagle, a Beagle 480. [17:32.650 --> 17:38.670] It's not a cheap device. It's about $1,200, $1,300. But if you're doing this work [17:38.670 --> 17:44.230] professionally, this works really well. It's kind of amazing how well it works for capture [17:44.230 --> 17:50.310] and interchip communications for USB. And we can show it here where we actually hook the [17:50.310 --> 17:56.730] device up. In this particular case, um, and many, if you're tapping into the USB communication [17:56.730 --> 18:03.490] lines, often the power lines associated with that, the 5 volts that tells the, it's fed with [18:03.490 --> 18:08.650] the USB also, doesn't show up. It's not on the surface you can connect into. So the [18:08.650 --> 18:13.710] black and, and red wires you see there are me just feeding a 5 volt power supply, external [18:13.710 --> 18:20.350] power supply. So my Beagle thinks the entire USB is functioning. Uh, there's some software [18:20.350 --> 18:25.890] changes you can make that the vendor has to actually turn that off. I have not done that yet. [18:25.890 --> 18:32.130] I probably won't in case I ever need it. But let's go ahead and, uh, look at actually [18:32.130 --> 18:40.010] capturing USB traffic in this particular case. So, uh, they have their application that comes [18:40.010 --> 18:44.790] with it. I know this is small but we're going to kind of blow in or, or, or sink into some of [18:44.790 --> 18:51.330] the more critical stuff. Jump over here real quick. So we can see we, we've hooked up, we [18:51.330 --> 18:57.090] power up the device, we quickly see a lot of USB handshake data taking place. Uh, and now [18:57.090 --> 19:01.930] it's connected out and what we want to do is we configure the device to only show data. [19:01.930 --> 19:06.670] Because that's all we care about. I don't care about the USB stuff. So you quickly, you can [19:06.670 --> 19:11.890] see in there that you're seeing a lot of those AT commands being transferred. Some of the [19:11.890 --> 19:16.590] stuff that Carlotta run, you actually see there as it's setting up the communication channel, [19:16.590 --> 19:26.290] uh, with the cellular's APN and all that type of stuff. So again, a lot of interesting serial [19:26.290 --> 19:30.970] number data, configuration data, firmware version data that are running on the device. All [19:30.970 --> 19:35.810] this kind of data is kind of set out there requested on the device. But we get into, we can [19:35.810 --> 19:41.250] see it collected out. That was it's uh, APN that it connected to. It was a special one. It's [19:41.250 --> 19:45.590] not a private but it's a special one. So then what we want to do is this device is connecting [19:45.590 --> 19:50.750] out and actually communicating real data out. It's taking photos and sending them out. And [19:50.750 --> 19:57.210] that's what I wanted to see. So we quickly, uh, search for this whole bucket thing and we [19:57.210 --> 20:05.090] start finding things like uh, certificates, keys, passwords. We see this device clear, basically [20:05.090 --> 20:12.130] clear text, passwords, keys, everything connecting out to an actual S3 bucket to communicate [20:12.130 --> 20:19.290] all this data. With all, everything we ever would need to know as a, uh, a tester, how this [20:19.290 --> 20:25.010] thing's connecting out to it's back end systems. Again, as you can see, versus trying to do [20:25.010 --> 20:32.110] stuff over cellular, which is encrypted, interchip comms often contains no encrypted data. [20:32.110 --> 20:38.550] And you can intercept that data and gain access, uh, a large amount of interesting stuff. I [20:38.550 --> 20:45.910] think this screen showed it actually sending out, uh, uh, data actually associated with, uh, [20:46.510 --> 20:54.990] the actual, um, configuration on the, on the device. So again, in this particular device, [20:55.670 --> 21:01.110] and Carlotte had mentioned this, both of the circuits were in, in use. Both of them were [21:01.110 --> 21:07.250] hooked up. Both the USB and the main UART were actually functioning on this or connected up. [21:07.250 --> 21:15.450] That's not always the case. Often a device that'll support both USB and all main UART [21:15.450 --> 21:20.650] communications often won't have both of them connected up. One of them will be dummied off [21:20.650 --> 21:25.930] and the other one's the only one connected in circuit. In those particular cases, in this [21:25.930 --> 21:30.330] case, which we'll show a little later, we're able to connect into the UART and control it. I [21:30.330 --> 21:35.130] think some of the examples already showed that. Because they still connected it to the main [21:35.130 --> 21:40.450] CPU on the device. Which is kind of cool. It made it easier for us. I didn't have to get into [21:40.450 --> 21:45.950] weird stuff with, uh, uh, sticking pins up underneath the body of the thing. We're able to [21:45.950 --> 21:52.110] just cut the actual circuits that do that type of stuff. So I'm going to turn this over to [21:52.110 --> 21:56.770] Carlotta and she's going to talk to us about connecting up and understanding serial [21:56.770 --> 22:06.440] communications through interchip and how we interact with that. Okay. So in the case of [22:06.440 --> 22:10.860] interchip communications for our cellular module, as I previously mentioned, it's going to be [22:10.860 --> 22:15.660] connecting over to a, to the CPU of the device. And in the case of this trail camera, it was [22:15.660 --> 22:21.500] using an EG91, which we have here. The thing is, for the actual UART communications, there's [22:21.500 --> 22:27.320] two separate lines going. So the, the, there's one line where the CPU is transmitting and [22:27.320 --> 22:32.200] then the, uh, cellular module is receiving. And then the cellular module is receiving on a [22:32.200 --> 22:37.740] separate line from the, the responses from that cellular module. So in order to actually get a [22:37.740 --> 22:41.440] full picture of the communications that are going between these two devices, we need two [22:41.440 --> 22:48.440] FTDI to USB devices. One receiving on one line and one on the other to get a full picture of [22:48.440 --> 22:52.900] the communications. Now this is only to be able to listen in on those communications and [22:52.900 --> 22:57.220] that's how we saw the, you know, when on power up that the cellular module was sending a [22:57.220 --> 23:04.160] ready and then on power down it was sending a power down. Now in order to actually be able [23:04.160 --> 23:09.120] to inject those AT commands like you saw in the AT query script, uh, demo that was run and [23:09.120 --> 23:13.920] everything, uh, we actually have to sever those connections between the CPU and the, that [23:13.920 --> 23:20.060] cellular module and put ourself pretty much in the place of the CPU. So we'd not, we'd only [23:20.060 --> 23:26.220] need one FTDI to USB device in this case and just like regular UR, you'd hook up the transmit [23:26.220 --> 23:30.320] to the receive on the cellular module and then the FTDI is received to the transmit on the [23:30.320 --> 23:38.180] cellular module. So here is, you know, three images here. On the far left we've identified [23:38.180 --> 23:43.900] that transmit and receive for the cellular module and the line that's going between it and [23:43.900 --> 23:50.160] the CPU. In the center there we've actually soldered wires to two different sides because on [23:50.160 --> 23:56.860] that far right image we've actually cut the traces between the two. Now in order to be able [23:56.860 --> 24:01.020] to continue to be able to listen in possibly on the communications we built a breakout [24:01.020 --> 24:05.980] board. So the side that's connected to the CPU is connected to the breakout board as is the [24:05.980 --> 24:11.360] side that we have the cellular module. So they can continue to function as normal. As long [24:11.360 --> 24:16.420] as, in the center there you can see that there are toggle switches. If they're in the on [24:16.420 --> 24:21.460] position the communications can continue between those two parts fine. But we can then turn [24:21.460 --> 24:26.600] them off and then connect to just one of the FTDI devices as you can see in the image and [24:26.600 --> 24:34.000] then issue those AT commands to the cellular module. And I will hand it back over to Daryl to [24:34.000 --> 24:43.380] talk about injected targeted attacks. Okay. To kind of mention a little bit on something else to [24:43.380 --> 24:50.960] add to the serial communication. We also, I also a couple years ago released a paper on [24:50.960 --> 24:56.980] interchip communication analysis and we released a proof of concept code called a Karen [24:56.980 --> 25:02.160] proxy. Now it wouldn't work in this case because we haven't set it up to handle ASCII but [25:02.160 --> 25:08.100] when we're dealing with devices where there's no ASCII data but just hex data going over, a [25:08.100 --> 25:14.420] Karen proxy would give us the ability to cut the circuit, throw the switches and route both [25:14.420 --> 25:20.420] sides back into a Python code script that would actually capture data going in both [25:20.420 --> 25:27.240] directions, allow you to replay data, capture and replay data and also capture and replay [25:27.240 --> 25:34.120] data and actually set filters to say when you see this hex string, replace it this one. Still a [25:34.120 --> 25:38.920] proof of concept, we can probably use some more development but it, it takes this to a new level [25:38.920 --> 25:44.340] and I was just talking to the guy this last week about let's add the ability to throw ASCII in [25:44.340 --> 25:48.940] there, use standard carriage return structures which is often what we see when we're talking [25:48.940 --> 25:57.220] about communication over the main AT or the main UART communication to cellular modules. So, [25:57.680 --> 26:04.440] in this part here, AT commands, so we wanted to start thinking about what can we do here? So [26:04.440 --> 26:10.720] we've, we've, we've looked at these devices, we can capture all the USB communications, which [26:10.720 --> 26:15.400] is a wealth of information if you're doing any kind of assessment or testing on a device and [26:15.400 --> 26:21.640] then we can actually send AT commands but what can we do? Again, we're still in the early stage [26:21.640 --> 26:27.080] of this but I have an example in here of something I thought was kind of cool as proving the [26:27.080 --> 26:33.440] potential capability but I want to start talking about this is how we've tapped into this [26:33.440 --> 26:41.840] device. So we have the device here. It's a trail camera. USB is what it uses primarily for all [26:41.840 --> 26:47.720] of its communication. The serial communication between the primary processor is in use so [26:47.720 --> 26:52.960] who cares if it's connected to the CPU? So we cut it and we hook up to it that way so we can [26:52.960 --> 26:59.220] pretty much send commands at will while the device is powered up. Again, I don't think if you [26:59.220 --> 27:05.760] remember one of the videos earlier, you've seen power down. Like any of these devices, they're [27:05.760 --> 27:09.800] not going to stay powered up. So they'll stay powered up for a certain period of time and [27:09.800 --> 27:14.380] then they'll do a time cycle. And they'll actually shut down the conserved batteries. So [27:14.380 --> 27:18.040] when you're testing them, you kind of have to deal with the fact that it's doing this. But [27:18.040 --> 27:22.480] with AT commands, potentially you can shut all that functionality off, especially if you're [27:22.480 --> 27:28.840] feeding an external power supply versus batteries into it. So that's how we tapped into it. So [27:28.840 --> 27:34.960] one of the things we wanted to do is, this particular module, as Carlotta had mentioned, when [27:34.960 --> 27:40.860] we pulled down all the AT commands that are available, looked AT command manuals, it didn't [27:40.860 --> 27:46.480] really show anything about socket capability. But when we run our test script against it, we [27:46.480 --> 27:53.020] found out socket capability was available. In this particular case, it's QI open and QI [27:53.020 --> 27:58.600] closed, where we can actually set up real sockets. In the first one there, we show that we [27:58.600 --> 28:04.340] connected out to a port over an IP and it actually failed and it came back with, what is that [28:04.340 --> 28:12.060] number, I think it's 566, and basically says the socket's not open. I think this actually shows [28:12.060 --> 28:16.500] that at the bottom it came back with a zero on that particular port. So we start thinking [28:16.500 --> 28:21.860] about this, hey, what can we do with that? One, with these sockets you can do a lot of [28:21.860 --> 28:28.640] things, but what if we wanted to do like a port scan? You know, can we use the device to port [28:28.640 --> 28:34.340] scan some of the back end stuff? And here's all of the ATQI open error messages that come [28:34.340 --> 28:40.040] back. So we get a wealth of information based on this information, whether the socket's [28:40.040 --> 28:48.000] available, it's open, it's closed, or some other error. When I was initially working for [28:48.000 --> 28:51.640] this, I got some of the command structure backwards, so I was throwing all kinds of weird [28:51.640 --> 28:56.360] errors. I'm like, why ain't this thing working? Finally figured it out after I sat down with a [28:56.360 --> 29:00.720] manual that talked about QI open, got the structure right, and we kind of moved on from [29:00.720 --> 29:06.000] there. So here's the actual code that we're going to show here in a minute. It's a simple [29:06.000 --> 29:11.540] Python script. This is actually on our GitHub also, so if you want to play around with it. The [29:11.540 --> 29:18.280] yellow stuff is kind of the important stuff. So basically we can set up the USB port that we [29:18.280 --> 29:24.160] want to connect through for the TLL. And then we can go into the IP addresses, port numbers, [29:24.160 --> 29:28.740] and the bottom is open, close the circuit. So let's open and close the socket and see what [29:28.740 --> 29:35.980] happens. So let's go ahead and run a quick demo. So again, this demo is not pointed to [29:37.000 --> 29:41.600] anyone's back end system. We're doing it as a proof of concept. So I pointed at InMaps, [29:41.600 --> 29:46.600] InMaps server, the one they allow you to run scans with, with InMap. So I wouldn't like to [29:46.600 --> 29:55.120] make anyone mad. And let's go ahead and run this. So we turn the device on. First thing we [29:55.120 --> 30:04.620] want to do, let's make sure that it's actually up and ready. Make sure I have all my [30:04.620 --> 30:17.180] connections right. Turn the unit on. See my grubby little fingers there? We got it ready. So [30:17.180 --> 30:23.260] now we can run the command. And initially this thing is going to go out and we can literally [30:23.260 --> 30:28.220] point it at any IP address, any number of ports, any number of IP addresses, and [30:28.220 --> 30:35.100] instantly it starts returning data. So we'll see a 00 come back. That port is open. We have 0 [30:35.100 --> 30:40.960] 5 6 6 come back. That port is closed. So from here we're actually able to do port scans to [30:40.960 --> 30:46.860] this device. I think there's a wealth of more things we could do where we can actually [30:46.860 --> 30:52.500] control these cellular modules to do some of this stuff. And let's go ahead and let it finish [30:52.500 --> 31:02.020] running. I think that's pretty straight forward what we got there. Ramp G, do port scans. I [31:02.860 --> 31:08.780] think 1337 I think is open or something like that. So a couple of the, you know, the weird [31:08.780 --> 31:13.700] ports, a couple of common ports. But now we've done a port scan. We've basically taken a trail [31:13.700 --> 31:19.760] camera. And while this is taking place, we did not alter the trail camera's function. It [31:19.760 --> 31:25.800] contended communicating out to the S3 bucket functioning normal. We just asked it to do a [31:25.800 --> 31:32.000] port scan using its socket capability. And we were successful in doing that. So where's [31:32.000 --> 31:39.380] this come into play? So if I'm doing, if I'm going to be assessing a target for a company that [31:39.380 --> 31:47.360] uses cellular backhaul for its communications, and let's say they're using a private APN. That [31:47.360 --> 31:53.540] private APN goes out. It goes through a VPN. It hits either some closed cloud service or it [31:53.540 --> 31:59.860] hits their actual internal company network through this VPN. And no one on the Internet has [31:59.860 --> 32:06.060] access to it. So no matter what data you get, you can't attack those back-end systems or test the [32:06.060 --> 32:13.740] overall ecosystem of the technology. But if we engage the device itself with what we showed [32:13.740 --> 32:19.020] here, it gives us the ability to actually go through that tunnel that's already been set up by [32:19.020 --> 32:25.620] the device through the private APN to the back-end services. And initially we can do a port [32:25.620 --> 32:30.460] scan on devices back there. Next we can actually, once we have those ports, we can set up [32:30.460 --> 32:37.400] sockets and start communicating to those devices in the area that is supposed to be trusted or [32:37.400 --> 32:44.060] secured, because we're looking at companies that are looking at security purely from a [32:44.060 --> 32:49.420] machine-to-machine environment in a closed back-end, which they would think would be secure. [32:49.420 --> 32:54.240] In this case, we can actually prove that's not the case. We can use the device, control the [32:54.240 --> 32:59.080] device, and set up our own connections and own tunnels to the back-end. So the first image is [32:59.080 --> 33:04.620] what we conceive of a private APN. The second one is more of a public APN. And that's kind of [33:04.620 --> 33:11.600] where this device was. So it kind of allowed us to actually go out and port scan and map in [33:11.600 --> 33:17.200] this case. But I have run into a number of devices that were on private APNs where we could [33:17.200 --> 33:22.540] not get access. And it's kind of the driving force around this research. How do we build out a [33:22.540 --> 33:30.560] knowledge base so pen testers, IOT testers, can go to that next level and look at the overall [33:30.560 --> 33:36.000] ecosystem effectively? And interchip communication and control is the best way to get there in [33:36.000 --> 33:41.000] my opinion. And I'm hopeful we got that over to you guys and you were able to get something out [33:41.000 --> 33:49.600] of this. Here is the actual data. So that's the GitHub and stuff like that that you can actually [33:49.600 --> 33:56.700] get to. A couple papers. We actually published a paper last week on this subject. So bring it [33:56.700 --> 34:03.300] down and check it out. We talk about a lot more in that paper. At least from the subject of [34:03.300 --> 34:09.780] engaging interactively on the hardware and how to trace things out effectively. We get [34:09.780 --> 34:16.100] into dechipping, taking chips off and actually rerouting circuits on the board and then [34:16.100 --> 34:21.740] putting the cellular modules back on, things like that. So we cover a lot of other cool [34:21.740 --> 34:26.540] stuff. So check out that paper. So I don't know if we have time for questions. We're probably [34:26.540 --> 34:32.840] out. But we're going to be around. So grab us when we get packed up off stage and I'd be glad to [34:32.840 --> 34:37.300] talk about more things with you. Thank you.