WEBVTT

00:01.480 --> 00:03.920
Greetings, RF Village.

00:07.680 --> 00:10.660
Man, y'all sound super excited.

00:11.240 --> 00:13.300
There we go!

00:14.520 --> 00:15.300
Hell yeah.

00:15.300 --> 00:17.660
Hell yeah, it's toothbrush time, my friends.

00:18.360 --> 00:18.720
So...

00:19.340 --> 00:42.900
This wonderful person, who is definitely on several lists, is intimately and on first-name basis with the TSA, Amtrak, and organizations with three-letter affiliations, and not for good reasons, who loves doing interesting projects, up to and including...

00:42.900 --> 00:53.160
They brought an interesting RF case to my village that looked like a pair of RF boobs, or that you could put googly eyes on it and it would work the same.

00:53.160 --> 00:59.520
It was an amazing contraption that I was sure was making me sterile while I was standing next to it.

01:02.480 --> 01:11.680
They always produce good work and do good in our village competing, so that I know this talk is actually going to have some great information in it.

01:11.680 --> 01:22.020
So, without further ado, I'm going to turn over the microphone to this particular person of the toothbrush botnet fashion, so that you can learn all kinds of cool things.

01:22.020 --> 01:22.820
Everybody ready?

01:24.680 --> 01:26.300
Let's do this.

01:27.100 --> 01:29.160
Thank you for the introduction.

01:29.160 --> 01:31.560
Yeah, so this is how to make a toothbrush botnet.

01:31.580 --> 01:34.580
Tips, tricks, tools, and process for ESP32 hacking.

01:35.920 --> 01:38.500
So, we'll get a little brief outline real quick.

01:38.500 --> 01:56.400
So, we'll get into the background a bit, the impetus for how this even became a thing, get into dumping the existing firmware, getting into some extremely basic reverse engineering, some wireless sniffing, some buzzing, how OTA updates work, self-referencing firmware.

01:56.400 --> 02:00.920
Unfortunately, the demo video is not going to work because the internet is not fast enough in here right now.

02:01.560 --> 02:03.780
And then some future work that we've got going on.

02:05.760 --> 02:07.740
So, yeah, I'm Lo Zanning.

02:08.440 --> 02:12.280
I feel like Wasabi did a pretty good job of introducing a lot of the things that I make.

02:12.280 --> 02:19.820
But, yeah, I like ESP32s a lot, and that's kind of my bread and butter when it comes to things that I use to compete in the RFCTF.

02:19.820 --> 02:27.040
So, yeah, I've been launching balloons and gluing ESP32s to circuit boards and making all kinds of stuff like that.

02:28.780 --> 02:30.300
So a little bit of background.

02:30.440 --> 02:49.800
So, like, back in January, I think it was, Fortinet, some Fortinet employee was talking to some IT trade publication, and either through something being lost in translation or perhaps maybe a bit of intentional FUD, the story that ended up coming out was that there was,

02:49.800 --> 02:54.560
like, 7 million toothbrush botnet that was actively attacking a Swiss bank.

02:55.700 --> 03:01.460
And so then there was a lot of consternation on Twitter about whether or not that was a real thing that could happen or could not happen.

03:01.680 --> 03:06.680
A lot of people feeling very intensely about whether or not that was even a possible thing to do.

03:08.160 --> 03:20.040
And eventually, UK Daniel Card on Twitter actually ended up finding a toothbrush that had, they claimed to have wireless functionality built in, which I thought was super interesting, and he went and posted a picture to Twitter.

03:20.920 --> 03:23.420
And within that Twitter, within that...

03:25.260 --> 03:28.180
Within that photo, there was actually the FCC ID.

03:28.180 --> 03:37.080
And so I suppose if you take one thing from this talk, is that the FCCID.io website is, like, my number one hacking resource.

03:37.540 --> 03:46.500
And the reason why is because they upload photos of the internal circuit boards as part of the FCC certification process.

03:46.560 --> 03:55.860
And so if you've got something that's FCC ID, or if you know who the manufacturer of that device is, you can plop that in there and, boy, how do you get some beautiful photos of stuff?

03:55.860 --> 04:00.000
And you don't even have to buy it, so you can figure out what is in the thing before you even spend any money on it.

