[00:00.000 --> 00:04.600] So, I guess we start. Thanks everybody for showing up so early. [00:05.020 --> 00:08.600] I guess we are the first talk today on the IoT Village. [00:09.600 --> 00:13.720] I still need to get this somewhere near my mouth. [00:14.520 --> 00:18.540] So, I'm Daniel, this is Jiska and Caroline. [00:18.600 --> 00:23.700] And we will present our work on Fitbit fitness trackers. [00:23.700 --> 00:28.420] Our talk is called Fitness Firmware Hacking, the Current State of the Heart. [00:28.420 --> 00:34.360] And this basically summarizes our research from the last few years. [00:34.400 --> 00:40.260] And all the work we are presenting was done in the secure mobile networking lab. [00:41.580 --> 00:43.780] So, a brief motivation. [00:44.560 --> 00:49.840] A few years ago, I guess like 2017, there was this article in the Telegraph, [00:49.840 --> 00:58.480] which talks about privacy in the Fitbit fitness trackers. [00:58.480 --> 00:59.920] But that's not so important. [00:59.920 --> 01:03.660] What's more important here is this comment from this guy, [01:03.660 --> 01:09.520] who says basically, please modify my Fitbit so that I run 10k every day. [01:09.520 --> 01:13.920] And we thought, why not help this poor soul achieving his goals. [01:13.920 --> 01:21.080] And also, if you look like insurance companies, [01:21.080 --> 01:34.240] you will get up to 1500 bucks bonuses if you upload your fitness data to the insurance companies [01:34.240 --> 01:37.560] to show them that you are healthy and stuff like this. [01:37.960 --> 01:41.760] So, let's start with the version comparison. [01:42.860 --> 01:48.080] So, today we are going to show you several issues and hacks and modifications [01:48.940 --> 01:54.220] that are applying to very different versions of the Fitbit. [01:54.220 --> 02:00.340] So, we started with the Flex as a simple tracker and also the ChargeHR. [02:00.440 --> 02:04.540] But Caroline did a lot of work on the Fitbit Ionic. [02:05.000 --> 02:09.720] So, there will be very different things on top of this [02:09.720 --> 02:13.500] because the Fitbit Ionic has different interfaces, which she will tell you. [02:13.500 --> 02:16.540] Apart from this, all of them are ARM-based. [02:16.540 --> 02:23.560] So, the architecture is definitely similar for the Flex and ChargeHR [02:23.560 --> 02:26.380] and somewhat similar for the Ionic. [02:28.580 --> 02:33.140] Yeah, the Fitbit Ionic is the first device within Fitbit's product portfolio [02:33.140 --> 02:35.760] to be marketed as an actual smartwatch. [02:35.880 --> 02:38.720] And this is because it introduces a number of new functionalities [02:38.720 --> 02:41.220] and interfaces. [02:41.320 --> 02:44.680] So, for instance, it does not only have GPS or Bluetooth. [02:44.680 --> 02:47.500] It also has a Wi-Fi interface and NFC. [02:47.500 --> 02:49.480] And it has something that is called Fitbit Pay, [02:49.480 --> 02:53.920] which essentially allows you to contactlessly pay with your watch. [02:53.960 --> 02:57.020] And you can develop your own custom applications in JavaScript [02:57.020 --> 03:00.480] using, for instance, an online IDE called Fitbit Studio. [03:00.600 --> 03:03.880] And, of course, it synchronizes data over Bluetoothable energy [03:03.880 --> 03:08.500] using some form of application, for example, on a smartphone or computer. [03:09.280 --> 03:11.200] And, of course, it has a number of different sensors [03:11.200 --> 03:14.040] for capturing the user's fitness data. [03:14.040 --> 03:17.080] And you can store music files, download radio station playlists, [03:17.080 --> 03:18.840] for example, from Deezer or Pandora, [03:18.840 --> 03:21.460] and connect your Bluetooth headphones. [03:21.460 --> 03:24.480] And the Hungry Cat marks the parts of the Fitbit Ionic [03:24.480 --> 03:28.340] that we thought were the most interesting in terms of security research. [03:31.980 --> 03:34.880] So, I'm now going to introduce the communication [03:36.060 --> 03:38.940] between the Fitbit and the server. [03:38.940 --> 03:42.500] And this part is very important for you to remember [03:42.500 --> 03:45.840] to understand the remaining part of the talk. [03:45.840 --> 03:49.280] So, you have a Fitbit fitness tracker, [03:49.280 --> 03:53.760] and this is connected over Bluetooth LE to the smartphone app. [03:53.760 --> 03:56.920] And this connection is not that secure, [03:56.920 --> 04:00.840] so it's not that important that it's not so secure [04:00.840 --> 04:06.100] because the app is only forwarding this traffic over HTTPS to the server. [04:06.100 --> 04:10.560] And the traffic is end-to-end encrypted with a device-specific symmetric key. [04:10.560 --> 04:15.520] So, each Fitbit will have its own key, [04:15.520 --> 04:19.440] 128-bit key, during fabrication of it, [04:19.440 --> 04:22.160] and it will be used for encryption. [04:23.880 --> 04:28.260] And this encryption only has been on recent trackers only, [04:28.260 --> 04:31.680] which means... well, recent... I mean, we started some years ago, [04:31.680 --> 04:34.020] so any model introduced after 2015 [04:34.020 --> 04:37.000] has encryption enabled by default. [04:37.240 --> 04:41.680] So, you cannot disable it, but on the oldest you could. [04:42.060 --> 04:45.520] And then also, there was a memory attack [04:45.520 --> 04:48.360] that was not patched in all trackers. [04:48.360 --> 04:52.180] It was only patched in October 2017 on all trackers. [04:52.180 --> 04:54.480] So, there were some possibilities in all the trackers [04:54.740 --> 04:57.580] to analyze this communication in plain text. [04:58.440 --> 05:00.060] So, what is happening? [05:00.060 --> 05:04.380] If you are running, so if you're Suzy Fit here in the example, [05:04.380 --> 05:07.820] you would run and then you have steps that are recorded [05:07.820 --> 05:10.720] on the tracker locally. [05:10.720 --> 05:13.880] And this locally stored data could be something like [05:14.120 --> 05:15.700] a week of activity data. [05:15.700 --> 05:18.240] But usually, if you're connected to the smartphone app, [05:18.240 --> 05:22.500] this data will be transferred to the server, [05:22.500 --> 05:27.120] just forwarded, and then it will be added to the activity database. [05:27.120 --> 05:31.600] And this activity database has this data then in plain text, [05:31.600 --> 05:36.560] but you need to actually log in with your smartphone [05:36.560 --> 05:38.880] to see this data in JSON. [05:39.140 --> 05:43.560] So, you would get summaries, like all the steps [05:43.560 --> 05:46.520] of the last week or something, in JSON. [05:46.780 --> 05:50.320] And the mega dumps itself, so the binary format from the tracker [05:50.320 --> 05:53.200] will also be answered with some settings from the server. [05:53.200 --> 05:55.280] So, this is a different communication here. [05:55.280 --> 05:57.700] What you see in JSON is a different thing than what you will see [05:57.700 --> 05:59.320] in the micro dump, mega dump. [06:01.500 --> 06:04.080] And now, there is a very interesting concept, [06:04.080 --> 06:07.940] because let's say I have my current step count [06:07.940 --> 06:10.000] or my heart rate, and I would like to see it [06:10.000 --> 06:11.560] in the smartphone app. [06:11.660 --> 06:14.600] That would be very inefficient to send it to the server each time, [06:14.600 --> 06:17.280] let the server decrypt, send it back in JSON, and so on. [06:17.340 --> 06:19.300] So, there is a live mode. [06:19.380 --> 06:22.820] And the idea here is that the user is logging in to the server, [06:22.820 --> 06:25.980] does a local pairing with the tracker, [06:25.980 --> 06:28.520] and then there is a remote association, [06:28.520 --> 06:30.320] so each time I would log in again, [06:30.320 --> 06:32.280] I would see the data from this tracker. [06:32.580 --> 06:34.720] And the smartphone app, actually, in this step, [06:34.720 --> 06:36.860] also gets authentication credentials. [06:37.460 --> 06:39.420] These credentials are only obtained once, [06:39.420 --> 06:42.020] so that you can later use them offline, [06:42.020 --> 06:45.420] so that you don't need the server for getting more data. [06:45.700 --> 06:47.640] And in this authenticated live mode, [06:47.640 --> 06:50.100] you would get plain text data. [06:50.960 --> 06:56.260] So, that is only the thing that you see as a summary on the display. [06:56.260 --> 06:58.400] So, it's only the total step count of the day, [06:58.400 --> 07:00.720] the current hide rate, and so on. [07:01.180 --> 07:04.820] And there was also the possibility for a memory readout. [07:04.880 --> 07:06.920] And since you can reuse this forever, [07:06.920 --> 07:10.000] even if you associate the tracker another time, [07:10.000 --> 07:14.220] this is kind of a critical thing here. [07:14.220 --> 07:17.220] But we can also understand why they did it this way, [07:17.220 --> 07:18.980] because it's for the offline usage. [07:18.980 --> 07:22.100] So, it's kind of by design that you can reuse it forever. [07:23.560 --> 07:27.800] So, Karin is now going to tell you about the additions on the Ionic smartwatch. [07:28.800 --> 07:32.400] So, as I've said, the Fitbit Ionic introduces new functionality [07:32.400 --> 07:36.240] and has new interfaces that have not been there in previous trackers. [07:36.240 --> 07:41.340] And for this reason, the communication paradigm has also been a bit modified. [07:41.640 --> 07:46.760] What remains largely the same is pretty much things like so-called server dumps. [07:46.760 --> 07:49.100] This is something that Disco already told you about. [07:49.100 --> 07:52.220] It's essentially a generalization of micro and mega dumps. [07:52.220 --> 07:55.500] And they are sent from the Fitbit service over the Fitbit smartphone application [07:55.500 --> 07:57.680] to the Fitbit smartwatch. [07:57.760 --> 08:02.160] And also, the entire communication on top of plutable energy is very similar. [08:02.160 --> 08:04.300] But there are also some new concepts. [08:04.300 --> 08:06.460] For example, something that we called app dumps, [08:06.460 --> 08:10.400] that I'm going to talk to you about later on in more detail. [08:10.700 --> 08:15.360] And the Fitbit Ionic's Wi-Fi interface is used during the installation [08:15.360 --> 08:18.020] of a custom application mainly for WebSocket traffic [08:18.020 --> 08:21.540] and also for downloading firmware during a firmware update. [08:21.540 --> 08:22.680] And that's pretty much it. [08:22.680 --> 08:26.240] Everything else is still relayed over the smartphone application. [08:26.420 --> 08:30.620] And the NFC interface is only used for the transmission of payment traffic [08:30.620 --> 08:32.840] to and from a payment terminal. [08:32.900 --> 08:37.060] And of course, as I've said, you can connect your Bluetooth headphones using Bluetooth. [08:40.590 --> 08:45.950] Okay, so one important step during our research was accessing the hardware. [08:45.950 --> 08:49.110] You can start with disassembling the app, of course, [08:49.110 --> 08:53.570] or taking dumps from, I don't know, HTTPS. [08:53.570 --> 09:00.010] But to get the whole picture, we thought we also want to get access to the hardware itself. [09:00.230 --> 09:05.970] So, to quickly show you our thread model, [09:05.970 --> 09:11.950] we still have Suzy Fit, who stores her activity locally on her tracker. [09:11.950 --> 09:15.990] And of course, this tracker has a local symmetric device key. [09:16.310 --> 09:22.410] But now what happens if Suzy is not so active anymore [09:22.410 --> 09:26.470] and likes to modify her own data or get her own data? [09:26.910 --> 09:32.650] So our goals are to access the local data storage and to get the encryption keys. [09:32.810 --> 09:35.750] So the first stuff you do, of course, is to search for eBay [09:35.750 --> 09:38.610] and buy all the trackers you get your hands on. [09:38.610 --> 09:44.690] And so in our case, the Fitbit Flex was pretty cheap already. [09:44.690 --> 09:50.970] So broken ones you could get up into patches of 20 for $1 each. [09:52.250 --> 09:59.710] And so here's a quick look at the hardware and software of the Fitbit Flex. [09:59.710 --> 10:03.150] So you have your main system on a chip. [10:03.610 --> 10:07.610] You have, which in this case is a chip from STM. [10:07.610 --> 10:11.450] It runs a Cortex-M3 arm. [10:11.970 --> 10:17.890] And the firmware consists of a few libraries which we identified they used. [10:17.890 --> 10:21.050] So for encryption, for example, they used libtomcrypt. [10:21.050 --> 10:25.970] And for BLE, they used a library which is very similar to libble-shield. [10:26.190 --> 10:32.770] And of course, apart from the main sock, you also have your Bluetooth chip, [10:32.770 --> 10:37.410] which is from Nordic Semiconductors and an accelerometer. [10:37.410 --> 10:42.550] And here in the Fitbit Flex example, everything is connected via a new R bus. [10:43.190 --> 10:47.830] So if you pry open the hardware, this is pretty easy on the Fitbit Flex. [10:47.830 --> 10:55.090] You just use a heating gun, heat it up, and then you can basically pull it apart and you will get to the PCB. [10:55.190 --> 11:01.910] So here we already removed the battery and the vibration sensor or vibration actuator. [11:02.590 --> 11:06.450] And so you already see that there are many testing points. [11:06.450 --> 11:09.270] And the most important ones are these. [11:09.590 --> 11:13.690] So TP8 and 9 are used for SWD debugging. [11:13.690 --> 11:19.890] And you can use just the ground for the battery to connect it to your debugger. [11:20.410 --> 11:25.410] And apart from this, there is also TP10, which you can use for resetting. [11:26.150 --> 11:27.690] And yeah, that's it. [11:27.690 --> 11:32.590] Then you have everything you need to hook it up to a debugger. [11:32.590 --> 11:37.490] And so here on the right-hand side, this is how it looked in our case. [11:37.490 --> 11:44.450] We just used the ST-Link debugger from STM in the breadboard, basically. [11:44.530 --> 11:49.810] And with this, we were already able to read out all the memory. [11:50.470 --> 11:54.050] So it basically consists of three big parts. [11:54.050 --> 11:57.490] A flash, an EEPROM, and an SRAM. [11:57.590 --> 12:01.090] The flash contains, of course, all the firmware code. [12:01.090 --> 12:05.870] The EEPROM stores all the data you want to get your hands on. [12:05.970 --> 12:09.750] And the SRAM, of course, for firmware variables. [12:11.810 --> 12:18.310] If you have a closer look at the flash, you will see that it consists of two big parts. [12:18.650 --> 12:21.110] An app part and a BSL part. [12:21.110 --> 12:23.950] Iska will tell you more about these later. [12:24.130 --> 12:28.030] But the important thing is that they can run independently from each other. [12:28.030 --> 12:32.830] And the EEPROM, as I said, contains all your fitness data, [12:32.830 --> 12:39.050] but also the serial number of the Fitbit, an encryption key, and an encryption switch. [12:39.050 --> 12:43.170] So with this switch, it was possible to disable encryption completely. [12:43.170 --> 12:48.930] But nowadays, the backend will not accept connections which are not encrypted anymore. [12:48.930 --> 12:50.570] So this does not work anymore. [12:52.650 --> 12:57.050] So one important step also was to re-enable GDB access. [12:57.050 --> 13:08.010] What we discovered is that you were only able to connect to the Fitbit if you did a reset before this. [13:08.730 --> 13:17.110] And after this, if you hit continue on your GDB, the connection to the debugger will be lost. [13:17.110 --> 13:23.310] So at some point in time, it apparently remaps the GPIO ports to something else, [13:23.310 --> 13:26.310] but not to something which we need for debugging. [13:26.310 --> 13:31.510] So we thought, why not reset them to something which we actually need? [13:31.790 --> 13:36.170] And what we used for this is the Nexmon patching framework. [13:36.170 --> 13:39.870] So we already developed this for a previous project, [13:39.870 --> 13:46.010] and with this framework, we are able to binary patch the stuff, basically. [13:46.170 --> 13:48.270] And we adapted it for our needs. [13:49.450 --> 13:55.170] Of course, our goal was to modify the firmware and enable the dynamic debugging. [13:56.850 --> 14:03.370] So this is what the core graph looks like after initialization. [14:03.370 --> 14:06.630] So at the beginning, GDB access still works. [14:06.630 --> 14:10.250] And somewhere after the initialization, it doesn't work anymore. [14:10.250 --> 14:16.350] So I have no idea where exactly these GPIO pins are reassigned, [14:16.350 --> 14:19.090] but I actually don't need to know. [14:19.090 --> 14:24.270] What we just did instead is to add an additional Bluetooth command [14:24.270 --> 14:31.110] to remap the GPIO ports to re-enable GDB access. [14:31.530 --> 14:36.790] And for this, we did this with a special Bluetooth command, [14:36.790 --> 14:43.250] because we did not know which other use case they had for the GPIO pins. [14:43.250 --> 14:47.360] And we just wanted to keep the side effects as small as possible. [14:49.090 --> 14:52.370] And with this, of course, then we were able to have break points [14:52.370 --> 14:54.170] and memory watch points and all the good stuff. [14:58.180 --> 15:02.680] So naturally, we also had to look at the Fitbit Ionix hardware. [15:03.060 --> 15:06.880] And we did this by using two broken Fitbit Ionix smartwatches. [15:06.880 --> 15:10.380] And the goal was for us to understand the hardware that is used [15:10.380 --> 15:13.340] and also to find possibilities for debugging. [15:13.340 --> 15:16.780] And what you see on the picture below is the Fitbit Ionix main PCB [15:16.780 --> 15:19.160] being powered by its battery pack. [15:19.160 --> 15:22.280] And it has 39 copper wires soldered to its back [15:22.280 --> 15:24.720] and is connected to a logic analyzer. [15:24.720 --> 15:27.400] And since the Fitbit Ionix main PCB is rather small, [15:27.400 --> 15:30.860] this entire setup always reminds me of the Flying Spaghetti Monster. [15:32.080 --> 15:35.440] What you see on this picture are all the hardware markings [15:35.440 --> 15:40.400] that we deciphered from the chips on the Fitbit Ionix main PCB using a microscope. [15:40.640 --> 15:45.400] And what you see from this is that the Fitbit Ionix uses a Cypress Bluetooth chip, [15:45.720 --> 15:48.600] a Broadcom Wi-Fi and an NXP NFC chip. [15:48.600 --> 15:53.480] And also the CPU and the flash memory are manufactured by Toshiba. [15:53.580 --> 15:58.280] And the CPU is custom-built for wearables and smartwatches. [15:58.400 --> 16:01.700] And it contains an ARM Cortex-M4. [16:01.700 --> 16:06.120] And it does not have JTAG interface, but instead uses SWD, [16:06.120 --> 16:08.840] which is short for Serial Wire Debug. [16:08.880 --> 16:13.140] And on the right-hand side, you see a comparison of the Fitbit Ionix main PCB [16:13.140 --> 16:15.920] to the main PCB of the Fitbit Flex. [16:15.920 --> 16:21.340] And what is noticeable is that the Fitbit Ionix has a lot more stuff going on on the PCB [16:21.340 --> 16:25.020] and it's a lot more densely packed and more complex. [16:25.020 --> 16:27.700] So there's definitely an involvement there. [16:28.680 --> 16:30.960] This is the main PCB from the back. [16:30.960 --> 16:34.280] With all the different testing points, there are 95 in sum. [16:34.280 --> 16:39.020] And we tested 39 of them using the logic analyzer under different conditions. [16:39.020 --> 16:44.600] And we wanted to identify which testing points correlate to the SWD interface. [16:44.600 --> 16:50.420] Unfortunately, Murphy's Law, this did not yield the desired result. [16:50.480 --> 16:56.800] Instead, we found that testing points 25 and 28 are responsible for SWD clock [16:56.800 --> 17:02.060] and input-output, respectively, after we desoldered the main CPU. [17:02.060 --> 17:05.780] So if you want to follow up on this, these are the testing points to look for. [17:07.320 --> 17:12.040] And this is what the flash memory and the main CPU look like desoldered. [17:12.040 --> 17:15.240] And the interesting thing to note about the flash memory is that [17:15.240 --> 17:18.560] we were not able to find any information on the public internet [17:18.560 --> 17:22.340] about the manufacturer parts number on this chip. [17:22.340 --> 17:27.060] We found one that was very similar, that had just one letter exchanged, essentially, [17:27.060 --> 17:28.320] but it was bigger. [17:28.460 --> 17:32.140] And this is why we think that it might be possible that this chip [17:32.140 --> 17:34.820] is even custom-built for the Fitbit Ionix. [17:40.900 --> 17:45.880] So, the thing is that it is not that practical to open up [17:46.780 --> 17:50.840] a Fitbit to then change your step count or whatsoever. [17:51.200 --> 17:54.200] So what we wanted to do is also to understand the wireless [17:54.840 --> 17:59.880] firmware flashing process to flash our own firmware [17:59.880 --> 18:02.840] that modifies something. [18:02.840 --> 18:06.540] So, the firmware update process usually works as follows. [18:06.560 --> 18:12.080] You just have the same mega-dump synchronization with the server [18:12.080 --> 18:14.720] and the server realizes, hey, I have a new firmware [18:14.720 --> 18:19.040] and then this firmware is actually shown to the user [18:19.040 --> 18:22.840] and the user needs to confirm to do a firmware update. [18:23.200 --> 18:25.820] And then again, the tracker is sending a micro-dump [18:26.440 --> 18:29.060] and there is the firmware request to the server [18:29.620 --> 18:33.860] and the answer to this contains two parts, [18:33.860 --> 18:37.060] which Daniel was already talking about, a BSL and an app. [18:37.060 --> 18:39.000] So, app here is not a smartphone application, [18:39.000 --> 18:44.600] but the main application running on the Fitbit tracker. [18:44.600 --> 18:47.620] And first, the BSL is flashed, validated and so on [18:47.620 --> 18:49.600] and then there is a reboot to BSL [18:49.600 --> 18:52.200] and then the same happens to the app. [18:52.240 --> 18:54.940] So, the idea is that you cannot prick your tracker, [18:54.940 --> 19:00.180] which means if I cannot reboot to BSL, [19:00.180 --> 19:03.960] then my BSL was wrong and then I can still boot the app. [19:04.960 --> 19:06.700] So far, so good. [19:06.700 --> 19:10.380] Another thing that you need to understand for trackers [19:10.380 --> 19:14.180] that still have a memory readout attack but do encryption [19:14.180 --> 19:17.500] is how the encryption itself works. [19:17.620 --> 19:19.280] So, we did a bit of reverse engineering [19:20.060 --> 19:26.020] and found that the tracker is using LibTomCrypt [19:26.020 --> 19:29.760] and with this it was also easier to find out [19:29.760 --> 19:32.900] how the nonce is used, how the encryption key is used [19:32.900 --> 19:34.280] and that they have a MAC. [19:34.280 --> 19:38.340] So, the MAC also means that you cannot easily flip [19:38.780 --> 19:41.400] a bit here and there to change the behavior [19:41.400 --> 19:45.100] because then in the end it will no longer match [19:45.100 --> 19:46.720] with the authentication MAC. [19:46.720 --> 19:50.560] So, you really need to understand how the format works [19:50.560 --> 19:52.260] and how the encryption works. [19:53.040 --> 19:56.520] So, if you want to flash a modified firmware, [19:56.520 --> 19:59.140] first of all you need to get the encryption key [19:59.140 --> 20:01.840] or you have a tracker that is still in plain text. [20:02.400 --> 20:05.800] You can achieve that actually if you buy one of the older trackers [20:05.800 --> 20:07.520] and never connect it to the internet. [20:07.520 --> 20:10.480] So, beginning of this year I was still buying trackers [20:10.480 --> 20:14.240] that could be modified, but only the very old models [20:14.240 --> 20:17.860] and then you need to find someone buying one of those models [20:17.860 --> 20:19.500] that has never been unpacked. [20:19.640 --> 20:24.400] So, if you have the key, you can then also read out the firmware. [20:24.500 --> 20:27.160] If it's not already a firmware that we already have, [20:27.160 --> 20:30.640] then you can copy the firmware, modify it with Nexmon [20:30.640 --> 20:33.260] and copy it back to the smartphone app. [20:33.260 --> 20:38.200] Our app actually already has a few firmware images built in. [20:38.200 --> 20:41.980] So, if you just want to have one of the images that we provide, [20:41.980 --> 20:43.340] you don't need to do this part, [20:43.340 --> 20:45.820] but probably you are interested in binary patching [20:45.820 --> 20:47.740] and want to have your own patches. [20:49.060 --> 20:52.080] And then you need again to format and encrypt the firmware [20:52.080 --> 20:54.680] and flash it back as I explained. [20:55.520 --> 20:58.440] So, the pre-compiled firmware that we have [20:58.440 --> 21:00.900] has a couple of funny features. [21:00.900 --> 21:04.040] So, the first feature we actually did [21:04.040 --> 21:06.660] when we had our first demo. [21:08.240 --> 21:10.160] So, when we gave our first talk. [21:10.180 --> 21:13.380] And it is just returning the step counts times 100. [21:14.220 --> 21:16.460] So, you need to do less points. [21:16.880 --> 21:20.000] And it will still look somewhat realistic to the server. [21:20.000 --> 21:21.820] So, you could do some more advanced stuff here [21:21.820 --> 21:24.820] like replaying activity records or something, [21:24.820 --> 21:27.260] but we just do the steps times 100. [21:28.300 --> 21:29.840] And another funny thing that happens, [21:29.840 --> 21:32.900] so if you then are resetting the tracker that has this patch [21:32.900 --> 21:35.580] and already have a high step count, [21:35.580 --> 21:39.520] then it is like taking the square of this or something, [21:39.520 --> 21:41.740] so it's getting like super high numbers. [21:42.060 --> 21:43.800] And this is really funny, [21:43.800 --> 21:46.340] because then if you have a Fitbit account in your inbox, [21:46.340 --> 21:48.660] you will have like all the notifications of like, [21:48.660 --> 21:52.560] you got the New Zealand badge of crossing all of New Zealand [21:52.560 --> 21:54.400] in one day and so on, I don't know. [21:55.820 --> 21:58.840] So, that's really funny what happens if you do this. [21:58.840 --> 22:02.840] And yeah, you definitely don't need to do any more sports. [22:04.160 --> 22:06.960] Maybe you shouldn't do too much of this, [22:06.960 --> 22:09.700] because if you have a health insurance and want to tell the health insurance [22:09.700 --> 22:11.840] I'm doing sports and then they are like, [22:11.840 --> 22:14.740] yes, but you did like 2 billion steps, [22:14.740 --> 22:16.300] then it might be strange. [22:16.440 --> 22:18.180] So, be careful with this. [22:19.740 --> 22:21.520] And then beginning of this year, [22:21.520 --> 22:24.220] I also ported this code to the Fitbit ChargeHR, [22:24.880 --> 22:28.660] which is also cool, because the Fitbit ChargeHR has a display. [22:29.100 --> 22:31.560] And display means that you can impress your friends [22:31.560 --> 22:33.980] without taking the smartphone app with you. [22:33.980 --> 22:36.920] So, you can just show like, oh, I did a lot of steps today. [22:37.200 --> 22:40.040] I was doing sports before coming to your party. [22:40.040 --> 22:42.440] And then you don't need to move a lot on the party, [22:42.440 --> 22:43.900] because otherwise they will think like, [22:43.900 --> 22:46.040] how did you do 5,000 steps on the party? [22:47.740 --> 22:52.060] Okay, so, the accelerometer is one thing that we thought [22:52.060 --> 22:53.980] is very interesting to access, [22:53.980 --> 22:56.580] because there is like, or at least has been, [22:56.580 --> 23:00.400] no good tools with trackers that are waterproof [23:00.400 --> 23:04.060] and still for experimentation to get accelerometer readings. [23:04.920 --> 23:08.080] And there is almost no strings in the firmware, [23:08.080 --> 23:10.120] so it's very hard to reverse engineer. [23:10.120 --> 23:13.620] But one thing that is there is a factory test mode [23:13.620 --> 23:15.620] with some basic console. [23:15.820 --> 23:19.100] And luckily, so one of the very few things that has a string [23:19.100 --> 23:22.000] is a command to test the accelerometer. [23:23.040 --> 23:27.260] And with this, we found out how the accelerometer is configured. [23:27.540 --> 23:30.800] And the most important part is the accelerometer is configured [23:30.800 --> 23:35.040] to make measurements with a rate of 100 hertz, [23:35.040 --> 23:36.980] so 100 measurements per second. [23:36.980 --> 23:40.900] I think this type of accelerometer can also be configured differently, [23:40.900 --> 23:42.480] so to something like 2 kilohertz, [23:42.480 --> 23:44.460] which would mean that you could also record [23:45.000 --> 23:47.560] or recognize some speech with this. [23:47.560 --> 23:50.520] But the 100 hertz is totally sufficient [23:51.980 --> 23:55.180] for recognizing some gestures and movements. [23:55.560 --> 23:59.720] Actually, already something like 25 hertz would be okay, [23:59.720 --> 24:00.620] so the question is, [24:00.620 --> 24:02.920] could we get the readings of the accelerometer [24:02.920 --> 24:04.520] somehow out of the tracker [24:04.520 --> 24:08.580] with at least a rate of 25 hertz? [24:09.460 --> 24:12.220] And the next problem is a bit that we are restricted [24:12.220 --> 24:14.560] in how to patch this, because we do binary patching, [24:14.560 --> 24:18.340] which means writing code from scratch aside, [24:18.340 --> 24:20.900] it's easier to reuse existing functions. [24:21.120 --> 24:26.640] So what we did is we made a switch into the live mode, [24:26.640 --> 24:28.680] so we are using the live mode, [24:28.680 --> 24:35.020] and then we are copying the XYZ values to the live mode. [24:36.200 --> 24:41.000] And the rate of this is the Bluetooth LE packet rate, [24:41.000 --> 24:43.840] and so you can put out the readings [24:43.840 --> 24:45.920] with something like 66 hertz, [24:45.920 --> 24:48.720] so it's not as much as the original readings, [24:48.720 --> 24:52.040] but it's still sufficient if you want to develop something [24:52.040 --> 24:53.920] that recognizes movements. [24:56.300 --> 24:58.900] And the use cases are various, [24:58.900 --> 25:03.420] so for example, you could now develop your own algorithms [25:03.420 --> 25:06.380] that do something with accelerometers, [25:06.380 --> 25:08.280] so recognize, I don't know, some gestures [25:08.280 --> 25:10.480] on top of step counts. [25:11.200 --> 25:13.140] And this you could do with Python [25:13.140 --> 25:18.660] or whatever you like on your smartphone in Java, whatever. [25:18.720 --> 25:20.220] And then once you have all the logic [25:20.220 --> 25:22.580] of how to recognize those movements, [25:22.580 --> 25:25.600] you can then point it back to C code with Nexamon, [25:25.600 --> 25:28.020] because putting out the readings over Bluetooth [25:28.020 --> 25:29.660] is draining the battery a lot, [25:29.660 --> 25:32.420] so it's nothing to do forever, [25:32.420 --> 25:34.840] but at least for development, it's very interesting. [25:35.560 --> 25:37.220] So the versions that you can modify [25:37.220 --> 25:40.240] is actually if you buy a Fitbit One Flex or ChargeHR [25:40.240 --> 25:42.920] that has never ever been updated, [25:42.920 --> 25:45.720] so a fresh one from the internet, [25:46.940 --> 25:51.220] or if you updated it only a very, very, very long time ago, [25:51.220 --> 25:56.500] so something like it was never updated since October 2017. [25:57.980 --> 26:00.540] And the ChargeHR would also allow you [26:00.540 --> 26:02.140] to access the heart rate sensor, [26:02.140 --> 26:04.680] so there's also some help commands with this, [26:04.680 --> 26:08.300] but we didn't release a patch for this so far, [26:08.300 --> 26:09.620] but if someone is very interested, [26:09.620 --> 26:11.240] we can look into this, of course. [26:11.240 --> 26:14.460] Yeah, so much about the trackers, [26:14.460 --> 26:16.120] and now we are going to tell you more [26:16.120 --> 26:18.440] about the new smartwatch. [26:21.600 --> 26:24.300] Okay, as Kiska said, [26:24.300 --> 26:26.720] I'll be switching back to the Fitbit Ionic for a bit [26:27.280 --> 26:29.020] and tell you about some of the insights [26:29.020 --> 26:31.420] that we gained during testing. [26:31.500 --> 26:33.060] So, as I've already mentioned, [26:33.060 --> 26:35.080] the most interesting parts of the Fitbit Ionic [26:35.080 --> 26:36.240] from our point of view [26:37.860 --> 26:39.600] are Fitbit Pay, [26:39.600 --> 26:42.380] the custom application installation capability, [26:42.380 --> 26:45.940] as well as the way that the Ionic synchronizes data. [26:45.940 --> 26:47.400] Synchronization is very interesting [26:47.400 --> 26:49.700] because we found that it heavily relies [26:49.700 --> 26:51.620] on the old Fitbit ecosystem [26:51.620 --> 26:53.580] and reuses old functionality, [26:53.580 --> 26:56.500] and we wanted to see whether all the old vulnerabilities [26:56.500 --> 26:58.500] are still present there. [26:58.520 --> 27:00.940] One thing to know about custom applications [27:00.940 --> 27:04.960] is that the process of installing heavily relies [27:04.960 --> 27:06.560] on the Wi-Fi interface, [27:06.560 --> 27:10.020] and for this, Fitbit consistently uses TLS, [27:10.020 --> 27:11.300] and sometimes, for example, [27:11.300 --> 27:13.180] during the download of firmware, [27:13.180 --> 27:16.220] they even use mutually authenticated TLS [27:16.220 --> 27:18.280] using server and client certificates, [27:18.280 --> 27:20.640] so it's rather hard to get in between the communication [27:20.640 --> 27:22.880] or modify communication. [27:24.080 --> 27:25.860] So I'll skip applications [27:25.860 --> 27:27.520] and focus on Fitbit Pay [27:27.520 --> 27:29.080] as well as synchronization [27:29.080 --> 27:31.000] in the next couple of slides. [27:31.820 --> 27:34.700] So one thing that I've talked quite a bit about already [27:34.700 --> 27:36.160] is Bluetooth for Energy, [27:36.160 --> 27:37.640] and as the name suggests, [27:37.640 --> 27:39.340] it is closely related to Bluetooth, [27:39.340 --> 27:40.620] yet a bit different, [27:40.620 --> 27:44.280] because it has been designed for energy-constrained devices. [27:44.420 --> 27:47.080] It operates on the 2.4 gigahertz frequency [27:47.080 --> 27:48.940] and performs frequency hopping [27:48.940 --> 27:50.560] on 40 channels, [27:50.560 --> 27:54.000] of which 37 are used for data transmission. [27:54.620 --> 27:56.060] The generic attribute profile [27:56.060 --> 27:59.680] is another layer within the Bluetooth for Energy protocol stack, [27:59.680 --> 28:01.220] and it groups related information [28:01.220 --> 28:03.380] into services and characteristics, [28:03.380 --> 28:04.920] and the smallest bit of information [28:04.920 --> 28:08.520] on this layer is called an attribute, [28:08.520 --> 28:10.920] hence the name generic attribute profile. [28:11.200 --> 28:12.520] So the Fitbit Ionic [28:12.520 --> 28:14.780] uses Bluetooth for Energy 4.2, [28:14.780 --> 28:17.720] which is the latest Bluetooth for Energy version, [28:17.720 --> 28:20.100] despite setting otherwise on the official website, [28:20.100 --> 28:20.740] which is weird. [28:20.740 --> 28:22.940] It says 4.0 on the website. [28:23.220 --> 28:24.580] And Bluetooth for Energy [28:24.580 --> 28:26.340] is not known for being [28:26.340 --> 28:29.740] the most secure standard by design. [28:29.960 --> 28:31.620] There is one pairing method [28:31.620 --> 28:33.160] called JustWorks, [28:33.160 --> 28:35.660] which essentially is the most [28:35.660 --> 28:37.800] unsecure pairing method that you could use, [28:37.800 --> 28:41.180] because it does not use authentication, [28:41.180 --> 28:43.240] and depending on the Bluetooth for Energy version, [28:43.240 --> 28:45.300] you can also launch active or passive [28:45.300 --> 28:48.020] eavesdropping and man-in-the-middle attacks. [28:48.360 --> 28:50.980] And this is precisely what the Fitbit Ionic uses. [28:50.980 --> 28:53.240] It enforces the use of JustWorks pairing. [28:53.240 --> 28:56.240] You cannot use anything else with your smartwatch, [28:56.240 --> 28:58.820] and we assume that this is due to usability issues, [28:58.820 --> 29:01.700] because it does not require user interaction. [29:02.760 --> 29:04.060] Also, the Fitbit Ionic [29:04.060 --> 29:05.780] exposes five different services [29:05.780 --> 29:08.840] on the generic attribute profile layer, [29:08.840 --> 29:11.640] and two of those services are proprietary, [29:11.640 --> 29:13.020] and these are used by Fitbit [29:13.020 --> 29:17.020] to layer their own application layer protocol on top. [29:17.600 --> 29:19.400] And this application layer protocol [29:19.400 --> 29:22.080] is what I'd like to dive a bit into [29:22.080 --> 29:23.960] in the next couple of slides. [29:24.100 --> 29:25.580] Some things are legacy [29:25.580 --> 29:28.420] and have already been present in previous trackers, [29:28.420 --> 29:31.400] and some things are new and specific to the Fitbit Ionic. [29:31.400 --> 29:33.160] So one thing Jiska already mentioned [29:33.160 --> 29:35.380] is the so-called live data, [29:35.380 --> 29:39.040] which is the real-time fitness information of a user. [29:39.340 --> 29:42.900] And this is still included and present on the Fitbit Ionic. [29:42.900 --> 29:45.540] It is not protected in any way on the application layer [29:45.540 --> 29:49.100] and sent between the smartwatch and the Ionic. [29:49.440 --> 29:51.660] Another type of data that is present [29:51.660 --> 29:53.380] on this application layer protocol [29:53.380 --> 29:55.400] is so-called command messages. [29:55.400 --> 29:57.080] They either instruct the receiving side [29:57.080 --> 30:00.040] to take a certain action or signal a state. [30:00.700 --> 30:02.560] And there have been modifications [30:02.560 --> 30:05.680] to previous ones or older ones from older trackers [30:05.680 --> 30:07.440] for the Fitbit Ionic. [30:07.440 --> 30:10.360] And there are also a couple of new ones that have been introduced. [30:10.360 --> 30:12.560] And they are also not protected on the application layer [30:12.560 --> 30:14.620] and exchanged between the smartwatch [30:14.620 --> 30:17.980] and the Fitbit application. [30:18.780 --> 30:21.100] One thing that is new to the Fitbit Ionic [30:21.100 --> 30:23.740] are something that we call app dumps. [30:24.080 --> 30:26.360] App dumps because they are exchanged [30:26.360 --> 30:30.100] between the Fitbit application and the Fitbit Ionic. [30:30.100 --> 30:34.620] And they are encrypted dumps, encrypted blobs of data. [30:35.040 --> 30:38.440] They are encrypted using AES in EAX mode [30:38.440 --> 30:40.700] using a symmetric key of course. [30:40.700 --> 30:42.940] And this key is derived using a proprietary [30:42.940 --> 30:45.180] session key derivation protocol [30:45.180 --> 30:47.080] that has been designed by Fitbit. [30:47.080 --> 30:49.440] We reverse engineered this protocol. [30:49.440 --> 30:51.080] And unfortunately for us, [30:51.080 --> 30:53.480] we did not find a practical exploit [30:53.480 --> 30:55.600] but only a theoretical attack on this protocol [30:55.600 --> 30:57.680] because it has two independent stages. [30:57.680 --> 31:00.340] And the semantics of the app dumps [31:00.340 --> 31:02.340] are defined in a construct that is called [31:02.340 --> 31:03.960] the Fitbit mobile data protocols [31:03.960 --> 31:06.480] which essentially is a set of XML files [31:06.480 --> 31:10.160] that define which bit and byte [31:10.160 --> 31:13.360] within a protocol byte stream means what exactly. [31:13.400 --> 31:14.960] And the normal thing about app dumps [31:14.960 --> 31:17.600] is that it's the first time that the application [31:17.600 --> 31:20.040] and the Fitbit tracker or smartwatch [31:20.040 --> 31:23.580] has the capability of exchanging encrypted blobs of data. [31:23.580 --> 31:26.300] Previously this was only present or possible [31:26.300 --> 31:29.640] between the Fitbit tracker and the Fitbit servers. [31:29.840 --> 31:31.960] And if you're interested how all of this works, [31:31.960 --> 31:33.240] I have a little Python script [31:33.240 --> 31:35.860] that demonstrates a little proof of concept [31:35.860 --> 31:39.320] to show you how app dumps work [31:39.320 --> 31:41.840] and how the session key derivation protocol works. [31:42.460 --> 31:43.720] And last but not least, [31:43.720 --> 31:45.100] I've already mentioned this, [31:45.100 --> 31:47.440] server dumps are still present on the Fitbit Ionic. [31:47.440 --> 31:49.160] They are exchanged between the Fitbit servers [31:49.160 --> 31:50.500] and the smartwatch. [31:50.500 --> 31:52.500] And they are also encrypted blobs of data [31:52.500 --> 31:54.260] using a symmetric key. [31:54.260 --> 31:56.380] And if you want to get to that data, [31:56.380 --> 31:58.960] you either have to hack the Fitbit servers [31:58.960 --> 32:00.160] or your Fitbit Ionic [32:00.160 --> 32:02.320] because that's where the keys are. [32:02.320 --> 32:05.360] It is completely transparent to the Fitbit mobile application. [32:05.480 --> 32:06.700] And for the Fitbit Ionic, [32:06.700 --> 32:08.860] the server dump header has been modified. [32:10.860 --> 32:12.400] Another thing that we looked into [32:12.400 --> 32:16.060] is the Fitbit pay capability. [32:16.240 --> 32:18.760] And when I heard that you could now pay with your smartwatch, [32:18.760 --> 32:21.280] I had really high hopes that it would be really insecure [32:21.280 --> 32:23.260] so I could find a lot of things. [32:23.260 --> 32:25.380] You can use Fitbit pay [32:25.380 --> 32:28.460] if you have a supported credit or debit card [32:28.460 --> 32:31.460] by one of the banks listed on Fitbit's website. [32:31.460 --> 32:32.380] For instance, [32:32.380 --> 32:34.000] the Bank of America is supported [32:34.000 --> 32:37.280] or the German Landesbank Baden-Württemberg. [32:37.320 --> 32:38.640] And all the payment traffic [32:38.640 --> 32:40.420] is transmitted on the NFC interface [32:40.420 --> 32:43.300] which means it is all transmitted wirelessly. [32:43.320 --> 32:44.040] And the implementation [32:44.040 --> 32:45.940] is according to the EMV standard [32:45.940 --> 32:47.840] or EMV specifications. [32:47.840 --> 32:50.460] And EMV is short for Europay International, [32:50.460 --> 32:52.280] Mastercard and Visa. [32:52.280 --> 32:53.840] And those are just three organizations [32:53.840 --> 32:55.400] that work together to create a common [32:56.120 --> 32:58.900] specification for credit card payments. [32:59.660 --> 33:01.520] The credit card information [33:01.520 --> 33:04.560] is managed using the Fitbit mobile application. [33:04.560 --> 33:05.820] And for this purpose, [33:05.820 --> 33:07.720] Fitbit registered a new web API [33:08.100 --> 33:09.740] that is located under the domain [33:09.740 --> 33:10.820] payables.co [33:12.320 --> 33:13.900] And we focused on [33:13.900 --> 33:16.180] analyzing the payment traffic. [33:16.180 --> 33:18.100] And to do this, we used an app [33:18.100 --> 33:19.480] that is called NFC Gate [33:19.480 --> 33:21.340] which has been developed [33:21.340 --> 33:23.280] within the CIMO Research Group, [33:23.280 --> 33:25.760] the Secure Mobile Networking Lab. [33:25.840 --> 33:27.000] And if you are interested in [33:27.000 --> 33:28.940] sniffing your own payment traffic [33:28.940 --> 33:30.960] using this very cost-effective setup, [33:30.960 --> 33:32.760] you can go to the link below of this slide [33:32.760 --> 33:34.760] which is nfc.wgf [33:35.480 --> 33:37.220] And what NFC Gate does [33:37.220 --> 33:39.480] essentially is it creates a Wi-Fi wormhole [33:39.480 --> 33:41.360] so the first app on the first [33:41.360 --> 33:42.880] smartphone captures the NFC traffic [33:42.880 --> 33:45.040] from the Fitbit Ionic, sends it via Wi-Fi [33:45.040 --> 33:46.980] to the NFC Gate server that is also [33:46.980 --> 33:48.320] able to lock the traffic [33:48.320 --> 33:50.300] and from there the traffic will be [33:50.940 --> 33:52.420] relayed to the other NFC Gate app [33:52.800 --> 33:54.780] where the data is sent via [33:54.780 --> 33:56.840] NFC to its destination which in this case [33:56.840 --> 33:59.660] is the payment terminal and vice versa. [34:01.780 --> 34:02.680] Okay, so [34:02.680 --> 34:04.980] after analyzing and [34:04.980 --> 34:07.060] experimenting with this, we found [34:08.260 --> 34:08.820] unfortunately [34:08.820 --> 34:11.040] for us that it is rather secure [34:11.040 --> 34:12.920] in terms of what is recommended [34:12.920 --> 34:14.860] in the EMV standard. [34:14.860 --> 34:16.400] So for instance [34:16.400 --> 34:18.640] something that is called tokenization [34:18.640 --> 34:20.780] is used during payment which means that [34:20.780 --> 34:22.580] your credit card number is never [34:22.580 --> 34:24.660] transmitted in plain text, instead it is [34:24.660 --> 34:26.760] replaced with a so-called token [34:26.760 --> 34:28.920] which essentially is a pseudonym [34:28.920 --> 34:30.140] for your credit card [34:30.860 --> 34:32.960] number. Also a so-called [34:32.960 --> 34:35.060] authorization request cryptogram is used [34:35.060 --> 34:36.520] which is a MAC that is [34:36.520 --> 34:38.900] computed among other things over the [34:38.900 --> 34:40.940] transaction details using a session [34:40.940 --> 34:43.020] key that is derived from the credit card's [34:43.020 --> 34:45.200] master key and a transaction counter. [34:45.280 --> 34:47.000] And what this does is that the [34:47.000 --> 34:48.800] transaction cannot be modified or [34:48.800 --> 34:51.240] replayed. And last but not least [34:51.520 --> 34:52.880] a four-digit PIN is used [34:52.880 --> 34:55.040] as soon as you decide to set up Fitbit Pay [34:55.040 --> 34:56.980] which is supposed to lessen the probability [34:56.980 --> 34:59.120] of someone else paying with your watch [34:59.120 --> 35:01.200] and it is also used during a process [35:01.200 --> 35:02.960] that is called consumer device [35:02.960 --> 35:04.920] cardholder verification which [35:04.920 --> 35:06.820] proves your identity as a cardholder [35:06.820 --> 35:08.720] towards the payment terminal. [35:09.240 --> 35:11.080] And to sum all of this up [35:11.080 --> 35:13.040] the security when [35:13.040 --> 35:15.300] paying with your Fitbit Ionic [35:15.300 --> 35:17.000] is pretty much the same than [35:17.000 --> 35:18.800] paying with your contactless [35:18.800 --> 35:21.020] plastic credit card. [35:21.740 --> 35:22.480] Yeah. [35:24.160 --> 35:25.000] Okay. [35:25.000 --> 35:27.040] And next I would like to dive a bit into [35:27.040 --> 35:29.000] all the vulnerabilities that we [35:29.000 --> 35:31.080] found on the Bluetooth interface which is something [35:31.080 --> 35:33.000] that we dedicated [35:33.200 --> 35:34.660] a bit more time to. [35:35.180 --> 35:37.040] And for this purpose I grouped all [35:37.040 --> 35:38.940] the vulnerabilities we identified in two [35:38.940 --> 35:40.980] categories. On the left-hand side [35:40.980 --> 35:43.020] you see all the vulnerabilities that are new to [35:43.020 --> 35:45.060] the Fitbit Ionic and have not been present [35:45.060 --> 35:46.980] in previous trackers. And on [35:46.980 --> 35:48.980] the right-hand side you see the vulnerabilities [35:48.980 --> 35:51.000] that are due to legacy implementations [35:51.000 --> 35:52.840] and have been known to be present [35:52.840 --> 35:54.920] in previous trackers. And what is pretty [35:54.920 --> 35:57.000] obvious is that the right-hand side is much [35:57.000 --> 35:58.820] larger. There's much more vulnerabilities [35:58.820 --> 36:01.100] and this is because Fitbit relies [36:01.100 --> 36:03.000] on its old ecosystem and has the [36:03.000 --> 36:04.700] need for backwards compatibility. [36:04.800 --> 36:06.960] So they reuse a lot of [36:06.960 --> 36:08.800] old stuff and implementations [36:08.800 --> 36:11.220] and this of course causes all the old vulnerabilities [36:11.220 --> 36:12.860] to still be present. [36:13.280 --> 36:15.080] Instead of explaining each and every [36:15.080 --> 36:16.920] one of those vulnerabilities, I'd [36:16.920 --> 36:19.040] just like to point out the main points [36:19.040 --> 36:20.600] of criticism that we have here [36:20.600 --> 36:22.900] and that are or that essentially [36:22.900 --> 36:25.220] cause all of these vulnerabilities. [36:25.220 --> 36:27.080] So one thing that I've already talked to you about [36:27.080 --> 36:29.080] of course is the weak Bluetooth Low Energy [36:29.080 --> 36:30.940] pairing that just works pairing method [36:31.660 --> 36:32.940] and also we found [36:32.940 --> 36:34.760] that Bluetooth Low Energy security is [36:34.760 --> 36:36.840] inconsistently enforced. This means [36:36.840 --> 36:38.800] once the connection is set up between [36:38.800 --> 36:40.580] your Fitbit Ionic and the smartphone [36:40.580 --> 36:42.300] application, [36:42.300 --> 36:44.580] Bluetooth Low Energy pairing does not instantly [36:44.580 --> 36:46.660] kick in. Instead it takes some [36:46.660 --> 36:48.740] time until pairing happens and during [36:48.740 --> 36:50.680] this time all of your data will be transmitted [36:50.680 --> 36:52.720] in plain text which of course is [36:52.720 --> 36:54.860] not that great. So our recommendation [36:54.860 --> 36:56.740] would be to use secure connections [36:56.740 --> 36:58.680] whenever possible which is present in Bluetooth [36:58.680 --> 37:00.900] 4.2 and use a pairing [37:00.900 --> 37:03.460] method that uses authentication. [37:03.460 --> 37:05.480] Also Jiska already [37:05.480 --> 37:07.520] said there is a problem with [37:07.520 --> 37:09.300] reusable authentication credentials [37:09.300 --> 37:11.580] for live data and this problem is [37:11.580 --> 37:13.380] still present on the Fitbit Ionic [37:13.380 --> 37:15.540] so if an attacker through whichever means [37:15.540 --> 37:17.600] acquires those authentication credentials [37:17.600 --> 37:19.640] they will forever be able to request [37:19.640 --> 37:21.640] live data from your smartwatch and of [37:21.640 --> 37:23.520] course this is also something that you do [37:23.520 --> 37:25.420] definitely not want. So [37:25.420 --> 37:27.440] the reuse of those authentication [37:27.440 --> 37:29.580] credentials should be prevented for example [37:29.580 --> 37:31.620] by associating them with a validity [37:31.620 --> 37:33.600] period or if that's not possible [37:33.600 --> 37:35.600] maybe just plainly store the last [37:35.600 --> 37:37.620] used authentication credentials because they [37:37.620 --> 37:40.340] are usually not swapped out that often. [37:40.800 --> 37:41.840] Another problem [37:41.840 --> 37:43.800] that persists is that live data [37:43.800 --> 37:45.720] is not protected on the application layer [37:45.720 --> 37:47.600] and this is a problem if you [37:47.600 --> 37:49.700] use a weak Bluetooth 4.0 energy pairing [37:49.700 --> 37:51.520] method as the Fitbit Ionic [37:51.520 --> 37:53.660] does or if at [37:53.660 --> 37:55.760] the beginning of each connection the traffic [37:55.760 --> 37:57.700] is not instantly protected so our [37:57.700 --> 37:59.620] recommendation at this point would be to [37:59.620 --> 38:01.360] encrypt live data with a similar [38:02.600 --> 38:03.800] mechanism that [38:03.800 --> 38:05.600] EPTOMs are protected with and [38:05.600 --> 38:07.520] this of course would introduce some additional [38:07.520 --> 38:09.680] delays so your real [38:09.680 --> 38:11.520] time data would not be entirely [38:11.520 --> 38:13.700] real time anymore but security [38:13.700 --> 38:15.620] has never been convenient so... [38:16.240 --> 38:17.520] and last but not least [38:17.520 --> 38:19.480] I also found some testing commands [38:19.480 --> 38:20.920] to be present in production [38:21.560 --> 38:24.040] for example I found a [38:24.040 --> 38:25.840] command that allows you which is one command [38:25.840 --> 38:27.400] to request a very large [38:27.400 --> 38:29.480] test dump. It's just meaningless test data [38:29.480 --> 38:31.460] but it's rather large and I was [38:31.460 --> 38:33.420] able to keep the Fitbit Ionic sending [38:33.420 --> 38:35.400] for 45 minutes straight. You could keep [38:35.400 --> 38:36.940] this for even longer [38:36.940 --> 38:39.420] and what it does is that it drains the Fitbit [38:39.420 --> 38:41.480] Ionic's battery quite quickly and for [38:41.480 --> 38:43.500] whatever reason the UI becomes [38:43.500 --> 38:45.420] very sluggish and unresponsive so you [38:45.420 --> 38:47.120] can't really use your smartwatch anymore [38:47.880 --> 38:48.440] and [38:49.280 --> 38:51.340] that's just pretty much unnecessary [38:51.340 --> 38:53.480] so our recommendation would be [38:53.480 --> 38:55.420] to employ a process that ensures [38:55.420 --> 38:57.360] that all your testing code is not rolled [38:57.360 --> 38:59.080] out to production which is probably [38:59.080 --> 39:01.580] something that is standard in software [39:01.580 --> 39:02.760] development. [39:03.480 --> 39:04.320] Okay. [39:06.200 --> 39:06.800] So [39:07.420 --> 39:08.840] to conclude our [39:09.420 --> 39:09.960] talk [39:11.260 --> 39:13.360] we have three major points [39:13.360 --> 39:15.300] which we want to [39:15.300 --> 39:16.780] point out. So [39:17.160 --> 39:19.300] in general we can say that Fitbit [39:19.300 --> 39:21.300] products improved a lot during [39:21.300 --> 39:23.320] the years which we observed them [39:25.020 --> 39:26.180] in general [39:26.180 --> 39:27.320] they have the problem of [39:27.320 --> 39:29.420] compatibility for [39:29.420 --> 39:31.100] older trackers so the app [39:31.100 --> 39:33.380] still needs to have [39:33.380 --> 39:34.600] this legacy protocol [39:35.500 --> 39:37.260] which needs to talk via [39:37.260 --> 39:38.800] Bluetooth and in general [39:39.580 --> 39:41.340] it seems that Fitbit just [39:41.340 --> 39:43.200] likes to implement [39:43.200 --> 39:45.620] encryption in weird ways. [39:45.940 --> 39:47.400] So that's it from our side [39:47.400 --> 39:48.980] thanks for your time [39:48.980 --> 39:51.140] and I guess we have now some time for [39:51.140 --> 39:52.780] Q&A. [40:02.880 --> 40:03.840] Questions? [40:09.780 --> 40:12.160] So the question was if we already [40:12.160 --> 40:13.680] looked into the app, right? [40:13.680 --> 40:16.480] Do you want to talk about this? [40:16.720 --> 40:18.160] Yeah, so we looked into the app [40:18.160 --> 40:20.360] so Caroline did it and me too [40:20.940 --> 40:22.460] for understanding for example [40:22.460 --> 40:23.820] how the firmware is [40:23.820 --> 40:26.200] and so on and we patched [40:26.200 --> 40:28.080] the APK and made some [40:28.080 --> 40:30.040] debug prints and so on to get an [40:30.040 --> 40:31.620] idea of what is going on. [40:54.000 --> 40:55.780] Okay, so the question was [40:55.780 --> 40:57.970] with the secure connections [40:58.380 --> 40:59.620] and the pairing [40:59.620 --> 41:01.760] how it works and why it [41:01.760 --> 41:03.000] kicks in later? [41:04.020 --> 41:05.940] So, I do not know why [41:05.940 --> 41:07.860] but I would expect that you pair [41:07.860 --> 41:10.140] or use a secure [41:10.140 --> 41:11.940] encrypted connection before you exchange [41:11.940 --> 41:13.860] any data between the smartwatch and [41:13.860 --> 41:16.160] the application and this just doesn't happen. [41:16.480 --> 41:18.000] They exchange data for a couple [41:18.000 --> 41:19.500] of seconds and then randomly [41:19.500 --> 41:21.800] pairing starts. [41:21.800 --> 41:23.900] I don't know why but I've seen [41:23.900 --> 41:25.340] this quite a lot when testing. [41:40.220 --> 41:41.420] Ah, so the question [41:41.420 --> 41:43.140] was if we also looked into other [41:43.140 --> 41:45.340] smartwatches. So actually another [41:45.340 --> 41:46.640] group at our university [41:47.160 --> 41:48.600] initially did a study on [41:49.160 --> 41:51.140] fitness trackers in general. I think that was [41:51.140 --> 41:53.160] back in 2017 or so [41:53.160 --> 41:55.020] or 2016 and [41:55.020 --> 41:56.540] they bought something like [41:57.220 --> 41:58.180] 16, 17 [41:59.340 --> 42:01.240] trackers, different kinds and [42:01.240 --> 42:03.300] what they found out is that most [42:03.300 --> 42:05.420] IOT fitness trackers do [42:05.420 --> 42:07.460] not even encrypt the data. [42:07.840 --> 42:09.060] So we actually [42:09.060 --> 42:11.380] picked Fitbit because we thought it's like [42:11.700 --> 42:13.860] a very interesting ecosystem. [42:13.860 --> 42:15.680] They have encryption and so on. [42:16.060 --> 42:17.260] So it's like we are [42:17.260 --> 42:18.960] hacking the strongest [42:18.960 --> 42:21.800] implementation. But yeah. [42:23.860 --> 42:25.100] Yeah. [42:30.220 --> 42:31.500] Ah, so the question is [42:31.500 --> 42:33.560] there's some Fitbits with GPS. [42:33.560 --> 42:35.800] I think it's the Fitbit search or something. [42:35.800 --> 42:37.860] But that one has been [42:37.860 --> 42:39.880] produced after 2015 so [42:39.880 --> 42:41.080] it's encrypted. [42:41.680 --> 42:43.700] And then it's harder to do it so [42:43.700 --> 42:45.760] that's why we just went then [42:45.760 --> 42:48.260] straight to the Ionic to see what changed. [42:48.440 --> 42:49.920] I assume that some [42:49.920 --> 42:51.940] stuff would be similar so if you would [42:51.940 --> 42:54.020] open the PCB and so on [42:54.020 --> 42:55.640] then you could maybe extract the firmware [42:55.640 --> 42:57.740] again. But then you only [42:57.740 --> 42:59.300] have access to this one tracker [42:59.940 --> 43:01.720] with the one encryption key that is [43:01.720 --> 43:03.400] on this very same tracker. [43:03.400 --> 43:05.240] And that's a lot of effort [43:05.240 --> 43:07.560] for just taking one device. [43:14.840 --> 43:15.380] Okay, then [43:15.380 --> 43:17.320] thank you for listening. We will be around here [43:17.320 --> 43:19.060] for a bit more if you have any questions. [43:19.060 --> 43:21.320] Also on how we patched [43:21.320 --> 43:23.300] the firmware for example. That might be interesting for [43:23.300 --> 43:25.280] some of you. Yeah. [43:25.280 --> 43:26.120] Thank you.