WEBVTT

00:00.000 --> 00:02.240
We have some new speakers here.

00:02.900 --> 00:12.060
Ray, Nix, talking to you about some technology that's in our local schools.

00:12.060 --> 00:13.700
Without further ado.

00:23.710 --> 00:24.850
Hello, DEF CON.

00:24.850 --> 00:26.850
Thanks for coming to our talk.

00:26.850 --> 00:31.890
This is Unmasking the Snitchpuck, the creepy IoT surveillance tech in the school bathroom.

00:32.710 --> 00:34.930
Just so you know, we don't think kids should vape.

00:35.090 --> 00:39.790
Probably nobody should vape, actually, but vaping among high schoolers is pretty bad.

00:40.590 --> 00:44.030
It's become a big problem in schools and, yeah, this talk isn't a vaping ad.

00:45.310 --> 00:48.550
But let's say you were a kid in high school and you did want to vape.

00:50.310 --> 00:53.290
What's a place you can go that has some sort of privacy?

00:55.110 --> 00:56.290
Obviously the bathroom.

00:56.470 --> 00:57.990
So you go in there and you hit the vape.

00:58.970 --> 01:03.970
And suddenly the smoke detector lights up and starts yelling, vape detected and security notified.

01:05.310 --> 01:12.130
Or to get more serious, what if a girl was talking to her friend about potentially getting an abortion in a state where that's not legal?

01:13.350 --> 01:17.710
What if the smoke detector was recording her conversation?

01:19.430 --> 01:20.310
Hey, I'm Ray.

01:20.310 --> 01:22.350
I'm a Portland-based security researcher.

01:22.350 --> 01:27.890
I've been learning InfoSec stuff on my own for about three years, since I was a sophomore in high school.

01:28.510 --> 01:31.110
This is actually my first time ever going to DEF CON, as you heard.

01:31.190 --> 01:33.090
So I'm pretty excited to be up here on stage.

01:39.050 --> 01:41.510
This whole thing actually started when I was 15.

01:42.010 --> 01:44.410
I used to poke around on the high school's network a lot.

01:44.850 --> 01:47.810
When I got bored, I didn't really want to do any school work.

01:49.610 --> 01:51.530
The school's Wi-Fi wasn't segmented at all.

01:51.770 --> 01:54.970
So I could just discover a lot of devices on the network.

01:55.470 --> 02:01.730
So yeah, one day I was poking around on the Wi-Fi and I found this device that had a strange OUI I had never seen before.

02:03.270 --> 02:09.750
Normally I would just see HP printers and Microsoft devices, but this time it was a company called IP Video Corporation.

02:10.250 --> 02:11.230
So I Googled them.

02:12.110 --> 02:14.470
I found out they were a small startup in New York.

02:14.670 --> 02:16.210
They had less than 50 employees.

02:16.610 --> 02:17.390
Not a lot.

02:18.110 --> 02:30.150
Their CrunchBase profile says they used to do a lot of video management systems, basically just camera systems, you know, those like multi-monitor camera setups you see in security offices.

02:30.870 --> 02:33.730
But their main product now is called the Halo 3C.

02:34.010 --> 02:36.970
It's basically an IoT version of a smoke detector.

02:42.240 --> 02:53.920
But it has all these sensors and features like, for example, for health, it detects carbon monoxide, CO2, humidity, you know, like just the general health things you expect to see in a device like this.

02:54.880 --> 03:03.240
It also has these safety features that detect gunshots, aggression, as well as spoken keywords like help emergency or help 911.

03:04.640 --> 03:10.920
But its main gimmick is snitching on kids doing dumb shit in the school bathroom, like smoking weed or vaping.

03:14.700 --> 03:20.040
They mention schools in their FAQ, so clearly it's one of the target markets.

03:21.020 --> 03:28.340
So when I first saw the audio features, I was curious about one claim, and that is ensures privacy without audio recording.

03:28.580 --> 03:33.260
I was curious about what this meant exactly, but I did not have a way to check at the time.

03:34.620 --> 03:40.660
The website also has a testimonials page that was pretty interesting to look into as a high schooler.

03:40.660 --> 03:44.580
This principal likes how they can catch kids vaping before they even leave the bathroom.

03:46.180 --> 03:47.860
Here's one saying it's futuristic.

03:53.560 --> 03:59.700
This one talks about how they have punishments in place, but how it's also serving as a deterrent.

04:12.080 --> 04:13.640
Here's a kind of funny one.

04:13.640 --> 04:22.620
This one talks about how they caught a kid ripping off a door from a bathroom stall and used the audio logs in conjunction with their camera system to catch him.

04:34.210 --> 04:35.790
But there are competitors.

04:35.890 --> 04:42.070
Zeptiv does a lot of work on vape detection and less on safety.

04:42.490 --> 04:46.330
It also just looks like it belongs in a school bathroom or maybe like a prison.

04:46.490 --> 04:51.010
It looks like something they put in a cell to stop prisoners from making prison wine or something.

04:53.930 --> 04:59.590
Or other ones, like this forensic detectors device only detect vape and don't detect anything else.

05:00.630 --> 05:04.350
But it seems like Halo is the number one used most popular vape detectors out there.

05:04.350 --> 05:06.810
So I was wondering, how did they get there?

05:07.410 --> 05:11.270
Going back to the LinkedIn, what's that at the top?

05:11.350 --> 05:12.190
Enhance.

05:15.190 --> 05:16.510
Motorola solutions.

05:19.530 --> 05:22.370
So yeah, they were bought up by Motorola in 2023.

05:22.630 --> 05:28.630
Motorola has been buying up a lot of these cop tech companies and integrating them into their security and safety offerings.

05:29.710 --> 05:36.430
So now I really wanted to get my hands on one, but I couldn't afford to because they were super expensive and about $1,200 each.

05:37.230 --> 05:39.290
But also because I was a broke high school student.

05:41.770 --> 05:43.510
So what about the firmware updates?

05:43.510 --> 05:46.210
I found out that I could just download it from their website.