04:00.640 --> 04:10.000
So I went ahead and I looked it up, and if you can see where the arrow is over there, that certainly looked like it was going to be serial UR broken out.

04:10.220 --> 04:13.360
So that's an exciting thing if we're trying to create a botnet.

04:13.820 --> 04:20.700
So I went ahead and, you know, thinking that, you know, I should be able to play with this thing if I actually buy one.

04:20.700 --> 04:23.440
And I went ahead and did buy one.

04:25.840 --> 04:29.760
So real quick, so the ESP32 tools.

04:30.240 --> 04:31.080
These tips are...

04:31.080 --> 04:33.240
Well, the tips are in everything, and for good reason.

04:33.240 --> 04:34.840
They are dirt cheap.

04:35.960 --> 04:46.140
I've got, like, an ESP32 Borg cube that I made, and, like, I got a guy on Alibaba who will sell me those for, like, 62 cents apiece.

04:46.580 --> 04:48.260
And so these things are ubiquitous.

04:48.260 --> 04:49.680
They're getting put in more and more things.

04:51.260 --> 04:57.180
And, at least in my opinion, granted, I've never actually programmed anything other than an ESP32.

04:57.500 --> 04:59.440
Sorry, STM32 fans.

05:00.040 --> 05:02.980
At least in my opinion, the tooling is good, or at least adequate.

05:04.020 --> 05:06.940
And with ESP tool, you can actually just read the flash.

05:06.940 --> 05:23.420
So assuming we're able to figure out how that serial UR is broken out, figure out the baud rate, all of that good stuff, you can just get the firmware, assuming no EPs have been burned in, is generally not the case, and we'll touch on that a bit in the conclusion.

05:23.440 --> 05:28.520
So we went ahead and bought one, and it showed up.

05:29.060 --> 05:34.640
And so, as you can see over there, that is, in fact, a serial UR that we have broken out there.

05:34.640 --> 05:42.500
So we've got the ground 3.3 volts RXTX reset, as well as boot.

05:42.500 --> 05:47.840
So the thing showed up, I took it apart, and I was very excited to see what I had found.

05:49.040 --> 05:51.800
And that's essentially when the trouble starts.

05:52.740 --> 06:09.420
So I don't have any of those fancy PC bytes, like probe out things, and so when it comes to me hooking up stuff to a circuit board, I'm usually just trying to solder stuff on there in the grossest way, because I'm not the world's best solderer.

06:10.940 --> 06:25.860
So essentially, solder up to TX RX ground, we don't need to supply 3.3 volts through this, because we can plug it in through the USB-C adapter at the bottom of it, which is how the device is normally charged.

06:27.320 --> 06:31.760
And that's good enough to get it turned on, and trying to start talking to it.

06:33.760 --> 06:42.900
And so I tried a lot of things, I had to figure out whether or not, is the RX that's printed on the board, is that its RX, or is that where I'm supposed to hook up my RX, like what's the baud rate.

06:43.660 --> 06:56.740
And I essentially manually fuzzed the thing for a while, it could never get it to talk to me, ended up actually writing up some Python code to try and automate that fuzzing, that unfortunately I didn't get very far with.

06:59.060 --> 07:10.300
And so eventually, I went back to the documentation and read that, and it's really amazing the kind of secrets that they hide away from you inside the documentation that's on the manufacturer's website.

07:10.980 --> 07:31.100
And so, essentially there's strapping pins on an ESP32, for those of you that might not be familiar with microcontrollers, that's essentially a kind of spell or incantation you have to do on the device using the GPIO pins, depending on what order you bring those to 3.3 volts or ground,

07:31.100 --> 07:35.780
is going to dictate essentially the mode that the MCU boots up into.

07:35.780 --> 07:50.880
And so, eventually I figured out that I need to supply power to the thing while holding the boot pin to ground, and then bring the reset to ground, and then put them both to floating.

07:51.080 --> 08:06.440
And with that, I'm able to get the stub from the ESP32 tool to load into the boot loader of the MCU, and then from that we're actually able to dump the firmware, using the command that I showed a couple slides back.

08:06.440 --> 08:11.480
So , once you've got the firmware, then we can start doing reverse engineering.

