WEBVTT

00:00.000 --> 00:01.160
All right.

00:01.800 --> 00:03.240
Good morning.

00:04.920 --> 00:06.440
Should I not talk too loud?

00:06.440 --> 00:07.900
Any of you guys got headaches?

00:10.980 --> 00:12.080
What's that?

00:12.620 --> 00:13.880
Pass the flask around.

00:13.880 --> 00:15.040
A little hair of the dog.

00:15.180 --> 00:16.200
Yeah, all right.

00:16.940 --> 00:19.940
Yeah, there isn't enough left in the flask.

00:21.100 --> 00:25.540
But so, yeah, I'll try not to bore you guys to death this morning.

00:25.540 --> 00:27.460
But thanks for turning out.

00:27.460 --> 00:31.420
Yeah, it is interesting times in the wireless village.

00:31.420 --> 00:36.600
I was originally scheduled for 7 o'clock on Thursday, but those darn EFF people got in our way.

00:36.780 --> 00:38.340
So here we are back.

00:38.400 --> 00:43.100
I'm going to do the talk that was originally scheduled for Thursday at 7 now.

00:43.100 --> 00:47.760
Bright and shiny early Saturday morning after all our great DEF CON parties.

00:48.760 --> 00:50.540
Yeah, I went to bed early.

00:50.960 --> 00:54.780
I went to bed early.

00:55.420 --> 01:01.660
2 a.m., and the alarm went off at 6.45, and I haven't had nearly enough coffee yet.

01:01.780 --> 01:04.580
So all right, let's get started.

01:04.960 --> 01:11.100
We're going to do an introduction to the Nordic NRF24L01 Plus.

01:11.100 --> 01:16.800
It's a pretty cool wireless chipset that I had an opportunity to do some playing with for a project .

01:16.800 --> 01:21.220
We'll talk about that project and all of the stuff that went along with that.

01:21.780 --> 01:33.440
We'll see that within sort of this project and the presentation and some of the stuff that we worked on for this, this may also be a candidate for next year's fail panel.

01:33.640 --> 01:37.780
How many of you got to go to the DEF CON Comedy Jam panel?

01:38.000 --> 01:40.780
And yeah, we had some folks up there.

01:40.780 --> 01:44.120
The overarching theme of that is fail every year.

01:44.180 --> 01:46.580
And we tried to do something that was humorous.

01:46.580 --> 01:52.940
One of my coworkers and I, we hacked some Teledildonic devices.

01:53.520 --> 02:01.140
So we played and hacked with an internet and Bluetooth-connected vibrator for epic lulls.

02:01.140 --> 02:02.560
It was lots of fun.

02:02.760 --> 02:09.120
And it, yeah, owned all sorts of interesting social connotary as well.

02:09.180 --> 02:18.300
So the overarching theme of fail, people make mistakes, and there were definitely some mistakes that were made going into this.

02:18.340 --> 02:23.500
One of those being, you ever have that time when you take on one too many projects?

02:23.740 --> 02:27.540
Yeah, I'm about three projects too many too deep, and this was one of them.

02:28.140 --> 02:32.560
So there's sort of lots of exercise left to the reader.

02:32.560 --> 02:37.100
It is definitely an introduction to some of the capabilities of this Nordic Radio.

02:37.200 --> 02:40.560
But we'll give you some examples, some ideas as how you can use it.

02:40.760 --> 02:45.200
And it's definitely something affordable that you guys might want to start playing with.

02:45.960 --> 02:46.460
All right.

02:46.460 --> 02:47.640
So a little bit about me.

02:47.640 --> 02:55.760
I'm a hardware hacker and penetration tester for a small boutique consulting group called InGuardians.

02:56.100 --> 02:59.380
I just had my one-year anniversary with them.

02:59.580 --> 03:10.040
And sort of as a part of this project, my one-year anniversary right about DEF CON last year, I had a little impact into the project where I got introduced to this radio.

03:10.040 --> 03:12.440
And I'll explain that in a little bit.

03:12.440 --> 03:15.180
I'm also an instructor for the SANS Institute.

03:15.180 --> 03:19.680
I teach their wireless class, SANS Sec 617.

03:19.680 --> 03:23.200
So wireless security, ethical hacking, and defense.

03:23.260 --> 03:28.350
I'm also a member of the Paul's Security Weekly crew, formerly known as Paul.com Security Weekly.

03:28.860 --> 03:30.420
Yes, trademark disputes.

03:30.420 --> 03:31.580
We changed the name.

03:31.580 --> 03:40.200
It was going to cost us $15,000 to fight the Paul.com issue with no guarantees at the end.

03:40.200 --> 03:47.060
So we elected to spend $5,000 to rebrand and have a $10,000 party with a guarantee at the end.

03:47.060 --> 03:50.860
So yeah, it was a financial decision and it worked out.

03:51.040 --> 03:53.880
I'm also an extra class ham radio operator.

03:53.880 --> 03:57.800
My call sign's KB1TNF, Kilo Bravo 1, Tango November Foxtrot.

03:57.800 --> 04:00.520
Or if you're being funny, Kevin Bacon 1.

04:00.520 --> 04:01.960
That's not funny.

04:02.160 --> 04:02.800
Okay.

04:03.820 --> 04:06.760
How many of you guys are going to take your ham radio exams tomorrow?

04:07.060 --> 04:11.840
How many of you guys are going to show up and take the cram session at 9 to noon here tomorrow?

04:12.000 --> 04:13.360
Yes, come do it.

04:13.360 --> 04:14.960
It's totally worth it.

04:14.960 --> 04:15.960
Totally worth it.

04:15.960 --> 04:16.860
All right.

04:17.400 --> 04:18.020
All right.

04:18.020 --> 04:23.540
So I had a little inspiration for talking about this radio and learning about this radio.

04:23.540 --> 04:31.480
I participate as an event organizer and volunteer for the Mid-Atlantic Cyber Collegiate Defense Competition.

04:31.480 --> 04:41.060
It's a competition where college students create teams within their local university for computer security club or computer club.

04:41.060 --> 04:45.000
They participate in some local and regional events.

04:45.000 --> 04:47.220
The semifinals are held regionally.

04:47.220 --> 04:52.380
I participate at the Mid-Atlantic region that divided into a bunch of different regions.

04:52.440 --> 04:57.820
As part of my involvement for the last four years, I've created their electronic badges.

04:58.120 --> 05:04.840
And their electronic badges as part of their scenario have been what's considered in scope.

05:04.840 --> 05:10.640
They're a hackable and defendable asset and they're scored based on points as to what they do with these badges.

05:12.980 --> 05:14.780
Normally this goes pretty darn well.

05:14.780 --> 05:16.320
We have lots of time to work on the badges.

05:16.320 --> 05:21.120
We know what the theme for the next year's competition is going to be a year in advance.

05:21.200 --> 05:32.060
So basically the ride home, eight-hour car ride on the way home, my cohort and I start talking about what we're going to do for the badges next year on the ride home.

05:32.840 --> 05:37.560
Unfortunately, the year before we didn't have a good handle on what we were going to do.

05:37.800 --> 05:50.300
And right about that time, so actually not last year, the year before at Mid-Atlantic CCDC competition, I was actually participating in my exit interview for getting laid off while at competition.

05:50.500 --> 05:52.920
So I was leaving competition unemployed.

05:54.180 --> 05:56.860
That was kind of interesting.

05:57.040 --> 06:10.160
So to that, in that year, over the last year, things sort of got put on hold as far as examining stuff what we're going to do for last year's Mid-Atlantic CCDC competition.

06:11.100 --> 06:16.380
So I was unemployed, found a job, was a great job.

06:16.380 --> 06:19.180
I was there three and a half months and they laid me off.

06:19.180 --> 06:23.340
So I got laid off twice in a four-month period, which sucked.

06:23.340 --> 06:26.700
In that four-month, three-and-a-half-month period, we had a child.

06:27.060 --> 06:28.340
We have two kids.

06:28.420 --> 06:36.560
So yeah, we had a four-week-old at home who had just come home from the hospital, was three weeks early, and has spent a week and a half in the NICU.

06:37.600 --> 06:46.000
So needless to say, there was a little bit going on in my life outside of looking at badges for the Mid-Atlantic CCDC competition.

06:46.680 --> 06:49.460
It ended up coming down to two months prior.

06:49.460 --> 06:57.100
Oh, so my compatriot as well, Darren Wigley, had helped me for four years on building badges and coming up with a scenario.

06:57.420 --> 07:10.120
He also got laid off from the same company at CCDC the year prior and his new job had him traveling 90% and had just no cycles to give to me to help with the badges.

07:10.120 --> 07:20.860
So I was on my own and by the time it came down to it, I had exactly two months to come up with a scenario, build a badge , get it implemented, and then bring it to the competition.

07:21.060 --> 07:23.140
So I needed something fast and easy .