05:47.590 --> 05:55.290
I didn't really know how firmware worked at the time, so I tried the usual bin walking it, opening it up in a reverse engineering tool.

05:56.010 --> 05:59.230
But none of those worked because it was encrypted.

05:59.390 --> 06:01.350
When I checked the entropy, it was just random bytes.

06:03.510 --> 06:04.410
I hit a wall.

06:04.430 --> 06:05.650
I couldn't get my hands on one.

06:06.170 --> 06:09.830
I didn't know what I was doing at the time, so I just kind of left it there for a while.

06:11.010 --> 06:16.310
A couple years later, one popped up on eBay for about half the price.

06:16.410 --> 06:19.310
Pretty good considering how expensive these are from the vendor.

06:25.710 --> 06:30.430
Around the same time, I found out about the Portland Hacker Foundation.

06:31.210 --> 06:35.430
It's basically just a non‑profit that gives out mini grants to hackers in the Portland area.

06:35.750 --> 06:38.050
You submit a cool project idea and they give you money.

06:48.150 --> 06:52.230
So I got a mini grant, went back to eBay and I bought it.

06:54.490 --> 06:57.230
Got here and I was actually kind of nervous about opening it up.

06:58.610 --> 07:05.630
This was my first hardware teardown project, so I didn't know what to expect at the time when it came to embedded devices.

07:05.750 --> 07:06.690
But finally I opened it up

07:17.130 --> 07:17.530
and...

07:17.530 --> 07:19.430
turns out it's just a Pi.

07:21.570 --> 07:23.410
Specifically a compute module 4.

07:26.770 --> 07:29.350
So yeah, this is about where I got involved.

07:29.630 --> 07:34.190
Ray shows up to the hacker space, has this thing, says it's an IOT vape detector.

07:34.330 --> 07:35.570
They had it in my school.

07:35.570 --> 07:36.910
It's got a Raspberry Pi in it.

07:36.910 --> 07:37.910
I'm a hack it.

07:38.070 --> 07:39.370
I'm like, yeah, sign me up.

07:39.370 --> 07:40.230
Where's the screwdriver?

07:41.290 --> 07:42.870
Hello, I'm Nix.

07:42.870 --> 07:43.870
I'm a hacker.

07:45.830 --> 07:46.710
Thank you.

07:49.190 --> 07:50.970
I wanted to do this stuff when I grew up.

07:50.970 --> 07:54.830
Since I was like 10, I got my hands on a copy of the cuckoo's egg by Cliff Stoll.

07:55.370 --> 08:03.130
In the intervening years, I have been to school for electrical and computer engineering and put in a few years tenure doing software stuff at a large tech company.

08:03.590 --> 08:04.870
Do love hacking stuff.

08:04.870 --> 08:07.450
Got my OSCP a few years ago just for the lulz.

08:07.550 --> 08:10.750
And I spend a lot of my free time these days down at the local hacker space.

08:10.750 --> 08:14.110
Getting into trouble and poking at whatever lands on the workbench.

08:14.570 --> 08:16.450
And yeah, this thing landed on the workbench.

08:16.450 --> 08:18.470
And gosh, did we poke at it.

08:19.310 --> 08:20.830
So you get the case open.

08:20.890 --> 08:28.090
It's got two double sided PCBs that are connected in parallel into a kind of PCB sandwich with a through hole pin header mezzanine connector.

08:28.850 --> 08:33.950
If you start on the underside of the bottom board, this is the part closest to the floor when it's mounted in the ceiling.

08:33.950 --> 08:35.470
This is where most of the sensors are.

08:36.590 --> 08:43.570
There is an SHT40 temperature humidity sensor on that kind of cut out thing probably to thermally isolate it from the rest of the board.

08:43.890 --> 08:47.570
It does get quite warm while it's running for reasons that will be clear shortly.

08:48.730 --> 08:51.530
Omron pressure sensor, not much to say about that one.

08:52.230 --> 08:54.510
There is an SCD41CO2 sensor.

08:54.510 --> 08:56.210
This is actually a nice part.

08:56.610 --> 08:58.650
It's about a $15 bomb cost.

08:58.650 --> 09:02.390
It is expensive because it directly measures the CO2 concentration.

09:03.010 --> 09:11.470
Cheaper CO2 sensors like this SGP30, it also has, measured volatile organic compounds, TVOCs and estimates CO2 from it.

09:11.470 --> 09:16.690
So if you see a sensor that does ECO2 or CO2EQ for equivalent, that's what it's doing.

09:17.570 --> 09:23.110
Other gas sensors, this MICS is part of a line of sensors that all look like this but have different internals.

09:23.110 --> 09:26.450
This one does VOCs as well as ammonia and nitrogen dioxide.

09:27.710 --> 09:30.690
Another total VOC sensor like the SGP30.

09:30.690 --> 09:33.990
This one also does its own like air quality estimate calculation.

09:35.750 --> 09:37.950
Middle of the board has a light level sensor.

09:37.950 --> 09:42.430
Not sure on the exact part number but Vishay semiconductors makes a ton that look just like this.

09:43.070 --> 09:48.690
And then a passive infrared motion detector turns body heat into voltage so it can see when people are moving around under it.

09:49.930 --> 09:51.990
So we go to the top of the top board.

09:51.990 --> 09:54.530
This is closer to the ceiling when it's mounted in the ceiling.

09:54.770 --> 09:56.590
There's a pair of POE connectors.

09:56.590 --> 09:58.290
This is for network and power.

09:58.330 --> 10:04.590
There's in and out because one halo can sink enough power to power two, both itself and a friend that it daisy chains.

10:04.590 --> 10:06.510
So you only need one run back to the switch.

10:06.510 --> 10:07.830
Makes install cheaper.

10:08.290 --> 10:10.670
There's a ring of RGB LEDs.

10:10.670 --> 10:12.930
These are for lighting up when it's mad about something.

10:12.930 --> 10:15.650
As well as emergency lighting apparently.