08:11.800 --> 08:13.620
Spoiler alert, I'm terrible at reverse engineering.

08:13.620 --> 08:15.200
I don't really get how Ghidra works.

08:15.760 --> 08:20.120
It's the thing I'm trying to get better at, but for right now it's essentially kind of magic to me.

08:20.120 --> 08:25.460
But, not understanding how a thing works has never stopped me from trying to, you know, fuck with that thing.

08:25.460 --> 08:34.920
So , essentially once you get the firmware from ESP32 tool, you need to parse that out into the various partitions.

08:34.920 --> 08:43.840
You need to take the partition that actually contains the code that you're interested in investigating, and you turn that into an ELF, and then once you've got your ELF file, you can load that into Ghidra for analysis.

08:43.840 --> 08:58.660
I think I'm also probably skipping a step that I forgot here, where because you're not looking at x86 stuff, you actually need to be able to tell Ghidra what the architecture of the chip and the code that you're looking at is using.

08:58.660 --> 09:00.700
And that way it can try and make sense of things.

09:01.060 --> 09:23.280
So , yeah, so we pop this into Ghidra, and one of the very nice things about Ghidra is that it'll actually show you kind of a code flow, and you can see here that kind of at the very beginning, one of the very first things the thing does at all when it boots is that we see that there's a loop that passes in a string of evo-era.

09:23.280 --> 09:25.900
Evo-era is actually the manufacturer of this toothbrush.

09:27.200 --> 09:31.340
And so that's a curious thing that kind of roused my suspicions.

09:33.220 --> 09:46.680
So then as I kept going, it turns out that there's another while loop passing in the string 1, 2, 3, 4, 5, 6, 7, 8, which if you've done Wi-Fi stuff for long enough, you recognize that 8 characters is the minimum amount of characters that you need in order to have a valid Wi-Fi password.

09:46.780 --> 09:54.040
And so we've got a while loop where we're doing some stuff with evo-era, and we're doing some stuff with 1, 2, 3, 4, 5, 6, 7, 8.

09:54.040 --> 10:00.300
If you really are scared of Geter, like I was, you can also just run strings against the binary.

10:00.420 --> 10:08.640
I don't know that this is actually a valid way to do reverse engineering, quite frankly, or I don't want to say invalid, but perhaps not time efficient.

10:08.920 --> 10:18.660
Because trying to figure out which of these strings is potentially a Wi-Fi network or password seems like you are going to be fuzzing for a very long time.

10:18.660 --> 10:37.140
So based on having gotten that evo-era string and the 1, 2, 3, 4, 5, 6, 7, 8 string, we've got a hypothesis that perhaps if we stand up our own Wi-Fi network with that SSID and that password, then maybe some stuff will happen.

10:37.880 --> 10:45.560
And so the way that I went about doing this was essentially to stand up a Raspberry Pi with two wireless networking cards.

10:45.680 --> 10:51.860
One of those is going to actually host the actual network that we intend the device to connect to.

10:51.860 --> 10:54.580
So that's the one that's going to be broadcasting the evo-era network.

10:54.580 --> 10:59.080
And then we've got another card that we're going to go ahead and throw into monitor mode and then pipe that into Wireshark.

11:00.440 --> 11:04.140
And that way we can monitor everything that's going on.

11:04.480 --> 11:08.980
A lot of different tools that are kind of around and available to set that up.

11:09.060 --> 11:16.600
I happen to be partial to RASP-AP because I'm too lazy to edit host APD manually.

11:16.600 --> 11:20.520
So we set that all up and we get to sniffing around.

11:20.520 --> 11:23.860
We turn the toothbrush on and we get them in 4K60.

11:23.860 --> 11:27.500
So that's probably... oh yeah, that is much too small for any of you to be able to see.

11:28.220 --> 11:30.360
It's much too small for even me to be able to see.

11:30.860 --> 11:35.580
But essentially, if you look real close, we can see that...

11:36.740 --> 11:44.680
not only does our device is beaconing for an evo-era network, but we can see that it connects to our network and then it actually makes several requests.

11:45.320 --> 11:51.360
All of which, if these were bigger, you'd be able to see that they're entirely in plain text.

