WEBVTT

00:00.000 --> 00:04.040
Today's presentation, Exploration of Cellular Based IoT Technology.

00:04.040 --> 00:12.660
In this particular presentation, in this research that me and Carlotta did, we did not focus on the cellular comms.

00:12.660 --> 00:30.600
We focused on figuring out how and what data is going out of cellular comms by doing interchip communication analysis via USB and UART and also how to control the cellular environment and cellular module to do cool things via direct interaction in the circuit board level.

00:34.730 --> 00:35.650
There we go.

00:35.890 --> 00:37.270
So my name is Daryl Hyland.

00:37.270 --> 00:41.510
I'm a research lead at Rapid7 working on IoT technology.

00:43.010 --> 00:48.430
And my name is Carlotta Bindner and I'm a lead security researcher at Thermo Fisher Scientific.

00:52.690 --> 00:58.510
So I just want to do a quick shout out to a friend of mine, Damian out of France.

00:58.790 --> 01:12.050
Some of the stuff that he did at this conference in Paris a number of years ago dealing with circuit board overlay to track out circuit runs at interesting points to tap into the circuit board was kind of cool and I've used it ever since.

01:12.270 --> 01:17.750
So let's go ahead and start off with the presentation and turn this over to Carlotta.

01:18.610 --> 01:32.550
So while Daryl mentioned that we are focused on the interchip communications, just to give you an idea about the type of technology that's being in use by the cellular devices that we picked, we focused on NB-IoT and LTE-M devices.

01:32.750 --> 01:41.910
These two protocols in particular have been developed specifically towards IoT there and we're going to step quickly through these two.

01:42.990 --> 01:44.530
Oh, there we go.

01:44.530 --> 01:48.530
So NB-IoT is also known as narrow band IoT.

01:48.570 --> 01:53.890
As you can see on the download and upload speeds, it's relatively low.

01:53.890 --> 01:56.770
It also only supports half duplex communication.

01:56.770 --> 02:11.130
This is intended because instead of using the high bandwidth that would cost a lot of money and also power, it's geared towards the IoT devices that are going to be deployed remotely or battery powered.

02:13.250 --> 02:15.190
I got to point it in the right direction.

02:15.950 --> 02:19.390
And then we have LTE-M which is machine type communication.

02:19.390 --> 02:26.990
Again, it has slightly higher speeds available than NB-IoT and supports full duplex communication.

02:26.990 --> 02:39.910
So this is best used in cases where like we're going to be transferring large amounts of data like video, audio, as opposed to NB-IoT which is popular for like sensors where the small amounts of data are being transferred.

02:40.990 --> 02:48.550
Now, the original NB-IoT and LTE-M were released in release 14 from the three GPP.

02:48.710 --> 02:55.990
And in consecutive releases, they've done things to improve the efficiency to help extend battery life.

02:56.170 --> 03:00.730
The original release only supported 4G so they've added 5G support.

03:01.150 --> 03:14.350
And then they've added small cell support which is these are small cellular nodes that would be deployed in a sort of mesh type network that allows for high bandwidth via like volume deployment.

03:17.560 --> 03:21.100
And now I'll hand it over to Daryl for interaction with hardware.

03:22.360 --> 03:24.200
Okay, I'll take a clicker.

03:25.320 --> 03:38.100
So when we're getting ready to engage cellular based technology, the actual hardware, Damian had demonstrated this at Hack in Paris.

03:38.200 --> 03:43.540
And what we want to do is we want to figure out how to interact in circuit.

03:43.540 --> 03:57.460
And often tracing out the key components, key locations, whether it's runs, circuit runs, various ways we can tap into the communications on the device, we think about it actually doing overlay.

03:57.460 --> 04:01.960
So we take images of both sides, reverse one of them and overlay it on the device.

04:03.880 --> 04:07.840
So that we can actually see all the components at the same time.

04:07.840 --> 04:13.820
It's really helpful for understanding at least the external layers of an actual circuit board.

04:13.820 --> 04:25.500
And then when we get into the cellular modules, the ability to overlay the cellular module in the orientation of the land grid arrays and we can see the land grid array structure.

04:25.940 --> 04:33.940
In this land grid array structure we can see the areas that are yellow and kind of coral color are kind of the key areas we want to see.

04:33.940 --> 04:36.480
The serial comms, the USB comms.

04:36.480 --> 04:45.160
And by doing that it gives us the ability to start thinking of where are the most likely points of access for these devices.

04:45.160 --> 04:50.100
Versus just randomly checking everything around the board, trying to figure out where it's at.