07:23.420 --> 07:39.620
Some of those design constraints for that particular badge were you're going to be handing this badge to a bunch of college students that may have never touched a microcontroller in their entire life, yet you're giving them a badge with a microcontroller that they have to learn how to program and defend in two days.

07:39.980 --> 07:44.700
Same thing from the red team side, the attackers that are attacking these students' networks.

07:45.000 --> 07:49.460
Some of these attackers are not hardware guys, they're software guys, they're web application security guys.

07:49.460 --> 07:52.500
They may have never touched a microcontroller in their life.

07:53.000 --> 07:57.220
So they need to learn how to turn the badge into an attack tool in two days.

07:57.360 --> 08:01.500
So it needs to be something that you can attack and defend in two days and do it fairly simply.

08:01.740 --> 08:05.180
Turns out this was a pretty interesting thing.

08:05.380 --> 08:08.820
I had some design constraints that I needed to think about for this.

08:08.960 --> 08:13.040
We're giving them to them as a badge, and so they need to be powered for two days.

08:13.280 --> 08:16.500
The badge needed to be powered with some fairly standard type of batteries.

08:16.580 --> 08:18.100
There was a budget involved.

08:18.100 --> 08:20.380
I couldn't spend two or three hundred dollars on a badge.

08:20.400 --> 08:28.280
I think I had the whopping price of $48 per person for a badge, which is pretty significant.

08:28.740 --> 08:40.580
The badge development effort is all funded through grants through the National Science Foundation for this event, as well as private donations and corporate donations as well.

08:40.800 --> 08:42.780
So there is a limit.

08:42.900 --> 08:49.220
I needed something that we could have low power that the students and attackers could wear around their necks for two days on a set of batteries.

08:49.940 --> 08:57.080
It needed to be relatively low cost and sort of low barrier to entry for the students to start figuring out what they needed to do.

08:59.440 --> 09:06.330
What ended up happening is I selected a set of radios because they ended up being fairly low power, fairly inexpensive, and easy to use.

09:06.630 --> 09:17.570
But additional research after the fact and during implementation time, I found these radios, the Nordic NRF 24L01 pluses, and I went, oh, these are going to suit my purpose.

09:17.570 --> 09:18.370
These are really neat.

09:18.370 --> 09:22.870
And then after I got them in my hand, I was like, these things are awesome.

09:22.870 --> 09:26.150
There's so much more that you can do with these with some hackery.

09:26.150 --> 09:29.910
And that's sort of what I wanted to introduce to you folks today.

09:29.910 --> 09:39.390
This is probably a radio chip set that many of you have never heard of but can have some really cool fun things and some potential security application for you as well.

09:39.970 --> 09:42.410
We're only going to take sort of a scratch at the surface.

09:42.410 --> 09:44.590
Many of those exercises left to the reader.

09:44.850 --> 09:49.770
I'm going to give you the introduction as to some of the things you can start doing, some challenges with those as well.

09:50.090 --> 09:52.350
So this is the display.

09:52.550 --> 09:53.690
We've got a setup here.

09:53.690 --> 09:54.970
Not quite as nice.

09:55.070 --> 10:05.230
What the badges ended up turning out to be were simulated aircraft ADS-B beacons and simulated because they had very little code space to deal with.

10:05.410 --> 10:09.630
So basically what ended up happening is that the badge just spits out an aircraft tail number.

10:09.630 --> 10:11.430
Hey, I'm aircraft this.

10:11.730 --> 10:15.570
And the radios have a fairly short transmit and receive distance.

10:15.870 --> 10:19.970
So we built a aircraft arrivals and board.

10:20.030 --> 10:26.930
So when they came close to the, quote, airport, the station here, the station would receive messages.

10:27.030 --> 10:29.130
And it would receive messages of a tail number.

10:29.130 --> 10:31.330
So we'd put them in an arrivals board.

10:31.650 --> 10:36.150
And every time a message was received, they'd reset the counter on the arrivals board.

10:36.150 --> 10:43.510
After that message was not seen for a five-minute period, it would move into the departures board.

10:43.750 --> 10:47.830
If we didn't see a beacon from an aircraft for five minutes, that means they're not there anymore.

10:47.830 --> 10:48.930
They've departed.

10:49.290 --> 10:54.170
After they were in the departures board for five minutes, that means that they're gone.

10:54.170 --> 10:59.570
This was also right about the time that the Malaysian airlines flight disappeared over the ocean.

10:59.610 --> 11:01.570
So there were all sorts of jokes there.

11:02.250 --> 11:02.770
Yeah .

11:03.710 --> 11:05.230
Completely unrelated.

11:05.230 --> 11:05.830
Yeah.

11:05.830 --> 11:06.470
Yeah.

11:06.470 --> 11:07.290
Yeah.

11:07.290 --> 11:07.570
What?

11:07.570 --> 11:08.330
Too soon?

11:08.330 --> 11:09.270
Okay.

11:09.370 --> 11:10.530
All right.

11:10.730 --> 11:11.030
All right.

11:11.030 --> 11:12.450
So a little bit about this radio.

11:12.450 --> 11:17.230
It's a 2.4 gigahertz radio in the ISM band, industrial, scientific and medical band.

11:17.230 --> 11:18.950
No license required to use.

11:18.950 --> 11:25.290
Just like your BGN wireless stuff, some BGN wireless stuff in the same frequency ranges.

11:25.790 --> 11:27.570
It's fairly low speed.

11:27.590 --> 11:29.910
Maximum data rate transfer is 2 meg.

11:29.910 --> 11:36.550
Typically we see them more often in the 250k to 1 meg range depending on application.

11:36.830 --> 11:41.150
It is very low power consumption for a radio.

11:41.150 --> 11:47.050
You can do all sorts of radio shut down over the radio with some of the various implementations.

11:47.050 --> 11:48.890
Requires 3.3 volts.

11:49.750 --> 11:54.910
And at a minimum, sorry, 3.3 volts at a minimum 1.9.

11:54.910 --> 11:58.410
So we'll take a set of batteries and drain those really well.

11:58.410 --> 12:01.510
Take them all the way down to make them unusable.

12:02.170 --> 12:04.770
Grab every possible amount of power out of them.

12:05.210 --> 12:11.030
So get some pretty decent battery life and it will continue to work all the way down to 1.9 volts.

12:11.350 --> 12:16.070
Uses Gaussian frequency shift keying, GFSK modulation.

12:16.330 --> 12:23.770
So for those of you doing some of the GNU radio, GNU radio companion stuff, we now know how we can potentially start decoding some of this stuff.

12:24.110 --> 12:31.690
The chip itself is a QFN 20 by 24 by 4 millimeter by 4 millimeter.

12:31.750 --> 12:33.590
10 millimeter by 10 millimeter, sorry.

12:33.630 --> 12:35.150
QFN package.

12:35.370 --> 12:37.410
These things suck to solder.

12:38.410 --> 12:43.070
Hence, every time you're probably going to buy one, you're going to buy them on one of these breakout boards.

12:43.730 --> 12:46.450
This is actually some of the samples that I had in my home office.

12:46.450 --> 12:53.990
Some of these breakout boards that elude at higher expense actually include a RPSMA connector and you can add a standard 2.4 gigahertz antenna to it.

12:54.490 --> 12:58.850
So this has just got the like the 1.1 DBI rubber ducky antenna.

12:58.850 --> 13:04.470
There's no reason we can't go take an 18 DBI parabolic dish antenna and put it on here if we want to.

13:04.570 --> 13:08.810
So we increase in distance and have all sorts of good fun there.

13:08.950 --> 13:22.410
The standard version without the RPSMA connector, very similar to this one, in small quantity, quantity of 10 on eBay from China, they're about $1.10 a piece.

13:23.030 --> 13:27.630
I can buy a bunch of these things and throw them away if I want to because they're that cheap.

13:27.770 --> 13:33.510
You think about some of the other chipsets that you may be looking at, you know, Wi-Fi chipsets, you're probably going to pay $30 or $40 for.

13:33.870 --> 13:37.530
The breakout boards from SparkFun are going to be relatively expensive, maybe $50, $60.

13:38.690 --> 13:42.310
Bluetooth, Bluetooth Low Energy, you're probably $5 to $10 a piece.

13:42.930 --> 13:48.210
Zigbee, some of the stuff that I've seen for the development kits are about $40 on the low end.

13:48.530 --> 13:50.090
These are a dollar.

13:50.550 --> 13:51.850
That's good.

13:51.870 --> 13:56.950
And for a radio that costs a dollar, we can do all sorts of fun stuff with those.

13:56.950 --> 13:58.150
Okay.

13:58.150 --> 14:09.770
Some other interesting ones as well, the NRF24LU one also has built-in USB support, so it becomes a USB device.

14:09.770 --> 14:13.070
You can plug that into any USB port and access it over serial.