10:16.390 --> 10:19.330
In between the two boards there's this MEMS accelerometer.

10:19.330 --> 10:21.290
This powers the tamper detection.

10:21.290 --> 10:26.270
So if you like to try to take it down or like throw a stapler at it, it will get mad and light up.

10:27.110 --> 10:30.430
Also an Ethernet switch I see to power the daisy chaining thing.

10:30.530 --> 10:37.150
And then in the bottom right corner, a couple of MEMS microphones that are connected to a wave share audio codec.

10:37.590 --> 10:41.590
Again, the spec sheet says like this is not for recording audio actually.

10:41.590 --> 10:42.930
We just do analysis.

10:42.990 --> 10:46.450
Noise and aggression, spoken word, gunshots, et cetera.

10:47.670 --> 10:51.050
Back on the underside of the case, there's a speaker.

10:51.050 --> 10:52.810
This is for playing alert noises.

10:53.310 --> 10:56.270
And then the sensor that powers the headlining vape detection stuff.

10:56.270 --> 10:58.170
The SPS30 particle sensor.

10:58.190 --> 11:01.290
If you haven't seen how one of these particular sensors works, it's actually really cool.

11:01.290 --> 11:02.990
They have a little fan and a laser.

11:03.010 --> 11:05.530
And the fan draws an air sample through that metal box.

11:05.530 --> 11:07.530
It shoots the laser into the air.

11:07.530 --> 11:10.550
And then it can estimate the particles based on how the laser scatters.

11:11.050 --> 11:12.430
So yeah, super sci-fi.

11:12.510 --> 11:17.990
And all of these sensors together give us this web dashboard that the device itself serves up.

11:18.210 --> 11:20.730
Each one of those green circles, you don't have to read the labels.

11:20.730 --> 11:21.570
I don't know if you can.

11:21.790 --> 11:23.870
But each one is a different alert type.

11:24.470 --> 11:26.330
And it will turn red if something is wrong.

11:26.550 --> 11:29.510
There's the ones you'd expect like vaping, tampering, motion.

11:29.670 --> 11:31.270
But also like environmental stuff.

11:31.270 --> 11:32.310
Like it's too cold in here.

11:32.310 --> 11:33.530
The air is too stuffy.

11:34.050 --> 11:37.830
By the way, the device can also serve a picture of this over RTSP .

11:37.910 --> 11:43.250
So you can have it like in your NVR and be able to scrub back and see what it looked like an hour or 24 hours ago or whatever.

11:44.190 --> 11:46.870
So yeah, naturally we wanted to see how this worked.

11:47.310 --> 11:49.630
So we turned our attention back to that Raspberry Pi.

11:51.990 --> 11:57.090
So this is a diagram of the secure boot flow on the Broadcom 2711 SOC.

11:57.090 --> 12:00.090
That is in the Pi CM4, model 4 and model 400.

12:00.330 --> 12:03.610
Once secure boot is toggled on, you cannot toggle it back off.

12:04.270 --> 12:09.370
So to kind of summarize how it works, the first code that runs when you turn it on is called boot ROM.

12:09.370 --> 12:13.130
That also has some public keys and that's all baked into the SOC.

12:13.670 --> 12:16.350
Boot ROM loads the first stage boot loader off the spy flash.

12:16.350 --> 12:17.670
That's called boot sys.

12:17.870 --> 12:21.370
It contains a signature from one of those keys which it verifies before running.

12:21.650 --> 12:35.970
Boot sys loads customer public key from the EPROM and then checks the digest against the SOC's OTP which has, it's a one time programmable like EFUSE type thing so you can write once and then you can't change it but you can continue to read it.

12:37.390 --> 12:41.310
Boot sys also contains hashes of boot main which is the second stage boot loader.

12:44.450 --> 12:54.630
So boot main loads the actual OS boot image and then that has a signature against that customer key which again is verified against the thing baked into flash or baked into the SOC rather.

12:55.830 --> 13:03.790
And then the OS image can finally load and mount that looks encrypted file system which is encrypted to the device specific private key also baked into the OTP.

13:03.790 --> 13:16.750
So altogether this whole process ensures that each stage of boot that runs is verified by the one before it and the end result is you get a file system that's encrypted at rest and it becomes quite difficult to just plug it in and dump the contents of the EMMC.

13:18.270 --> 13:21.570
So we just plugged it in and dumped the contents of the EMMC.

13:26.770 --> 13:29.490
Yeah, this is the real world secure boot doesn't always happen.

13:29.490 --> 13:30.510
This is fine.

13:30.650 --> 13:37.130
So we took the CM4 off of the halo and put it on this carrier board that basically turns it into the form factor of the model 4.

13:37.510 --> 13:43.670
It also contains this handy switch that grounds a particular pin that tells the Pi to run in USB boot loader mode.

13:43.770 --> 13:50.450
And then the Raspberry Pi GitHub has a script that when you run it, it like throws a mass storage device boot gadget over to the Pi.

13:50.450 --> 13:53.390
So it just comes up on the host device as a block device.

13:53.730 --> 13:57.810
Meaning you can just DD it into a file and then go spelunking all you want offline .

13:59.070 --> 14:00.510
So yeah, what's in that software?

14:01.330 --> 14:08.130
The smoke detector runs Linux, specifically Raspbian 10 which is currently old stable, like a little old but fine, whatever.

14:08.510 --> 14:12.910
I cannot believe I'm saying this next part but the smoke detector runs Node.js.

14:15.110 --> 14:20.630
Yeah, the code running all of this is JavaScript with an express web server to do the web stuff.

14:20.630 --> 14:21.890
It's not quite all JavaScript.

14:21.890 --> 14:31.270
There's also like a bunch of like Python and bash on there that it shells out to and like it builds command lines out of user supplied parameters and then fires those in subshells.

14:31.270 --> 14:32.810
This is probably fine.

14:33.650 --> 14:35.210
And then there's a bunch of drivers.

14:35.290 --> 14:38.570
These are either elf binaries or sometimes like Python byte code.