04:50.100 --> 04:58.260
By figuring the orientation on the circuit board, we can be more logical in our efforts to identify where to hook to everything.

04:58.850 --> 05:10.700
And also notice that as I mentioned the yellow and the actual coral color, the items of the most interest are always out around the outer edge.

05:10.700 --> 05:12.720
And how does that play out?

05:13.180 --> 05:18.040
So here is a circuit , a cellular module that's been pulled off.

05:18.040 --> 05:21.520
In this particular case we can see everything running around the outer edge.

05:21.520 --> 05:28.320
All the stuff that's inside is typically ground planes are not connected in almost every case.

05:28.540 --> 05:43.040
So what happens when we engage a device where there's nothing on the surface of the board and they've managed to route all the most critical communication underneath a sub layer in the circuit board?

05:43.040 --> 05:45.060
So I started playing around with that idea.

05:45.060 --> 05:47.020
How would we look at this?

05:47.060 --> 05:57.400
So what we did is we noticed on a lot of these cellular modules, if we turn it on the edge and magnify it, we kind of quickly see, we can see up underneath the edge of it.

05:57.400 --> 05:59.760
We can see some of the land grid arrays.

06:00.480 --> 06:04.440
So what we did was we went out and bought acupuncture needles.

06:05.020 --> 06:16.980
And using acupuncture needles, we literally inserted them underneath the edge of the chip to engage the communications that we're after.

06:17.380 --> 06:26.080
Making it possible for us to not need to actually chip off or cut through the layers of the board or other things in that particular case.

06:26.080 --> 06:27.820
And it came to be very effective.

06:27.820 --> 06:30.820
Now it doesn't necessarily work on all modules.

06:30.860 --> 06:41.260
This particular module, the critical connection points are only about a quarter millimeter or half a millimeter from the edge of the actual cellular module device.

06:41.720 --> 06:49.440
Some of the larger modules we found out it was three or four millimeters up underneath the edge, which is really not that far.

06:49.440 --> 06:54.080
But the problem is the larger the module, it has a tendency to have more of a cupping effect.

06:54.120 --> 06:57.840
So it closes down that edge so you can't always get to it.

06:57.840 --> 07:03.940
So if you're going to look at a cellular module on a board and you're thinking about needing to do this, just roll it up on edge.

07:03.940 --> 07:05.320
Is there a gap there?

07:05.320 --> 07:14.080
If there's any gap between that cellular module's board and the circuit board you're looking at, use acupuncture needles.

07:14.680 --> 07:18.200
Now also note acupuncture needles, you can't solder to them.

07:18.200 --> 07:19.220
They're stainless.

07:19.660 --> 07:30.080
So, uh, I found out that you can get some good crimp, crimping units and, 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:42.740
So now that you have, if you have hardware access to the cellular module, how do you communicate it with, with it?

07:43.060 --> 07:48.480
Uh, cellular modules you, much like many other modems use AT commands.

07:48.480 --> 07:53.080
So AT commands were originally created for the HACE 300 modem back in the 1980s.

07:53.080 --> 07:59.280
And as technology, you know, continued to advance dial up and cellular, they continue to use AT commands.

07:59.280 --> 08:08.160
AT stands for attention and these commands are used for the debugging configuration of the modem, you know, making it connect up to the cellular network.

08:09.140 --> 08:14.400
When looking at AT commands, there are sort of four categories of how you can use AT commands.

08:14.480 --> 08:15.780
First there's the test command.

08:15.780 --> 08:18.820
The test command is sort of like a help menu for an AT command.

08:18.820 --> 08:23.000
You issue an AT test command to, with a equals and a question mark.

08:23.000 --> 08:31.340
And the cellular modem will respond with the parameters and the values that you can then submit to the cellular module to run the command.

08:31.760 --> 08:33.340
Then you have the read command.

08:33.340 --> 08:41.620
Uh, the read command will actually return the current values and the configurations if you, for that particular command, if you were to issue it to the cellular module.

08:41.900 --> 08:43.860
Uh, then you have write commands.

08:43.860 --> 08:50.760
These are how you actually perform configurations after learning how to, you know, use the te- using the test command on that AT command.

08:50.820 --> 08:58.160
And finally you have execute which would be to actually cause the, uh, cellular module to perform some sort of action.

09:00.680 --> 09:17.860
Now, during our research, we reviewed various different modules from different manufacturers and most manufacturers actually release AT command manuals specific to the act- the version of cellular module that you're using, uh, for development purposes and configuration.

