WEBVTT

00:01.510 --> 00:02.430
Hi, everyone.

00:02.430 --> 00:07.830
Welcome to Hacking IEEE 802.15.4 Low-Rate Wireless Networks.

00:07.830 --> 00:08.950
My name is Dan Perrette.

00:08.950 --> 00:12.110
I'm one of the volunteers with the RF Hacker Sanctuary.

00:12.290 --> 00:21.170
And I help design and run challenges for the Radio Frequency Capture the Flag that we run at several conferences throughout the country.

00:21.330 --> 00:24.930
And part of that is what prompted this talk.

00:25.650 --> 00:30.950
So what we're going to be talking about today is what is IEEE 802.15.4?

00:31.270 --> 00:36.650
It's not something that a lot of people have heard of, unless you're very familiar with some of these low-rate protocols.

00:37.130 --> 00:45.610
We're going to talk about sending and receiving IEEE 802.15.4 data and some hardware and software tools to do that.

00:45.810 --> 00:51.510
I think that's kind of the most basic you can get with hacking these types of networks.

00:51.510 --> 00:56.490
And then we're going to talk about some RF Capture the Flag 802.15.4 challenges.

00:57.510 --> 01:00.410
There's a basic IEEE 802.15.4 challenge.

01:00.410 --> 01:07.110
There's also a 6LowPan challenge that I've been running for a little while, and then a new challenge that I introduced very recently.

01:07.650 --> 01:14.930
So if you're looking for zero days or new novel research, that's not what's going to be in this talk.

01:14.930 --> 01:20.270
I'm going to be talking about how to interact at a basic level with some of these types of networks.

01:20.810 --> 01:29.110
It's something that I've seen people seem to struggle with a little bit, and I want to share what I've learned about interacting with some of these signals.

01:29.770 --> 01:40.330
Mandatory disclaimer, the viewpoints, opinions, and recommendations in this presentation are my own, and they're not representative of the views, opinions, or recommendations of my employer.

01:43.020 --> 01:45.720
So what is IEEE 802.15.4?

01:46.240 --> 01:52.360
IEEE 802.15.4 is a standard from the IEEE for low-rate wireless networks.

01:52.360 --> 01:55.840
It was first introduced in 2003.

01:55.840 --> 02:12.100
It defines the physical and the MAC layers, meaning how the physical signal is sent over the air, and then also the media access control layer, so addressing different devices on that network.

02:12.100 --> 02:16.200
So we're talking about point-to-point, from one device to another.

02:16.360 --> 02:20.600
That's the kind of thing that this standard specifies.

02:20.600 --> 02:26.940
The latest version is 802.15.4.2020, so that was released two years ago.

02:27.220 --> 02:31.340
You can get a PDF of that standard for free under the IEEE GET program.

02:31.460 --> 02:33.680
It's about an $800 paid standard.

02:34.160 --> 02:38.000
If you really want to read through the entire thing, have a good time.

02:38.430 --> 02:42.200
We're going to be focusing on just the most common things that are in there.

02:42.740 --> 02:52.680
So 802.15.4 can range anywhere from 169 MHz up to 10.2 GHz, depending on which physical layer implementation you're using.

02:52.820 --> 02:56.820
They actually do define a couple of different options for the physical layer.

02:57.380 --> 03:02.960
I don't know that some of those are all that common, but they are possibilities.

03:02.960 --> 03:09.900
In the U.S., the 2.4 GHz and the 915 MHz bands are the most common.

03:10.040 --> 03:23.100
The 915 MHz band is split up into 2 MHz channels from 1 to 10, and then the 2.4 GHz band is split up into 5 MHz channels, numbers 11 through 26.

03:23.860 --> 03:32.740
I would say the 2.4 GHz band is probably the most common, or at least those are what we're going to be talking about when we get to the challenges later.

03:35.000 --> 03:43.080
So I mentioned that IEEE 802.15.4 defines the physical and the MAC layers for sending these signals.

03:43.400 --> 03:55.820
And so let's talk just a little bit about the OSI model, and I'm going to talk about that just a little bit because the OSI model, I think, is the networking abstraction model that most people are familiar with.

03:56.420 --> 04:11.360
It's not perfect, and so we're not going to dive super deep into things like certain protocols kind of split some of these layers, like the data link layer in particular, and how IEEE defines things slightly differently than OSI.

04:12.120 --> 04:23.140
But the main thing I want people to take away from this is that there are different layers, and we're talking about those bottom two layers, the physical and the data link layer, or the physical and the MAC layer.

04:23.580 --> 04:29.980
So if you're talking about other protocols like Ethernet, that's at the same level, the physical and the data link layer.

04:29.980 --> 04:33.000
Same thing with Wi-Fi, physical and data link again.

04:33.180 --> 04:43.760
On top of that, you can use other protocols like IPv4, IPv6, TCP, UDP, TLS, PPTP, SOX, and all the way up to the application level, HTTP.