14:13.650 --> 14:19.630
The devices that we're looking at here are actually SPI bus, so a little bit different.

14:19.630 --> 14:25.230
We've got to have another microcontroller in between this device and potentially something else to use it.

14:25.250 --> 14:33.430
Those other devices are a little bit more expensive with the built-in serial support, and they don't necessarily integrate as well with a standalone microcontroller.

14:34.690 --> 14:35.630
All right.

14:35.730 --> 14:49.390
Within the Nordic NRF24LU one, they've got their own standard protocol called shockburst, and most notably advanced, sorry, shockburst enhanced.

14:49.590 --> 15:07.710
It does all sorts of fun packet stuff for us, very much like we'd expect for 802.11 TCP, you name it, it does packet assembly, CRC checksums, retransmissions, shockburst enhanced will handle all of this stuff for us.

15:07.710 --> 15:09.570
In the default mode.

15:09.570 --> 15:16.950
Plug it in, start sending packets to the radio, packets come out of the radio, received by another radio, shockburst enhanced, and we don't have to worry about anything.

15:17.530 --> 15:18.190
Awesome.

15:18.190 --> 15:19.690
And it costs me a dollar.

15:20.510 --> 15:37.190
However, we can take one of these devices and put them in what they call direct shockburst mode, which leverages us the ability to directly access the radio and craft our own packets within the limitations of the shockburst enhanced framework.

15:37.190 --> 15:39.230
There's some specific challenges to that.

15:39.230 --> 15:50.930
So we can implement with these radio chips, implement ANT, iBeacon and some Bluetooth low energy functionality for a radio that costs us a dollar .

15:51.130 --> 15:54.010
It's all done in software and not saved at the radio.

15:54.670 --> 15:59.130
We've got some links to the spec sheet as well.

15:59.130 --> 16:13.390
And I'm trying to remember, my images for these, for a lot of the slides come up as take the title of the slide, go to Google image search and take the first image that's decent and shows up.

16:13.390 --> 16:18.150
This is a Marvel superhero from like Marvel Saturday morning cartoon somewhere.

16:18.310 --> 16:20.210
And I have no idea which one it is.

16:20.210 --> 16:22.090
And I tried to remember which one it was.

16:22.270 --> 16:27.730
But it was the only one that actually looks cool when I put protocol in Google image search.

16:27.970 --> 16:29.970
So that's what we've got.

16:30.610 --> 16:31.390
All right.

16:31.530 --> 16:33.250
How do we interact with the radio?

16:33.250 --> 16:35.390
We're going to use SPI.

16:35.910 --> 16:43.390
When I started looking at SPI, I had never worked with SPI before I worked on this project for the Mid-Atlantic CCDC project.

16:43.910 --> 16:46.710
And I thought it was this voodoo and magic.

16:47.130 --> 16:52.590
Turns out you spend about 15 or 20 minutes with it and you'll get some pretty good ideas.

16:53.090 --> 16:55.670
I happened to interface mine with an Arduino.

16:55.770 --> 16:59.550
And I can hear you guys saying I hate Arduinos for microcontroller.

17:00.190 --> 17:00.930
I get it.

17:00.930 --> 17:01.730
But guess what?

17:01.730 --> 17:02.810
I had design constraints.

17:02.810 --> 17:03.530
They're easy to use.

17:03.530 --> 17:06.650
Had to have students that had open IDE that they could use.

17:06.650 --> 17:09.970
Didn't want to have to have them spend money to participate in this challenge.

17:09.970 --> 17:11.530
It's easy to use.

17:11.850 --> 17:14.310
Even a monkey can do it just like this one up here.

17:15.410 --> 17:19.230
Using SPI on the Arduino was actually pretty darn easy.

17:21.130 --> 17:31.350
So if you want to learn some more about the SPI implementation, Nordic Semiconductor and some other folks have got some great tutorials on understanding SPI.

17:31.350 --> 17:33.130
This was the one that I used.

17:33.690 --> 17:39.070
And SPI does allow us to have multiple of these serial devices on the same chain.

17:39.070 --> 17:42.710
So we can conceivably daisy chain multiple radios.

17:43.550 --> 17:45.730
Pulsing which ones are on and off.

17:45.870 --> 17:48.470
And we could conceivably do that with an Arduino as well.

17:48.510 --> 17:53.570
It turns out it's really not as much voodoo as you seem to think and ends up being fairly easy.

17:54.750 --> 17:58.230
So Larry, why the heck do we care about this stuff?

17:58.410 --> 18:08.650
Well, we're seeing the adoption of the Nordic NRF24L01 and L01 plus radios in all sorts of commercial devices.

18:08.930 --> 18:22.770
Max Moser and I want to say Dominic Spill actually spent some time as part of their Keyboard Sniffing Development Project figuring out which devices had some of the stuff.

18:23.010 --> 18:28.370
That's where some of the Ativa platform stuff.

18:28.370 --> 18:34.390
It's a voting platform for like when you go into like a closed caption studio audience type of thing.

18:34.490 --> 18:39.490
And you can vote on various things based on some of the shows and some of those types of things.

18:39.490 --> 18:41.790
Wireless device that you can do some voting with.

18:42.070 --> 18:49.910
The Nike plus portion that goes the beat portion that goes with your in your shoe that tracks your steps.

18:49.910 --> 18:52.670
Uses the Nordic radio as well.

18:52.670 --> 18:58.170
The Garmin Chirp for doing activity tracking for exercise.

18:58.670 --> 19:03.190
A whole bunch of unnamed medical devices.

19:03.550 --> 19:07.810
In this one, a Suunto sports instrument.

19:08.650 --> 19:11.970
This one's the Microsoft keyboard.

19:11.970 --> 19:14.350
The Logitech unifying receiver.

19:14.350 --> 19:20.890
How many of you guys have bought one of these Logitech wireless keyboards at like Staples recently with a unifying receiver?

19:20.890 --> 19:23.590
It's the one with the little like red star thing on it.

19:23.790 --> 19:26.710
Nordic NRF24L01 plus radios.

19:26.750 --> 19:32.390
In fact, I picked this one up at Staples last week for 20 bucks.

19:33.310 --> 19:37.930
And now we can have all sorts of fun hackery for a $20 keyboard and a $1 radio.

19:37.930 --> 19:39.470
A little bit more complicated.

19:39.890 --> 19:41.790
Various unnamed medical devices.

19:41.970 --> 19:48.050
I have a good friend that may or may not have hacked his own insulin pump and I'll leave it at that.

19:48.150 --> 19:56.610
Some of those type of devices that may be life-saving actually contain some of these radios and could have some pretty serious impact should some of that stuff go bad.

19:57.410 --> 19:59.930
So thanks to Travis Goodspeed.

19:59.930 --> 20:18.690
He spent a lot of time looking at some of these radios and interacting with these radios with the GoodFET, the interactive board for dealing with all sorts of fun devices, ZigBee and others, dealing with various wireless chipsets and all open source.

20:18.690 --> 20:22.930
I highly suggest if you're interested to pick one up, it's all open source.

20:24.330 --> 20:34.890
Travis, through some magic of math and implementation hacks, discovered that we can turn one of these Nordic radios into a promiscuous sniffer.

20:35.410 --> 20:38.090
It's a little bit convoluted.

20:38.090 --> 20:47.050
He's using some modes for the registers in the chipset to an invalid state at which point the radio says, oh, well, that's fine.

20:47.050 --> 20:50.910
I'll just turn the radio on and just spit you a stream of raw data.

20:51.090 --> 20:53.910
And then we can disable some of the other settings as well.

20:53.910 --> 20:58.170
So shock burst doesn't process stuff like CRC 32-bit checksums.

20:58.570 --> 21:02.570
And now we potentially have a $1 2.4 gigahertz sniffer.

21:02.570 --> 21:03.470
Okay.

21:03.510 --> 21:06.750
It does require some interesting hackery.

21:06.750 --> 21:09.110
It will not do channel hopping.

21:09.350 --> 21:21.090
The radio takes in radio terms, anyways, takes some significant time to retune the radios between the different channels for channel hopping and the time that is remaining for a lot of the protocols that do channel hopping.

21:21.090 --> 21:25.070
We don't have enough time left to actually do any processing on the packet that we receive.

21:25.210 --> 21:28.010
So it can't hop fast enough.

21:28.010 --> 21:32.670
But we can sit on one channel and listen for traffic as it goes by on that one channel.

21:32.670 --> 21:38.550
Very similar to how the Uber Tooth One operates for doing some of the Bluetooth sniffing.

21:38.550 --> 21:48.070
It sits on channel 39 by default and listens for all the packets go by on channel 39 when it hops 1,600 times a second.

21:49.030 --> 21:50.850
We'll get to this a little bit more.

21:51.670 --> 21:52.050
All right.