09:17.960 --> 09:33.420
Um, in the ma- manuals, we, uh, notice that a lot of the different manufacturers, they have the sort of standard AT commands that are out there, but then they also have their custom syntax that usually used for configuration of specific features that are available with the module that the manufacturer has,

09:33.420 --> 09:34.520
you know, configured.

09:37.600 --> 09:39.960
So, what can we do with AT commands?

09:40.080 --> 09:47.800
Well, one of the big things at the beginning was just being able to perform information gathering and enumeration against the cellular modules that we had access to.

09:48.020 --> 09:57.360
Um, one of the most interesting commands that we did find, and it's a generic one and available on all of the cellular modules that we interacted with, was the AT clock command.

09:57.360 --> 10:02.480
And what this does is literally ask the cellular module, what AT commands do you- I have access to?

10:02.480 --> 10:03.600
What do you support?

10:04.100 --> 10:08.600
Um, although I- we will- I will, uh, circle back to that one in particular.

10:08.700 --> 10:16.040
Then, I mean, the AT commands you can get the manufacturer information, the model, the firmware version that the cellular module's running.

10:16.340 --> 10:21.920
And just to give you an idea, we have a quick demo on AT commands.

10:23.600 --> 10:24.680
There we go.

10:25.800 --> 10:31.620
So, we booted up the device, it responded with a ready.

10:33.160 --> 10:35.220
And here's that AT clock command.

10:35.220 --> 10:40.340
As you can see, it spit out a ton of AT commands that are available with this particular module.

10:40.340 --> 10:45.660
So, then you could go start doing- running test versions of those commands to get more information.

10:49.570 --> 10:57.850
Then we issued- this particular command returns the IMEI, so just like in your cell phone, there's an IMEI associated with every cellular device.

10:57.850 --> 11:04.930
And then the next one was the IMSI, which is used for like authentication up to the APN, billing, location.

11:06.610 --> 11:13.750
Um, this command returns the information about what band and channel the device is currently running on.

11:13.750 --> 11:15.750
So, it's running on LTE4.

11:16.570 --> 11:19.650
And then here's a custom command from QuackTel.

11:19.650 --> 11:24.550
And it's used for actually configuring this- the more advanced features available on the device.

11:26.370 --> 11:39.410
And one of the things about, like, these more advanced commands, or even just basic commands, especially the custom ones from the manufacturers, the manuals provide so much information about what each of them does and what the responses will be.

11:39.430 --> 11:48.830
So, in this case, we're checking if the web services are on when the device boots up and they are not indicated by the 0 at the end of the web services.

11:49.150 --> 11:51.370
And then we checked the WLAN services.

11:51.530 --> 11:55.590
So, and the 1 indicates that it is on when the device boots up.

11:58.030 --> 12:02.250
So, in addition to information gathering, we can also open sockets.

12:02.250 --> 12:05.010
Uh, cellular modules support HTTP.

12:05.010 --> 12:09.170
They support FTP and various other TCP IP protocols.

12:12.290 --> 12:19.390
So, as part of our research, we actually created some scripts to make it easier to get through all the AT commands available.

12:19.390 --> 12:24.270
Um, one in particular is the ATquery.py script, which is available on Daryl's GitHub.

12:24.730 --> 12:32.210
Um, this particular script allows us to either run a test or a read on a file containing all, a whole list of AT commands.

12:32.210 --> 12:44.050
So, we scraped AT command manuals, AT clock output, and combined that and then we're able to actually just iterate quickly through all the various commands to determine, okay, what does the cellular module actually support?

12:44.050 --> 12:57.750
Um, because we did find that in some cases, while the AT clock output was there and even the cellular, uh, the manual associated with that module has, you know, AT list, AT commands listed, some of them were not included in either of those resources.

13:00.580 --> 13:06.100
So, here's a quick demo of the AT command query script.

13:12.900 --> 13:21.620
So, we're going to check and make sure that the device, that we have a FTDID USB device connected, which is then connected to that, uh, it's a field camera.

13:23.020 --> 13:33.780
And then in the AT query script, you can actually configure the, you know, the FTDI USB device that's there and the baud rate associated with the, uh, the cellular modem.

13:34.840 --> 13:38.700
And our script does, we did add a quick help menu.

13:38.700 --> 13:44.820
Uh, you can configure the version, the manufacturer of the cellular module, whether you want to run a read or a test on it.

13:47.860 --> 13:53.340
And here we're just confirming that the device is on and ready to go before running the script.

13:53.340 --> 13:54.700
Otherwise, you're not going to get anything.