11:52.100 --> 11:58.260
This device is making a whole bunch of API requests to the backend and they are all HTTP.

11:58.260 --> 11:59.920
Every single one of them.

12:03.200 --> 12:04.080
So what does it do?

12:04.080 --> 12:11.620
Essentially, it makes several calls to na-api.evo-era.com on port 80.

12:11.720 --> 12:14.160
And like I said, those are entirely plain text.

12:15.420 --> 12:27.500
And so every time one of these packets gets sent, as long as the toothbrush gets back data from the server that validates, then it'll go ahead and make the subsequent request.

12:27.880 --> 12:34.680
And so there's a back-and-forth, back-and-forth, and there's like four or five API requests and subsequent responses that happen.

12:34.720 --> 12:41.900
And then the thing that we're most particularly interested in is the second-to-last request...

12:41.900 --> 12:59.700
or, I'm sorry, the... eventually what ends up happening is the toothbrush responds back to the backend with its current firmware version, at which point the server evaluates whether or not it has a firmware version that's a higher version number than the version number that it was just communicated the toothbrush was running.

12:59.780 --> 13:15.220
If the server decides that there is, in fact, a more up-to-date firmware, then it can reply back to the toothbrush with a URL, again, over HTTP, where the toothbrush should download a new bin file from.

13:17.220 --> 13:19.180
So, a quick little update on...

13:19.180 --> 13:21.420
or info on ESP32 updates.

13:21.960 --> 13:27.440
Kind of one of the main selling points of these chips is that they almost all have some kind of connectivity.

13:28.360 --> 13:31.320
Almost always Wi-Fi, and I think everything has Bluetooth at this point.

13:31.880 --> 13:41.280
And so one of the very useful features of that connectivity is that we can actually load new code into the device wirelessly, so we don't need to flash everything through the Sudo UART.

13:42.800 --> 13:47.580
Espressif provides a lot of examples in both Arduino and their native IDF for these.

13:50.080 --> 13:54.620
There's a lot of different ways that they demonstrate being able to do this.

13:54.720 --> 14:12.260
You can download code from an S3 bucket, you can have the device itself actually stand up its own AP, and then you can connect to that and upload new firmware, or essentially you can do the same thing kind of opposite, where the ESP32 will connect to a network,

14:12.260 --> 14:15.500
and then a device can push firmware to it.

14:17.980 --> 14:28.400
So then for our Toothbrush RGE chain, what we need is to stand up a wireless network that has SSID of eVoera, and a password of 12345678.

14:28.400 --> 14:32.040
We also need to be running a Poison DNS server on that very same network.

14:32.040 --> 14:59.980
That way, when the Toothbrush makes a DNS request for that na-api.evoera.com, we can reply back with the IP address of our own web server, whereby we can essentially forge the requests, and send all those valid communications back and forth, and eventually serve that bin file that we'll also need to have a way of serving.

14:59.980 --> 15:06.360
So , there are libraries that do all these things for the ESP32.

15:06.680 --> 15:11.820
In fact, they're mostly all built into the actual framework that Espressif puts out.

15:11.820 --> 15:25.120
So , we need to host a network, we need to run a DNS server, we need to run a web server, host a file, and so we spoiler alert, or I suppose we're boating, just need to write our own code that runs on an ESP32 that does all of that.

15:27.060 --> 15:30.240
And so, as it turns out, most of this is actually, thankfully, pretty easy.

15:30.240 --> 15:31.620
Standing up a network, super easy.

15:31.620 --> 15:34.280
That's like one of the core competencies of an ESP32.

15:34.840 --> 15:36.700
Running a web server, again, same thing.

15:36.700 --> 15:39.040
That's like right in the wheelhouse of ESP32 stuff.

15:39.040 --> 15:40.500
Running a DNS server, same.

15:42.080 --> 15:50.300
Hosting a binary on a web server, like that's just a file on a web server, and, you know, we can run a web server on an ESP32, so we're looking great there.

15:51.420 --> 16:10.480
Unfortunately, making a binary that we host that is able, excuse me, making a binary that contains itself and is able to serve that version of itself to other devices as it turns out is kind of stupid hard.

16:11.380 --> 16:14.620
So, quick primer on ESP32 storage partitions.