21:52.050 --> 21:56.010
So one of the things that we mentioned, we can do Bluetooth low energy.

21:56.190 --> 22:07.550
And for any of you who have seen Mike Ryan's talk on how smart is Bluetooth smart, you learn that Bluetooth low energy is all sorts of fail.

22:07.790 --> 22:24.630
They significantly reduced the channel hopping requirements, took out half the number of frequencies and the number of channels, shortened the frequency hopping time frame, and some various cryptographic failures as well.

22:24.630 --> 22:28.690
So it might be neat for us to start looking at some Bluetooth low energy stuff.

22:29.430 --> 22:36.570
The maximum data rate transfer for Bluetooth low energy is 1 meg, which is well within the duty cycle of the Nordic radio.

22:36.570 --> 22:39.530
It would do 250, 1 and 2 meg.

22:39.530 --> 22:42.190
So we certainly can do some of that.

22:42.190 --> 23:00.970
The problem is that observing and or transmitting some packets with the Nordic radio, the enhanced shock burst when we go into direct mode and disable CRC 32-bit checksum checks, the packet size is only 32 bytes long.

23:00.970 --> 23:03.430
Let me make sure I get that number right.

23:03.530 --> 23:03.930
Yep.

23:04.030 --> 23:06.530
32 bytes long.

23:06.670 --> 23:10.770
But Bluetooth low energy packets can be up to 39 bytes long.

23:11.310 --> 23:18.270
Some of the packet types, depending on their advertising rates, we can fit and have fit in the 32-byte packet.

23:18.270 --> 23:22.690
So we only have the ability to sniff and or transmit specific packet types.

23:22.690 --> 23:27.550
Specifically, one of those is the advanced no connection indicator.

23:27.550 --> 23:29.770
Hey, I'm a device and I'm here.

23:29.950 --> 23:31.910
So broadcast packets.

23:31.950 --> 23:36.330
So we can observe broadcast packets and we can conceivably craft our own.

23:36.330 --> 23:44.750
However, also only on channels 37, 38 and 39, which is where all of these actually happen within Bluetooth low energy.

23:44.750 --> 23:53.490
All of the discoverable mode packets for Bluetooth low energy happen on three channels as opposed to 79 with normal Bluetooth stuff.

23:54.050 --> 24:00.850
So Bluetooth low energy sniffing, yes, I actually went to meme generator and created this specifically for this slide.

24:01.010 --> 24:07.670
I couldn't find anything in Google image search, so I went and made my own.

24:08.670 --> 24:13.050
It's not so easy to do Bluetooth low energy sniffing with one of these devices.

24:13.150 --> 24:19.250
The channel hopping is one of the ways that's going to come down to fail for us.

24:19.250 --> 24:24.330
The radio just can't hop fast enough for Bluetooth low energy to do connection following.

24:24.470 --> 24:34.430
But we could do very similar types of things like the ubertooth one does by listening on one or potentially implementing three radios and sniffing on just three channels.

24:34.430 --> 24:41.010
However, based on the packet size problems, we're only able to grab those advanced non-connection indicator packets.

24:41.010 --> 24:46.310
So we can find beaconing devices and potentially beacon devices ourselves.

24:46.310 --> 24:50.410
So some limited capabilities, but we only paid a dollar for it.

24:52.190 --> 24:53.350
All right.

24:53.350 --> 24:55.150
Have you guys heard of iBeacon?

24:55.990 --> 24:58.330
This is kind of neat stuff.

24:58.410 --> 25:05.330
Apple's pseudo-proprietary technology for doing location tracking.

25:05.630 --> 25:23.130
Some of the stories that we hear about Apple wants to see successes for iBeacon is to put iBeacon's devices within, say, grocery stores so that when you fire up your grocery store application and you walk around the grocery store and you show up in the toilet paper aisle,

25:23.130 --> 25:33.850
it knows you're in the toilet paper aisle and you're standing in front of the Charmin and it can beam a coupon for Charmin to your phone while you're standing in front of Charmin.

25:33.850 --> 25:42.530
Because you'd normally buy Quilted Northern, but hey, now I've got this coupon and now they're the same price or cheaper, so I'll buy Charmin.

25:42.750 --> 25:54.910
Location tracking within building with a commercial application and now we start tying that to something for purchasing habits, that's kind of creepy.

25:55.230 --> 25:58.110
That said, it's still a pretty darn neat application.

25:58.830 --> 26:02.990
We can still, with the Nordic Radio, do some stuff with iBeacon.

26:02.990 --> 26:10.030
However, iBeacon is based on Bluetooth Low Energy and we just sort of went over some of those challenges with Bluetooth Low Energy.

26:10.590 --> 26:14.730
However, some of those challenges still exist.

26:14.730 --> 26:20.530
We can only either broadcast or sniff the presence for some of those devices.

26:21.810 --> 26:24.850
And injection actually works a little bit better here.

26:25.210 --> 26:28.190
So we can create iBeacon advertisements.

26:28.190 --> 26:29.870
Hey, I'm an iBeacon and I'm here.

26:30.530 --> 26:33.810
And that's sort of about it for this radio with iBeacon.

26:34.610 --> 26:38.790
All right, some practical implementation for you guys to get started for some of this stuff.

26:38.790 --> 26:42.770
This is exactly what we used for the Mid-Atlantic CCDC competition.

26:42.770 --> 26:44.190
This is their badge.

26:44.290 --> 26:45.470
Sexy, isn't it?

26:46.510 --> 26:49.430
It's an Arduino micro and one of the radios.

26:49.430 --> 26:51.830
And a battery pack and a lanyard.

26:51.830 --> 26:52.970
I didn't put the battery pack.

26:52.970 --> 26:56.270
They had four AA batteries and a USB connected thing.

26:56.270 --> 27:02.930
So I made these guys wear four AA batteries around their neck with this nice thin lanyard for two days.

27:03.210 --> 27:04.390
It sucked.

27:04.390 --> 27:05.090
It sucked.

27:05.090 --> 27:06.890
But the battery packs were cheap.

27:06.890 --> 27:08.270
We got them in all under budget.

27:08.270 --> 27:11.150
I got them in way under budget and they had a great time with them.

27:11.170 --> 27:17.170
Okay, so with this, with the Arduino, we're using the SPI libraries, which were included.

27:17.170 --> 27:18.830
If not, fairly easy to grab.

27:19.350 --> 27:28.970
And there are a couple of ‑‑ there are at least two Nordic NRF 24L01 libraries available for Arduino.

27:28.990 --> 27:33.610
This was the one I found to be the most robust, the one from Maniac Bug.

27:34.530 --> 27:39.890
Easy to install, copy, unzip, put in your Arduino libraries folder and import your libraries.

27:40.130 --> 27:41.950
He's got tons of examples.

27:42.190 --> 27:45.910
Part of the reason why I really liked some of his stuff, it's well documented.

27:46.050 --> 27:49.550
And the examples are well documented as well.

27:49.550 --> 27:56.850
The ADS‑B beacon is half of his ping pair transponder examples.

27:56.850 --> 28:02.870
It took me all of three days to write the code to modify his stuff and put it through some pretty rigorous testing.

28:03.710 --> 28:07.150
Based on the code for that ping pair example.

28:07.150 --> 28:10.230
And yes, giving credit where credit was due.

28:10.230 --> 28:13.690
Most of the code was Maniac Bug's.

28:14.190 --> 28:17.190
And got it done in a two‑month time frame.

28:17.870 --> 28:20.670
This is the one that was really flexible.

28:20.870 --> 28:23.790
Because it's library based, we can do some modification to it.

28:23.790 --> 28:28.910
We can actually use the libraries to set all the registers to disable the CRC 32‑bit checksum.

28:28.910 --> 28:32.610
We can enable shock burst direct mode if we really want to.

28:32.610 --> 28:40.690
And there's also some libraries for us to do some of that limited Bluetooth low energy stuff under Arduino as well.

28:40.710 --> 28:45.750
With the BT ‑‑ Bluetooth low energy libraries as well.

28:46.110 --> 28:47.550
So, fairly easy to use.

28:47.550 --> 28:51.110
It's six wire SPI.

28:51.150 --> 28:51.910
If I remember correctly.

28:51.910 --> 28:52.950
Five or six wires.

28:52.950 --> 28:54.710
We can go through and count them if we really want.

28:54.990 --> 28:59.110
When we built these, I recruited help.

28:59.550 --> 29:03.330
I recruited my six‑year‑old daughter and my wife to wire these.

29:03.530 --> 29:07.730
If my six‑year‑old can wire these, so can you.

29:08.870 --> 29:10.110
All right.

29:10.430 --> 29:12.710
So, lots of good fun.

29:13.190 --> 29:18.250
Now, there's all sorts of things that right out of the box with the Arduino stuff, we can start capturing.

29:18.250 --> 29:21.170
We can start capturing some of other Arduino traffic.