13:57.680 --> 14:01.560
And as you can see, it starts outputting the, uh, you know, results to the screen.

14:01.560 --> 14:04.460
It also saves it to a file that you could then parse through.

14:04.460 --> 14:13.940
In this case, we ran a test, so it's going through the whole list of AT, uh, commands that are in the text file and checking to see which ones are valid.

14:15.180 --> 14:22.300
And if you get, you know, an error that it's an invalid command, the, the module doesn't support it and doesn't know what to do with it.

14:25.130 --> 14:29.690
So, what types of communications are actually supported by cellular modules?

14:29.690 --> 14:44.250
During our research, uh, we found that with the, especially the field camera that we've been using for the demos, uh, it actually primarily used US high, high speed interchip USB to actually perform the AT commands issued.

14:44.250 --> 14:46.530
But it still had an active UART.

14:46.530 --> 14:53.590
So, these are the two main communication methods that cellular modules are going to use to try and, to be able to take in commands.

14:54.030 --> 14:58.310
Um, and in the case of UART, there's usually an external UART used for debugging.

14:58.310 --> 15:06.710
Uh, during research we found that the output of that would just indicate sort of the cellular modem booting up, but wouldn't actually take type, any type of input.

15:06.730 --> 15:19.770
And then the interchip UART, which would be between the cellular module and a CPU, would actually be the place that you would possibly see, uh, you know, it would be a primary use case for receiving AT commands.

15:19.970 --> 15:28.910
But during our research we found that all we saw was on boot up, we'd see a ready, and then during power down there would be a message that it was being powered down.

15:28.910 --> 15:32.450
The AT commands were not actually being sent via the UART.

15:33.930 --> 15:37.030
And now I'll hand it back to Daryl for USB capture and decoding.

15:39.990 --> 15:41.010
Thank you.

15:41.590 --> 15:43.470
So, we're still on time, which is good.

15:44.310 --> 15:48.730
So, um, the field camera she was talking about is kind of like one of these.

15:49.050 --> 15:54.630
Uh, one that you put out in a field to capture, uh, wildlife photos and stuff like that that we were using.

15:55.130 --> 15:56.890
Uh, in this particular case.

15:56.970 --> 16:01.870
So, one of the things I always wanted to do is, uh, capture, uh, USB.

16:02.010 --> 16:06.650
And there's a number of tools out there for capturing USB, but most of those are in line.

16:06.890 --> 16:13.310
So I had to start hunting around and try to find one, because what we want to do is sniff USB in circuit.

16:13.910 --> 16:16.150
And there's very few devices that do that.

16:17.210 --> 16:24.890
So, um, on this particular device, this interchip device, we kind of map out the USB from the actual cell module.

16:24.890 --> 16:26.710
We need to figure out where it's at.

16:26.870 --> 16:38.990
I've opened up a number of devices that utilize USB and found that, uh, not all of them, but many of them, they actually were bringing the USB to the surface and putting terminator resistors in there.

16:38.990 --> 16:44.610
And we got a, got a picture here showing those terminating resistors, impedance matching resistors.

16:44.630 --> 16:46.130
Uh, at least that's what they appeared by.

16:46.130 --> 16:51.630
I eventually ended up measuring them, found out they were really zero ohm resistors.

16:51.630 --> 16:54.870
So they were actually purely as a pass through.

16:55.570 --> 17:04.290
So, uh, what we needed to do is to be able to attach into a USB bus, you can rarely connect straight into it.

17:04.290 --> 17:08.010
You will actually load the circuit down and communications will fail.

17:08.070 --> 17:16.610
With a particular manufacturer of device that we used to sniff this data, they recommended using a 20 to 40 ohm resistor.

17:16.730 --> 17:24.690
So in this case, we actually soldered straight to the, to the circuit board a 32, 33 ohm resistors so that we can tap into.

17:24.850 --> 17:27.890
And we were able to tap into those devices.

17:28.190 --> 17:32.650
And, uh, the device we happened to use was a Beagle, a Beagle 480.

17:32.650 --> 17:34.690
It's not a cheap device.

17:35.030 --> 17:36.810
It's about $1,200, $1,300.

17:37.270 --> 17:41.530
But if you're doing this work professionally, this works really well.

17:41.530 --> 17:46.910
It's kind of amazing how well it works for capture and interchip communications for USB.

17:47.810 --> 17:51.470
And we can show it here where we actually hook the device up.