14:39.130 --> 14:46.810
These basically read the sensor data over I squared C and then send it to that main server process over like a JSON web socket thing or TCP socket rather.

14:46.810 --> 14:47.530
It's not web.

14:48.270 --> 14:50.530
Not important to read any of the names up here.

14:50.530 --> 14:57.290
The point is there's a ton of integrations as well like it supports all these different APIs for different video and camera systems and security stuff.

14:57.290 --> 14:59.330
A lot of vendors we recognize in that list.

15:00.730 --> 15:05.190
Yeah, and then we went back looking for those encrypted updates that Ray was trying to look at before.

15:05.890 --> 15:07.650
We found a script to unpack them.

15:07.650 --> 15:10.890
Actually a super user friendly script which was nice for us.

15:10.890 --> 15:13.710
But we were really just interested to see how the encryption works.

15:14.110 --> 15:15.890
And then we found this.

15:16.350 --> 15:25.990
So the file format of those encrypted updates is a header that has the key in it and then the IV and then the encrypted contents.

15:26.330 --> 15:33.310
So like we're giving the customers a lock box where the key is taped to the bottom of it and then like most people don't know to look there.

15:33.310 --> 15:34.850
So this kind of works I guess.

15:34.850 --> 15:39.710
The contents turn out to be a tar GZ that like it's splatted onto the file system when it unpacks.

15:39.970 --> 15:42.690
But aside from that like there's no signing.

15:43.350 --> 15:45.030
No other validity checks.

15:45.170 --> 15:50.670
Once we know that the key is literally in the fucking file there's nothing to stop us from making our own.

15:50.830 --> 15:52.910
So like that's shells, right?

15:52.910 --> 15:56.850
Like we can overwrite the firmware with whatever we want.

15:56.850 --> 15:59.370
But it gets even sillier kind of.

15:59.370 --> 16:03.550
This is the code behind the API endpoint for handling the firmware uploads.

16:03.650 --> 16:09.910
It grabs the file, dumps it onto the disk and like a temp location and then fires this extract UPK shell script at the end.

16:11.010 --> 16:13.270
That shell script looks like this.

16:13.470 --> 16:15.050
Our favorite part is this.

16:15.050 --> 16:20.110
If it unpacks it and it finds a file called extra, it fucking runs it.

16:21.790 --> 16:25.470
This is probably for like clean up tasks or migrations or whatever.

16:25.470 --> 16:28.630
But like what if our migration is this?

16:29.090 --> 16:36.290
So yeah, standard reverse shell payload and I will give you three guesses which user it's running it as.

16:43.310 --> 16:48.010
So yeah, this was the documenting the first time we got a root shell on it.

16:48.230 --> 16:53.270
The deranged comic sans terminal font is one of our friends who helped us with this a little bit.

16:54.350 --> 16:56.810
So yeah, we have this thing, right?

16:56.810 --> 17:00.670
So if you can log into the website as admin, you can turn that into a root shell.

17:00.670 --> 17:03.470
But we're really interested in like the other part too, right?

17:03.470 --> 17:06.410
Like how can we get from having nothing to being admin on the dashboard?

17:07.790 --> 17:09.450
So how do we do that?

17:09.450 --> 17:11.530
We go and peek at the off code.

17:11.610 --> 17:13.430
It's all just kind of weird and janky.

17:13.430 --> 17:15.530
Actually all the code is kind of weird and janky.

17:15.530 --> 17:23.710
We've been joking this feels like they took like a grizzled 80s Unix C hacker and sat him down and said like, okay, your new job is writing JavaScript, go.

17:25.010 --> 17:30.490
There's some weird like nonce math stuff that seems like it might leave the device vulnerable to replay attacks.

17:30.710 --> 17:33.270
We didn't POC that because it's all TLS in the latest.

17:33.390 --> 17:37.710
It's all TLS so it's encrypted on the wire so that kind of makes it harder.

17:39.190 --> 17:41.330
Then we thought what if we could brute force the login?

17:41.810 --> 17:46.050
Usually web logins like this have some kind of like rate limiting brute force protection.

17:46.110 --> 17:50.530
So it will keep track of how many times you've guessed and if you guess too many times too fast it will back you off.

17:51.230 --> 17:53.230
The halo did implement rate limiting.

17:54.450 --> 17:55.310
And it works like this.

17:55.310 --> 17:56.490
So we try to log in.

17:56.610 --> 17:59.030
It initializes a counter for the auth attempts.

17:59.130 --> 18:01.470
The password is bad so it increments the counter.

18:01.530 --> 18:02.870
And then it stores the counter.

18:03.590 --> 18:04.750
In a cookie.

18:08.940 --> 18:12.460
So the flow is like I guess a bad password.

18:12.480 --> 18:14.720
The halo says 401 unauthorized.

18:14.720 --> 18:15.240
That's wrong.

18:15.240 --> 18:17.040
Also you have guessed wrong once.

18:17.200 --> 18:19.480
Please remind me of that next time you guess.

18:20.400 --> 18:22.920
And so we can just not use the cookie next time.

18:22.920 --> 18:28.020
If we're writing a script to do this, it's actually more work to comply with the rate limiting by handing it the cookie.

18:29.200 --> 18:32.540
So yeah, seems like we can maybe brute force it over the network.

18:33.840 --> 18:35.960
It is pretty slow actually.

18:35.960 --> 18:37.100
So it's like a raspberry pie.

18:37.100 --> 18:39.580
So it can only respond to about 3,000 guesses a minute.

18:39.720 --> 18:42.620
This means it would take like five hours to do a word list of a million.

18:42.780 --> 18:44.960
But high schoolers have a lot of time, right?

18:45.880 --> 18:47.600
It's also extremely loud.

18:47.680 --> 18:50.780
If there's network security stuff watching it will definitely notice.

18:50.960 --> 18:53.840
But we suspect there might not always be network security stuff.

18:53.840 --> 19:00.660
We did find like 20 of these on showdown on the open internet with their own public IPV4s.