29:21.470 --> 29:26.350
Some other potential applications with standard shock burst enhanced stuff.

29:26.350 --> 29:30.910
For example, some great proprietary type of items.

29:31.110 --> 29:37.450
There's some folks here at Con from the Midwest, a group that calls themselves the Whiskey Pirates.

29:38.010 --> 29:42.070
They decided that they wanted to have a learning experience before they came to DEF CON.

29:42.270 --> 29:45.070
One of the guys wanted to learn surface mount soldering.

29:45.070 --> 29:48.270
The other guy wanted to learn how to do board design with Eagle.

29:48.530 --> 29:56.950
The other guy wanted to learn how to program ARM Cortex A7 processors and do some firmware development for that.

29:56.950 --> 29:59.910
So, they got together and they did just that.

29:59.910 --> 30:05.030
And, in fact, they built this badge in, like, four and a half months.

30:05.030 --> 30:06.350
Like, damn!

30:06.470 --> 30:09.750
And they didn't get to implement all the features and firmware.

30:09.750 --> 30:13.390
They gave me this one Thursday late afternoon.

30:13.390 --> 30:20.590
They were still in their hotel room cranking out firmware and they were, like, reflashing these things every 15 minutes because they were adding more and more features.

30:21.110 --> 30:28.830
As one of the things that they wanted to do further development for, these badges feature Nordic NRF24L01 radios.

30:28.830 --> 30:42.370
They wanted to be able to do games between the multiple badges, the ability to have a microphone so that would do VU meter type of stuff and sync the levels for the VU meter between all the badges.

30:42.410 --> 30:48.010
So, like, one guy could be in the party and everybody else can be in the hallway and they're all thumping to the same beat.

30:48.430 --> 30:49.250
Pretty cool.

30:49.250 --> 30:53.190
We can potentially use that to sniff and or mess with those as well.

30:53.490 --> 30:53.990
Okay.

30:53.990 --> 30:56.190
Lots of hobby-based applications.

30:56.190 --> 31:00.110
How many of you guys have seen the Flea Microcopter?

31:00.110 --> 31:02.790
And I can't remember the company that makes it.

31:02.790 --> 31:08.170
It's one of the tiny, tiny nano quadrotors.

31:08.890 --> 31:10.630
It's about this big.

31:10.630 --> 31:15.350
They use the Nordic NRF radio to do control for that device.

31:15.630 --> 31:17.130
Wireless 2.4 gigahertz.

31:17.130 --> 31:23.330
So you can now conceivably build your own controllers and crash other people's quadcopters.

31:23.710 --> 31:24.150
Okay.

31:24.370 --> 31:25.110
All right.

31:25.210 --> 31:30.590
Some of the stuff on the back end may require some significant post processing depending on what you're doing.

31:31.110 --> 31:31.470
Okay.

31:31.470 --> 31:34.770
So this stuff becomes fairly easy to do.

31:34.790 --> 31:36.330
We talked about the Arduino.

31:36.450 --> 31:39.170
How many of you guys have ever done any Arduino work?

31:39.550 --> 31:40.030
Okay.

31:40.030 --> 31:40.350
All right.

31:40.350 --> 31:41.930
You guys can do this.

31:41.930 --> 31:44.890
Grab the demo stuff and start from there.

31:45.050 --> 31:49.970
My college professors told me all good programmers reuse code.

31:50.110 --> 31:52.990
Doesn't necessarily need to be your code.

31:53.170 --> 31:54.850
Give credit where credit's due.

31:55.330 --> 31:57.850
So really easy for us to implement.

31:58.070 --> 31:59.370
The libraries are there.

31:59.370 --> 32:01.130
There's some great examples.

32:01.370 --> 32:06.890
And sure enough, take one of the examples, flash them to a pair of Arduinos, and it's that simple.

32:06.890 --> 32:08.390
And communication works.

32:12.370 --> 32:24.330
I'm the challenges that I ran into with the Mid-Atlantic CCDC badges that I didn't realize until half the badges were already built is that they'll make a pseudo mesh as part of shock burst enhanced.

32:24.330 --> 32:28.430
But the mesh will really only support effectively six devices.

32:28.990 --> 32:32.150
I created a mesh and it had 110 devices.

32:33.010 --> 32:35.370
It didn't work very well.

32:36.210 --> 32:39.470
It worked well enough for the students to have fun with it.

32:39.470 --> 32:42.130
But that was one of the things that we ended up telling them about.

32:42.130 --> 32:51.090
You can create cascaded meshes so that you can do routing and fault tolerance over the meshes as well with enhanced shock burst.

32:51.090 --> 32:58.590
So you could have conceivably multiple meshes with six or five or six devices and route through those meshes as well.

32:58.590 --> 33:00.470
I didn't know that at the time.

33:00.470 --> 33:04.930
I just gave everything the same address and sent all the traffic to broadcast.

33:04.930 --> 33:07.190
It did not work out so well.

33:07.490 --> 33:09.370
There were lots of crashed aircraft.

33:10.170 --> 33:15.650
But so it can be loads of fun with too many nodes, potential denial of service conditions.

33:15.650 --> 33:18.130
So that might be something to look at as well.

33:18.630 --> 33:22.370
I specifically talked about using it with the Arduino.

33:22.470 --> 33:25.730
That was where a lot of my experience lied.

33:25.730 --> 33:28.530
However, it's a standard SPI bus.

33:28.530 --> 33:32.910
So any microcontroller that you can do SPI with, you can use this radio on.

33:32.910 --> 33:35.390
You want to do that on the Arduino, sure.

33:35.430 --> 33:38.990
You want to do it on a Raspberry Pi, great, no problem.

33:39.150 --> 33:43.750
You can even use the Bus Pirate, which if I recall is MSP430 based.

33:43.850 --> 33:47.510
Same thing with the GoodFET from Travis Goodspeed.

33:47.650 --> 33:49.270
Also MSP430.

33:49.550 --> 33:53.570
Parallax from your DEF CON badge this year.

33:54.330 --> 33:56.530
If it does SPI, you can interface with the radio.

33:56.530 --> 33:58.910
And there are likely libraries that you can use.

33:59.070 --> 34:02.850
And here's some of the standard pinouts to be able to interface with the radios.

34:03.370 --> 34:04.850
Readily available on the internet.

34:04.850 --> 34:06.570
So very easy for us to get to.

34:06.810 --> 34:10.130
So this is how you change a tire like a boss.

34:11.170 --> 34:12.790
I have no idea.

34:12.790 --> 34:13.270
I told you.

34:13.270 --> 34:14.710
Google image search.

34:14.990 --> 34:16.610
Easy mods.

34:16.710 --> 34:18.310
And this came up.

34:18.370 --> 34:26.190
This looks like the Chinese army learning how to change a tire while driving on their motorcycle with sidecar.

34:26.410 --> 34:33.350
I've actually seen one of these videos and it's pretty damn impressive that they change the tire on the sidecar while they're driving.

34:33.350 --> 34:36.430
Yes, you too can do this very easily.

34:36.770 --> 34:50.790
We can modify the libraries to change the various settings, change frequency channels, change whether we're going to use shock burst in direct mode, set our rates right within our Arduino libraries.

34:50.790 --> 34:56.390
However, if you're going to change it within a library, the Arduino will use that same library in that same setting.

34:56.390 --> 35:06.270
So you may want to have multiple instances of libraries or modify those libraries to assign all of those from a variable from your main program.

35:06.730 --> 35:09.230
Fairly easy to undertake.

35:09.670 --> 35:14.110
Standard programming practices about importing libraries and referencing libraries.

35:14.450 --> 35:20.150
So it doesn't exist currently, but that's something that would be relatively easy to undertake.

35:20.290 --> 35:32.870
So for example, here are some of the items within the RF24 libraries for us accessing some of the registers within the radio.

35:32.950 --> 35:35.050
The libraries will handle all of this for us.

35:35.050 --> 35:40.750
You tell it to initialize the radio, it goes and initializes the radio with all of these default settings, just like we'd expect.

35:40.750 --> 35:43.030
You do two of them and they do the same things.

35:44.170 --> 35:48.610
Some additional registers so that we know what the default values are.

35:48.610 --> 35:51.610
Go and read the spec sheet from Nordic.

35:52.070 --> 35:56.150
Find out what some of the values you may want to change are depending on your application.

35:56.150 --> 36:00.030
And again, easily changeable within the modules.

36:00.710 --> 36:01.510
Okay.

36:01.510 --> 36:02.590
All right.

36:03.050 --> 36:04.790
We talked about Arduino.

36:04.870 --> 36:06.370
That was really easy.

36:06.370 --> 36:13.650
You fire up the Arduino IDE, you load some demo code, you put some stuff on there, and hey, look, it works!

36:13.650 --> 36:18.730
Let's go down a little bit more advanced application.