16:14.780 --> 16:26.900
Most of these devices have around four megabytes worth of storage and how you allocate those, presuming that you have the ability to flash the device over its serial UART is largely left up to you.

16:27.900 --> 16:35.780
There's a graph over on the right that kind of goes over the various partitions that are available for you to use or not use at your leisure.

16:36.120 --> 16:41.320
So, OTA0 and OTA1, those are going to be both where you can store your actual sketch.

16:41.320 --> 16:53.800
The reasons why we have an OTA0 and an OTA1 is because when we're running our active code from one of those partitions and we want to update it, we need to have a place to store our updated code.

16:53.800 --> 17:12.060
So, essentially the process is that you would write your new code to the OTA partition that you're not running and then once you've validated that, you've actually gotten that firmware written to the storage, the new firmware that is essentially the device reboots and it knows to start running from the other partition.

17:13.300 --> 17:17.600
So, the toothbrush that we're looking at has four megabytes of total storage.

17:17.600 --> 17:21.820
That graph on the right is for a different device.

17:22.920 --> 17:24.620
It's an important thing to know.

17:24.980 --> 17:34.880
Being able to change your partition table is a thing that is generally only available for you to do if you are flashing the device over the serial UART.

17:34.920 --> 17:44.680
If you are doing an OTA update, the OTA update process in and of itself doesn't provide a mechanism through which you can change your partition table.

17:45.180 --> 17:54.660
If you want to change the partition table over OTA updates, what you end up having to do is essentially trample in an update.

17:54.660 --> 18:13.760
You would need to load code into the other OTA partition that you're not running from and then that code itself needs to modify the code that actually stores the partition table and then you would need to do another update where you could actually load code into the storage of your newly defined partition table.

18:15.820 --> 18:18.900
So now we get into a little bit of the challenge of self-referencing firmware.

18:19.800 --> 18:27.420
At least on the existing partition table of the device itself as it comes from the factory, there's no SPFs partition.

18:27.780 --> 18:43.620
Essentially what the SPFs partition is, is that's just essentially kind of more regularly formatted storage such that if you have a device and it's going to display a picture on its screen or whatever, you'd usually end up putting that picture in the SPFs partition.

18:49.840 --> 18:53.120
Essentially, in order to compile...

19:02.600 --> 19:11.200
There's no SPFs partition, so that means that we can't compile our worm and reference a bin file and the SPFs partition within it and then after compiling the worm, load it into the SPFs partition.

19:11.980 --> 19:33.920
Essentially, this sets up a terrible self-referential problem whereby our code needs to be able to reference the raw bytecode of its own compiled form which gets you into this terrible kind of nesting doll situation where our uncompiled code needs to have the exact copy of the compiled code in it and it's a chicken and egg problem.

19:34.500 --> 19:38.680
The way that I went about trying to solve this was very terrible, quite frankly, and very silly.

19:42.180 --> 19:47.100
I won't read to you the entire steps of my very heinous and harebrained tool scheme.

19:48.300 --> 20:05.300
The important part there is down in red at the bottom where essentially after compiling and then decompiling and then re-referencing and then re-compiling like 8 times eventually I was able to make my firmware that was able to reference a complete version of itself.

20:05.560 --> 20:22.820
The issue with this is the size of the final binary that gets compiled at that point has a ton of dead code inside of it and the final size of the sketch ends up being significantly larger than what we can flash on a normally partitioned ESP32C3 with 4MB of flash which is our intended starting vector to the toothbrush.

20:23.520 --> 20:30.860
We can change the size of the partition on our evil ESP32 it's like our initial infection vector.

20:35.900 --> 20:40.400
So we can control the partition table of the device that we have the ability to flash over serial.

20:40.540 --> 20:45.060
Our initial patient zero of the botnet if you will.

20:47.120 --> 21:11.020
And that'll work except that then essentially you end up trying to shove a 2.5MB worth of data into the OTA partition on the actual brush and that partition is only 1.9MB based on the partition table we got from dumping the original firmware and so unfortunately the update always fails because we're trying to put 2.5MB worth of data into a 1.9MB bag.

21:12.860 --> 21:18.360
Luckily there are many people on the internet and a lot of them are way smarter than I am.