04:44.160 --> 04:48.640
So IEEE 802.15.4 lives down at those first and second layers.

04:48.640 --> 04:58.480
A very, very short rant and a nitpick, IEEE 802.15.4 is not the same as ZigBee.

04:58.480 --> 05:01.980
So a lot of people have heard of ZigBee.

05:01.980 --> 05:03.760
It's got a really catchy name.

05:03.800 --> 05:07.720
It's great in its own right, but it is not the same thing.

05:07.860 --> 05:12.680
So IEEE 802.15.4 is the MAC layer and the physical layer that ZigBee uses.

05:12.680 --> 05:15.380
However, they are not interchangeable terms.

05:16.080 --> 05:22.040
So taking a look back at the OSI model, IEEE 802.15.4 is at the physical and MAC layer.

05:22.140 --> 05:29.160
ZigBee, 6LowPan, Thread, there are some other things, too, that you can put over 802.15.4.

05:29.160 --> 05:32.980
Those are all in those higher level layers.

05:35.850 --> 05:39.930
So next up, receiving and sending 802.15.4.

05:39.950 --> 05:48.290
So again, I think this is sort of the most basic thing that you can do with some of these signals, aside from maybe just detecting that there might be a signal at all.

05:48.290 --> 05:59.770
So if you look in the background underneath the presentation, underneath the slides, you see a scrolling waterfall display that's actually centered up on a fairly active 802.15.4 channel.

05:59.770 --> 06:06.010
And you can see some things that are about 5 MHz wide, and those are very likely 802.15.4 packets.

06:06.230 --> 06:13.070
This is also overlapping in their range of Wi-Fi, so some of the more broad spectrum things are likely not 802.15.4 packets.

06:14.150 --> 06:20.590
But there's a decent number of 802.15.4 packets scrolling through that waterfall behind me.

06:21.390 --> 06:27.070
So some of the common tools for sending and receiving 802.15.4 packets that we're going to run through.

06:27.070 --> 06:46.630
Killer Bee, OpenLabs 802.15.4 radios for Raspberry Pis, Nordic, Nordic Dongle, SILO OpenSniffer, FreakLabs has a Freak USB dongle that is helpful, and also some SDR tools or software-defined radio tools for interacting with it.

06:47.070 --> 06:48.990
So first up is Killer Bee.

06:48.990 --> 06:55.970
This is kind of the OG for manipulating IEEE 802.15.4 traffic.

06:55.970 --> 07:01.930
Also ZigBee, the name Killer Bee comes from ZigBee.

07:01.930 --> 07:05.210
It's obviously some inspiration there.

07:06.110 --> 07:13.470
So this is an old tool set, and it's fantastic for capturing and manipulating traffic.

07:13.990 --> 07:27.610
Some of the hardware that you can get for it is, or that can be used with Killer Bee, so the App Remote V4 up at the top there, that's something that Ryan Spears and Sergey brought us, introduced at DEF CON a number of years ago.

07:27.950 --> 07:32.590
And that's a fantastic tool for interacting with some of these networks.

07:33.750 --> 07:35.910
Downside for a while, it was a little bit hard to get.

07:35.910 --> 07:40.790
I think there's actually a vendor now selling those for somewhere around $150 or something.

07:40.830 --> 07:43.790
I don't have any experience with that particular vendor.

07:44.390 --> 07:52.390
Sergey and Ryan were nice enough to give me one of these boards after their talk at DEF CON, and I very much appreciate that.

07:52.390 --> 07:59.650
That's enabled me to mess around with a number of different 802.15.4 protocol or devices.

07:59.650 --> 08:06.330
Also, the Atmel RZ USB stick, which unfortunately is not made any longer.

08:06.850 --> 08:10.150
So this was somewhere around $30 when it was available.

08:10.690 --> 08:13.150
Sadly, Atmel decided to stop making it.

08:13.150 --> 08:23.470
This is something that you could flash with the Killer Bee firmware, and then use that with the Killer Bee tools like zbdump, zbreplay, and all that sort of thing.

08:24.430 --> 08:34.090
Something that I haven't used, but I've heard that other people are using with some success, the TICC2531 dongle, which you can see down in the lower right there.

08:34.530 --> 08:45.470
That, as I understand it, is capable of sniffing only with Killer Bee, but that's another viable option for potentially capturing 802.15.4 traffic with Killer Bee.

08:47.710 --> 08:51.030
Next up, the OpenLabs 802.15.4 radio.

08:51.030 --> 08:56.790
So this is something that can transmit and receive 802.15.4 and 6LOPAN.

08:56.790 --> 08:58.610
It's open source hardware.

08:58.630 --> 09:05.190
You can sniff with TCPdump, at least within the channel that you're currently on.

09:06.390 --> 09:10.610
It's fairly inexpensive at around $13 when it's available.

09:10.910 --> 09:14.410
There unfortunately is intermittent availability with it.

09:14.410 --> 09:18.050
That said, it is open source hardware, so if you really want to, you can make your own.