17:51.470 --> 18:06.030
In this particular case, um, and many, if you're tapping into the USB communication lines, often the power lines associated with that, the 5 volts that tells the, it's fed with the USB also, doesn't show up.

18:06.030 --> 18:08.170
It's not on the surface you can connect into.

18:08.170 --> 18:14.890
So the black and, and red wires you see there are me just feeding a 5 volt power supply, external power supply.

18:14.890 --> 18:18.490
So my Beagle thinks the entire USB is functioning.

18:18.910 --> 18:24.590
Uh, there's some software changes you can make that the vendor has to actually turn that off.

18:24.590 --> 18:25.890
I have not done that yet.

18:25.890 --> 18:28.290
I probably won't in case I ever need it.

18:28.410 --> 18:35.550
But let's go ahead and, uh, look at actually capturing USB traffic in this particular case.

18:37.170 --> 18:40.590
So, uh, they have their application that comes with it.

18:40.590 --> 18:46.250
I know this is small but we're going to kind of blow in or, or, or sink into some of the more critical stuff.

18:46.310 --> 18:47.950
Jump over here real quick.

18:48.770 --> 18:55.970
So we can see we, we've hooked up, we power up the device, we quickly see a lot of USB handshake data taking place.

18:56.130 --> 19:01.930
Uh, and now it's connected out and what we want to do is we configure the device to only show data.

19:01.930 --> 19:03.170
Because that's all we care about.

19:03.170 --> 19:05.270
I don't care about the USB stuff.

19:05.350 --> 19:10.730
So you quickly, you can see in there that you're seeing a lot of those AT commands being transferred.

19:11.530 --> 19:19.950
Some of the stuff that Carlotta run, you actually see there as it's setting up the communication channel, uh, with the cellular's APN and all that type of stuff.

19:24.350 --> 19:30.830
So again, a lot of interesting serial number data, configuration data, firmware version data that are running on the device.

19:30.830 --> 19:34.310
All this kind of data is kind of set out there requested on the device.

19:34.550 --> 19:36.870
But we get into, we can see it collected out.

19:36.870 --> 19:40.110
That was it's uh, APN that it connected to.

19:40.110 --> 19:41.130
It was a special one.

19:41.130 --> 19:43.230
It's not a private but it's a special one.

19:43.290 --> 19:48.830
So then what we want to do is this device is connecting out and actually communicating real data out.

19:48.830 --> 19:50.710
It's taking photos and sending them out.

19:50.710 --> 19:52.310
And that's what I wanted to see.

19:52.570 --> 20:02.610
So we quickly, uh, search for this whole bucket thing and we start finding things like uh, certificates, keys, passwords.

20:02.610 --> 20:13.330
We see this device clear, basically clear text, passwords, keys, everything connecting out to an actual S3 bucket to communicate all this data.

20:13.330 --> 20:22.370
With all, everything we ever would need to know as a, uh, a tester, how this thing's connecting out to it's back end systems.

20:22.370 --> 20:32.110
Again, as you can see, versus trying to do stuff over cellular, which is encrypted, interchip comms often contains no encrypted data.

20:32.110 --> 20:38.390
And you can intercept that data and gain access, uh, a large amount of interesting stuff.

20:38.390 --> 20:51.610
I think this screen showed it actually sending out, uh, uh, data actually associated with, uh, the actual, um, configuration on the, on the device.

20:51.610 --> 21:00.650
So again, in this particular device, and Carlotte had mentioned this, both of the circuits were in, in use.

21:00.650 --> 21:01.610
Both of them were hooked up.

21:01.610 --> 21:07.250
Both the USB and the main UART were actually functioning on this or connected up.

21:07.250 --> 21:09.110
That's not always the case.

21:09.110 --> 21:19.190
Often a device that'll support both USB and all main UART communications often won't have both of them connected up.

21:19.190 --> 21:23.310
One of them will be dummied off and the other one's the only one connected in circuit.

21:23.410 --> 21:30.270
In those particular cases, in this case, which we'll show a little later, we're able to connect into the UART and control it.

21:30.270 --> 21:32.830
I think some of the examples already showed that.

21:32.850 --> 21:37.130
Because they still connected it to the main CPU on the device.

21:37.130 --> 21:38.330
Which is kind of cool.

21:38.330 --> 21:39.590
It made it easier for us.

21:39.590 --> 21:45.370
I didn't have to get into weird stuff with, uh, uh, sticking pins up underneath the body of the thing.

21:45.370 --> 21:49.490
We're able to just cut the actual circuits that do that type of stuff.