19:00.700 --> 19:02.220
Very cool, very normal.

19:02.360 --> 19:05.200
There's also a password policy to the credit of the vendor.

19:05.840 --> 19:08.180
There's got to be a capital , a lower, a number and a special.

19:08.180 --> 19:09.460
It has to be eight characters.

19:09.520 --> 19:12.140
So all this in mind, you do have to get a little bit lucky.

19:12.840 --> 19:14.440
But it still totally works.

19:14.440 --> 19:15.020
We tested it.

19:15.020 --> 19:15.640
You can brute force.

19:15.640 --> 19:16.380
Works great.

19:16.980 --> 19:28.320
So with ten lines of bash and a little luck and one 400 byte updatey boy, we've got like an unauthenticated over the network full chain device takeover thing.

19:28.420 --> 19:29.120
Cool.

19:29.420 --> 19:30.860
We have some video demos.

19:30.860 --> 19:32.040
You want to see the demos?

19:33.540 --> 19:35.300
I'm going to let Ray introduce those.

19:39.190 --> 19:43.850
Yeah, before we get into that, there's some things we forgot to mention.

19:43.850 --> 19:45.450
It's not just in schools.

19:46.290 --> 19:48.970
They're putting these in retail stores.

19:49.710 --> 19:50.950
It's in banks.

19:51.830 --> 19:54.250
It's in hotels, air B&Bs.

19:54.250 --> 19:55.990
It's in hospital rooms.

19:56.970 --> 20:00.290
It's in assisted living facilities, like care homes.

20:01.070 --> 20:03.950
And it's in public housing projects and section 8 apartments.

20:05.530 --> 20:11.690
Here's one case study from the vendor talking about how it was used in section 8 housing in New York.

20:13.670 --> 20:20.590
They started implementing them in residential units as part of enforcing a no smoking policy and are planning to install more.

20:21.850 --> 20:26.750
In this case study, they're basically bragging about how they use the halo to catch poor people.

20:27.710 --> 20:32.590
The director of the housing authority says it's like having an expert witness on the stand in the courtroom.

20:35.350 --> 20:38.050
So with that context in mind, let's see the video.

20:45.220 --> 20:51.200
Yeah, it's not playing.

20:51.740 --> 20:52.860
No video?

20:55.140 --> 20:56.160
Oh, yeah.

20:56.160 --> 20:58.020
Other screen, I see.

20:58.380 --> 20:59.300
Hey.

20:59.300 --> 21:00.400
All right.

23:19.700 --> 23:21.900
Put my C-Phrase.

23:52.150 --> 23:53.810
Pure.

23:54.250 --> 23:55.590
Command.

23:55.710 --> 23:57.230
Keenness.

23:57.230 --> 23:58.450
Boom.

23:58.450 --> 23:59.690
Fairy.

23:59.690 --> 24:01.130
Exhaust.

24:01.130 --> 24:02.550
Hate.

24:02.550 --> 24:04.230
All.

24:18.180 --> 24:25.340
A little pause...

24:33.040 --> 24:34.400
and we are back.

24:34.400 --> 24:34.760
Now...

24:44.100 --> 24:45.700
Anybody in there?

24:46.420 --> 24:47.680
Get back in there.

24:47.680 --> 24:49.200
I'm not there.

24:49.680 --> 24:51.240
Can you move out of your way?

24:58.300 --> 25:00.200
Which one do I go back to?

25:01.600 --> 25:02.620
Left one.

25:02.720 --> 25:04.100
Where's my cursor?

25:04.100 --> 25:04.840
Right there.

25:04.840 --> 25:06.820
All right.

25:10.920 --> 25:14.020
Yeah, so after that, we disclosed all of this to the vendor.

25:17.540 --> 25:22.000
We sent them an e-mail to the vulnerability disclosure program on July 10th.

25:22.000 --> 25:23.440
We told them about the findings.

25:23.440 --> 25:27.640
We also mentioned in the e-mail that we were going to present this in a conference about a month.

25:28.480 --> 25:31.480
We received an automatic response about a day later.

25:31.480 --> 25:35.200
They assigned us a ticket number, but didn't say much, really.

25:36.480 --> 25:43.360
And then about a week later, they got back to us with an actual human response, saying they acknowledge the vulnerabilities and will try to patch it before DEF CON.

25:45.820 --> 25:47.600
And they actually did, on Monday.

25:47.600 --> 25:51.880
We haven't had a lot of time to look at it yet, but trust me, we are going to look at it.

25:55.530 --> 25:58.730
Before that, we did actually see they patched stuff.

25:58.730 --> 26:01.350
In the original firmware, we pulled off the Halo.

26:01.350 --> 26:05.990
This function for setting the time zone and stuff was not sanitizing user input at all.

26:06.330 --> 26:08.970
It would just take parameters and insert them into shell commands.

26:12.180 --> 26:18.860
After we updated the Halo to the latest version, we found they had updated it with a new function called CleanArg.

26:20.100 --> 26:25.200
And that basically just goes through the string and escapes dangerous characters.

26:26.020 --> 26:28.480
To recap, these are the things we have found.

26:29.220 --> 26:31.640
You can just brute force a login on the web interface.

26:32.920 --> 26:36.820
You might be able to do a replay attack, but we didn't develop a POC for this.

26:38.620 --> 26:43.620
There's a lack of firmware signing, which lets us make our own firmware and take over the device.

26:44.860 --> 26:47.400
And a firmware update can just turn it into a listening device.

26:48.900 --> 26:51.980
So yeah, this is the list of issues we have found.

26:53.600 --> 26:56.380
And these are the ones they can fix with patch.

27:01.210 --> 27:02.990
Anybody remember this thing?

27:03.950 --> 27:08.310
A few years ago, Google had this cloud enabled home alarm system called Nest Secure.

27:08.310 --> 27:11.530
This little control unit keypad thing is called Nest Guard.

27:11.830 --> 27:13.310
And one day they make this blog post.

27:13.310 --> 27:16.570
It's like, hey everybody, Google Assistant is coming to Nest Secure.