09:18.050 --> 09:19.690
Not something I've tried yet.

09:19.810 --> 09:25.210
I might try to do that at some point, but it is something that is an option to you.

09:26.790 --> 09:32.450
Potential downside to using this is that you do need to compile the kernel for the Raspberry Pi and or the modules.

09:32.450 --> 09:38.930
So I think you might just be missing a module for the default Raspberry Pi images at this point.

09:39.350 --> 09:44.250
There's a helpful guide at the link that's in that slide right there.

09:44.490 --> 09:50.390
It's something I've followed to recompile the kernel and the kernel modules to make this module work.

09:50.550 --> 09:54.090
You also need WPAN Tools, which is another open source project.

09:55.990 --> 10:01.730
So that guide is not 100% perfect, but it's evolved over time.

10:01.730 --> 10:07.750
It makes mention of a few different kernel versions that were problematic at a certain point.

10:07.830 --> 10:16.930
I believe the current versions of the Raspberry Pi kernel are compatible with this module and with 6LoWPAN and all that fun stuff.

10:17.130 --> 10:21.170
I think the latest version I was running was 5.10 point something.

10:21.170 --> 10:28.090
Don't quote me on that exact version, something very recent, much more recent than is listed in those directions.

10:28.310 --> 10:30.350
Should be able to get things working.

10:34.110 --> 10:38.910
Also from OpenLabs, a couple of things I haven't tried yet, but I think are potentially interesting.

10:39.330 --> 10:42.230
There's a Pi 6LoWPAN slip radius.

10:42.230 --> 10:50.230
So basically what this does, it has some firmware on it that will just talk IPv6 over a slip link to the Raspberry Pi.

10:50.230 --> 10:54.330
So the kernel itself is not interacting with the radio.

10:55.530 --> 10:57.910
There's potential pros and cons to that.

10:57.910 --> 10:59.210
It's a potentially interesting thing.

10:59.210 --> 11:03.630
It's also a relatively inexpensive module just like the other one.

11:04.550 --> 11:10.610
Again, not something I've tried, but it looks interesting and I know the guy that made it is using them with success.

11:10.630 --> 11:19.070
Also this KW-41Z mini board that's got an ARM Cortex processor in it and it's also capable of Bluetooth Low Energy.

11:19.070 --> 11:21.110
It can run on a coin cell battery.

11:21.150 --> 11:30.070
Again, not something I've used myself, but it looks like a viable option for interacting with some of these 6LoWPAN networks in particular.

11:32.150 --> 11:36.630
Next up, the Nordic NRF-52840 dongle.

11:36.630 --> 11:40.570
This is a USB dongle that's very versatile.

11:40.570 --> 11:47.610
It's got firmware available that can sniff Bluetooth Low Energy and also firmware for sniffing 802.15.4 traffic.

11:48.170 --> 12:02.010
There's a Python script which is available to use as an XCAP interface for Wireshark, meaning you can have this external script captured directly into Wireshark and you can control this module from the GUI in Wireshark.

12:02.230 --> 12:11.750
It's relatively inexpensive at around $10 and you can get it on both DigiKey and Mouser and I'm sure some other vendors online.

12:15.660 --> 12:17.900
Next up, the Celo OpenSniffer.

12:17.900 --> 12:21.220
This is not something I have, but I've heard good things about it.

12:21.220 --> 12:24.440
It's a multiband 802.15.4 sniffer.

12:25.000 --> 12:29.520
It's very expensive at around $622 was when I checked.

12:29.520 --> 12:33.600
It was the price on it last I checked within a week or two ago.

12:34.120 --> 12:36.080
There is a killer B firmware available.

12:36.500 --> 12:51.620
Something I noticed about this particular sniffer when looking at it is that it's got two different transceivers on it using the chips listed there, the Atmel chips there, one for the sub-gigahertz bands and one for the 2.4 gigahertz band.

12:52.720 --> 13:02.460
Interestingly enough, that is the same transceiver chip that's used in a couple of the other things like the OpenLabs 802.15.4 board, also something that we're going to talk about next.

13:02.460 --> 13:06.860
There are a couple of different things that use that chip for interacting with 802.15.4.

13:06.860 --> 13:11.240
This just has two of them and does some processing to make everything a little bit easier.

13:11.240 --> 13:18.500
If you're looking for a more professional type sniffer, this might be something that you should look into.

13:21.060 --> 13:25.440
The FreakLabs Freak USB is another option for sniffing 802.15.4.

13:25.440 --> 13:28.900
This again uses the same chips depending on which version you get.

13:28.900 --> 13:32.360
So they have 2.4 gigahertz and 900 megahertz options.

13:32.480 --> 13:38.640
They use the same chips as the Saewoo OpenSniffer and it's basically an Arduino that's interacting with that chip.

13:38.640 --> 13:50.040
So there's a sniffing firmware which is available as an Arduino example sketch that you upload to the dongle and then you can sniff packets that way.