36:18.790 --> 36:23.950
And I will admit, when I say advanced application, it wasn't terribly bad.

36:24.190 --> 36:28.890
We talk about ‑‑ I talked a little bit about having one too many projects.

36:29.070 --> 36:31.770
I did my advanced implementation stuff.

36:31.770 --> 36:34.610
I wrote these slides Tuesday.

36:35.130 --> 36:39.590
Because I actually got a chance to do it on Tuesday.

36:40.010 --> 36:43.650
So I wrote the slides and did these on Tuesday right before DEF CON.

36:44.090 --> 36:49.210
And I had some of the stuff sort of preloaded.

36:49.570 --> 36:53.270
But it was just a matter of putting the pieces together and it didn't turn out too bad.

36:53.770 --> 36:54.250
Okay.

36:54.250 --> 37:05.430
So as we mentioned, Travis Goodspeed found a way for us to be able to capture data with the Nordic radio with some promiscuity giving us a raw stream of data.

37:05.770 --> 37:10.590
Now why don't we leverage some tools to take that raw data and do some post processing.

37:10.930 --> 37:25.870
His implementation sets some of those registers for an invalid mode to give us raw data and disables all of the CRC calculations and checking so that it's not modifying any of that data on the way inbound.

37:25.870 --> 37:28.130
So his hackery was great.

37:28.210 --> 37:30.490
Send us all this raw data.

37:30.870 --> 37:32.970
The data is going to look like data.

37:32.970 --> 37:41.430
But when we've got noise, it is typically ‑‑ the 00 in hex or FF in hex.

37:41.490 --> 37:52.810
So let's throw all of the 00s and FFs in hex away and or search for very specific strings for a device that we're looking for.

37:52.810 --> 38:05.230
In the case of Logitech and Microsoft keyboards, the sync word and or start of some of the headers for some of the packets start with 55 in hex or AA in hex.

38:05.270 --> 38:10.090
So if you see a packet that's ‑‑ or a value that starts 55, maybe this is a packet.

38:10.090 --> 38:12.510
Were there 0s and FFs before it?

38:12.510 --> 38:13.130
Yes.

38:13.130 --> 38:14.190
Throw that stuff away.

38:14.190 --> 38:15.810
This is likely the start of a packet.

38:16.210 --> 38:18.270
Now let's start capturing that and take a look at that.

38:18.270 --> 38:19.550
That's pretty darn neat.

38:21.210 --> 38:24.590
So why would Larry consider this advanced?

38:24.870 --> 38:35.350
Well, it requires the use of a that you can actually purchase a good FET from Adafruit industries.

38:35.470 --> 38:36.990
They're 50 bucks.

38:37.710 --> 38:41.650
To me that's kind of pricey for what it is.

38:41.650 --> 38:43.270
However, you can assemble your own.

38:43.270 --> 38:45.770
How many of you guys have done surface mount soldering work?

38:45.790 --> 38:49.210
This is a great opportunity to go try to start with.

38:49.210 --> 38:51.510
This was my first surface mount job.

38:52.110 --> 38:53.990
Which I got it to work.

38:53.990 --> 38:59.010
I used it to program my IME pink pager and that was the only time it ever worked.

38:59.830 --> 39:02.090
It was my first surface mount solder job.

39:02.090 --> 39:03.210
It was horrible.

39:03.610 --> 39:05.230
And I wanted to use it.

39:05.230 --> 39:07.050
This is the only one I had for this.

39:07.050 --> 39:11.530
So I had to take it down to the basement to the soldering iron and put on the loop.

39:11.530 --> 39:15.550
And I had to reflow every single joint on the board.

39:15.550 --> 39:16.570
I don't have a reflow oven.

39:16.570 --> 39:17.430
I don't have a hot plate.

39:17.430 --> 39:18.870
It's all by hand.

39:19.590 --> 39:22.650
So to me, that's one of the reasons why it's advanced.

39:22.750 --> 39:26.650
The hardware assembly is a little bit more complex.

39:26.830 --> 39:31.670
But Travis's design uses the MSP430 and there's SPI libraries with that.

39:31.670 --> 39:34.590
And Travis has done a lot of the heavy lifting for us.

39:34.590 --> 39:43.530
He's got some applications for us to be able to interact with the MSP430 and trigger the radio for us to capture packets.

39:45.050 --> 39:54.890
There's also a port that I discovered on Tuesday of the GoodFET software to the Arduino with the same functionality.

39:55.170 --> 40:03.870
So you can do all the same stuff that you can do with the GoodFET with an Arduino by having the libraries ported to an Arduino as well.

40:04.310 --> 40:14.350
And the reason for that was the gentleman had more experience with the Arduino, didn't have the ability to get his hands on or assemble a GoodFET.

40:14.350 --> 40:24.270
So he ported that to the Arduino with the idea to be able to sniff packets from keyboards using Travis's promiscuity hack.

40:25.810 --> 40:26.770
Great.

40:27.350 --> 40:31.230
I found out about this one Wednesday afternoon at 2 o'clock.

40:31.310 --> 40:36.210
Like, I'm trying to pack to go to DEF CON and I'm still updating slides for this talk.

40:37.470 --> 40:43.190
Because there was a post that got made on Hackaday Wednesday morning.

40:43.210 --> 40:45.070
I didn't stumble upon it until 2 o'clock.

40:45.070 --> 40:50.890
I had to go to work on Wednesday and found it at 2 o'clock right after lunch.

40:50.890 --> 41:06.630
And a gentleman had created an Arduino sketch and some plug-ins for Wireshark and a Windows -based application to do a named pipe to interact with the Arduino to pass data to a named pipe to Wireshark on Windows.

41:07.250 --> 41:14.790
So we can now use Wireshark to directly sniff using Travis's promiscuity hack right into Wireshark.

41:14.830 --> 41:22.630
And he wrote some protocol dissectors for the Nordic NRF24L01 packets.

41:22.670 --> 41:32.750
So we've got a module there, post-processing module, as well as the underlying protocol for a device called MySensors.

41:32.750 --> 41:36.930
They do temperature monitoring and home control type of stuff, open source type of things as well.

41:36.930 --> 41:38.210
And that's really what he wanted to do with it.

41:38.210 --> 41:40.390
He wanted to be able to interact with that with the Arduino.

41:40.490 --> 41:41.410
So he did.

41:41.930 --> 41:47.870
All of the stuff is available at these three blog spot links here.

41:47.870 --> 41:48.730
I apologize.

41:48.730 --> 41:52.530
It's a little eye chart.

41:52.530 --> 41:53.810
We'll get to that.

41:54.850 --> 41:58.750
But limited analysis as far as the protocol dissectors go.

41:58.870 --> 42:00.670
But we've got PCAPs.

42:01.250 --> 42:04.690
Like stuff that we know how to deal with with all sorts of various tools.

42:04.810 --> 42:07.230
And directly within Wireshark.

42:07.330 --> 42:10.650
The problem is, I set this up to give you guys a demo.

42:10.890 --> 42:12.090
And it requires Windows.

42:12.090 --> 42:13.830
And Wireshark on Windows.

42:14.030 --> 42:16.530
And application with name pipes.

42:16.530 --> 42:22.590
And I'm missing some redistributable.net objects on that Windows VM.

42:22.590 --> 42:25.110
And I just didn't have enough time to make it happen.

42:25.110 --> 42:27.390
So it's a little buggy on the install.

42:27.570 --> 42:32.370
And there's some comments on one of these blog posts on some of the issues that are still going.

42:32.370 --> 42:34.670
But still incredibly possible.

42:34.970 --> 42:35.630
Okay.

42:35.790 --> 42:40.150
We can also do software defined radio stuff for some sniffing.

42:40.150 --> 42:53.230
However, many of the software defined radios that you're going to find that are affordable such as the RTLSTR real tech type dongles, the digital DV tuner stuff, do not accurately do in many cases 2.4 gigahertz.

42:53.310 --> 43:01.890
So you now need to use a down converter, something that will capture 2.4 gigahertz and then sort of retransmit that at a lower frequency within the dongles.

43:02.470 --> 43:15.530
There are some plug-ins for I think SDR sharp as well as we can do this with GNU radio and GNU radio companion to be able to decode enhanced shock burst packets.

43:16.290 --> 43:17.450
So all of the stuff is there.

43:17.450 --> 43:19.550
It's just a matter of being able to capture that.

43:20.850 --> 43:25.350
This may be interesting for you that are working on challenges, CTF.

43:28.150 --> 43:30.850
So I have some of the software defined radios.

43:30.850 --> 43:33.030
I don't have a down converter yet.

43:33.310 --> 43:36.010
It's just too many projects, not enough time.

43:36.550 --> 43:44.130
And the CFO has yet to approve additional purchases because I've already got enough hardware to play with.

43:44.130 --> 43:49.250
And by CFO, chief financial officer, I do not mean the CFO at my day job.