27:16.570 --> 27:20.790
So great news, you're going to be able to say hey Google at it and ask it what the weather is or whatever.

27:20.790 --> 27:26.250
And everybody in unison is like, yo, what the fuck, you didn't tell us you put a microphone in this thing?

27:26.690 --> 27:27.550
Because they hadn't.

27:27.550 --> 27:29.470
They omitted that from the spec sheet.

27:29.830 --> 27:32.770
And then they tweeted like, oh yeah, we totally, there's a mic in that.

27:32.930 --> 27:34.310
But we haven't even used it yet.

27:34.310 --> 27:37.770
And also you can turn it off in the app that we also control.

27:38.130 --> 27:42.130
And then a few years later they discontinued the cloud service and bricked everyone's thing.

27:42.310 --> 27:43.430
Because that's kind of what Google does.

27:43.430 --> 27:44.190
But that's for another talk.

27:44.190 --> 27:50.350
The point is, people don't like when you can turn a device into an audio bug with a server side toggle.

27:50.350 --> 27:53.790
And it seems like the company that makes the Halo understands this as well.

27:53.790 --> 27:57.750
Because again, all their marketing stuff says ensures privacy without audio recording.

27:57.930 --> 28:07.450
I imagine this would have been workshopped heavily from what the engineers might have written, which would have been like, it has microphones in it, but we're not saving the audio or shipping it off anywhere.

28:08.070 --> 28:09.390
Not in this firmware.

28:10.970 --> 28:12.290
Trust me, bro.

28:14.510 --> 28:20.570
So when you're trying to evaluate some new gadget or system, I think there are two questions that are important to ask.

28:20.570 --> 28:21.550
And the first one is really easy.

28:21.550 --> 28:23.170
It's what does the technology do?

28:23.330 --> 28:24.070
How does it work?

28:24.070 --> 28:24.650
What's inside it?

28:24.650 --> 28:25.630
What are the capabilities?

28:26.030 --> 28:30.190
But just as important as what it does, is who does it do it for?

28:30.470 --> 28:32.950
Whose interests does this technology serve?

28:33.350 --> 28:35.270
I want to show you something else we found in the firmware.

28:35.270 --> 28:42.690
So when the thing starts up, in its startup routine, which is called start main B for some reason, it sets up a call to this reverse proxy thing.

28:43.310 --> 28:51.310
Ten seconds later, that fires and the device opens up a TLS encrypted web socket to the company, which owns this IOTmanager.com domain.

28:51.310 --> 28:53.210
We didn't poke at any of their cloud stuff, by the way.

28:53.210 --> 28:54.030
That's crimes.

28:54.030 --> 28:54.930
Those are illegal.

28:55.390 --> 29:02.830
But the message handler for this socket says, like, anytime something comes back over this socket, put it into this for halo array and then call send to halo.

29:03.210 --> 29:04.410
Well, what does that do?

29:04.410 --> 29:05.530
So we go looking for that.

29:05.530 --> 29:13.210
Turns out that function opens another socket to the local web API and takes the first thing out of for halo and shoves it into the web API.

29:13.210 --> 29:15.810
Then it calls itself recursively until that array is empty.

29:16.090 --> 29:19.430
The web API then, and it's authorized middleware.

29:19.430 --> 29:21.790
People who have written express will recognize this.

29:21.790 --> 29:32.010
It looks at those requests and sees that if they came from inside the building, like if the remote address is local host, it sets the user name to this cloud server placeholder and then sets is admin to true.

29:32.790 --> 29:45.730
So, like, what this enables, in addition to the paid cloud subscription service, because of course it has that, is that the company that made the halo can, at any time, call any of the end points on the device's local web API as admin.

29:47.510 --> 29:50.750
So, look, to be clear, we are not saying this thing is listening to you.

29:50.850 --> 29:51.890
It probably isn't.

29:51.890 --> 29:56.690
We saw no evidence on the one we got our hands on that they are doing anything dodgy, that they're saving it or shipping it off.

29:56.690 --> 30:02.990
The problem, though, is that, like, this is microphones connected to a Raspberry Pi that's on the network.

30:03.050 --> 30:04.790
And someone else has root on it.

30:04.790 --> 30:09.610
So, like, at any time, it could just decide to start listening to you and you would not know the difference looking at it.

30:10.230 --> 30:13.910
So we thought it would be fun to, like, try to enumerate who might be listening to you through your halo.

30:14.950 --> 30:17.230
It could be script kiddies who saw this talk.

30:18.570 --> 30:21.630
It could be the IT admin who has access to that dashboard.

30:22.770 --> 30:26.090
It could be system integrators, the installers, who have access to the dashboard.

30:27.930 --> 30:31.910
Motorola themselves, who have root by that cloud reverse proxy backdoor thing.

30:33.210 --> 30:36.630
Local cops who compel any of the above to act on their behalf.

30:37.470 --> 30:38.750
Same deal with feds.

30:38.750 --> 30:39.950
Like, thank DHS.

30:39.950 --> 30:41.230
Thank ICE.

30:41.870 --> 30:46.250
And, you know, statistically speaking, probably...

30:48.430 --> 30:51.110
The possibilities with this device are endless.

30:51.110 --> 30:53.690
And, like, you're probably asking, did they have to do it this way?

30:53.690 --> 30:56.330
Did they have to engineer it in a way that opens it up to these risks?

30:56.330 --> 30:58.430
And, like, no, totally not.

30:58.430 --> 31:02.710
This is a peripheral made by a boutique shop in India called PCB Artists.

31:02.730 --> 31:04.650
It is an I2C decibel meter.

31:05.150 --> 31:09.090
It has a microphone, just like the halo, and its own STM32.

31:09.110 --> 31:16.370
And all day long, that STM32 reads the microphone, calculates the decibel level, and sends just the number back to the host machine over I2C.

31:16.550 --> 31:22.910
So this means that you get the data that you wanted, but if somebody pops your web server, they can't trivially turn the whole thing into an audio bug.