13:50.500 --> 13:52.780
Close to this, you can program it with an Arduino.

13:52.780 --> 13:58.720
So if you're looking to write some Arduino code that interacts with 802.15.4 stuff, this would be a really good thing to use.

13:59.360 --> 14:13.140
Unfortunately, in some of my testing, I found that it dropped packets, especially when trying to monitor six low-pin data and trying to monitor, say, repeating pings or ping sixes over six low-pin.

14:13.140 --> 14:20.060
I found that it seemed to drop some packets compared to some of the other sniffing solutions or some of the other sniffing options that I mentioned.

14:20.440 --> 14:23.420
And I also noticed that it seems to be currently unavailable.

14:23.420 --> 14:30.020
I'm not sure if that's a permanent thing or if that's just the particular website I was going to wasn't around.

14:30.300 --> 14:32.680
But that's something to consider when looking at these.

14:33.210 --> 14:35.620
Great, you can do some good stuff with it.

14:36.300 --> 14:40.080
But if you're looking to buy something new, you might not be able to find one of these.

14:42.440 --> 14:45.960
Last up, I wanted to mention GRIEE 802.15.4.

14:45.960 --> 14:51.560
This is an out-of-tree module for GNU Radio that can interact with 802.15.4.

14:51.560 --> 15:01.340
I think they have a couple of different physical layer implementations available in this out-of-tree module, both OQPSK and CSS.

15:02.040 --> 15:04.760
They might have others at this point, I'm not 100% sure.

15:05.020 --> 15:12.700
But this is something that you could potentially use to use a USRP as a transceiver or potentially a BladeRF or something like that.

15:13.360 --> 15:16.180
That said, this is a little bit more difficult to set up.

15:16.560 --> 15:19.560
It doesn't work just out of the box necessarily.

15:21.080 --> 15:24.420
It's not something that I've been able to get working, which doesn't mean that it doesn't work.

15:24.420 --> 15:28.300
It just means that I haven't spent enough time to get this working myself.

15:28.300 --> 15:34.300
But this is something that I'm sure it works based on the amount of work that's gone into it, and I have a lot of respect for the guy that made it.

15:34.600 --> 15:39.840
So I have no doubt that it does work if you get it set up correctly.

15:40.320 --> 15:50.760
But this is something that you could use to send and receive 802.15.4 packets and have a lot of control over every aspect of the physical layer, the Mac layer, everything you want.

15:54.730 --> 15:58.450
Next up, the RFCTF 802.15.4 challenges.

16:05.930 --> 16:14.710
So in the RFCTF flag, for anybody that's participated in that, you've probably seen some of these little devices.

16:14.710 --> 16:18.710
These are Arduino UNOs with little XB boards on them.

16:19.070 --> 16:21.730
So that is an XB-S1.

16:22.290 --> 16:27.790
So those are XBs that communicate over 802.15.4 if you configure them to do so.

16:29.090 --> 16:33.610
So these are simulating an industrial temperature sensor.

16:33.610 --> 16:46.170
The idea behind this challenge is I wanted something that was just plain 802.15.4, very basic point-to-point communication, just sending a little bit of data, which I think is what 802.15.4 is really designed for.

16:46.170 --> 16:50.130
Sending small amounts of data back and forth just between a couple of different points.

16:50.610 --> 17:08.410
You can be more complicated than that, but this is, I feel like, about a very small amount of data going back and forth between the simulated sensor on the right there without the LCD, and the simulated display, which is on the left with that LCD display on it.

17:08.610 --> 17:12.250
So the idea here is that there are a couple parts to the challenge.

17:12.270 --> 17:15.370
One is to receive the 802.15.4 traffic.

17:15.690 --> 17:26.830
And so in addition to sending the simulated temperature data from the transmitter to the display, there's also a key that's being transmitted in ASCII across that.

17:26.830 --> 17:37.290
So if you're sniffing this traffic for a little while, you'll see a bunch of simulated data, and then you'll also see an ASCII key go across in clear text at some point.

17:37.690 --> 17:48.650
The second part of the challenge is reverse engineering this basic protocol, decoding it, and then transmitting a value that's outside of the normal range.

17:48.650 --> 17:54.570
So I took the temperature ranges for this based on what's necessary for melting glass.

17:54.570 --> 18:09.610
And the idea is that this would be a glass oven, something that's heating up for a little while, it gets up to a certain level, and then it goes back down and kind of cools off, kind of fluctuating in temperature like an oven would.

18:10.470 --> 18:16.990
And it fluctuates within a certain range, and if you watch for long enough, you'll see what that range is.

18:17.110 --> 18:28.610
And the transmit part of this challenge is to transmit something outside of that range, hopefully triggering an alarm, transmitting something that's too hot for this particular oven, or this simulated oven.

18:31.130 --> 18:33.090
Couple possible solutions for this.

18:33.090 --> 18:41.610
When I designed the challenge originally, I intended for Killer Bee to be used to decode and to replay the traffic for this challenge.

