[00:00.000 --> 00:00.560] Awesome. [00:00.880 --> 00:03.520] So, everything seems to work. [00:04.820 --> 00:06.740] So, why am I here? [00:07.760 --> 00:13.560] I'm basically going to be talking about the story of my IoT device. [00:13.860 --> 00:15.660] It has two threads in it. [00:15.820 --> 00:21.640] Basically, the first one is how I got my first IoT device. [00:21.900 --> 00:22.820] It's a button. [00:23.060 --> 00:26.740] I will definitely show you a lot about it. [00:26.740 --> 00:51.300] But the second and, I think, more important thread here is what you guys can do once you get your own IoT devices, if you already have them, to say, basically, safe, secure, to understand what threats does it bring to your home, and to do all of this cost-effectively. [00:51.300 --> 01:01.160] So, you don't want to spend your time reverse engineering some weird CPU, or maybe... I mean, it might be your day job, but you don't want to bring it home. [01:01.400 --> 01:13.160] You want to do some simple things that will then have a great... a big impact, and you will be able to live with whatever new device you bring. [01:17.120 --> 01:18.080] So, okay. [01:18.280 --> 01:23.040] So, the agenda is... I'm basically going to be talking about four parts. [01:24.400 --> 01:27.020] What do you do before you purchase your device? [01:28.140 --> 01:32.800] What do you do once you have it with the application? [01:32.800 --> 01:37.460] Because most of the devices come with some kind of iOS or Android application. [01:38.700 --> 01:53.700] what can you do to the device itself, understand what's running on it, what electronics it contains, whether it contains things you didn't expect it to, and, of course, they always talk to some remote server, usually in China. [01:53.940 --> 02:01.480] So, what you can do to, you know, protect whatever it is that the device is collecting on you. [02:02.300 --> 02:10.600] So, who here has an IoT device already, okay, and who's planning to have one within, like, the next five years? [02:11.960 --> 02:17.600] Everyone's hand should be up right now, because there's no way you will buy... [02:17.600 --> 02:21.880] Like, there are some electronics that you can basically not buy that aren't smart anymore. [02:22.040 --> 02:25.780] Like, TVs, I think there's no more dumb TVs. [02:28.160 --> 02:31.280] And, basically, everything is going to become... [02:31.480 --> 02:31.840] IOT. [02:32.140 --> 02:32.640] Why? [02:32.900 --> 02:36.020] I guess because that's how the world works, right? [02:36.260 --> 02:38.960] But, we don't have control over it anymore. [02:39.260 --> 02:49.540] Like, we can't stop it, and it's better to embrace it than to hope that, you know, it will go away, because it's not going away. [02:51.140 --> 02:57.920] So, I mean, I'd really love to hear later, in the question phase, how you guys have been protecting yourself. [02:59.340 --> 03:02.020] But, for me, it all started with a problem. [03:03.520 --> 03:08.100] I have this habit, once in a while, I think, what can I automate? [03:08.420 --> 03:12.180] Like, for example, how can I make my life easier? [03:12.420 --> 03:21.280] And, I started a new job, I started biking to the new job, and when I got home, I had to wait, like, 30 minutes before I had hot water. [03:21.280 --> 03:28.120] So, I mean, it's really a big problem, I know, life and death even. [03:28.840 --> 03:34.200] But, it was the first thing that popped out as something easy to automate, right? [03:34.420 --> 03:41.160] I mean, you can, basically, you can, there are so many ways to solve this. [03:41.160 --> 03:48.960] And, the two main things I found in Israel is, first, there's only one actual device that will work. [03:49.120 --> 03:52.620] There are, like, two models, but one of them was sold out. [03:52.880 --> 03:54.840] And, of course, you can do it DIY. [03:55.520 --> 04:00.180] This is actually a friend of mine, and his girlfriend got electrocuted by that. [04:02.860 --> 04:04.960] And, he swears by it, by the way. [04:06.400 --> 04:09.180] So, as you can see, this is the DIY route. [04:09.420 --> 04:13.820] And, I'm sure it will, it's like, it works for him, but it took a lot of time. [04:14.040 --> 04:16.460] And, he really likes to tinker with things like that. [04:16.620 --> 04:19.560] I thought, I don't have any time, I'll spend some money. [04:20.000 --> 04:22.840] So, I bought this cool device. [04:24.380 --> 04:26.560] You will see a GIF of it soon. [04:28.240 --> 04:30.720] So, that was the only option I had, right? [04:30.860 --> 04:34.120] If I didn't want to elect, buy an electrocution device. [04:35.560 --> 04:40.680] It's an Israeli company that sells it, called SmartGrade. [04:41.020 --> 04:43.740] But, the device is obviously not built in Israel. [04:43.920 --> 04:46.360] It's actually built by a company called Broadlink. [04:46.640 --> 04:51.220] You can see signs of it everywhere, in their site, in the app that you download. [04:54.600 --> 05:05.540] It's a different form factor of all of Broadlink's devices, which are just like a very popular manufacturer of smart devices. [05:05.800 --> 05:08.380] They have different devices that they sell. [05:08.600 --> 05:14.940] And, apparently, they created a device for the Israeli market that is that thing. [05:14.940 --> 05:19.240] I didn't see any documentation about it from anywhere outside of Israel. [05:19.940 --> 05:22.520] Which, I mean, it was fun. [05:22.680 --> 05:25.560] But, it's also similar to a lot of other devices they manufacture. [05:26.920 --> 05:32.300] And, this is how the unpacking goes. [05:33.980 --> 05:38.160] And, basically, what you have here is a button. [05:38.160 --> 05:41.080] It's a glorified button with a few LEDs. [05:41.520 --> 05:44.600] It has an actual electromagnetic relay. [05:45.180 --> 05:50.760] So, each time you press it on or off, you can hear a satisfying click, which is very fun. [05:52.400 --> 05:56.200] And, it has an annoying LED that's always on. [05:56.840 --> 06:00.360] And, it gives my house a ghostly feeling. [06:01.680 --> 06:05.540] And, the fun part is controlled by an application, of course. [06:05.880 --> 06:07.980] The application is called eSmart Home. [06:08.280 --> 06:13.600] It is made by Broadlink, but the name of the application is com.broadlink.neutralapp. [06:13.980 --> 06:15.360] So, why is it Neutralapp? [06:15.460 --> 06:19.140] Because, apparently, it's their white label application. [06:19.140 --> 06:22.400] So, that's what they give companies like SmartGrade. [06:22.600 --> 06:24.840] And, you get the little QR code. [06:25.040 --> 06:27.120] And, then, it downloads the logos of the company. [06:27.300 --> 06:29.980] And, then, puts it on the actual application. [06:30.380 --> 06:33.400] So, apparently, I had a very white label experience. [06:33.980 --> 06:34.340] No. [06:34.740 --> 06:35.940] It was very obvious. [06:35.940 --> 06:36.700] It's Chinese. [06:37.100 --> 06:40.040] Like, everything was in broken English, of course. [06:40.260 --> 06:41.980] And, not that I'm maligning it. [06:42.120 --> 06:44.640] It's, well, I'm going to malign it. [06:46.500 --> 06:49.580] So, this is basically what it's supposed to do. [06:49.720 --> 06:52.920] This is the old button I had. [06:53.120 --> 06:55.000] I replaced it with the new button. [06:56.300 --> 06:58.160] That's just how you set it up. [06:58.400 --> 07:00.240] It takes AC. [07:01.800 --> 07:05.620] And, you basically put it in a hole in my wall, and it works. [07:06.760 --> 07:10.500] So, what can you do before you purchase your own device? [07:10.500 --> 07:13.520] First, do your research, right? [07:13.700 --> 07:16.420] You want to buy a device that's pretty popular. [07:16.600 --> 07:25.440] You want to make sure that, if you can search for how hackable it is, how documented it is, whether other people already reverse engineered it. [07:25.940 --> 07:29.500] Hopefully, your market doesn't have only one device of that kind. [07:31.140 --> 07:38.160] And, you want to see, if the case is there's only one device of that kind, how many devices are in the family. [07:38.160 --> 07:42.700] So, the Broadlink family has a lot of devices, and it comes into play in a bit. [07:43.020 --> 07:45.900] And, of course, think about what risks it exposes you. [07:46.000 --> 07:50.100] Like, what personal information can the device collect on you? [07:53.320 --> 07:55.360] So, this is the Android app. [07:56.920 --> 08:00.720] As you can see, it asks for all of Android's permissions. [08:01.080 --> 08:01.820] All of them. [08:03.640 --> 08:05.300] The weird ones were contacts. [08:05.960 --> 08:12.640] Because, I mean, of course, I want to share my water status with all my friends. [08:14.720 --> 08:18.220] Mic and camera, which, I mean, is pretty self-explanatory. [08:19.000 --> 08:21.160] Modify system settings, of course, but reorder. [08:21.540 --> 08:23.540] Other apps, I have no idea what that means. [08:23.540 --> 08:25.420] Like, what can it reorder? [08:25.760 --> 08:27.600] It seems very sketchy, right? [08:28.360 --> 08:31.940] So, I mean, is it really malicious? [08:32.600 --> 08:34.100] I mean, probably not. [08:34.460 --> 08:35.800] It's probably not malicious. [08:36.080 --> 08:39.520] But, once again, it's like, we'll see in a bit. [08:39.640 --> 08:45.060] It contains, like, SDKs of every Chinese popular site. [08:45.060 --> 08:48.620] Like, map SDKs and WeChat SDKs and things like that. [08:49.460 --> 08:55.620] But, the fact that it asks for all the permissions, it opens you up to a lot of attacks. [08:55.800 --> 08:58.520] For example, if an update, a malicious update occurs. [08:59.960 --> 09:08.700] Or, if there is indeed a vulnerability and the app can be used to have, basically, a permission elevation attack. [09:09.440 --> 09:12.420] But, of course, I still wanted to use my new toy. [09:12.940 --> 09:15.540] So, I don't want to install the Chinese app, obviously. [09:15.840 --> 09:19.520] So, I just carried a tablet with me. [09:19.660 --> 09:23.760] An old tablet, which only had the app with, like, a fake new Gmail account. [09:25.320 --> 09:26.680] That wasn't convenient. [09:27.440 --> 09:29.180] So, let's dig deeper. [09:29.320 --> 09:32.280] Let's see what we can actually do. [09:32.740 --> 09:35.500] So, of course, you can decompile the app. [09:35.500 --> 09:36.560] It's pretty easy. [09:36.720 --> 09:39.900] There are even online services that do it, at least for Android. [09:39.900 --> 09:42.400] iOS is a different story. [09:46.180 --> 09:48.480] So, decompiling it worked. [09:48.720 --> 09:53.620] I found out there's, like, 13,000 files and 300 lines of Java code. [09:53.760 --> 09:55.420] That's not super helpful. [09:55.420 --> 10:02.460] But the actual code relating to my device, I could start to understand it. [10:02.620 --> 10:07.540] And I could see how, you know, the main flows work. [10:09.520 --> 10:15.700] But, and basically, I mean, once again, the app itself included a ton of different SDKs. [10:15.820 --> 10:18.640] Other vendors, code that they support. [10:20.140 --> 10:22.680] Obviously, more code means more vulnerabilities. [10:23.240 --> 10:30.500] That tens of SDKs of Chinese companies that do, you know, basically everything that Google does. [10:30.820 --> 10:35.960] Docs, maps, text, text translations, things like that. [10:36.100 --> 10:39.080] I have no idea, like, what device will need maps. [10:39.080 --> 10:42.520] But I guess maybe I'm not imaginative enough. [10:44.080 --> 10:46.200] The actual control code was obfuscated. [10:46.320 --> 10:53.240] But, of course, I mean, if you're bored enough, you can start on obfuscating and renaming the functions and everything. [10:53.580 --> 10:59.460] But it really gets annoying, especially when you try to reverse engineer something as huge as this. [11:00.080 --> 11:04.560] And so, I mean, at this point, I started maybe Googling a bit more. [11:04.800 --> 11:08.740] And apparently, the device family is indeed popular. [11:09.000 --> 11:17.100] So, while this device itself doesn't have anything on the Internet, like, it doesn't, outside of Israeli sales sites that sell it, it doesn't exist. [11:17.400 --> 11:25.140] But the communication APIs of Broadlink devices, the company that manufactures it, were reverse engineered. [11:25.140 --> 11:30.720] There's even a Python library, so that made life really easy. [11:31.720 --> 11:36.440] But because of the way this device works, it's a bit different than actual Broadlink devices. [11:36.520 --> 11:37.780] I have no idea why, by the way. [11:37.840 --> 11:38.720] We'll see it in a bit. [11:39.460 --> 11:43.100] I still had to use the app to activate the device. [11:43.360 --> 11:48.380] And then I could control it with the Python library, which is, like, three lines of code. [11:48.500 --> 11:50.640] You basically input the library. [11:50.640 --> 11:59.840] You initialize the SP2 device, which is just, like, the name of a device similar to this one, which the Internet actually knows about. [12:00.380 --> 12:07.280] You authenticate, which sends a token, and then you set power on or off. [12:08.180 --> 12:10.320] I could get rid of the tablet. [12:10.660 --> 12:13.040] I set up a simple web server. [12:14.040 --> 12:21.560] I opened up a port on my router that forwarded it to my computer, which is silly and don't do that. [12:21.780 --> 12:23.580] But sometimes you must do that. [12:24.080 --> 12:32.400] I used a random URL because I didn't want random Internet crawlers to turn my water heater on or off. [12:32.400 --> 12:46.440] It's actually, like, once you put something on the Internet, you know that, like, after two minutes, you start getting weird crawlers trying to understand if it's WordPress or some other popular site that it can hack. [12:46.700 --> 12:50.820] So that was fun, seeing all those people trying to crawl me. [12:52.100 --> 12:58.580] And then, basically, I could throw the tablet away and hope my ISP doesn't change my IP. [12:58.580 --> 13:00.820] There are ways around that, too. [13:01.120 --> 13:03.140] There's a dynamic DNS, DIN DNS. [13:03.600 --> 13:05.360] There's other things you can do. [13:05.580 --> 13:09.740] You can constantly update your IP. [13:10.060 --> 13:14.500] But, I mean, I wanted something simple, and they still didn't change my IP. [13:16.240 --> 13:17.760] So what can you do? [13:17.880 --> 13:20.620] First of all, Google the hell out of whatever you're buying. [13:21.040 --> 13:24.960] A guy that I met yesterday told me that he could actually re... [13:26.100 --> 13:31.420] the device that he bought had a CPU that he could refresh. [13:31.620 --> 13:35.240] And there was already, like, an open firmware that you could use. [13:35.440 --> 13:40.100] So that really makes life easier, because you'll see what I needed to do. [13:40.960 --> 13:42.080] Use keywords. [13:42.720 --> 13:45.640] Use Google Translate for Russian and Chinese sites. [13:45.920 --> 13:50.020] So this is a guy who basically rewrote the broadly application. [13:50.500 --> 13:51.820] Like, he reverse engineered it. [13:51.820 --> 13:53.980] He wrote a new application, a Russian guy. [13:54.220 --> 13:55.940] That was very helpful. [13:57.320 --> 13:58.680] And it actually works. [13:58.680 --> 14:00.260] I have no idea how, by the way. [14:00.420 --> 14:04.020] Like, I still haven't started reverse engineering that. [14:04.240 --> 14:07.200] But, I mean, I don't need to, because I found something better. [14:08.360 --> 14:09.400] What else can you do? [14:09.440 --> 14:10.500] You can use an old device. [14:10.640 --> 14:14.460] You could use a sandbox or an emulator, like Bluestacks. [14:14.520 --> 14:17.100] It's an Android emulator that works pretty well. [14:17.240 --> 14:19.760] In this case, both didn't work. [14:19.760 --> 14:21.440] Well, an old device did work. [14:22.240 --> 14:25.580] You can find and reverse engineer your API yourself. [14:25.760 --> 14:26.620] It's not that hard. [14:26.840 --> 14:30.380] Like, reverse engineering is something that takes a lot of patience. [14:30.820 --> 14:33.140] And some people are better at it than others. [14:33.420 --> 14:35.360] But you will eventually get somewhere. [14:35.560 --> 14:42.440] Like, just follow code and do, like, finding files, and you will get something. [14:44.680 --> 14:51.480] And, of course, once you get an API or you can change the application, you can also customize the device. [14:51.600 --> 15:04.600] For example, I guess, because no one thought this specific firmware is going to be used for a water heater, no one thought about turning it off after 30 minutes when the water is already hot. [15:04.600 --> 15:07.600] And I have a habit of forgetting it on for the whole day. [15:07.860 --> 15:13.740] So I could just write a simple daemon that checks if it's on and saves a timestamp. [15:13.740 --> 15:17.160] And if it's on for more than 30 minutes, just turns it off. [15:18.160 --> 15:28.080] And a lot of those devices basically come with the basic set of commands or things that whoever designed it thought of. [15:28.440 --> 15:34.980] And they usually don't complement whatever your lifestyle is, whatever your use of the device is. [15:35.200 --> 15:43.760] So having an API, having a way to control it outside of the app, really opens you up to customizing it and making it your own. [15:44.880 --> 15:46.020] What else can you do? [15:46.020 --> 15:48.120] You can check what the app is communicating with. [15:48.600 --> 15:52.100] There are things like Wireshark, which is a network sniffer. [15:53.560 --> 15:55.460] BurpSuit, which I'll talk about in a second. [15:56.400 --> 16:05.620] OpenVPN, basically a tunnel, all the communication from your device through a computer that you can use to sniff the communication better. [16:05.960 --> 16:13.740] And Kismet, which is a Wi-Fi sniffer, basically sniffs random, like all Wi-Fi traffic. [16:13.740 --> 16:17.360] So these devices are usually Wi-Fi enabled. [16:17.540 --> 16:20.980] There are also sniffers for Bluetooth, like people mentioned before. [16:22.240 --> 16:29.400] Decompile the Android app again, J-A-D-X, the compiler, and you can also get... [16:31.280 --> 16:37.860] You can try following the main paths, the buttons, like the on button, see where that goes. [16:39.220 --> 16:41.940] URLs, we'll see how that turned out. [16:42.160 --> 16:47.620] And logs, and use the strings and grep, which are very simple and very fun. [16:48.580 --> 16:54.660] BurpSuit gets a special mention because it actually worked and helped me find some cool things. [16:54.660 --> 16:56.820] It's an HTTP, HTTPS proxy. [16:58.420 --> 17:04.180] You can watch the traffic, your devices, the APIs it calls. [17:04.480 --> 17:14.920] It's very useful to play with it for REST APIs, which usually these devices try at least to, like they communicate with basic JSON and stuff like that. [17:15.100 --> 17:16.360] It can do HTTPS. [17:16.810 --> 17:32.480] If you install the certificate, the Burp certificate into your device, it can basically, man in the middle, the SSL, and you can see even if the device is using safe and encrypted URLs. [17:33.320 --> 17:36.950] This device wasn't, it's so, I mean... [17:37.840 --> 17:40.600] Okay, let's talk about the device itself. [17:42.580 --> 17:48.160] Basically, I decided to see really what it communicates with, so I opened it up. [17:48.940 --> 17:57.500] I realized that it phones home because the app has a feature where you can see the on and off state history. [17:57.820 --> 18:02.800] And even if I manually pressed it on or off without the app, it's still new. [18:02.800 --> 18:14.080] So I started suspecting that something's not quite right and that the device is doing stuff that, well, maybe I don't want it to do, like talk with some remote server. [18:15.420 --> 18:18.080] And so I thought, hey, what else can it be doing? [18:18.220 --> 18:20.020] Like, does it have like a camera somewhere? [18:20.220 --> 18:20.600] I don't know. [18:20.900 --> 18:23.460] Let's be paranoid about it and actually check. [18:24.820 --> 18:32.340] So, I mean, once you open it, you can see it's a Wi-Fi chip from a company called MediaTek. [18:32.420 --> 18:33.420] They're super popular. [18:33.940 --> 18:35.180] There's a flash memory. [18:35.180 --> 18:37.740] There's the electromagnetic relay button thing. [18:38.400 --> 18:41.340] The user interface is two buttons and a LED. [18:42.000 --> 18:43.060] That's about it. [18:43.220 --> 18:49.740] Like some random other electronics, but nothing suspicious, like no microphone or camera. [18:49.740 --> 18:51.840] I was really hoping to find something like that. [18:52.000 --> 18:53.340] That would have made this talk awesome. [18:55.820 --> 18:56.320] Okay. [18:56.560 --> 19:00.240] So then I thought, okay, let me get the firmware, the code running on the device itself. [19:00.400 --> 19:01.940] This is usually more tricky. [19:02.540 --> 19:04.800] It wasn't as easy as I expected. [19:05.500 --> 19:07.860] We have a flash reader at work. [19:11.500 --> 19:22.080] I used it, but the first device we got, like the first device I brought for test that wasn't actually in my home, someone pressed erase instead of read. [19:24.000 --> 19:26.640] And well, we had to buy like two more. [19:27.720 --> 19:29.240] And of course the two here. [19:31.020 --> 19:40.080] So the MediaTek chip uses some system of a chip that we couldn't find an instruction set to. [19:40.080 --> 19:45.640] There was like some random presentation from a Taiwanese university with some of the instructions. [19:46.220 --> 19:51.160] But reversing it is annoying and well beyond like what I wanted to do. [19:51.540 --> 19:53.540] That's like hard stuff. [19:54.240 --> 19:55.800] But strings still work. [19:56.080 --> 19:57.260] Strings is very useful. [19:57.580 --> 20:01.260] So first of all, you can see all the embedded access point names. [20:01.540 --> 20:05.940] This device is supposed to open an access point that you connect to. [20:06.680 --> 20:09.680] And then you set it up. [20:09.940 --> 20:12.340] But that's not how it works. [20:12.560 --> 20:16.020] So I still am not sure how the app itself is doing it. [20:16.140 --> 20:17.440] Probably broadcasting it. [20:18.940 --> 20:20.900] You can see all the password, of course. [20:21.080 --> 20:25.020] The server URLs, which are main.broadlink and backup. [20:25.520 --> 20:26.660] They have backups. [20:26.840 --> 20:27.220] That's good. [20:28.640 --> 20:33.440] And just notable that the system of a chip uses something called micro IP. [20:33.440 --> 20:36.920] It's a network stack, which has like one known vulnerability. [20:37.480 --> 20:41.440] And it's really restricted. [20:41.440 --> 20:43.620] But once again, the chip itself is very restricted. [20:45.440 --> 20:48.280] So at this point, I wanted to start playing with the device. [20:48.280 --> 20:52.740] But once it's open, it's not a good idea to connect it to AC anymore. [20:53.630 --> 20:59.340] But thankfully, they left the VCC and ground points that I could solder to a USB. [21:00.400 --> 21:05.100] So now I have a USB connector device. [21:06.060 --> 21:09.300] And so that was pretty easy. [21:09.600 --> 21:12.880] It could have been harder if they didn't just mark it. [21:13.120 --> 21:18.320] And of course, it's not really sending any data to the USB. [21:18.320 --> 21:19.880] It just powers it. [21:20.080 --> 21:22.300] But still, it makes it easier to work with. [21:22.400 --> 21:24.280] I'm not going to get electrocuted by it. [21:25.820 --> 21:28.460] Those are the points there. [21:28.800 --> 21:29.580] Super easy. [21:31.180 --> 21:35.200] Also, I switched the LEDs from blue to red, just because I could. [21:39.740 --> 21:42.120] So what can you do about the device itself? [21:42.840 --> 21:48.800] First of all, you should open it up and see that there's nothing there that you didn't expect. [21:49.400 --> 21:54.420] You can usually recognize the components just by Googling whatever is on them. [21:55.020 --> 21:59.740] You can look up data sheets if you want to do something more advanced. [22:00.280 --> 22:07.880] You can make life easier by finding ways to connect it to your computer easier, and maybe re-flash in it. [22:08.400 --> 22:10.000] You can customize it. [22:10.880 --> 22:19.420] So for firmware, you can usually find the firmware online or maybe check where the app usually initiates updates. [22:20.420 --> 22:23.540] Maybe the device itself, but you can find that by sniffing. [22:23.760 --> 22:33.860] You can try reading the firmware from the device, but you'll need some flash reader that's something not everyone has. [22:34.120 --> 22:42.760] So maybe hackerspace, or you can make your own using a Raspberry Pi or something. [22:42.940 --> 22:45.180] There are a ton of tutorials online. [22:46.040 --> 22:48.760] You can hex edit the firmware and write it back. [22:49.780 --> 22:58.340] That's like the next thing I want to do, see if replacing the URLs from Broadlink forces it to stop sending information. [22:58.940 --> 23:06.920] And of course, you can find a hardware development kit, which MediaTek has, and see if you can compile your own hardware. [23:07.220 --> 23:17.900] That's going to be way harder because once the device is actually in production, the... so they usually have it set. [23:18.140 --> 23:24.260] And this one, for example, the chip itself has some memory with some code that, I mean, it's hard to get. [23:24.360 --> 23:29.600] And there's also an external flash drive, which was easier to get, but still. [23:30.420 --> 23:33.060] And of course, use your software, right? [23:33.340 --> 23:39.940] And like, so that's the read and the erase buttons are so close together that we just, I mean... [23:44.410 --> 23:45.110] Cool. [23:45.530 --> 23:49.270] So I still had the problem of something is saved remotely. [23:51.310 --> 23:54.750] Like, trying to reverse the firmware didn't really help. [23:56.710 --> 23:59.530] And Wireshark also didn't really help. [23:59.770 --> 24:05.910] So now I just grabbed for all the URLs in the application itself. [24:06.310 --> 24:08.610] And oh wow, I was surprised. [24:08.610 --> 24:12.150] So there's a file called apiurls.java. [24:12.370 --> 24:14.310] It has like 71 URLs. [24:14.550 --> 24:18.010] Only 28 are HTTPS, because I mean, why bother? [24:20.370 --> 24:22.930] 55 of them were Broadlink APIs. [24:22.990 --> 24:32.310] And the rest were, like I said, just APIs of every company that Alibaba, QQ, Weibo... [24:32.950 --> 24:35.810] No other companies, by the way, only Chinese companies. [24:35.810 --> 24:39.390] I don't know why they're discriminating against Google or something. [24:39.710 --> 24:46.590] And of course, calling these APIs gives you fun errors, like the Chinese JSON. [24:48.630 --> 24:53.670] And the API itself that interested me was, of course, the history API. [24:54.370 --> 24:59.890] It wanted the token, which was really, really spoiled the fun there. [25:00.550 --> 25:09.870] So I could either read and like read 300 lines of the compilation of how it created the token. [25:10.170 --> 25:15.770] Or I could use burp to find the token and send it. [25:16.190 --> 25:17.670] And that worked. [25:18.670 --> 25:22.330] Basically, I could use the token for like a minute until it expired. [25:22.470 --> 25:24.690] Or maybe five minutes until it expired. [25:24.850 --> 25:28.630] And I had to proxy the app again and find the token. [25:29.310 --> 25:30.990] So that was pretty convenient. [25:31.930 --> 25:37.070] And I could see that it actually only returned my history. [25:37.270 --> 25:40.050] So nothing too malicious, I guess. [25:40.050 --> 25:43.990] I mean, it depends on your definition of malicious. [25:44.790 --> 25:49.450] And a totally open source OSINT look at the server. [25:49.630 --> 25:55.170] First of all, it's running an ancient Nginx version with a lot of known CVs. [25:56.050 --> 26:00.030] There is a valid HTTPS cert, which is not being used. [26:00.210 --> 26:06.070] I mean, why bother having an HTTPS cert and then not use it in the application? [26:06.070 --> 26:08.650] Maybe it's for newer versions. [26:09.330 --> 26:16.130] They left the Nginx welcome page at the root of the URL to welcome you to their site. [26:17.790 --> 26:19.970] And of course, I'm not doing anything else. [26:20.790 --> 26:22.650] So is this anticlimactic? [26:22.910 --> 26:23.890] Well, it depends. [26:24.190 --> 26:28.430] I mean, it's good to know that only my history is saved. [26:29.450 --> 26:34.870] I can decide whether I'm okay with it and whether I want it to be saved. [26:34.870 --> 26:37.250] And I know the extent of what is collected. [26:37.570 --> 26:39.190] And of course, I wasn't okay with it. [26:39.370 --> 26:46.670] So I just blocked all of the device's communication with the outside world through the router, through parental controls. [26:47.670 --> 26:54.570] And now, basically, I had my server in my network that can talk to it and turn it on or off. [26:54.930 --> 26:57.990] And no one knew about it, of course. [26:58.370 --> 27:01.370] So I felt very, very proud of myself. [27:02.070 --> 27:02.970] So what can you do? [27:03.990 --> 27:07.270] Well, the easiest thing is just block everything, right? [27:07.450 --> 27:08.950] That's a very good default. [27:09.570 --> 27:12.130] Sometimes you do want some features. [27:12.550 --> 27:22.370] Maybe you want to connect it with remote servers without having to proxy to your own your own web server or your own service. [27:23.110 --> 27:32.610] But you should at least be aware of what it's sending and be sure that it's okay with you. [27:33.050 --> 27:37.410] You could use parental controls, which I think most modern routers have. [27:37.930 --> 27:46.170] You could put the device in the guest network if you don't want it used as a spearhead to hack other computers in your network. [27:47.990 --> 28:00.110] And, of course, you can run your own DNS server and try to see whether you can move the communication the device tries to do with the remote server to your own. [28:00.110 --> 28:06.790] The fun thing was that I couldn't actually resolve broadlink.com main and backup. [28:06.790 --> 28:09.450] So I guess it might be using its own DNS. [28:10.390 --> 28:12.250] Still stuff to research. [28:12.910 --> 28:27.530] There's the 3DAM router solution, which basically says put the IoT devices in one network with a router and then all your other nice devices in another, and then have both of them [28:30.690 --> 28:35.610] connect to another router that connects to the Internet, so there's no way for any crosstalk. [28:36.850 --> 28:38.450] That's another good solution. [28:40.010 --> 28:41.250] Some final thoughts. [28:41.410 --> 28:46.090] First of all, clients or devices that you own are always hackable. [28:46.230 --> 28:49.650] It's like a maxim in iOS and Android development. [28:50.350 --> 28:56.170] The device, the application, whatever, whenever it's not on your server, it's hackable. [28:56.170 --> 29:00.170] When it's on your server, it's harder, but still hackable, of course. [29:01.830 --> 29:07.330] But clients are always hackable, and you should, and you can open up your devices. [29:07.330 --> 29:08.650] You shouldn't be afraid of it. [29:09.090 --> 29:11.610] Avoid your warranties, all of that. [29:13.090 --> 29:22.270] One thing that's sometimes hard is that hardware is, well, at least for me, maybe for a lot of people, is harder than software. [29:22.270 --> 29:28.210] And sometimes it's not worth your time, but it's definitely something that you can do. [29:28.350 --> 29:34.210] You can read the firmware, you can understand chips, and you don't need to do more than that. [29:34.410 --> 29:40.350] Like, you will know if there's a weird camera hidden in your water heater. [29:42.350 --> 29:45.570] And the important thing is, you can add your own features. [29:45.770 --> 29:52.390] Whether it's in hardware, whether it's in software, you can at least try. [29:53.070 --> 29:56.170] And you should make the device your own. [29:57.050 --> 30:09.490] Make it fit you, instead of you fitting it and its app, and all of the things it's sending to the server, and the rest of the crap that's going on there. [30:11.390 --> 30:11.890] Cool. [30:12.170 --> 30:13.170] So, thank you. [30:14.530 --> 30:16.430] And I'd love to hear some questions. [30:27.060 --> 30:29.340] I actually don't see if there are questions. [30:34.440 --> 30:34.940] Anyone? [30:40.310 --> 30:41.270] Okay, well. [30:42.130 --> 30:43.110] Oh, sorry. [30:44.710 --> 30:45.710] It's hard to see. [30:45.870 --> 30:46.990] There are so many lights. [30:47.250 --> 30:47.490] Yes. [30:47.490 --> 30:55.850] So, I played around with a few different IOT devices that all came from one company that I think was based in New York City, called Corky. [30:56.290 --> 31:14.610] And they all have this very strange control chip in them that was all like, it seems like it came off an assembly line and that it used the generic API that could just send and receive various like, you know, signed character values or something like that. [31:14.810 --> 31:23.530] And it was unique because it was configured by the devices all had a CDS cell on them, so like a light sensor on them. [31:23.630 --> 31:32.070] And you held up a smartphone up the light sensor, the smartphone app would flash the screen in a pattern to transmit your Wi-Fi credentials or something to that. [31:32.250 --> 31:37.250] I was curious if you'd, when you've played around with these devices, you came across anything similar to that. [31:37.950 --> 31:43.210] So, I haven't seen this specific way of transmitting data. [31:43.430 --> 31:50.190] It sounds like like those hacks where you try to transmit data with the hard drive light on and off. [31:50.450 --> 31:53.630] That's something that was done like a few years ago. [31:55.250 --> 32:02.150] I guess there are... It seems like it would be very hard. [32:02.350 --> 32:14.330] Like, it's very low bandwidth, just holding it up and very... But for devices that don't have any network connectivity, which maybe... Oh, no, these did have Wi-Fi chips in them. [32:14.430 --> 32:16.490] This is how they receive the Wi-Fi credentials. [32:16.910 --> 32:18.950] Oh, so, I mean, it depends. [32:19.070 --> 32:21.690] Like, this device also has a Wi-Fi chip on it. [32:21.950 --> 32:23.810] It's very basic. [32:24.170 --> 32:27.930] It's like the lowest media tech, the company that makes it has it. [32:28.090 --> 32:32.370] And it can act as an AP, an access point. [32:32.610 --> 32:34.770] And that's, like, usually what they do. [32:36.050 --> 32:38.310] I haven't heard about of that method. [32:38.750 --> 32:42.050] But you can also send it to Broadcast. [32:42.350 --> 32:44.490] There's some ways to do that. [32:46.530 --> 32:47.670] That's unique, though. [32:47.910 --> 32:49.050] I have another question. [32:49.270 --> 32:53.510] Have you taken apart any smart speakers or anything like that? [32:54.690 --> 32:57.350] Because I don't own one yet, so I haven't taken one apart? [32:57.590 --> 33:06.150] No, there was a teardown that... There's a teardown on medium of the Echo and the Sonos smart speakers. [33:07.270 --> 33:08.810] It's very interesting. [33:09.130 --> 33:17.510] Like, the guy who did it tries to understand what it means for the companies, which is a bit out of my league there. [33:17.770 --> 33:20.790] But the components and everything is really interesting. [33:21.450 --> 33:22.310] Just Google it. [33:22.430 --> 33:24.470] It was, like, on Hacker News last week or something. [33:24.890 --> 33:25.090] Thanks. [33:25.450 --> 33:25.850] No problem. [33:26.010 --> 33:26.170] Thanks. [33:26.830 --> 33:30.210] I actually have worked on both of those things. [33:30.470 --> 33:34.870] So, not Quirky itself, but I can answer a bit of that. [33:34.970 --> 33:39.190] All the Quirky devices, a lot of the ones that use Wi-Fi, have the electric imp inside of them. [33:39.330 --> 33:41.110] And you can actually get that as a dev kit. [33:41.290 --> 33:43.950] If you're curious about it, you can program it yourself using the... [33:44.630 --> 33:46.410] That's how the electric imp gets a Wi-Fi. [33:46.710 --> 33:47.070] What? [33:48.090 --> 33:49.750] It's just a company called electric imp. [33:50.510 --> 33:53.290] And they have dev boards and stuff you can play around with on their own. [33:53.710 --> 33:55.130] I also took a part in Echo. [33:55.670 --> 34:03.450] And the goal with that is because when I was moving into a new place, I was using it as a music speaker, which it's great for. [34:03.630 --> 34:05.690] And you can control it from Spotify on your phone or whatever. [34:05.930 --> 34:06.550] But I didn't... [34:06.550 --> 34:07.990] I wanted to disable the mics. [34:08.530 --> 34:13.150] And that was actually my question, is that there's this array of like seven MEMS microphones on there. [34:13.350 --> 34:16.550] And I tried dremeling them off, which was not the best idea. [34:19.190 --> 34:26.290] And whether it was that or the fact that I probably had some collateral damage, it doesn't work at all anymore. [34:26.890 --> 34:31.630] But I was considering injecting some epoxy into the little holes on them. [34:31.750 --> 34:32.130] I'm not sure. [34:32.310 --> 34:35.050] But I was wondering if you had any other recommendations for that. [34:35.130 --> 34:37.710] I guess I could try and hack into the software side. [34:38.150 --> 34:43.910] So sometimes, for example, the LEDs on this device, they're harmless. [34:44.110 --> 34:45.270] Like I could take them off. [34:45.330 --> 34:48.070] I don't have to change them to a different color just because I can. [34:49.090 --> 34:51.730] And they're not part of the main electric board. [34:52.090 --> 35:00.410] Sometimes though, these components like the mics, like in the Echo case, they are part of the main board that makes everything else run. [35:00.570 --> 35:02.950] And then you'll need to think of a creative solution. [35:03.150 --> 35:12.430] For example, actually start reverse engineering the circuit, understanding what it expects it, like what the interactions it expects is. [35:13.370 --> 35:16.990] Maybe, you know, just emulating somehow a mic. [35:17.390 --> 35:19.670] That's also possible. [35:19.950 --> 35:26.750] But in this case, maybe some side channel thing like preventing it from transmitting to the Internet. [35:27.290 --> 35:29.390] And it's a good question. [35:29.630 --> 35:32.810] I don't have anything smart to say about how to fix it though. [35:33.290 --> 35:37.050] That's... I tried decodering them and that also didn't work super great. [35:37.170 --> 35:38.030] But I'll keep packing on it. [35:38.150 --> 35:40.190] Yeah, you need to be trying. [35:40.790 --> 35:42.190] That's one important takeaway. [35:42.690 --> 35:43.530] Thank you so much. [35:43.630 --> 35:44.390] It was very inspiring. [35:44.850 --> 35:45.270] Thank you. [35:45.430 --> 35:45.750] Thank you. [35:47.370 --> 35:48.710] Thanks, Michael, for a great talk. [35:49.670 --> 35:52.690] A while back, I work in IoT stuff. [35:52.870 --> 35:55.370] So it's always fun to see how things get taken apart. [35:55.590 --> 35:57.330] And I really appreciate everything you've done. [35:57.610 --> 36:01.550] There's a project called the thing system, which unfortunately went poof. [36:02.250 --> 36:03.850] But it was all done open source. [36:04.070 --> 36:08.970] So anyone who's looking to hack their devices, especially the early gen ones, the thing system was really cool. [36:09.010 --> 36:14.510] And they just basically bought everything they could in 2013 and 2014 and kind of did this and published stuff. [36:14.830 --> 36:17.710] And I'd say as well, the other one to look at maybe is open hub. [36:17.870 --> 36:19.770] I don't know if that came up on your on your list. [36:19.890 --> 36:32.050] But it's, there's a lot of people that will do the discussion and similar things on on some of the devices and then try and sort of coordinate them under a steward or something that runs on a Raspberry Pi in the home before letting the stuff out too. [36:32.950 --> 36:39.630] So there's something called Home Assistant, which is awesome, which someone told me about. [36:39.770 --> 36:43.910] It has, it's basically like a platform to control IoT devices. [36:44.710 --> 36:54.410] It has, it can talk to a lot of devices, devices, and it can do some cool things like, I don't know, it connects to a lot of data sources. [36:54.670 --> 37:04.110] So you can say when the angle of the sun is very low, then start the lights without me having to, you know, get off my chair and turn it on. [37:05.210 --> 37:14.330] That's, that's exactly the thing you should be looking for, like whether the device itself is supported by platforms like that, open platforms, whether you can refresh it. [37:14.950 --> 37:20.250] For example, this device, I still have no idea how I can get my own custom, custom firmware on it. [37:20.350 --> 37:24.350] It seems a bit hard, but the point is try hard things. [37:24.670 --> 37:27.410] So I'm definitely going to try it. [37:27.530 --> 37:36.730] And hopefully, I mean, I could do something open source that, you know, I, I don't, that I can, I can know exactly what's running on it. [37:37.370 --> 37:37.890] Thanks. [37:40.050 --> 37:47.150] Uh, yeah, just on, in response to the question about the, uh, about the optical transmission for the Wi-Fi. [37:47.410 --> 37:53.670] The other thing I've seen a lot of with that, um, is, uh, uh, audio transmission. [37:53.750 --> 38:02.010] You'll see that in a lot of, in a lot of, uh, IP cameras when they, when they want to connect to, um, some Wi-Fi network they've never connected to before. [38:02.690 --> 38:11.610] It'll actually, uh, could be any number of protocols to do it, but it'll actually send it out over, over sound to the microphone and the camera and pick it up that way. [38:12.190 --> 38:25.810] Um, there's, there are several different ways that you see that where it doesn't exactly want to, um, want to connect to, it doesn't want to send out its own, uh, AP, but it does want you to have some way of connecting to it. [38:26.490 --> 38:26.870] Yeah. [38:27.090 --> 38:29.810] There's a lot of creative solutions like that. [38:29.810 --> 38:37.210] So, I mean, it's hard for me to understand why if you already have a Wi-Fi chip that can act as an AP, maybe it can't act as an AP. [38:37.650 --> 38:50.530] Maybe it's just some easy way that someone thought of and didn't really think of alternatives, but it's also seems like something that would be very, uh, uh, error prone, right? [38:51.310 --> 38:51.570] Yeah. [38:51.570 --> 38:55.190] Although they do use tones that humans can produce, uh, usually. [38:56.410 --> 38:56.890] Yeah. [38:57.370 --> 39:09.630] The other, the other thing that may very well be, um, in so many cases, the people building the system are thinking of it in terms of a security camera system or, or that sort of a system. [39:09.870 --> 39:18.070] So you're, you're, you're looking at it and you've got, um, you're not necessarily thinking about it in terms of the network side of it, even though you've added Internet to it. [39:18.190 --> 39:20.770] Um, may very well be the reason behind that. [39:22.050 --> 39:28.970] Uh, the company I work at, we do, um, it's actually an IOT company, although I'm just like a back-end developer. [39:29.190 --> 39:39.030] This is something I've done like on my own time, but we've looked into, I don't know, like a few dozen maybe IOT cameras. [39:39.030 --> 39:47.630] And, um, there's like every camera you look at has a ton of CVEs and a ton of, uh, things that are broken. [39:48.190 --> 39:58.050] Um, um, unfortunately this is still the state of the commercial security market, like the commercial security camera market. [39:58.690 --> 40:01.950] But, uh, that's why we're here, to make it better. [40:04.650 --> 40:05.530] Thanks for the talk. [40:05.750 --> 40:06.570] Um, I have a question. [40:06.730 --> 40:12.710] I don't know whether or maybe somebody else in the audience might want to get in touch and say something or get in touch me. [40:12.870 --> 40:15.650] But, um, my concern, of course, is cars. [40:16.030 --> 40:26.370] Um, so, um, I want to find the, um, the wireless, um, transmitter in my car, ring its neck, um, and get rid of the microphone, too, while I'm at it. [40:26.730 --> 40:28.970] Um, so, any suggestions for how to go about doing that? [40:29.370 --> 40:29.730] No. [40:34.670 --> 40:35.030] Yeah. [40:35.470 --> 40:37.050] Uh, that's not sustainable in the long term. [40:37.690 --> 40:40.350] I mean, I can think of a few ways just off the top of my head. [40:40.450 --> 40:42.370] It's usually connected to something in the OBD. [40:42.450 --> 40:47.830] I mean, I, uh, I'm sure you can, like, find someone who's done it before. [40:47.950 --> 40:52.950] And if you're the first, then it just means you'll be the one getting all the glory when you publish it, right? [40:58.770 --> 41:01.930] The microphone connects back to some cars. [41:02.110 --> 41:05.470] It's a separate new computer that only runs the phone Bluetooth. [41:06.110 --> 41:09.910] Other times, it'll be part of the overall telematics module. [41:09.910 --> 41:15.470] So, you can't, you can't always just unplug it without bringing other engines into the car. [41:15.770 --> 41:16.310] All right. [41:16.590 --> 41:17.630] Do you guys unplug the microphone? [41:17.910 --> 41:29.270] What I, what I heard, my information is a couple years old, but, um, from what I heard, they are not, car manufacturers are not yet making it so that removing the telematics module cripples bricks the car. [41:29.750 --> 41:33.810] Um, so, I don't see any use for the telematics or, um, microphone whatsoever. [41:33.810 --> 41:36.530] I just want to get rid of the whole, uh, that whole subsystem. [41:36.710 --> 41:38.190] I like brick the car. [41:38.550 --> 41:41.790] That's very sad that we have to use these words now. [41:42.330 --> 41:48.070] The other thing that you can always do is jailbreak, that's the word, chill in your car. [41:48.290 --> 41:55.790] If you want to keep the Bluetooth, but don't want the thing going home, the box will have some connectors for, for the GPS and, and then the cellular control. [41:55.910 --> 41:56.910] Just unplug the antennas. [41:57.250 --> 41:57.330] Yeah. [41:57.850 --> 41:57.930] Yeah. [41:57.930 --> 41:58.170] It's fine. [41:58.470 --> 41:58.610] It's fine. [41:59.230 --> 41:59.790] It's fine. [42:00.110 --> 42:00.490] It's fine. [42:03.860 --> 42:04.300] Hi. [42:04.660 --> 42:13.820] Um, it's great to, to see your research and, uh, how you went through, um, reversing the, the firmware, oh, with some strings and stuff like that. [42:14.040 --> 42:26.040] Um, I was wondering because, you know, some strings can be packed and they, if people are hiding things, um, was, so, was the media chip, uh, a separate, uh, was it a separate chip from the SOC? [42:26.400 --> 42:28.680] Um, or was it all in one package? [42:28.940 --> 42:30.360] It's all in one package. [42:30.700 --> 42:38.300] Um, so it also has its own, the, the, the firmware I got was from a separate, um, slash memory chip. [42:38.820 --> 42:41.900] Um, the, the chip itself also has some memory. [42:42.260 --> 42:49.440] So, first of all, some data might be packed, like you said, although, I mean, why would they bother, right? [42:50.140 --> 43:02.880] Um, but some of the, uh, the code might be on the chip itself, which I didn't, uh, uh, that wasn't part of, uh, it wasn't an easy thing to do, which is something that I pride myself in doing easy things. [43:03.380 --> 43:03.820] Right. [43:04.260 --> 43:04.760] Um, okay. [43:04.920 --> 43:17.620] I was just, uh, that would make it a little difficult for my question, but I was wondering, um, if there was any opportunity to use, uh, logic analyzers in order to try to extract, uh, like configuration data for, like, modems and things like that? [43:17.620 --> 43:19.640] Um, no, no. [43:19.780 --> 43:26.260] We used, uh, um, a firmware, uh, reader from the flash, uh, memory chip. [43:26.460 --> 43:44.380] We didn't, it's like a specialist device that we have, but you can also do it, uh, I, I mean, we could, we could try and analyze the board, like we said, and see what's actually happening and then just remove the chip and try and, uh, emulate it with something or another. [43:44.680 --> 43:49.860] But that's something we thought of, but again, it's hard. [43:50.260 --> 43:50.660] Right. [43:51.060 --> 43:51.980] Like, yeah. [43:52.260 --> 43:52.660] Okay. [43:53.420 --> 43:53.760] Thanks. [43:55.860 --> 44:00.480] I really enjoyed your talk, uh, and really appreciate these kinds of exercises. [44:00.800 --> 44:11.100] Um, in the United States, uh, water heaters tend to be, I think for most people, a 40 gallon drum that is either gas or electric, and it tends to always be on. [44:11.320 --> 44:15.880] So when you turn the faucet on, the water eventually gets hot. [44:16.120 --> 44:19.560] Uh, there's the newer flash, you know, hot water on demand. [44:19.840 --> 44:26.460] Uh, I was wondering if you could take a minute to describe what this water heater is and, you know, having the switch in the house. [44:26.580 --> 44:27.320] Is it a tank? [44:27.440 --> 44:28.640] Is it a electric? [44:29.880 --> 44:32.540] Um, so that's a good question. [44:32.860 --> 44:36.880] Um, maybe I should have explained it a little bit better. [44:37.040 --> 44:39.900] I'm from Israel, um, in case my accent doesn't give it away. [44:40.180 --> 44:45.780] Um, we have, um, drums that are electrically heated. [44:46.080 --> 44:51.560] Um, and the drums themselves are usually on the roof of the house. [44:51.760 --> 44:53.480] Sometimes you have a solar heater. [44:53.760 --> 45:00.780] Um, and in this case, it's controlled by, uh, basically all you have is a button. [45:01.480 --> 45:05.060] And I guess that's why, uh, the device is only for the Israeli market. [45:05.420 --> 45:06.980] Um, the form factor of it. [45:07.120 --> 45:09.620] And of course, uh, the way it behaves. [45:10.280 --> 45:13.640] But, uh, yeah, that's, that's what it is. [45:15.020 --> 45:16.820] Water comes from somewhere. [45:21.820 --> 45:22.300] Magically. [45:22.680 --> 45:23.040] Yeah. [45:23.540 --> 45:26.640] I mean, maybe that's something I should check where it comes from. [45:31.380 --> 45:32.260] It's a good answer. [45:32.900 --> 45:35.800] Um, cool. [45:36.120 --> 45:37.320] So, thank you very much.