21:18.500 --> 21:37.060
So big shout out to ATC1441 who after I was posting all the terrible things that I was trying to do with compiling my firmware like 7 times so that it could finally reference itself asked me why I wasn't just doing it the smart way and the answer is that I didn't know that there was a smart way.

21:37.060 --> 21:39.220
If I did I would have started that way.

21:40.820 --> 22:14.120
And so essentially what we can do here is if we go back to this one you can see that there's actually memory addresses on that chart and so essentially really all we've got to do is when it comes to serving our bin file we just reference starting at that pointer and then we chunk through at I think it's like 1024 bytes at a time and my little Russian nesting doll firmware experiment I think I got absolutely nowhere with getting that to actually work Tim yesterday .

22:14.120 --> 22:14.640
We did a lot of stuff together.

22:17.480 --> 22:20.940
And then ATC came along and told me how to do it for real.

22:21.400 --> 22:26.660
And I think I had my proof of concept working within 45 minutes.

22:26.660 --> 22:27.500
Thanks to Tim.

22:27.500 --> 22:37.020
So one of the key things here is that we need to reference the firmware from the partition that we're running.

22:44.120 --> 23:05.700
So essentially, every time you do an OTA update onto an ESP32, you're going to change the partition that the active sketch is being run from, and so if the device has been updated before, there's no real way to know definitively what, or rather, there's no way to know pre-run time what partition we're running from.

23:05.700 --> 23:22.620
Thankfully, the Arduino tool set, or rather the ESP32 tools for the Arduino core library includes some handy methods by which we can just ask it which one we're running on and then reference the memory address from there.

23:23.940 --> 23:33.880
Like I said, I had a really cool video to show you, but the Wi-Fi doesn't work here, which is probably partially my fault, well enough to actually be able to download that.

23:34.020 --> 23:40.620
But I do have the toothbrush up here if you want to come take a look on the infected toothbrush there.

23:41.940 --> 23:45.320
So now we have full RCE, we can run our own code on the toothbrush.

23:45.400 --> 23:49.980
I don't know if you can see, that's my little ransomware funny ha-ha photo.

23:51.340 --> 23:59.220
Quite frankly, it's very silly to try to make a toothbrush botnet for a couple of reasons.

23:59.280 --> 24:16.180
Mainly that the way that we're able to spread and infect subsequent toothbrushes is that we need to be running our own Wi-Fi network such that other devices will connect to it, and then we need to serve firmware to those devices, which means that at any point we're trying to attack other stuff on the internet.

24:16.600 --> 24:29.040
By definition, that means that we're not also attacking the things physically in the room with us, because we're just broadcasting our own network there as opposed to connecting to a network that's being broadcast to us.

24:30.420 --> 24:40.620
So once you have full RCE on the thing, it's not entirely that novel to write ESP32 code that'll make a HTTP GET request that could potentially be something malicious.

24:41.420 --> 24:43.480
But nevertheless, we write a POC anyways.

24:43.480 --> 24:46.840
And so essentially the code will go ahead and scan for open networks.

24:46.840 --> 24:50.300
If there's an open Wi-Fi network, it'll go ahead and connect to it.

24:50.300 --> 25:16.260
It'll then make a request to GitHub where I've set up a really terrible C2 with some JSON where you can define an IP address as well as a payload, at which point the ESP32 will download that information, send the payload to the target IP address, and then resume broadcasting the EvoEra network for...

25:16.840 --> 25:20.580
I want to say it's like a minute and a half, which will then...

25:20.580 --> 25:22.860
So you've got a minute and a half to...

25:23.780 --> 25:24.780
It's dark in here.

25:25.220 --> 25:39.420
Have a minute and a half to infect other brushes, at which point, if it doesn't find any brushes to infect, it'll go back to scanning for open Wi-Fi networks, and it'll scan for open Wi-Fi networks for a minute and a half, and essentially it just goes back and forth between scanning for Wi-Fi networks that it can connect to,

25:40.820 --> 25:44.120
as well as continuing to try to connect...

25:44.120 --> 25:48.060
or not connect to, but continuing to try to infect other devices.

25:49.860 --> 25:50.520
So, yeah.