18:42.070 --> 19:00.330
So one possible way you could do this is take Killer Bee with whatever dongle you happen to have, sniff the traffic with zbdump, and then take that traffic, you can extract the receive key, the RX key in ASCII out of Wireshark or whatever else you're using to look at that traffic,

19:00.330 --> 19:08.330
and then you can take that PCAP and either create a new one or modify that PCAP and replay that with zbreplay.

19:09.190 --> 19:19.590
You can also, at the same time that you're doing that, if you're sniffing with a second dongle, you'll be able to receive the transmit key once you successfully complete that part of the challenge.

19:20.470 --> 19:26.190
Alternate solution is sniffing traffic with the tool of your choice, doesn't necessarily have to be Killer Bee, could be anything.

19:27.070 --> 19:38.250
You can do things like identify the channel, the PAN ID, the source and destination for the sensor and the display.

19:38.730 --> 19:50.990
And then if you have an XBee module, an XBee Series 1 module, you can configure that to send and receive frames just through the configuration tool, XCTU, that's used for configuring XBee modules.

19:52.990 --> 19:57.970
So here's an example of what that data looks like when it's going across.

19:57.970 --> 20:05.650
So you can see here there are a bunch of data packets going from a source of all zeros to a destination of one.

20:05.650 --> 20:09.950
So that is the simulated sensor transmitting to the display.

20:10.170 --> 20:15.390
And you can see there's a very small amount of data, just five bytes at the end there.

20:15.830 --> 20:21.970
And that's all that's going back and forth, all that's going from the transmitter to the display.

20:25.930 --> 20:27.810
Go back real quick here.

20:27.810 --> 20:40.150
You also notice there's a destination PAN of 3332, and that's something else that we'll need to plug into the configuration if we want to interact with this.

20:41.450 --> 20:47.310
So in this case, the channel that I had set was channel F or 15.

20:47.710 --> 20:52.930
I have the PAN ID plugged in there, destination address of one.

20:52.930 --> 20:58.950
In this case, I also have my address set to one, so I could potentially receive data.

20:58.950 --> 21:04.790
You can mess around with those and have your destination and your source address be the same.

21:04.790 --> 21:06.230
You could have them be different.

21:06.230 --> 21:09.690
You could have them configured exactly like the transmitter or the receiver.

21:09.970 --> 21:16.390
There are a couple of different things you can do here in order to receive all the data and to be able to send the data to where you want to get it to go.

21:17.370 --> 21:20.490
Something important here is the MAC mode.

21:20.930 --> 21:23.790
I have that set to 802.15.4 with AX.

21:24.610 --> 21:27.550
There's a couple options in there with the MAC stream header.

21:27.550 --> 21:31.830
That's not necessary for what we're doing, and that could make it incompatible.

21:31.830 --> 21:36.290
So I was trying to make this as plain vanilla 802.15.4 as possible.

21:36.290 --> 21:40.810
Could have done no AX, but decided to go with AX for whatever reason.

21:41.230 --> 21:47.930
Once you have that all set up, in the console log, if you open that up, you can see a bunch of data scrolling past.

21:48.710 --> 21:55.890
You'll see there's a bunch of 5-byte hex values on the right there, and then a couple of longer ones.

21:55.890 --> 22:00.650
And you can see that the longer ones are just an ASCII DEF CON 30 demo RX key.

22:01.090 --> 22:03.270
So that's something I just set up just for demo.

22:03.310 --> 22:07.570
The other ones are simulating the actual temperature.

22:07.870 --> 22:12.170
You can see in there, there's a 53, which is an ASCII S.

22:12.170 --> 22:23.110
In this case, that's just to simulate, hey, this is the type of sensor I have, or it's something to identify the type of transmission.

22:23.110 --> 22:34.350
The next two bytes are the actual simulated temperature, and then that's followed by a one -byte checksum, and 0d is just a new line or a carriage return.

22:34.350 --> 22:38.750
It's an artifact of how the code is written to send stuff over the XP.

22:43.370 --> 22:53.550
So once you figure that stuff out, you've got the receive key, you can also try to craft packets to send them back to the simulated display.

22:53.790 --> 22:55.970
That's something you can do through XCTU.

22:55.970 --> 23:04.610
You can construct packets just like I have up on the screen here, and then you can send the packets either once or multiple times.

23:04.730 --> 23:05.750
And depending on what you send...

23:06.930 --> 23:12.130
So there are a couple different things I saw over the amount of time we've been running this challenge.

23:12.130 --> 23:21.070
The first one I implemented with no checksum at all, and saw people immediately just jump straight to changing the values to all Fs.

23:21.090 --> 23:23.250
Okay, that works.

23:24.070 --> 23:28.910
But what if we had some basic error checking, and that's where the checksum came into play.

23:29.410 --> 23:37.530
And so at this point, this iteration of the challenge, there are a couple different error states or a couple of different things that the challenge will detect.