31:23.530 --> 31:29.930
And they could have done the same thing with the silly wake word feature, separate coprocessor, like, get it away from the main computer.

31:30.130 --> 31:33.670
The part costs about $30, but you could do this way cheaper at scale.

31:33.890 --> 31:37.470
Or you could do what the Zeptive thing does, that prison wine one from before.

31:37.490 --> 31:40.230
They have a noise add-on that is an add-on.

31:40.330 --> 31:46.030
It's optional, you don't have to have it, but you can buy this if you want to enable microphones in your deranged setup.

31:47.310 --> 31:54.790
But, you know, even if you get rid of all the microphone stuff completely, and this might be a slightly hotter take, I think this thing still sucks.

31:55.270 --> 31:57.530
Because, again, who is it working for?

31:57.530 --> 32:00.410
Who benefits from this device existing in our society?

32:02.370 --> 32:05.390
I want to rant for a little bit about the death of privacy.

32:05.830 --> 32:07.830
It never happens all at once, right?

32:07.830 --> 32:09.090
Like, it's a gradual thing.

32:09.090 --> 32:10.370
It erodes over time.

32:10.370 --> 32:12.610
Little nibbles of it get taken around the edges.

32:13.610 --> 32:16.090
Y'all know about usage-based car insurance?

32:16.490 --> 32:31.530
So, like, way back when this was for over-the-road truck drivers, or actually for the trucking companies, they had, like, dongles in the trucks that would report back if the truck driver was obeying the speed limit and, like, not driving too many hours without taking their legally mandated rest breaks.

32:31.850 --> 32:48.810
And more recently, some car insurance companies have started offering this program where you can put an app on your phone that will keep an eye on your driving and, like, nominally give you discounts, but actually just narc on you to the insurance company if you go too fast or brake too hard or drive too many miles so they can raise your insurance.

32:48.810 --> 32:53.350
And then they realized that nobody was signing up for these because that's creepy and weird.

32:53.390 --> 32:59.870
So they just started buying your driving data directly from OnStar via LexisNexis and raising your insurance without even getting you involved.

33:00.850 --> 33:02.690
What about the Amazon drivers?

33:02.730 --> 33:04.570
They aren't really Amazon drivers.

33:04.570 --> 33:18.070
Those drivers work for these other companies called delivery service partners, or DSPs, which are third parties that Amazon contracts to provide delivery services to Amazon, which gives Amazon access to a labor force that is fragmented enough that they probably won't unionize.

33:18.070 --> 33:32.170
Anyway, those fucking vans have cameras in them pointed at the drivers, and they caught some bad press a couple of years ago because the drivers were, like, scratching their face or sipping their coffee or opening their mouth to sing along with the radio,

33:32.170 --> 33:36.970
and the cameras were reporting them to their bosses so they could get penalized for driving while distracted.

33:37.550 --> 33:45.870
If your car at home has any kind of, like, advanced driver assistance or smart cruise control, like, it might have a cabin-facing camera in it, right?

33:45.870 --> 33:48.990
Like, all I'm saying... but back to the halo.

33:48.990 --> 33:51.930
So this thing starts out in schools, hospitals, whatever.

33:52.210 --> 33:53.330
Relatively benign.

33:53.870 --> 33:57.150
And then some ghoul is like, what if we could just put it into poor people's houses?

33:57.890 --> 34:03.650
And do we think at that point the company is going to be like, okay, we have addressed a modest proportion of our total addressable market.

34:03.710 --> 34:06.090
Like, we've done enough shareholder value, let's pack it up.

34:06.090 --> 34:06.610
No, right?

34:06.610 --> 34:07.190
Of course not.

34:07.190 --> 34:08.110
Blood for the blood god.

34:08.110 --> 34:08.970
Number must go up.

34:08.970 --> 34:12.670
So this thing is coming for you in your bougie downtown apartment.

34:12.690 --> 34:15.810
Or, like, what if the home insurance company demands you put one in your house?

34:15.810 --> 34:18.370
Or else they drop your insurance because you're a fire risk.

34:18.570 --> 34:28.750
And, you know, when I start extrapolating along these lines, even to a relatively privacy-conscious audience, I'm sure I start to sound like a frothing conspiracy theorist or a swivel-eyed loon.

34:29.530 --> 34:35.630
But to borrow the title of this Cory Doctorow piece a while ago, the swivel-eyed loons have a point.

34:36.050 --> 34:40.010
Because over and over again, the rest of us say, surely they wouldn't sink any lower.

34:40.090 --> 34:41.210
And then they do.

34:41.210 --> 34:52.010
The company that makes the Halo says in their marketing stuff that because it doesn't record video or audio, supposedly, it can, and I quote, be safely used in private areas like restrooms.

34:52.690 --> 35:01.290
In other words, not only are they marketing a promise to put every square inch under some kind of surveillance, but they're actually saying nothing is sacred as a selling point for their thing.

35:01.670 --> 35:06.750
And, like, honestly, what happens to the magic of technology making the world a better place thing?

35:06.810 --> 35:18.670
Why does it seem like any time we develop some new capability as a species that in the best case, it gets used to track and profile our thoughts and behaviors, to put more accurate targeted ads in our faces, or capture more of our attention.

35:18.750 --> 35:24.950
And in the worst case, it gets used to literally subjugate and abuse poor people, immigrants, school children.

35:25.350 --> 35:35.910
And there's a sick hypocrisy underlying all of it, because do we really think the depraved creeps who cooked this thing up and, like I said, put them in poor people's houses would be thrilled to have them on the ceilings of their living rooms?

35:36.290 --> 35:37.830
I think they wouldn't.

35:37.830 --> 35:38.710
I'd guess they wouldn't.

35:38.710 --> 35:50.630
But I'd also guess it doesn't keep them up at night, because they know, as they drift off to sleep atop their fucking Scrooge McDuck piles of Motorola acquisition money, that they're in an economic position where nobody's going to compel them to bug their houses.