43:49.250 --> 43:50.650
I mean my wife.

43:50.990 --> 43:51.510
Okay.

43:51.510 --> 43:56.710
She does the, honey, would you rather this neat new tech toy or diapers?

43:59.370 --> 44:01.230
Yeah, let's do the diapers.

44:01.430 --> 44:03.170
Because I don't want to clean the carpet.

44:03.170 --> 44:04.530
Let's do the diapers.

44:04.990 --> 44:07.650
So, yeah, and it can be done relatively inexpensive.

44:08.390 --> 44:11.630
Under $75, including the software defined radio.

44:11.750 --> 44:14.470
Folks that like hack shop or get them direct from China.

44:14.870 --> 44:18.670
Down converters and cables direct from China, places like deal extreme.

44:19.250 --> 44:21.630
Have you guys done deal extreme before?

44:21.950 --> 44:25.170
That place is like the easiest place for me to part with my money.

44:25.410 --> 44:29.030
You go to deal extreme and you're looking for one thing and like, hey, this is cool.

44:29.150 --> 44:30.790
Android tablet, $20.

44:31.750 --> 44:33.310
Smart watch, $6.

44:33.870 --> 44:35.210
Give me three.

44:35.950 --> 44:36.510
Yeah.

44:36.510 --> 44:43.490
Next thing I know, I'm checking out a deal extreme and I got a $300 order of just cheap Chinese stuff that's awesome to play with.

44:43.490 --> 44:45.590
And when am I going to have time to play with it?

44:45.650 --> 44:46.010
Yeah.

44:46.010 --> 44:55.070
So, for example, when we do the demos, I've got this solar powered battery, 30,000 milliamp hour solar rechargeable battery.

44:55.410 --> 44:58.530
I lost my other one, so I went to deal extreme to buy this one.

44:58.530 --> 45:00.710
Turns out they were so cheap, I bought four.

45:01.830 --> 45:04.210
So I can lose it three more times.

45:05.130 --> 45:05.590
Okay.

45:05.590 --> 45:12.130
Turns out they're really handy, especially when you come to DEF CON, because one can be in your hotel room charging while you're charging your phone with the other one.

45:12.250 --> 45:12.990
Okay.

45:13.590 --> 45:19.490
So, yeah, we can do this fairly inexpensively and use software to find radio to tune into some of the stuff as well.

45:19.870 --> 45:20.590
All right.

45:21.150 --> 45:31.230
So as promised from the talk description, I'm going to do some demonstration, hopefully, and I'm going to tempt the 2.4 gigahertz demo unicorns.

45:31.230 --> 45:36.470
And for those of you who have seen the Photoshop version of this with Dave Kennedy's head, it's significantly better.

45:36.790 --> 45:37.390
Okay.

45:37.450 --> 45:41.690
So now let's see if we can actually make something work.

45:42.590 --> 45:47.250
But before we get into that, the first one that we're going to do, I know this is definitely high chart.

45:47.250 --> 45:50.210
I am going to give you guys a location where you can go grab the slides.

45:50.490 --> 45:59.370
This is the code as part of the two halves of the Mid-Atlantic CCDC badge for the badges that we did.

45:59.570 --> 46:03.170
This one happens to be the ADSB receiver.

46:03.370 --> 46:09.930
So I've got an Arduino with one of these radios just sitting here listening for beacons, and I'm going to show you sort of the output for that.

46:11.470 --> 46:12.930
Pretty short for code.

46:12.930 --> 46:16.570
I know it's a little crunched, so I could get it all on one slide and make it somewhat readable.

46:17.350 --> 46:19.510
It will be better in the PDF, I promise.

46:20.290 --> 46:23.230
And here's the transmitter, the ADSB beacon.

46:23.230 --> 46:25.270
You can actually read that one on the slide.

46:25.870 --> 46:27.170
It's what?

46:27.910 --> 46:29.790
30 lines of code, if that.

46:30.070 --> 46:33.930
And the sad part is, some of these lines of code don't even need to be there.

46:33.930 --> 46:36.470
I was in a rush, and it worked.

46:36.710 --> 46:39.030
So if it ain't broke, don't fix it.

46:39.270 --> 46:44.530
When I was going through and cleaning some of it up to actually make it take out some of the extra spaces, I'm like, I don't need that.

46:44.910 --> 46:49.450
But, you know, in a matter of full disclosure, I'm going to tell you guys that I screw up.

46:49.450 --> 46:51.010
And, yeah, there's some screw-ups in here.

46:51.010 --> 46:51.990
But it works.

46:52.530 --> 46:58.630
For example, we do not need the type def enumeral.

46:58.630 --> 47:00.990
It's about the seventh line down.

47:00.990 --> 47:03.110
The role ping out equals one.

47:03.710 --> 47:04.910
Doesn't do anything.

47:04.910 --> 47:07.310
It's defining a variable that we don't even reference.

47:07.510 --> 47:09.090
So one line down.

47:09.090 --> 47:10.150
Okay.

47:10.150 --> 47:10.870
All right.

47:11.750 --> 47:13.910
Let's try this.

47:15.290 --> 47:16.390
All right.

47:16.390 --> 47:22.570
So serial application tied to the receiver in the purple case.

47:22.990 --> 47:25.490
It's connected over serial.

47:25.490 --> 47:29.470
And now we'll power up the badge.

47:29.470 --> 47:32.830
And, again, thank you for loaning me the micro USB cable.

47:32.830 --> 47:34.630
Remind me to give this back to you.

47:34.930 --> 47:38.170
To prove that I'm not doing anything funny standalone.

47:41.250 --> 47:42.750
Plug this in.

47:43.050 --> 47:44.510
Let it boot up.

47:44.510 --> 47:47.510
And it should immediately start spitting out tail number.

47:47.870 --> 47:49.650
And we gave it a fun tail number.

47:51.550 --> 47:52.470
Okay.

47:52.750 --> 47:59.770
The aircraft beacon is DEF CON 22 wifi village NRF54L01 plus.

47:59.770 --> 48:01.990
No, it's the 24L01 plus.

48:02.230 --> 48:04.690
Low bandwidth radio.

48:05.510 --> 48:07.850
Processing for the Arduino is eh.

48:07.850 --> 48:11.610
But it will have some issues.

48:11.930 --> 48:17.710
So it is actually the DC wifi village NRF24L01 radio.

48:17.710 --> 48:20.750
But in some of the cases it's received as 54.

48:20.870 --> 48:21.770
Why?

48:21.770 --> 48:22.970
No idea.

48:22.970 --> 48:23.610
But it is.

48:23.610 --> 48:26.110
It started doing this at home to me, too.

48:26.270 --> 48:27.610
So maybe I screwed something up.

48:27.610 --> 48:29.570
It is actually the 24.

48:29.710 --> 48:32.290
It is 24 in the code when I programmed it.

48:32.490 --> 48:33.450
That was easy.

48:33.450 --> 48:35.590
Go flash two Arduino examples.

48:35.810 --> 48:36.890
Plug them in.

48:37.450 --> 48:44.170
And you're doing data transfer at 1 meg for $1 radios and connect it to, like, $25 Arduinos.

48:44.350 --> 48:45.270
It's pretty cool.

48:46.570 --> 48:47.490
All right.

48:47.570 --> 48:49.970
Now let's go for the advanced one.

48:50.870 --> 48:51.470
All right.

48:51.470 --> 48:52.530
Let's just disconnect that.

48:52.530 --> 48:53.250
No.

48:54.110 --> 48:54.770
All right.

48:54.790 --> 48:56.650
For the advanced one.

49:06.150 --> 49:06.810
All right.

49:07.290 --> 49:10.550
So I need to unplug that.

49:10.870 --> 49:12.670
And need to plug this in.

49:12.670 --> 49:17.770
So this is the unifying receiver from Logitech that I'm going to plug in here.

49:18.070 --> 49:20.390
And hopefully that will work just fine.

49:20.390 --> 49:22.670
Keyboard is on.

49:22.670 --> 49:24.230
And working.

49:24.270 --> 49:31.190
So I've got one of these Nordic NRF radios attached to GoodFET according to Travis's wiring.

49:31.910 --> 49:33.330
And the GoodFET is actually working.

49:33.330 --> 49:34.870
The reflow actually worked.

49:35.330 --> 49:39.070
So we can now use the GoodFET applications.

49:39.070 --> 49:40.610
Travis has given us some nice scripts.

49:40.610 --> 49:42.910
The GoodFET.NRF script.

49:43.170 --> 49:48.790
And if we run that without some commands, he's going to tell us all the different fun things that we can do.

49:49.390 --> 49:54.310
Capture spark fun, dongle traffic, open beacon traffic.

49:54.710 --> 49:59.890
We can do some auto tune for radios to try to discover stuff that's on specific channels.

50:00.170 --> 50:04.630
However, if we do that with the sniff Microsoft keyboard.