23:37.530 --> 23:45.870
One is if you just kind of blindly send all Fs to it, including with a checksum, it'll send back a nope key.

23:45.870 --> 23:52.550
So basically, the display detected a really rudimentary attack.

23:52.550 --> 23:55.610
It knows that that should never happen.

23:55.890 --> 24:00.830
Everything was all Fs, so it just kind of blindly went in there and did that and sent it.

24:00.830 --> 24:06.470
So this is the one negative flag that we have in there.

24:06.470 --> 24:09.950
If you send this and submit that key, you'll get some negative points.

24:09.950 --> 24:16.210
Not a lot, but we figured that was kind of mean when people are doing that to go too negative with it.

24:16.570 --> 24:19.030
Next up is the try harder key.

24:19.650 --> 24:31.650
So basically, what this is, is you capture a packet, and then you modified the right bits for the temperature and modified that to something higher, but you didn't update the checksum.

24:31.650 --> 24:33.650
So this is a checksum mismatch.

24:33.650 --> 24:37.550
So that's like, you were real close, try a little harder.

24:38.030 --> 24:40.190
So that's the try harder key.

24:40.190 --> 24:50.630
Finally, down to the bottom there, we have modifying the packet to include both the updated temperature data and also the correct checksum for that data.

24:51.130 --> 24:54.430
And that gets you the actual TX key.

24:55.910 --> 24:57.150
And here's some examples.

24:57.150 --> 25:05.710
So if you modify the data and send a temperature outside of a valid range, just a little bit, you get the screen also turn yellow.

25:05.710 --> 25:13.070
And if you send it way over correctly, then the screen will start flashing red as though there were an alarm going off.

25:13.070 --> 25:16.190
And that's when it will transmit the key back to you.

25:26.430 --> 25:29.390
Next up is the 6LOPAN challenge.

25:31.070 --> 25:35.790
So 6LOPAN is IPv6 over IEEE 8215-4.

25:35.790 --> 25:41.970
And this is something that is defined in IETF RFC 4944, if you care to read up on that.

25:43.810 --> 25:50.070
Basically, all it's doing is defining a way of sending IPv6 packets over 802.15.4 networks.

25:50.070 --> 25:58.810
So you can have IPv6 addresses on your IoT network that is running 802.15.4 stuff.

26:00.190 --> 26:11.550
Interesting thing about 6LOPAN is that an IPv6 packet is a lot bigger than the max size of an IEEE 8215-4 packet.

26:12.870 --> 26:14.930
So an IPv6 packet needs...

26:16.030 --> 26:23.770
MTU on that is 1280 octets, and an IEEE 8215-4 frame is only 127.

26:23.850 --> 26:31.170
So there's a lot of overhead that you need to crunch down into a much smaller space to get this to work.

26:31.450 --> 26:40.930
So a lot of what the standard defines is how to compress the headers for IPv6 and also how to fragment those packets across multiple IPv6 packets.

26:41.670 --> 26:48.030
This is something to consider when looking at sniffing traffic for 6LOPAN networks.

26:48.750 --> 26:50.750
Something that I thought was a problem...

26:50.750 --> 26:51.330
I thought that...

26:52.030 --> 26:59.610
Something I learned while preparing for this talk was that I thought that 6LOPAN actually increased the MTU of 802.15.4.

26:59.610 --> 27:00.810
I think that's actually not right.

27:00.810 --> 27:10.010
I think it just compresses the headers and does some fragmentation to get the traffic to flow across those networks.

27:10.510 --> 27:15.310
And I thought that the MTU was bigger because there are some tools...

27:15.310 --> 27:20.550
Kilby in particular, the last time I tried to capture 6LOPAN traffic with it, wasn't capturing properly.

27:20.550 --> 27:21.710
And I wasn't sure why.

27:21.710 --> 27:23.290
I thought this was why it was.

27:23.290 --> 27:25.090
I might be wrong about that.

27:25.390 --> 27:30.130
But all that to say, there are some tools that capture 6LOPAN properly.

27:30.130 --> 27:31.770
There are some that do not.

27:31.770 --> 27:36.230
Double check what you're looking at if you're trying to monitor 6LOPAN traffic.

27:36.230 --> 27:45.370
Test and verify that your stuff is actually capturing 6LOPAN properly, displaying it correctly in Wireshark if that's what you're using to analyze the data.

27:47.850 --> 27:55.430
So the 6LOPAN challenge that I created is two Raspberry Pis that are communicating back and forth with each other over 6LOPAN.

27:55.670 --> 28:00.350
You see they're using the OpenLabs 802.15.4 radios.

28:01.290 --> 28:02.750
One of them is a client.

28:02.750 --> 28:04.730
One of them is a server.

28:04.730 --> 28:10.370
One of the challenges is that the client is running ping6 with an ASCII payload.

28:10.930 --> 28:18.250
That's something you could see, even if you're not properly decoding 6LOPAN, you might get lucky and see that text going by.

28:19.170 --> 28:21.630
And the keys are usually pretty obvious.