21:50.550 --> 22:00.970
So I'm going to turn this over to Carlotta and she's going to talk to us about connecting up and understanding serial communications through interchip and how we interact with that.

22:03.780 --> 22:04.660
Okay.

22:05.220 --> 22:13.620
So in the case of interchip communications for our cellular module, as I previously mentioned, it's going to be connecting over to a, to the CPU of the device.

22:13.620 --> 22:17.960
And in the case of this trail camera, it was using an EG91, which we have here.

22:18.840 --> 22:23.100
The thing is, for the actual UART communications, there's two separate lines going.

22:23.320 --> 22:29.780
So the, the, there's one line where the CPU is transmitting and then the, uh, cellular module is receiving.

22:29.780 --> 22:35.340
And then the cellular module is receiving on a separate line from the, the responses from that cellular module.

22:36.200 --> 22:43.940
So in order to actually get a full picture of the communications that are going between these two devices, we need two FTDI to USB devices.

22:44.000 --> 22:49.520
One receiving on one line and one on the other to get a full picture of the communications.

22:49.780 --> 22:59.860
Now this is only to be able to listen in on those communications and that's how we saw the, you know, when on power up that the cellular module was sending a ready and then on power down it was sending a power down.

23:01.900 --> 23:17.980
Now in order to actually be able to inject those AT commands like you saw in the AT query script, uh, demo that was run and everything, uh, we actually have to sever those connections between the CPU and the, that cellular module and put ourself pretty much in the place of the CPU.

23:18.080 --> 23:31.320
So we'd not, we'd only need one FTDI to USB device in this case and just like regular UR, you'd hook up the transmit to the receive on the cellular module and then the FTDI is received to the transmit on the cellular module.

23:33.380 --> 23:36.540
So here is, you know, three images here.

23:36.540 --> 23:44.960
On the far left we've identified that transmit and receive for the cellular module and the line that's going between it and the CPU.

23:45.120 --> 23:54.700
In the center there we've actually soldered wires to two different sides because on that far right image we've actually cut the traces between the two.

23:55.800 --> 24:01.720
Now in order to be able to continue to be able to listen in possibly on the communications we built a breakout board.

24:01.720 --> 24:08.120
So the side that's connected to the CPU is connected to the breakout board as is the side that we have the cellular module.

24:08.340 --> 24:10.860
So they can continue to function as normal.

24:11.020 --> 24:14.860
As long as, in the center there you can see that there are toggle switches.

24:15.380 --> 24:20.560
If they're in the on position the communications can continue between those two parts fine.

24:20.560 --> 24:29.520
But we can then turn them off and then connect to just one of the FTDI devices as you can see in the image and then issue those AT commands to the cellular module.

24:31.960 --> 24:36.240
And I will hand it back over to Daryl to talk about injected targeted attacks.

24:38.640 --> 24:39.680
Okay.

24:40.260 --> 24:46.520
To kind of mention a little bit on something else to add to the serial communication.

24:47.020 --> 24:58.000
We also, I also a couple years ago released a paper on interchip communication analysis and we released a proof of concept code called a Karen proxy.

24:58.480 --> 25:21.060
Now it wouldn't work in this case because we haven't set it up to handle ASCII but when we're dealing with devices where there's no ASCII data but just hex data going over, a Karen proxy would give us the ability to cut the circuit, throw the switches and route both sides back into a Python code script that would actually capture data going in both directions ,

25:21.060 --> 25:33.500
allow you to replay data, capture and replay data and also capture and replay data and actually set filters to say when you see this hex string, replace it this one.

25:33.500 --> 25:56.560
Still a proof of concept, we can probably use some more development but it, it takes this to a new level and I was just talking to the guy this last week about let's add the ability to throw ASCII in there , use standard carriage return structures which is often what we see when we're talking about communication over the main AT or the main UART communication to cellular modules.

25:57.180 --> 26:04.340
So, in this part here, AT commands, so we wanted to start thinking about what can we do here?

26:04.340 --> 26:19.500
So we've, we've, we've looked at these devices, we can capture all the USB communications, which is a wealth of information if you're doing any kind of assessment or testing on a device and then we can actually send AT commands but what can we do?

26:19.820 --> 26:34.480
Again, we're still in the early stage of this but I have an example in here of something I thought was kind of cool as proving the potential capability but I want to start talking about this is how we've tapped into this device.

26:34.600 --> 26:36.700
So we have the device here.

26:36.800 --> 26:38.700
It's a trail camera.

26:39.040 --> 26:43.320
USB is what it uses primarily for all of its communication.