25:51.360 --> 26:02.640
Community control here for battery-powered Wi-Fi devices is pretty terrible, so if you're aspiring botnet creator, I don't know that I would recommend battery-powered Wi-Fi devices.

26:02.640 --> 26:08.620
Like, hard-wired into mains voltage is probably the way that you actually want to go there.

26:10.140 --> 26:12.260
So to the conclusion, so...

26:12.260 --> 26:28.300
If you look at the App Store information on Google Play, there are definitely not 3 million of these brushes, or if there are, 3 million people bought these smart toothbrushes and then didn't bother to download the app to actually enable any of that technology.

26:28.300 --> 26:35.380
But there certainly are at least 3 million ESP32s out there in production, if not significantly more.

26:36.460 --> 26:52.220
These chips are used in extremely low-cost devices, and I don't want to besmirch the good name of Espressif, but I think essentially what ends up happening is that companies are out there, they're trying to get stuff to market as quickly and as cheaply as possible.

26:53.420 --> 26:55.660
ESP32s are a way to do that, but...

26:58.300 --> 27:12.220
At this point, it kind of feels like that if you're putting ESP32s into a real actual product that you intend to sell to the public, that I'm just going to assume that you've probably cut every possible corner, and that you went ahead and used, like you've already did,

27:12.220 --> 27:27.380
the HTTP methods to do the OT update, and didn't use the HTTPS one, which Espressif does provide one single example of, whereby you've got to do a whole bunch of stuff where you hard-code your own cert within your own sketch.

27:27.380 --> 27:37.120
And so, my suspicion is that essentially any product that has an ESP32 in it is probably vulnerable to something along the lines of what you saw here.

27:38.780 --> 27:54.000
So depending on the form factor of the chips that are being put into these new products, odds are better than good that the device will have to go through FCC certification, and as a part of that process, like I said earlier, companies have to send their devices into a lab,

27:54.000 --> 27:57.260
and have those devices be photographed.

27:57.360 --> 28:07.100
Those photos are included in their FCC report, and almost nobody bothers to redact any of the photos, which is a thing that the FCC will allow you to do, and no one actually bothers with.

28:07.540 --> 28:29.000
And so that leads me to my next project, where I'm currently working on a computer vision system that'll subscribe to the RSS feed that the FCC puts out of all of the new products that are going through certification, checks and sees if there are internal photos associated with whatever new product is going through certification,

28:29.000 --> 28:40.780
download those photos, and then automatically send me notifications if the computer vision system is able to determine that it thinks that there's an ESP32 on that board.

28:40.780 --> 28:47.200
So these chips are everywhere, they're ripe for abuse, and I heavily encourage you to go out there and find them.

28:48.220 --> 29:07.420
Just recently, I believe it was Bishop Fox put out some research where they ended up getting O'Day on every Traeger Wi-Fi grill they'd ever made, because their flaws weren't as low-hanging fruit as this, but weren't that complicated either.

29:07.420 --> 29:26.160
So I would encourage you to go forth and to find these chips and devices around your home, or hopefully you don't have them in your home yet, but buy them and play with them, because it's a lot of fun, and they are, like I said, very ripe for abuse, and you can make household objects do strange things,

29:26.160 --> 29:28.500
and your own bidding.

29:29.980 --> 29:31.780
And yeah, that's the end of the presentation.

29:31.780 --> 29:33.900
If anybody has any questions, I'd be happy to answer.

29:59.080 --> 30:09.180
Well, so I'm of the opinion that if there's two of these toothbrushes, like that meets my, I don't know, legal definition of botnet, like, is it a good botnet?

30:09.180 --> 30:13.040
Is it equivalent in power as the Mirai botnet?

30:13.040 --> 30:14.260
Like, absolutely not.

30:15.540 --> 30:30.540
But one of the things that I was trying to do with this, is I had a version of the firmware that was essentially doing port scanning, and I was like, oh, it would be funny if I could get my IP address to show up in gray noise, as like a port, oh, this person's doing port scanning from this IP address,

30:30.540 --> 30:38.380
whatever, but the speed that these things work at, like the connectivity, is god-awful.

30:38.600 --> 30:41.060
Like, the scalability of it is pretty bad.