35:50.690 --> 35:58.190
Nobody's going to come knocking on the CEO's front door to investigate an anomaly from the particulate sensor mounted above his fucking living room sofa.

36:00.570 --> 36:05.510
It's enough to make anyone want to walk away from all this and build a tiny cabin in the woods in Montana.

36:06.770 --> 36:11.050
But if this stuff pisses you off, too, I want you to stick around for this last bit.

36:11.970 --> 36:14.710
What can you, the hackers, do about any of this?

36:15.270 --> 36:16.910
Well, you can do what Ray did.

36:16.970 --> 36:20.670
You could buy some weird cop tech on eBay and mess with it and then tell people about it.

36:20.890 --> 36:24.930
You might have noticed we didn't have to discover any V8 runtime ODAs to pop this thing.

36:24.930 --> 36:26.070
Like , it wasn't that hard.

36:26.070 --> 36:26.990
You could probably do it, too.

36:26.990 --> 36:28.030
You should give it a shot.

36:29.030 --> 36:33.130
Or go to your school board and ask if they're putting these things in your local schools.

36:33.390 --> 36:41.550
And if they are, maybe also ask if the tens of thousands of dollars they've blown making their schools more like prisons might have been better spent on, like, a music teacher or something.

36:42.590 --> 36:44.730
Campaign for strong privacy legislation.

36:44.910 --> 36:48.070
Because this is not a problem the free market is interested in solving.

36:48.130 --> 36:53.150
Because neither the people who sell this thing nor the ones who buy it are the ones who eventually have to suffer with the surveillance.

36:53.390 --> 36:56.790
Up in Oregon, we are really lucky to have Senator Ron Wyden.

36:58.990 --> 37:03.590
He's been on the right side on just about every digital privacy and surveillance debate.

37:03.590 --> 37:07.290
And he knows what he's talking about in part because he listens to his hacker constituents.

37:07.590 --> 37:12.270
If your representative does not know anything about any of this, consider reaching out.

37:12.270 --> 37:13.850
Ask what it might take to change that.

37:14.770 --> 37:21.310
If you don't have time for any of this stuff, but you do have money, consider giving some money to the Electronic Frontier Foundation.

37:21.750 --> 37:25.390
The EFF has been around since literally before I was born fighting the good fight.

37:25.390 --> 37:27.070
And they are here at DEF CON in the vendor hall.

37:27.070 --> 37:29.610
So swing by their booth, give them some cash, get some stickers.

37:29.730 --> 37:31.110
Give a little more, get one of the hoodies.

37:31.110 --> 37:32.770
The design is freaking sick this year.

37:32.770 --> 37:35.910
And the contributions go to making the world better for everyone.

37:37.190 --> 37:39.250
Stay aware, stay informed.

37:39.610 --> 37:41.990
Look, I know it's a shitty time to be reading the news right now.

37:41.990 --> 37:44.030
I'm not advocating for doom scrolling.

37:44.250 --> 37:45.290
Pace yourself.

37:45.610 --> 37:50.890
But if you can stomach it, I believe it is your duty to read and understand the adversaries.

37:51.070 --> 37:57.450
Because knowing what is happening now and what's coming next is the only way to keep yourself, your friends, and your community safe.

38:00.830 --> 38:03.370
From beginning to end, this talk has been a wild ride.

38:03.370 --> 38:09.630
Ray and I did not do it alone, so a huge and heartfelt thanks to everybody up on screen right now for helping us out along the way.

38:09.630 --> 38:25.750
Do not have time to read everyone individually, but I do want to call special attention again to the EFF and their Coder's Rights Team for the generous legal advice and counsel, as well as to Joseph Cox at 404 Media and Andy Greenberg at Wired for listening to our story and finding it compelling enough to share it with the rest of the world.

38:25.850 --> 38:28.350
I don't know if you guys saw, but we were in Wired this morning.

38:28.350 --> 38:29.450
That was pretty cool.

38:34.280 --> 38:42.940
On an even more personal note, Ray is a freshly minted high school graduate who already has his first main stage DEF CON talk under his belt.

38:45.440 --> 38:47.200
This kid is going places.

38:47.200 --> 38:55.660
He is passionate, he is curious, and he is looking for opportunities for scholarships, internships, and inter-level employment, particularly in hardware hacking and security research.

38:55.700 --> 38:58.940
If you want to be a part of his story, reach out to him directly via Macedon DM.

38:58.960 --> 39:01.240
He is bujo at defcon.social.

39:01.240 --> 39:03.680
I am also looking for opportunities.

39:03.980 --> 39:07.040
I've just been caught in the latest round of Corpo Layoff Roulette.

39:07.300 --> 39:12.900
My last day at my current employer is a week from today, and I am so excited and thrilled for what might happen next.

39:12.900 --> 39:23.920
So if you'd like to hire me on a consulting or full-time basis to hack stuff that sucks, build stuff that doesn't, or do cool research and write talks like this about it, you are more than welcome to reach out to me via Blue Sky DM.

39:24.020 --> 39:26.360
I am nixwtf.bsky.social.

39:26.720 --> 39:38.420
And finally, if you're looking for something to do this evening, and you'd like to hang out with me, Ray, a bunch of the Portland, Oregon hacker crew, and dozens of our closest friends from around the internet, you are humbly invited to join us at the 503 party.

39:38.480 --> 39:39.720
It's hosted by the Portland folks.

39:39.720 --> 39:41.080
It's in the Flamingo this year.

39:41.220 --> 39:42.280
And it's going to be a good time.

39:42.280 --> 39:43.300
Doors open at 8.

39:43.300 --> 39:45.420
We will hack the planet all night long.

39:45.440 --> 39:49.300
And you can get more details on venue by pointing your web browser at 503.party.

39:51.140 --> 39:52.280
Thanks for listening.

39:52.500 --> 39:53.440
That's all we got.

39:56.820 --> 40:00.220
Any burning questions, we will be out in the hall for a couple of minutes.

40:00.220 --> 40:02.480
And if not, see you at the party later maybe.