28:21.970 --> 28:24.150
But just ping6 with an ASCII payload.

28:24.890 --> 28:30.730
And then that client is also periodically getting a page over a web page over HTTP.

28:31.530 --> 28:34.010
And there's a key on that page.

28:34.010 --> 28:37.510
And also a link to a second web page with an additional key.

28:40.020 --> 28:47.820
So here's what that looks like if you're monitoring that traffic in Wireshark with whatever tool you choose to use.

28:48.140 --> 28:52.420
So on the left there, there's an ICMPv6 packets.

28:52.420 --> 28:57.020
And you see a Defcon 30 demo key going by there.

28:57.440 --> 29:01.480
Just regular ping6 between two different addresses.

29:01.480 --> 29:07.080
You'll see a WCTF in the payload down there.

29:07.080 --> 29:11.840
That is actually just part of the IPv6 addresses that I chose to use for this.

29:12.680 --> 29:15.400
I figured I'd throw a little Easter egg in there in addition to the key.

29:15.400 --> 29:20.680
And also something to make it more clear that this is part of the wireless capsule flag.

29:21.200 --> 29:26.980
Over on the right, you'll see the web page that the client is requesting.

29:27.600 --> 29:30.240
It's just getting a root.

29:30.240 --> 29:32.300
So it's getting index.html.

29:32.780 --> 29:39.160
And if you follow that stream, you'll see the entire GET request and the HTML that's coming across.

29:39.180 --> 29:44.520
You'll see the key, the demo, 6LOPAN RX key in there.

29:44.520 --> 29:47.780
And then you can see the link to that additional page.

29:49.060 --> 29:52.920
And if you open those up in a browser, this is what they look like.

29:52.920 --> 29:57.700
So it's just a little page saying, hey, 6LOPAN is fun, here's your key.

29:57.700 --> 30:00.240
Are you really on the network?

30:00.300 --> 30:01.500
Can you click this link?

30:01.500 --> 30:03.940
Can you also request this page?

30:03.940 --> 30:13.360
And that key link will take you into a second page with the TX key or a key that's only available if you go and request that page yourself.

30:14.620 --> 30:23.480
Something that was possible for a while, and I think a number of people were doing, were passively sniffing while other people were solving this portion of it.

30:23.480 --> 30:28.300
For the most recent iteration, I added HTTPS to the key page.

30:28.300 --> 30:34.680
So the client will request the regular page, the index.html over HTTP.

30:34.680 --> 30:38.020
And that goes across in clear text, and other people can see that.

30:38.020 --> 30:40.820
You can passively sniff that and get that flag.

30:41.080 --> 30:45.740
But now when you go to the key, that's encrypted over HTTPS.

30:45.740 --> 30:51.180
And so other people won't be able to passively steal flags if you're computing in the wireless capture flag.

30:53.000 --> 30:55.780
Next up, a new challenge for this year.

30:55.980 --> 31:00.420
I wanted to introduce an RFCTF 6LowPanFox.

31:01.860 --> 31:09.720
So for anybody that doesn't know what I mean by a fox within the confines of an RFCTF, fox hunting, a.k.a.

31:10.280 --> 31:13.580
finding mobile transmitters, is what we're talking about.

31:13.620 --> 31:23.040
So in this case, there will be a 6LowPan transmitter roving around whatever conference we're at, and the goal will be to go and find that transmitter.

31:23.680 --> 31:31.540
If you're unfamiliar with fox hunting, there's a DEF CON 22 talk in the wireless village by Adam Worth called Practical Fox Hunting 101.

31:31.680 --> 31:40.880
This is an excellent intro to fox hunting, and he talks about a number of different techniques and considerations that you need to think about when fox hunting.

31:40.940 --> 31:48.120
We're not going to go into all of those during this talk, but if that's something you're interested in, definitely go find that video and watch that talk.

31:48.120 --> 31:50.080
There's a lot of great information in there.

31:52.780 --> 32:04.500
So when I was creating this challenge, one of the most important things that you need for fox hunting is to be able to figure out where that signal is, figure out how far away from that signal am I.

32:04.500 --> 32:06.420
So where's the signal strength?

32:06.480 --> 32:16.340
And if you look in this capture from below, there's a bunch of information in that capture, but one of the things that's missing is signal strength.

32:16.340 --> 32:22.140
There's no RSSI, there's no other way of representing signal strength.

32:22.740 --> 32:25.640
And so I want to make sure that this is solvable.

32:25.640 --> 32:34.840
So when I created this challenge originally, I started looking through a bunch of my captures, started capturing a bunch with all the different tools that I had, and I found that none of them had signal strength available.

32:34.840 --> 32:40.660
It took me into this rabbit hole of, you know, why is signal strength missing?

32:40.660 --> 32:42.460
Where would I find that?

32:42.460 --> 32:44.420
Is there anything that will show me that?