26:43.720 --> 26:50.120
The serial communication between the primary processor is in use so who cares if it's connected to the CPU?

26:50.120 --> 26:57.320
So we cut it and we hook up to it that way so we can pretty much send commands at will while the device is powered up.

26:57.680 --> 27:04.120
Again, I don't think if you remember one of the videos earlier, you've seen power down.

27:04.400 --> 27:07.360
Like any of these devices, they're not going to stay powered up.

27:07.360 --> 27:11.360
So they'll stay powered up for a certain period of time and then they'll do a time cycle.

27:11.500 --> 27:14.180
And they'll actually shut down the conserved batteries.

27:14.220 --> 27:17.880
So when you're testing them, you kind of have to deal with the fact that it's doing this.

27:17.880 --> 27:25.720
But with AT commands, potentially you can shut all that functionality off, especially if you're feeding an external power supply versus batteries into it.

27:25.720 --> 27:27.900
So that's how we tapped into it.

27:28.300 --> 27:43.900
So one of the things we wanted to do is, this particular module, as Carlotta had mentioned, when we pulled down all the AT commands that are available, looked AT command manuals, it didn't really show anything about socket capability.

27:44.040 --> 27:50.040
But when we run our test script against it, we found out socket capability was available.

27:50.080 --> 27:56.540
In this particular case, it's QI open and QI closed, where we can actually set up real sockets.

27:56.740 --> 28:09.500
In the first one there, we show that we connected out to a port over an IP and it actually failed and it came back with, what is that number, I think it's 566, and basically says the socket's not open.

28:09.980 --> 28:15.480
I think this actually shows that at the bottom it came back with a zero on that particular port.

28:15.600 --> 28:19.800
So we start thinking about this, hey, what can we do with that?

28:20.000 --> 28:25.540
One, with these sockets you can do a lot of things, but what if we wanted to do like a port scan?

28:26.540 --> 28:30.860
You know, can we use the device to port scan some of the back end stuff?

28:30.860 --> 28:34.960
And here's all of the ATQI open error messages that come back.

28:34.960 --> 28:45.940
So we get a wealth of information based on this information, whether the socket's available, it's open, it's closed, or some other error.

28:46.620 --> 28:52.100
When I was initially working for this, I got some of the command structure backwards, so I was throwing all kinds of weird errors.

28:52.100 --> 28:53.760
I'm like, why ain't this thing working?

28:53.820 --> 29:01.160
Finally figured it out after I sat down with a manual that talked about QI open, got the structure right, and we kind of moved on from there .

29:02.340 --> 29:05.560
So here's the actual code that we're going to show here in a minute.

29:05.560 --> 29:07.360
It's a simple Python script.

29:07.500 --> 29:11.400
This is actually on our GitHub also, so if you want to play around with it.

29:11.400 --> 29:14.640
The yellow stuff is kind of the important stuff.

29:14.640 --> 29:20.220
So basically we can set up the USB port that we want to connect through for the TLL.

29:20.520 --> 29:26.340
And then we can go into the IP addresses, port numbers, and the bottom is open, close the circuit.

29:26.480 --> 29:29.580
So let's open and close the socket and see what happens.

29:29.980 --> 29:32.380
So let's go ahead and run a quick demo.

29:33.060 --> 29:38.380
So again, this demo is not pointed to anyone's back end system.

29:38.380 --> 29:39.900
We're doing it as a proof of concept.

29:40.040 --> 29:45.200
So I pointed at InMaps, InMaps server, the one they allow you to run scans with, with InMap.

29:45.560 --> 29:47.780
So I wouldn't like to make anyone mad.

29:48.420 --> 29:50.320
And let's go ahead and run this.

29:52.840 --> 29:54.620
So we turn the device on.

29:54.620 --> 29:59.420
First thing we want to do, let's make sure that it's actually up and ready.

30:03.520 --> 30:06.000
Make sure I have all my connections right.

30:08.400 --> 30:10.100
Turn the unit on.

30:10.520 --> 30:12.540
See my grubby little fingers there?

30:16.020 --> 30:17.100
We got it ready.

30:17.100 --> 30:18.680
So now we can run the command.

30:19.820 --> 30:30.940
And initially this thing is going to go out and we can literally point it at any IP address, any number of ports, any number of IP addresses, and instantly it starts returning data.

30:30.940 --> 30:33.100
So we'll see a 00 come back.

30:33.100 --> 30:34.500
That port is open.

30:34.500 --> 30:36.560
We have 0 5 6 6 come back.

30:36.560 --> 30:38.160
That port is closed.