30:41.120 --> 31:01.460
I suppose if you had some kind of real simple attack that you could do that would grant you access to whatever it was you were trying to hack, it could work, but between kind of how unreliable the connectivity is and the fact that they're battery-powered...

31:03.920 --> 31:07.860
I'm going to go ahead and say... I'd never say never, but I'm going to say no, probably not.

31:17.070 --> 31:18.150
What was that?

31:20.130 --> 31:24.890
Oh, so that's one of the more hilarious things about this product, is that it's a smart toothbrush.

31:24.890 --> 31:27.390
It is not a powered toothbrush.

31:27.930 --> 31:33.570
So like, I have like a Sonicare toothbrush, right, and you like hit the button, and then it like zzzz, and you like brush your teeth with it.

31:33.590 --> 31:35.450
This thing doesn't go zzzz.

31:36.690 --> 31:39.150
So yeah, no, I don't get it either.

31:39.270 --> 31:52.510
So like the entire selling point is that there's a load cell that's connected between the head of the brush and the body of it, and then like a nine degree of freedom IMU inside.

31:52.650 --> 32:05.510
And so every time you finish brushing your teeth, it'll send information about like where you were brushing and how hard you were brushing to the Alibaba cloud, which is where all of their backend infrastructure is running out of.

32:05.550 --> 32:13.630
And then the app on your phone connects to the Alibaba cloud to retrieve that like brush health...

32:14.350 --> 32:19.570
I don't know, they give you a bunch of weird metrics that no dentist that I've ever been to has ever asked me about.

32:19.570 --> 32:26.510
So again, it's a product that I am apparently not in the target market for, for at least its intended use.

32:39.100 --> 32:41.580
So I think I saw one person has a toothbrush.

32:41.580 --> 32:49.540
If you also have a toothbrush, you can come up, and if you set it next to mine, we can see if we can really make a...

32:49.540 --> 32:53.760
we'll have two toothbrushes meeting my legal definition of a botnet.

32:54.680 --> 33:07.200
I will say though, I am massively skeptical of being able to see it actually work just based on how absolutely malicious the RF environment is in here right now.

33:10.340 --> 33:25.220
So yeah, so we got the Bluetooth logo right now, and then if it'll find it, the Bluetooth logo should switch to the Wi-Fi logo, and then you'll see that there's going to be progress bar loads for the bin file to be transferred.

33:26.620 --> 33:38.340
If you want to just like keep mine next to yours for as long as you want to hang out in the village, and like hopefully maybe it'll work, my hopes are unfortunately not all that high.

33:39.520 --> 33:40.560
Okay, cool.

33:41.420 --> 33:42.000
Yeah.

33:52.920 --> 33:54.180
I mean, yeah, absolutely, right?

33:58.300 --> 34:12.220
You're not going to convince me that these are going to make a great botnet, but as far as bringing a device into an area, I don't know, I've never worked in a SCIF, but I get that they exist and that they're supposed to be secure.

34:12.220 --> 34:17.460
How many SCIF managers know that they need to be checking for people?

34:17.620 --> 34:22.400
It seems weird to me to bring a toothbrush into the SCIF in the first place, so that's suspicious all on its own, I think.

34:22.440 --> 34:37.200
But I can certainly imagine environments like, I don't know, federal correctional facilities or something, I don't know, where you may not assume that, one, a toothbrush would even have Wi-Fi, let alone be out there purposely doing malicious things.

34:37.200 --> 34:56.960
I think being able to hide Wi-Fi stuff into objects that you wouldn't expect it to have, that you wouldn't expect it to have Wi-Fi, is certainly an interesting thing and it touches on some of the other projects I've been working on where, like, I don't know if you all saw where,

34:56.960 --> 35:03.700
whatever the, I think it was the Chinese version of the NSA, it was like hot gluing ESP32s into power strips and stuff.

35:04.560 --> 35:11.020
So yeah, anytime you can get a Wi-Fi radio in a place where people wouldn't expect it, I think that's certainly ripe for abuse.

35:20.940 --> 35:25.620
All right, well, if nobody has any questions, nobody else has any other questions, I think we'll call it.

35:25.620 --> 35:27.500
Thanks for coming to the talk.