32:44.420 --> 32:58.820
And I started thinking about, you know, this is something that shows up when I do, when I sniff Wi-Fi with Aircrack or some other tools, it usually shows up in a header above the, above that Mac layer stuff.

32:58.820 --> 33:02.400
It's an extra layer that shows up in Wireshark.

33:05.500 --> 33:14.500
And before we get into it, this is the, this XHCD comic is the most applicable to what I found in this rabbit hole that I went down.

33:14.500 --> 33:18.980
There, it turns out there are multiple ways to represent signal strength.

33:19.040 --> 33:21.880
And there are many different standards.

33:21.880 --> 33:24.040
There doesn't seem to be a clear winner.

33:24.040 --> 33:32.100
There's some that sort of win in Wi-Fi, but there's even less of a clear winner when it comes to 802.154.

33:33.880 --> 33:43.260
So in 802.11, there's a, most commonly if you're capturing with Aircrack or something like that, you'll see a radio tap header.

33:43.260 --> 33:46.160
You'll also see underneath that a WLAN radio header.

33:46.820 --> 33:55.220
Actually, both of those additional protocol layers will show you some form of signal strength that you can go and look in your PCAPs for that.

33:55.460 --> 33:59.340
And there's also a case PPI pattern or header.

33:59.480 --> 34:07.920
So case, like for anybody that remembers the Air PCAPs, the company that made those, case per packet information is what that stands for.

34:07.920 --> 34:13.820
And that's another way to represent a number of different extra data fields with additional information about each packet.

34:14.540 --> 34:22.000
So when we get to 802.154, there is an 802.154 radio tap header that's relatively new.

34:22.000 --> 34:26.060
I think, I want to say 2015 or so, somewhere in that range.

34:27.020 --> 34:37.540
With the NRF sniffer or that NRF dongle that I mentioned earlier, their dongle will let you do that as long as you specify an additional metadata field.

34:37.540 --> 34:41.140
So that IEEE 802.154 tap as the metadata.

34:41.900 --> 34:45.400
You can also select that in Wireshark, which I'll show in just a minute.

34:45.920 --> 34:53.400
With Killer Bee, Killer Bee uses another header.

34:53.400 --> 34:58.140
It uses the case PPI headers, so the old 802.11 standard.

34:58.580 --> 35:03.660
They kind of repurposed that for 802.154.

35:04.220 --> 35:07.240
ZBdump does not use that header by default.

35:07.240 --> 35:14.180
You need to use the dash P flag or double dash PPI flag in ZBdump.

35:14.340 --> 35:16.120
And then you'll get that per packet information.

35:16.120 --> 35:17.560
You'll get signal strength.

35:18.080 --> 35:26.000
This is something that took me a little while to figure out because in the help output for ZBdump, it doesn't tell you what that dash P stands for.

35:26.000 --> 35:32.360
So if you don't know that PPI stands for per packet information, you might miss that option in ZBdump.

35:33.100 --> 35:37.240
But both of those tools will capture signal strength for you.

35:37.260 --> 35:40.720
And that's something that you could use to potentially foxhunt.

35:43.080 --> 35:51.760
So I mentioned that the NRF dongle and the Python script for that is available as an XCAP interface for capturing data in Wireshark.

35:51.760 --> 35:53.800
And here's what that looks like when you're configuring it.

35:53.800 --> 35:55.960
So you can select the channel that you want to capture on.

35:55.960 --> 36:01.240
You can select 802.154 tap from that out-of-band metadata.

36:01.240 --> 36:09.540
And then if you look on the right there, you'll see that 802.154 tap layer above the 802.154 data.

36:09.540 --> 36:13.300
You can see we have an RSS, in this case, of negative 51 dBm.

36:13.380 --> 36:18.300
So that's the kind of information that we need to be able to foxhunt successfully.

36:21.720 --> 36:24.380
And that's all I've got for you today.

36:24.480 --> 36:31.040
So if you have any questions, the easiest place to find me is going to be on the RF Hacker Sanctuary Discord.

36:31.200 --> 36:32.940
My username on there is RedBaron.

36:33.420 --> 36:39.940
I'm also on Twitter with underscore TheRedBaron, underscore some number of underscores under there.

36:39.940 --> 36:45.720
You can find me from the RF Hacker Sanctuary website under the crew page.

36:45.720 --> 36:48.140
The bio listed there is 100% accurate.

36:50.160 --> 36:54.160
And like I said, this is not original research.

36:54.160 --> 37:07.420
You know, this talk was intended to tell people with some of the things that I've struggled with in interacting with some of these networks and to convey some of the lessons I've learned over the years of interacting with these things.

37:07.480 --> 37:20.360
So I'm hopeful that more people will interact with these types of networks, go find more devices, maybe do some more driving with it, interact with the RFCTF challenges a little bit more.

37:20.360 --> 37:24.420
Hopefully we get somebody to find the 6LopanFox at some point.

37:25.320 --> 37:26.860
That's all I've got for you today.

37:28.040 --> 37:29.500
Thanks and have a great day.