30:38.240 --> 30:42.160
So from here we're actually able to do port scans to this device.

30:42.720 --> 30:50.240
I think there's a wealth of more things we could do where we can actually control these cellular modules to do some of this stuff.

30:51.140 --> 30:53.320
And let's go ahead and let it finish running.

30:55.060 --> 30:57.340
I think that's pretty straight forward what we got there.

30:57.340 --> 30:59.100
Ramp G, do port scans.

31:01.540 --> 31:06.400
I think 1337 I think is open or something like that.

31:06.520 --> 31:10.680
So a couple of the, you know, the weird ports, a couple of common ports.

31:10.680 --> 31:12.160
But now we've done a port scan.

31:12.160 --> 31:14.600
We've basically taken a trail camera.

31:14.880 --> 31:19.340
And while this is taking place, we did not alter the trail camera's function.

31:19.540 --> 31:23.740
It contended communicating out to the S3 bucket functioning normal.

31:23.900 --> 31:28.140
We just asked it to do a port scan using its socket capability.

31:28.340 --> 31:30.700
And we were successful in doing that.

31:31.500 --> 31:33.480
So where's this come into play?

31:34.300 --> 31:46.980
So if I'm doing, if I'm going to be assessing a target for a company that uses cellular backhaul for its communications, and let's say they're using a private APN.

31:46.980 --> 31:48.960
That private APN goes out.

31:48.960 --> 31:50.300
It goes through a VPN.

31:50.300 --> 31:58.240
It hits either some closed cloud service or it hits their actual internal company network through this VPN.

31:58.540 --> 32:00.780
And no one on the Internet has access to it.

32:00.780 --> 32:08.940
So no matter what data you get, you can't attack those back-end systems or test the overall ecosystem of the technology.

32:09.360 --> 32:24.040
But if we engage the device itself with what we showed here, it gives us the ability to actually go through that tunnel that's already been set up by the device through the private APN to the back-end services.

32:24.060 --> 32:27.580
And initially we can do a port scan on devices back there.

32:27.660 --> 32:46.920
Next we can actually, once we have those ports, we can set up sockets and start communicating to those devices in the area that is supposed to be trusted or secured, because we're looking at companies that are looking at security purely from a machine -to-machine environment in a closed back-end,

32:46.920 --> 32:48.840
which they would think would be secure.

32:48.880 --> 32:52.360
In this case, we can actually prove that's not the case.

32:52.360 --> 32:57.860
We can use the device, control the device, and set up our own connections and own tunnels to the back-end.

32:57.860 --> 33:01.920
So the first image is what we conceive of a private APN.

33:01.920 --> 33:04.120
The second one is more of a public APN.

33:04.120 --> 33:06.080
And that's kind of where this device was.

33:06.080 --> 33:12.600
So it kind of allowed us to actually go out and port scan and map in this case.

33:12.620 --> 33:18.440
But I have run into a number of devices that were on private APNs where we could not get access.

33:18.520 --> 33:21.360
And it's kind of the driving force around this research.

33:21.400 --> 33:32.460
How do we build out a knowledge base so pen testers, IOT testers, can go to that next level and look at the overall ecosystem effectively?

33:32.620 --> 33:37.000
And interchip communication and control is the best way to get there in my opinion.

33:37.060 --> 33:41.820
And I'm hopeful we got that over to you guys and you were able to get something out of this.

33:42.000 --> 33:46.980
Here is the actual data.

33:46.980 --> 33:50.700
So that's the GitHub and stuff like that that you can actually get to.

33:50.700 --> 33:51.600
A couple papers.

33:51.600 --> 33:55.980
We actually published a paper last week on this subject.

33:55.980 --> 33:58.160
So bring it down and check it out.

33:58.160 --> 34:00.780
We talk about a lot more in that paper.

34:00.780 --> 34:09.120
At least from the subject of engaging interactively on the hardware and how to trace things out effectively.

34:09.260 --> 34:19.760
We get into dechipping, taking chips off and actually rerouting circuits on the board and then putting the cellular modules back on, things like that.

34:20.100 --> 34:22.580
So we cover a lot of other cool stuff.

34:22.580 --> 34:24.100
So check out that paper.

34:24.440 --> 34:26.180
So I don't know if we have time for questions.

34:26.180 --> 34:27.060
We're probably out.

34:27.060 --> 34:29.040
But we're going to be around.

34:29.040 --> 34:34.800
So grab us when we get packed up off stage and I'd be glad to talk about more things with you.

34:36.280 --> 34:37.300
Thank you.