50:05.190 --> 50:09.670
We're going to sniff Microsoft keyboards with specific HID applications.

50:09.670 --> 50:18.950
If we have the Microsoft keyboard, it will determine all of the USB human interface device codes and will convert those to keystrokes.

50:18.950 --> 50:21.270
This is unfortunately not a Microsoft keyboard.

50:21.270 --> 50:22.890
It is a Logitech keyboard.

50:23.590 --> 50:25.950
So it doesn't know how to decode them into the keystrokes.

50:25.950 --> 50:28.430
It will, however, give us the raw packets.

50:28.630 --> 50:31.890
And then we can potentially do some magic with those packets as well.

50:32.630 --> 50:42.030
It does take a little bit of time because the radios on these devices turn on to a pseudo random frequency every time it turns on.

50:42.470 --> 50:46.830
So it attempts to do sniffing on all channels.

50:46.950 --> 50:47.950
But it cannot do that.

50:47.950 --> 50:50.790
It has to go through each channel at a time.

50:50.830 --> 50:59.870
And when it sees stuff that are interesting based on various headers, either 55 or AA, it says, hey, we've seen some stuff that looks like it might be a packet.

51:00.050 --> 51:03.210
And we're going to see... so we saw one.

51:03.250 --> 51:07.410
This one looks like a valid packet coming from a device of AAA.

51:07.790 --> 51:13.790
And quite honestly, this may be the guys over doing CTF totally screwing with me.

51:14.370 --> 51:17.130
So it's going to step through all the various channels.

51:17.590 --> 51:19.010
It takes some time.

51:19.070 --> 51:22.810
And eventually we'll start seeing stuff that end up looking like packets.

51:23.350 --> 51:26.130
This is totally impressive, right?

51:26.270 --> 51:27.150
Hey, look.

51:27.150 --> 51:28.490
It tuned to a channel.

51:28.710 --> 51:29.290
Yeah.

51:30.030 --> 51:31.950
There's not a lot of way I can make it speed up.

51:31.950 --> 51:32.750
I'm like, oh, great.

51:32.750 --> 51:38.210
I'll just find out what channel this keyboard talks on and set it to tune to that channel automatically.

51:38.210 --> 51:41.090
Don't do any of this auto tune stuff and just have it spit packets.

51:41.310 --> 51:45.470
The problem is every time you turn on the keyboard, it does a different channel.

51:46.050 --> 51:49.810
So we saw some different stuff on 2403.

51:49.870 --> 51:52.790
Again, lots of AAA stuff.

51:52.790 --> 51:54.290
So likely noise.

51:54.310 --> 51:56.170
Probably some more noise there.

51:56.170 --> 51:58.190
We had lots of fives in a row.

51:58.190 --> 51:59.790
And 2403 as well.

51:59.790 --> 52:01.970
It now starts spitting us out packets.

52:01.970 --> 52:12.070
When we see stuff that ends up being valid over a longer period of time, we can take the address cell, tell it, hey, just sniff for this address.

52:12.070 --> 52:14.610
And then it starts dumping us keystrokes.

52:15.570 --> 52:21.750
So with the Microsoft keyboard, it gives us actual converted keystrokes.

52:21.830 --> 52:25.310
With this one, I haven't had the opportunity to figure out how to make that work.

52:25.310 --> 52:27.450
Again, I was working on this on Tuesday.

52:28.270 --> 52:30.750
Made this work on Tuesday and into Wednesday morning.

52:30.750 --> 52:33.630
So haven't had the opportunity to start reversing that.

52:34.030 --> 52:35.370
But fun stuff.

52:35.410 --> 52:37.870
Didn't take a heck of a lot to make that happen.

52:37.870 --> 52:41.770
Of course, now all the guys at CTF are turning around going, huh.

52:45.250 --> 52:45.890
No.

52:45.890 --> 52:46.230
All right.

52:46.230 --> 52:47.630
We'll let that stop.

52:47.630 --> 52:49.090
Hey, guess what?

52:49.810 --> 52:51.750
No demo unicorns.

52:51.870 --> 52:53.550
All right.

52:53.550 --> 52:56.970
And now I get to admit something kind of embarrassing.

52:59.170 --> 53:03.210
Well, that's all I've got for you guys in some pretty good time.

53:03.210 --> 53:09.670
But so the demo unicorns were tempted and they didn't show up.

53:09.670 --> 53:13.230
So he-man on a flying unicorn, your argument is invalid.

53:13.230 --> 53:14.990
However, I take issue.

53:14.990 --> 53:17.310
This is not a unicorn.

53:17.410 --> 53:19.630
A unicorn has a horn and no wings.

53:19.630 --> 53:23.290
A pegasus has wings and no horn.

53:23.490 --> 53:27.330
So what is a flying unicorn called?

53:27.510 --> 53:28.640
An alicorn.

53:29.160 --> 53:30.620
Why do I know this?

53:30.860 --> 53:34.100
My 6-year-old daughter is obsessed with My Little Pony.

53:34.620 --> 53:37.200
I'm like a closet brony and I don't know it.

53:37.600 --> 53:40.240
That's all that we watch in our house is My Little Pony.

53:40.240 --> 53:41.700
Please, God, save me.

53:42.180 --> 53:44.800
To the point that I knew that this was an alicorn.

53:45.860 --> 53:47.840
And I actually went and made sure I looked it up.

53:47.840 --> 53:49.780
So, yeah, it is not a unicorn.

53:49.780 --> 53:50.240
It could be.

53:50.240 --> 53:51.220
It's not a unicorn.

53:51.300 --> 54:00.000
It's either an alicorn or, according to some sci-fi authors, it is also a pegacorn or a unipeg.

54:00.460 --> 54:02.140
So, yes.

54:02.160 --> 54:15.100
And my boss so kindly filled me in when, even better, that this is neither an alicorn, a unipeg, a pegasus, a unicorn, or a pegacorn.

54:15.100 --> 54:19.560
This is, in fact, Strider from He-Man.

54:21.280 --> 54:22.000
All right.

54:22.000 --> 54:26.600
So thank you guys very much for getting up nice and early on Saturday.

54:26.800 --> 54:28.440
Hopefully I didn't bore you too much.

54:28.440 --> 54:30.100
And , you know, go forth and conquer.

54:30.100 --> 54:31.220
Some really neat stuff.

54:31.220 --> 54:33.780
Really inexpensive to start getting involved with.

54:33.780 --> 54:36.020
And has some pretty interesting application.

54:36.020 --> 54:47.020
You guys can build a keyboard sniffer for Microsoft Logitech 2.4 gigahertz keyboards and take this back to your organization, do some auditing and say, get rid of these damn things.

54:47.260 --> 54:50.220
Unless you really want to have some fun.

54:50.840 --> 54:52.360
These radios will transmit.

54:52.660 --> 54:58.120
So now take what you've learned about the receive and start crafting packets and injecting keystrokes.

54:59.040 --> 55:00.640
Exercise left to the reader.

55:02.040 --> 55:04.360
Some of these slides, text is a little bit hard to read.

55:04.360 --> 55:06.620
If you want to go back and look at this, I know they're recording it.

55:06.620 --> 55:10.760
So it will likely be at irongeek.com later and various places.

55:12.940 --> 55:21.740
The slides, as soon as I get home, and by home, I mean probably late next week, because I go directly from DEF CON to a client site.

55:22.080 --> 55:23.480
I hope they like the hair.

55:25.080 --> 55:28.920
So I'm literally leaving from DEF CON to go to a client site after I go home.

55:28.920 --> 55:32.200
I'm going home for about six hours, pack a suitcase and leaving again.

55:32.300 --> 55:37.260
So I will put the PDFs up on my website at hacksterthematrix.com.

55:37.480 --> 55:38.560
It's my blog.

55:38.560 --> 55:40.500
There's a total of five entries.

55:40.680 --> 55:41.820
You'll be able to find it.

55:41.820 --> 55:44.240
So I won't give you a specific link to a specific entry.

55:44.240 --> 55:45.480
You'll be able to find it.

55:45.700 --> 55:47.960
And there's all sorts of other fun stuff up there as well.

55:48.060 --> 55:48.400
Great.

55:48.400 --> 55:50.940
So thank you for spending some time with me this morning.

55:51.120 --> 55:55.080
I'm going to stick around for a while if you guys have got questions, cool fun things.

55:55.360 --> 56:01.480
I actually want to see if I can capture some stuff with some software defined radio as part of the CTF and get some practice.

56:02.060 --> 56:03.920
So good time to do that.

56:03.920 --> 56:05.220
Thanks for coming.

56:05.920 --> 56:07.080
And thank you.

56:07.160 --> 56:08.560
Enjoy the rest of your DEF CON.

56:08.600 --> 56:10.760
And we'll see you all for ham radio exams tomorrow, right?

