[00:00.000 --> 00:03.940] Okay guys, thanks for coming to the Biohacking Village. If you've been here for earlier talks today, [00:03.940 --> 00:08.720] thank you for coming back. If it's your first one, welcome. We have, if you guys haven't, [00:08.720 --> 00:14.620] visited the CTF down the hall. It's a pretty impressive array of technologies. I suggest you [00:14.620 --> 00:19.280] guys go over there and try to break some things. Next door we have classroom stuff where actually [00:19.280 --> 00:24.740] we're assembling some prosthetics at the moment right now for somebody who gave a presentation [00:24.740 --> 00:29.580] earlier. And we also have the wonderful speaker track here where we're sharing a lot of information [00:29.580 --> 00:35.500] from some of the great research that's going on in the community. With that, in between talks, [00:35.500 --> 00:41.640] we also have some donation work here. As you know, this is a non-profit. The work done here and the [00:41.640 --> 00:45.200] money collected here is both to help fund and do the process and projects of these things around [00:45.200 --> 00:50.300] here. In exchange, we have some things that we'll give you as being a participant in that. [00:51.320 --> 00:56.220] So I'd like to introduce Dr. Avi Rubin. He's a professor at Johns Hopkins University. [00:56.220 --> 01:00.120] He also serves as the technical director of the JHU Information Security Institute. [01:00.720 --> 01:04.720] He's the founder and director of the JHU Health and Medical Security Lab and is working advancing [01:04.720 --> 01:11.880] medical devices and security in healthcare networks. He's got, he'll, he'll also introduce [01:11.880 --> 01:16.120] his co-presenter. But I want to give you an opportunity to welcome him here to speak [01:16.120 --> 01:35.110] here at the Biohacking Village. Okay, hi everyone. It's, it's nice to be here. This is my first [01:35.110 --> 01:41.290] DEF CON. I'm used to going to academic conferences and the first thing I was told when I showed up [01:41.290 --> 01:46.110] here and I presented myself as a speaker, I was wearing khaki pants and I was told you can't [01:46.110 --> 01:51.570] speak like that. This is a hacking conference and you have to change into jeans. And so I did. I [01:51.570 --> 01:56.630] followed the rules and I changed into jeans. What's really weird for me about DEF CON is I'm [01:56.630 --> 02:01.030] really not used to being the least geeky person around because in most of the circles that I go, [02:01.030 --> 02:07.770] I'm the geek. But there's a whole other level here and I'm enjoying it a lot. As the intro, [02:07.770 --> 02:11.690] introduction mentioned, I'm the director of the health and medical security lab at Hopkins. [02:11.790 --> 02:16.970] When you're a professor at a university, you get to create your own lab and you get to name it. [02:16.970 --> 02:23.510] And I love boats and ships and I wanted a lab that was like HMS lab, right? Does anybody know, [02:23.510 --> 02:28.950] you guys look like an educated crowd here. What, what HMS stands for? Why ships are like the HMS [02:28.950 --> 02:35.210] this? That's right. Her majesty's ships. So you won't find American ships. We name our ships [02:36.110 --> 02:41.310] after presidents and states, but a lot of the British ships are the HMS this and that. So I'm [02:41.310 --> 02:46.850] the HMS lab. It's the health and medical security lab. And let me give you a little bit of background [02:46.850 --> 02:54.010] about how, um, the work that I've done, how I got there. And, uh, that'll kind of segue into the [02:54.010 --> 02:57.850] technical work that we're going to present and have a co-presenter that I'll introduce in a [02:57.850 --> 03:04.630] minute too. So I am a professor at Johns Hopkins and most of you probably know Hopkins as a medical [03:04.630 --> 03:09.790] school and a medical facility and a hospital. In fact, when I meet people socially, like the, [03:09.790 --> 03:14.550] the parents of my kids' friends, they just assume I'm a medical doctor. They'll come talk to me [03:14.550 --> 03:18.610] about their ailments and things like that. It's just, you know, if you're at Johns Hopkins, [03:18.610 --> 03:24.410] there's this kind of force to work on medical stuff. So I started out at Hopkins in 2003, [03:24.410 --> 03:28.770] working on electronic voting security. I did that for about seven or eight years. [03:28.770 --> 03:33.250] But when you're at Hopkins, there's this sucking that happens towards you. I'm not saying like we [03:33.250 --> 03:37.990] suck. I'm saying like it pulls you like the Ross Perot kind of sucking that, that it pulls you [03:37.990 --> 03:43.290] into it. And you have to work on, uh, medical stuff because the doctors will come around and [03:43.290 --> 03:47.290] say, Hey, I've got this problem. Can you help me? And their medical record systems. And I'm [03:47.390 --> 03:52.390] a security guy. And so pretty soon I found myself working on medical stuff, created the health and [03:52.390 --> 03:56.650] medical security lab, started training up students. Um, and we started looking at all kinds [03:56.650 --> 04:03.250] of things. One of the seminal things that happened in this field is a paper at the IEEE security and [04:03.250 --> 04:07.150] privacy conference. We call it the Oakland conference. It's the number one rated academic [04:07.150 --> 04:12.750] conference, uh, by some of my colleagues, Kevin Fu, Yoshi Kono. And it was where they had taken [04:13.170 --> 04:17.050] a defibrillator, wrapped it in a bunch of meat. So it would simulate being inside of a person [04:17.050 --> 04:21.390] and launched a bunch of attacks against it. And it kind of woke up the industry because [04:21.390 --> 04:27.550] the press got very interested in this and it just got very high profile. And so the field, I felt [04:27.550 --> 04:33.270] like the field of health and medical security, at least for academics really took off after that [04:33.270 --> 04:39.470] paper. And so I applied for grants and was part of a group that got a 15 and a half million dollar [04:39.470 --> 04:44.630] grant from the ONC, which is the office of the national coordinator in health and human services [04:44.630 --> 04:49.870] to do health and medical security research. When that project ended, we got a $10 million grant [04:49.870 --> 04:55.370] from NSF to do the same. And we worked on projects like encrypting of medical records using [04:55.370 --> 05:00.310] attribute-based encryption and we used, um, performing role-based access control via [05:00.310 --> 05:04.170] attribute-based encryption. That's the kind of stuff that I like. So I am a geek. I do call, [05:04.170 --> 05:11.050] I do qualify for that. Um, and we also looked at medical devices. And in my lab, I had students [05:11.050 --> 05:16.170] that we were getting our hands on medical devices. They were, uh, flashing the, the, the ROM on [05:16.170 --> 05:21.450] there and then analyzing the firmware. And so we developed a set of expertise and skills in that [05:21.970 --> 05:27.730] and, um, published a lot of papers. And then some of those students from that lab, uh, came to work [05:27.730 --> 05:32.530] for me after when I started Harbor Labs, which is my company. And Harbor Labs started because I was [05:32.530 --> 05:36.630] getting approached by a lot of medical device companies. Once I started publishing in this area [05:36.630 --> 05:41.330] saying, you know, we would like some help, some consulting help with the security of our systems. [05:41.450 --> 05:44.790] And I have all these really smart students graduating and light bulb went off. I said, [05:44.790 --> 05:49.590] why don't I start a company? We'll do this type of thing professionally. Um, and so that's what we [05:49.590 --> 05:55.670] do. So that's the long winded introduction, um, of my background. And Mike Reshanan is here. Put [05:55.670 --> 06:01.770] your hand up. Um, Mike was a PhD student of mine who finished his PhD in the HMS lab and is now [06:01.770 --> 06:06.570] the director of medical security at Harbor Labs. And he and I are going to co-speak today. So I [06:06.570 --> 06:10.390] also brought him here in case you guys ask any hard questions, direct them to him. He's more [06:10.390 --> 06:19.190] likely to be able to answer them. So, um, this is kind of the high level outline of the talk. I'm [06:19.190 --> 06:24.490] going to talk about, um, what happens when you have a medical device and you care about the [06:24.490 --> 06:29.430] security of it. Uh, and what should you do if you're building a medical device and you want to [06:29.430 --> 06:34.870] get through, uh, regulatory, uh, certification, you want to make sure that your device is [06:34.870 --> 06:41.810] actually secure. And what I'd like to do is base the talk on a tool that we built and show you the [06:41.810 --> 06:46.850] various steps that this tool can take you through. And then Mike will take you into some of the [06:46.850 --> 06:52.570] case studies of actual projects we worked on with clients who built medical devices and ran into [06:52.570 --> 06:57.190] hiccups when they tried to get certification for them and show you like how we help them solve [06:57.190 --> 07:05.210] those problems. So, um, I like to ask the audience who knows what things are because that [07:05.210 --> 07:11.110] shows me the audience is alive. So, who knows what a BOM is? B-O-M. Wow, okay, we have an [07:11.110 --> 07:16.010] audience that is way above the level that I expected for this talk. Um, for those of you that [07:16.010 --> 07:22.590] didn't, uh, raise your hands, it's a bill of materials. And why is a BOM important? Well, let me [07:22.590 --> 07:28.630] get into talking about a firmware. So, if we're looking at a medical device, the software that [07:28.630 --> 07:34.310] runs it, the logic behind it is going to be in a firmware file. And if you're in a company that [07:34.310 --> 07:38.510] builds these things, which I think many of you are, you know that you can have a team that's [07:38.510 --> 07:42.430] building the software and then you have someone on the team that puts something in there and [07:42.430 --> 07:46.370] then they leave the team and somebody else comes in. This dynamic kind of flow of people [07:46.370 --> 07:51.250] through the development of a project that lasts many years. And there may not be anyone in the [07:51.250 --> 07:55.590] organization that actually knows everything that's in this firmware. Because a firmware [07:55.590 --> 07:59.870] image, you know, it's usually a Linux distribution. It's got a lot of open source packages [07:59.870 --> 08:04.030] in there. It's got libraries. Somebody finds a tool and they say, this would be a great tool in [08:04.030 --> 08:08.490] our firmware. There's a web server in there. They put that in the, in the firmware. And then [08:08.490 --> 08:14.250] the firmware is kind of a, a living and breathing thing. And if you go to get certified for the [08:14.250 --> 08:19.410] medical device, uh, the regulators are going to say, okay, what's your bill of material? And you [08:19.410 --> 08:24.130] may not know, you may not know everything that's in there. And so one of the things that we did [08:24.130 --> 08:29.510] is, uh, built a tool that will automatically extract, it'll unpack a firmware binary and [08:29.510 --> 08:35.030] automatically extract all of the, uh, materials that are in there, all of the software that the [08:35.030 --> 08:40.350] firmware uses. And that's actually not as easy as you might think, because you're talking [08:40.350 --> 08:46.110] about binaries and the binaries may not have necessarily a string that has the name of the [08:46.110 --> 08:51.230] package that you're using or the version number. And so we used, um, all the material available [08:51.230 --> 08:55.470] at our disposal, both external to the firmware and inside the firmware and did some fuzzing [08:55.470 --> 09:00.370] matching and came up with what I think is a pretty good system for figuring out what are all [09:00.370 --> 09:05.450] the pieces that are inside of this firmware. And why does that matter from a security [09:05.450 --> 09:10.590] perspective? Well, there's a national vulnerability database that has these common [09:10.590 --> 09:15.450] vulnerability and exposures, which are called CVEs, that are vulnerabilities that are known [09:15.450 --> 09:20.770] for various software packages. So let's say that your firmware in this medical device has [09:20.770 --> 09:25.110] package X. It's a software package that does something that the firmware wanted to do. It's [09:25.110 --> 09:28.450] not something that was developed by the manufacturer, it was something open source that [09:28.450 --> 09:35.450] they found. And version 3 of, uh, product X has a serious security problem in it. And it has [09:35.570 --> 09:40.850] a CVE in the national vulnerability database. And so what the tool can do is, when it [09:40.850 --> 09:46.830] goes through and unpacks the firmware and it finds that package X, I'm sorry, that package X [09:46.830 --> 09:53.570] version 3 is in there, it can say, aha, there's a CVE associated with this firmware. And if [09:53.570 --> 09:58.630] that thing gets upgraded someday to version 4, maybe there's no CVE for that because the [09:58.630 --> 10:04.390] problem was patched. And so it's important to get a look into a firmware to be able to know [10:04.390 --> 10:10.710] what are the CVEs associated with this firmware. Now, if, let's see how big this is [10:10.710 --> 10:16.210] coming out on here. One of the things that you can have in, um, when you're trying, for [10:16.210 --> 10:21.090] example, to get a medical device, uh, through certification is there can be disqualifying [10:21.090 --> 10:26.690] problems. Like, for example, if you're using a weak algorithm, this says weak algorithm [10:26.690 --> 10:33.790] detected, and that has a CVSS score. CVSS is the common vulnerability scoring system, I [10:33.790 --> 10:40.730] think. And that is a standardized way that, um, the industry takes certain problems and [10:40.730 --> 10:46.110] scores them. And so this is something that you can identify in a firmware file and say, [10:46.110 --> 10:50.090] uh-oh, you know, there's something here that's going to disqualify me from passing. I [10:50.090 --> 10:57.710] need to fix that. I need to put something better in there. And so here you can see that you, [10:57.710 --> 11:02.450] the tool can look through and see all the various CVEs and all the packages. And this is [11:02.450 --> 11:07.850] what we call the pre-market CVEs. That is, you package up your firmware, you run this [11:07.850 --> 11:13.490] through it, you sell your device, and you get your score. It takes the worst score of all [11:13.490 --> 11:18.010] the CVSS scores that are found in the device and gives you that as your overall score for [11:18.010 --> 11:24.990] the firmware. However, a firmware file, believe it or not, in terms of its security, is a [11:24.990 --> 11:30.470] living, breathing thing. It's not static. Why is that? Well, imagine that you put out your [11:30.470 --> 11:36.790] firmware and it uses library X version 3, like I told you before. And you're the developer [11:36.790 --> 11:42.330] of this firmware, so you're like, oh, there's a security flaw in package X version 3. I'm [11:42.330 --> 11:48.270] going to swap out and put in version 4 in there, and now there's not a security flaw. So the [11:48.270 --> 11:52.670] product is out for a while, everything's going great, and then some DEF CON researcher [11:53.470 --> 11:58.230] looks at product X version 4 and finds a really serious vulnerability that nobody knew [11:58.230 --> 12:03.930] about. And so a CVE is issued, and now you're sitting there with a package, a firmware [12:03.930 --> 12:09.010] package, using that version 4 that is believed to be pretty secure, it's got a really good [12:09.010 --> 12:17.190] CVSS score, and it's actually not. Okay? And so what's needed is a way to constantly check [12:17.190 --> 12:30.290] the CVEs, whoops, let me, got a little ahead of myself, to constantly check the CVEs of all [12:30.290 --> 12:34.490] the packages to see if there are new ones. And what our tool does is every night it [12:34.490 --> 12:38.350] downloads the NVD database and then looks at all the packages and all the firmware that [12:38.350 --> 12:43.590] people have analyzed and see, is there a new CVE for one of these things? Let me tell you [12:43.590 --> 12:48.470] another way that your CVSS score can be misleading and where you need to stay on top of [12:48.470 --> 12:54.230] it. One of the packages is to look at crypto, to look at the various settings, the [12:54.230 --> 12:59.210] algorithms, the parameters of the crypto that's being used in the firmware package. And [12:59.210 --> 13:03.750] one of the checks is made to see if a certificate is expired. If the certificate is not [13:03.750 --> 13:08.270] expired, that's not going to hurt your score. But what happens is time moves forward and [13:08.270 --> 13:12.130] the certificate is expired, and so if you don't keep on top of it, and you don't keep [13:12.130 --> 13:17.430] checking it, you could end up with a package that's got security problems that, that you [13:17.430 --> 13:25.010] don't know about. So let me now, before I hand it over to Mike, he's going to talk about a [13:25.010 --> 13:32.590] couple, I think three or four examples, how many? Three examples of actual security work [13:32.590 --> 13:36.930] that we did with medical device manufacturers with some lessons learned from it. And the [13:36.930 --> 13:40.830] first one is about patch management. I just want to say a couple words about patch [13:40.830 --> 13:45.930] management. You all know what patch management is. It's the ability to take a software [13:45.930 --> 13:51.390] package and get new patches to download for them. And there's always the question of, when [13:51.390 --> 13:56.130] do you patch, right? And is the patch going to break my software? Because I've got a [13:56.130 --> 14:00.870] system that works really well, and now the vendor issues a patch, and you have to ask [14:00.870 --> 14:05.850] yourself the trade-off between, well, if I don't patch, I'm vulnerable to this vulnerability [14:05.850 --> 14:10.310] that the patch addresses, and everybody now knows about it because there's been a patch, but [14:10.310 --> 14:14.130] if I do patch, it might break my system, it might actually introduce new vulnerabilities. And [14:14.130 --> 14:19.250] so, system administrators have the unenviable task of figuring out how to manage patches [14:19.250 --> 14:24.810] and when is the right time to patch. If you think that that's difficult, consider a paper, I [14:24.810 --> 14:29.090] believe it was authored out of David Wagner's lab a couple of years ago, in one of the [14:29.090 --> 14:33.490] academic security conferences, where they talk about, I think the title of the paper was [14:33.490 --> 14:38.750] something like, automatic exploit generation from patches. And so, think about what's [14:38.750 --> 14:44.430] going on here. You've got a software package, and somebody finds a vulnerability, so the [14:44.430 --> 14:49.890] vendor issues a patch, and releases it. What this tool does, it's a security tool, but it's [14:49.890 --> 14:54.950] one that hackers could have as well, or could have built and not told anyone, is, it [14:54.950 --> 14:59.350] looks at the patch, and based on what the patch is doing, and based on the original [14:59.350 --> 15:04.070] binary, reverse engineers the vulnerability, and then builds an exploit to take advantage [15:04.070 --> 15:09.010] of that vulnerability, you know, in milliseconds. It's all fully automated. You take a [15:09.010 --> 15:13.090] patch, and the output of their tool is an exploit that takes advantage of the [15:13.090 --> 15:16.970] vulnerability that the patch was addressing. Now, you really don't have a lot of time, if [15:16.970 --> 15:21.830] you've got, like, an online system, to get that patch in there really quickly. Okay. So, [15:21.830 --> 15:24.670] with that, I'll hand it over to Mike. [15:29.720 --> 15:35.300] All right. Thanks, Avi. Hey, everybody. I'm going to talk about some war stories, as it [15:35.300 --> 15:40.880] were. Working with some of our clients, with respect to three different scenarios. So, Avi [15:40.880 --> 15:45.780] gave a great introduction to patch management. In this particular case, we were working [15:45.780 --> 15:51.200] with a medical device manufacturer. They were going, it's a class three device. So, this [15:51.200 --> 15:55.240] is, you know, it has the potential to cause great patient harm, and they were going [15:55.240 --> 16:00.380] through a PMA evaluation. So, that's working directly with the FDA, to review their [16:00.380 --> 16:05.840] protocol, to see if all risks are mitigated, and this includes cyber security risks, of [16:05.840 --> 16:09.040] course, because we're cyber security experts, and that's why we were working with said [16:09.040 --> 16:15.160] client. Now, what had happened is when they approached us, they described their current [16:15.160 --> 16:20.340] patch management. And so, let's go ahead and diagram this out. And just note, I'm using [16:20.340 --> 16:24.080] medical device here sort of arbitrarily. We love and respect our clients. I would never use [16:24.080 --> 16:29.260] their names. So, please don't ask. Cool. All right. So, the original process, we have a [16:29.260 --> 16:34.340] medical device. It's sending out a patch request. You'll note that there is this [16:34.340 --> 16:39.680] manufacturer's CDN. So, this is a public cloud. I'll oftentimes interchangeably say AWS, [16:39.680 --> 16:44.260] because it's typically the cloud that I work with and prefer. So, we'll have more details [16:44.260 --> 16:49.660] in terms of why that actually matters in a bit. So, medical device makes a patch request, goes [16:49.660 --> 16:57.660] to the cloud, and the cloud is going to send a patch. Well, it's an unsigned patch. So, what [16:57.660 --> 17:04.240] could possibly go wrong with an unauthenticated patch? Well, I wish the text didn't overlap, [17:04.240 --> 17:08.280] but it's subject to tampering, right? And in this particular case, when we're working with the [17:08.280 --> 17:11.840] manufacturer, we had to think about what the threat model is and who are the attackers, [17:11.840 --> 17:16.920] right? So, in this particular patch request, I haven't even said if it is a secure and [17:16.920 --> 17:20.800] authenticated channel. So, let's imagine that it's not TLS to begin with. Well, if you have a [17:20.800 --> 17:25.360] passive eavesdropper, what's going to happen? You're going to see the raw bytes. And as Avi [17:25.360 --> 17:30.380] alluded to, when I go about a security analysis, the first thing I'm going to look at is, well, [17:30.380 --> 17:34.140] if I can capture some of those patches, I'm going to find out what libraries are changing. I'm [17:34.140 --> 17:37.920] going to find out what binaries you're actually changing and updating, and that will inform how [17:37.920 --> 17:42.560] I do and perform my analysis to break your device. And let's not be fooled, any attacker is [17:42.560 --> 17:48.680] going to do the same thing. Now, another issue with this is just to assume that the next more [17:48.680 --> 17:54.400] powerful attacker is an active attacker. Well, an active attacker can modify, jam, or drop [17:54.400 --> 17:59.500] this traffic, right? So, this becomes problematic because that sort of higher level of an [17:59.500 --> 18:04.080] attacker, if they can just change bytes in that patch, they've effectively controlled the [18:04.080 --> 18:08.120] software that's going to be delivered to your system. If your particular medical device doesn't [18:08.120 --> 18:13.140] actually verify a signature on this particular patch, well, then you're going to install it [18:13.140 --> 18:17.780] haphazardly and be very happy, and lo and behold, you're running a code that an attacker [18:17.780 --> 18:22.500] directly controls. I should also mention, I mean, we're talking about patches here, but it is the [18:22.500 --> 18:26.780] case oftentimes that this could be an entire firmware, so it's not just some of the [18:26.780 --> 18:31.380] functionality. And if anyone doesn't believe me, if anyone has like Windows 10, for example, and [18:31.380 --> 18:35.260] your update process is like 20 gigs, it's because it's putting the whole entire operating [18:35.260 --> 18:41.620] system on there again. So, this is pretty big. And so, what we have to do, we have to talk to [18:41.620 --> 18:45.680] the manufacturer and say, all right, what do you guys care about, right? And we, of course, [18:45.680 --> 18:49.820] mentioned this issue, we say, well, do you care about confidentiality? Like, you could [18:49.820 --> 18:54.820] potentially have IP in this firmware for this device. And they said, you know, we're not too [18:54.820 --> 18:59.760] concerned about our IP, which is a weird statement, but it was fine. But what they did say [18:59.760 --> 19:04.640] is, yes, being actively able to modify is a big, big problem. How would you guys go about [19:04.640 --> 19:10.660] solving this? And this is where we start collaborating together. All right. So, first [19:10.660 --> 19:15.720] solution we come up with, we sort of brainstorm through. Again, we have our patch request. [19:15.880 --> 19:19.000] This time, let's just assume this is TLS and we'll get into that for a second. So, we at least [19:19.000 --> 19:25.140] have a secure channel between, say, medical device and the cloud. And in the cloud, what's [19:25.140 --> 19:31.720] happening now is that the cloud will have that patch pre-existing somewhere. So, if this is [19:31.720 --> 19:37.360] AWS, it would be an S3, for example. What the cloud is going to do, the cloud actually can [19:37.360 --> 19:42.280] access a hardware security module. And so, for people that don't know HSMs, I'll do the brief [19:42.280 --> 19:48.180] 101 as fast as I possibly can. Crypto device, tamper proof, tamper evidence, secure key [19:48.180 --> 19:53.920] generation with random number generator that's been certified. If you're an academic like me, [19:53.920 --> 19:57.720] you might not put too much clout into FIPS. Everyone else is from the industry, you love FIPS [19:57.720 --> 20:01.780] because people and regulators tell you it's good. And of course it is. The appropriate [20:01.780 --> 20:05.820] algorithms, the appropriate ciphers, the appropriate key sizes, and make sure you don't make [20:05.820 --> 20:09.840] any funny mistakes. No one wants to see you implement a Caesar cipher because that's not [20:09.840 --> 20:14.660] crypto, you will be broken. And so, this hardware security module exists, typically they're [20:14.660 --> 20:19.800] clustered, which gives you a great benefit in that if one fails, you have encrypted contents [20:19.800 --> 20:24.900] elsewhere. Because if you delete, say, private key, for example, which is non-extractable, if [20:24.900 --> 20:28.440] you lose a hardware security module, well, guess what? You've just lost the ability to [20:28.440 --> 20:33.260] perform any of these signing operations again, and you have to reboot your system. So all of [20:33.260 --> 20:37.680] this is great. I thought this was fantastic. Yes, use the cloud, use hardware security [20:37.680 --> 20:42.920] modules. And so we send a signed patch, and we look at the medical device. And we say, oh, [20:42.920 --> 20:48.600] no, guess what? This is still subject to tampering. Guess why? We were talking to the [20:48.600 --> 20:54.180] great FDA reviewers and regulators, and I'm not saying great, just kind of cheeky, they really [20:54.180 --> 20:58.620] are super smart people to work with. And one of them had mentioned, well, all right, where's [20:58.620 --> 21:01.960] your trust boundary? I'm like, oh, you know, I trust the cloud. Like, I don't trust the [21:01.960 --> 21:05.680] cloud. All right, well, you're the regulator, and I believe you. I, too, do not trust the [21:05.680 --> 21:10.460] cloud right now. And so we reworked the solution based on this dialogue because it made a [21:10.460 --> 21:13.980] lot of sense. And in terms of security, it's going to bolster the security. So then we'll [21:13.980 --> 21:19.540] come up with our next sort of brainstorming approach. Again, medical device, do a patch [21:19.540 --> 21:24.820] request. We don't trust the cloud anymore. So what we're going to do, my big head, I'm [21:24.820 --> 21:29.300] sorry, I'm very tall. We're going to generate a private and public key pair. We're going to do [21:29.300 --> 21:34.420] that locally during the manufacturing process. This is a secured network. It's within our [21:34.420 --> 21:38.580] trust boundary. And what's great about it is you can still use hardware security modules. [21:38.580 --> 21:42.800] They're like $25,000, and usually, I don't know, medical device manufacturers have a ton of [21:42.800 --> 21:46.680] money to throw away. So I love saying, yeah, you should get that one. And that's precisely what [21:46.680 --> 21:51.820] they did. They did the secure key generation their side. They used the private key in that [21:51.820 --> 21:58.160] secured network manufacturing environment. They can sign a patch, and they can upload the [21:58.160 --> 22:03.240] patch and the sign, the signature to their content delivery network, which is the cloud. So [22:03.240 --> 22:07.840] great. So these two things are existing in AWS, and we pulled out sort of our, from our [22:07.840 --> 22:13.960] trust boundary, that cloud. We sent the signed patch across. We thought we were good. [22:14.240 --> 22:18.300] Lo and behold, if you think about the process, and during the brainstorming process, well, you [22:18.300 --> 22:22.100] know, you have an authenticated patch. But the problem here is that, well, we don't have a [22:22.100 --> 22:26.440] nonce. We don't have a time stamp. We don't have any uniqueness. And the reason this [22:26.440 --> 22:30.700] matters is, well, you've opened yourself up to a replay attack, right? And so there are a [22:30.700 --> 22:34.000] number of ways to mitigate this, and some of them aren't even security. I'll just blatantly [22:34.000 --> 22:37.600] tell you that, and I can tell you what that particular solution is, because you can combine [22:37.600 --> 22:42.700] it with actual security, and it works well. And so the scenario, let me just play it out this [22:42.700 --> 22:47.620] way, right? If I were an active attacker, not even active, maybe I'm an eavesdropper, and I [22:47.620 --> 22:55.840] see a patch that's put out in like 2006. I saved that patch. I know that at some point, even [22:55.840 --> 22:59.320] that patch is going to have some vulnerabilities inside of it. So some software gets old. [22:59.320 --> 23:05.780] Software ages like milk. Go figure. I wait, and I see patch happens five years later. And I [23:05.780 --> 23:08.960] see exactly what changed, and I look at the old patch, and I go, oh, well, these binaries [23:08.960 --> 23:14.560] also changed. I had this entire thing. Well, if there's no replay protection mechanism, what's [23:14.560 --> 23:19.860] to stop me from attacker as to replaying that original patch, overwriting the good one, and [23:19.860 --> 23:24.680] putting the system back into a bad state? Now, I won't lie to you, that scenario may be a bit [23:24.680 --> 23:28.120] contrived, and the reason is because you can implement controls inside of the medical device [23:28.120 --> 23:33.080] that say, all right, well, you're signed. I need one of those bytes to actually specify what the [23:33.080 --> 23:37.360] firmware version is, and I will never downgrade. That's a reasonable approach, and that's one [23:37.360 --> 23:40.480] thing that we did build in, but at the same time, we wanted to go ahead and mitigate this [23:40.480 --> 23:47.980] particular risk as well. So we end up with the next patch process. Patch request to the cloud. [23:48.260 --> 23:54.200] Still doing our on-premise signing and uploading signature and patch. And then we're sending a [23:55.520 --> 24:00.100] signed patch and or firmware and a time stamp, which is also signed. I'll talk, we're missing [24:00.100 --> 24:04.880] some text on there, but I'll explain. And now we're authenticated with a nonce, and this gives [24:04.880 --> 24:10.620] us a better security implementation than we had before. Now, I said there's something missing, [24:10.620 --> 24:14.700] and let me just walk over here real quick, so that way, when the purist asks me the questions, [24:14.700 --> 24:19.180] and I say, well, dude, you messed up, how did you sign that? One approach that we can take, we [24:19.180 --> 24:24.780] have the on-premise signing of the patch or the firmware. We still have hardware secure modules [24:24.780 --> 24:28.620] that exist in the cloud. And so this is a semi-trusted environment. I won't say that it's [24:28.620 --> 24:32.940] untrusted, because, for example, you're putting the patches in here to begin with, so you have to [24:32.940 --> 24:38.480] have some trust or some notion of trust. So what we can do, we can have, yet again, another [24:38.480 --> 24:44.580] symmetric or asymmetric key pair, excuse me, and we will go ahead and sign the inner payload, [24:44.580 --> 24:49.960] which is signed itself, with an outer payload, bake in that time stamp, ship that off to the [24:49.960 --> 24:54.160] medical device, and what happens? Well, you verify the outer, go ahead, pull it apart, check [24:54.160 --> 25:01.500] out the time stamp, verify the inner, and there you go, you have a secure protocol. Cool. And [25:01.500 --> 25:06.920] so that is the patch process experience that we have with one medical device manufacturer. [25:08.600 --> 25:14.500] Awesome. So the next thing we're going to talk about is communication protocols. And the [25:14.500 --> 25:18.960] reason why I bring this up is I actually talked to some of the device manufacturers next [25:18.960 --> 25:22.760] door, and one of the guys, we had a dialogue, and I was like, wow, this is really close to our [25:22.760 --> 25:25.660] system, and I was like, yeah, I've seen this in multiple places, you must be doing okay. [25:25.960 --> 25:29.520] Here's my card, you should call me. But it's okay, so we're going to talk through this [25:29.520 --> 25:33.760] process. So let me take a step back, we see three beautiful images on here that I did not [25:33.760 --> 25:39.060] make, but they look great, and we're going to talk about what the relationship is. So in this [25:39.060 --> 25:43.020] particular case, we have a personal medical device, this is a wearable, it's on you all the [25:43.020 --> 25:49.180] time. We have a mobile device, so smartphone, Android, iOS. This is going to be in [25:49.180 --> 25:54.620] direct communication with this particular device. And we still have our cloud component. So [25:54.620 --> 25:58.200] one might imagine, well, how the heck are these things going to communicate, and where is your [25:58.200 --> 26:01.680] trust boundary, and those are all fantastic questions. Before I get ahead of myself, I'm [26:01.680 --> 26:03.860] going to hit the right arrow a couple of times, because I'm going to mess up these [26:03.860 --> 26:11.960] transitions. Come on, is there one more? No, that looks like it. Yep. Cool, they're all up [26:11.960 --> 26:15.640] there, they're just not showing there. So let's think about it this way. You're going to [26:15.640 --> 26:19.920] have this smartphone, smartphone is going to configure the actuation of this particular [26:19.920 --> 26:23.900] device. We're going to make some assumptions, close physical proximity, you might [26:23.900 --> 26:29.560] imagine, well, what protocols would you use there? BLE, of course. And then, you know, there [26:29.560 --> 26:33.580] might be, this is all patient configurable, but the medical device, since it's doing [26:33.580 --> 26:38.340] actuation, it's also doing sensing, right? And so we have to imagine, medical devices are [26:38.340 --> 26:43.680] oftentimes, like, I hate when people argue, it can't have really good robust hardware, [26:43.680 --> 26:47.580] because, let's face it, raspberry pies have four gigs of RAM now, anything can have good [26:47.580 --> 26:53.060] hardware. But the argument is that, well, these won't have a NIC, and I can buy that. So, [26:53.060 --> 26:57.240] you know, I might have a Bluetooth BLE module such that it can talk and some driver around [26:57.240 --> 27:01.900] it, but it doesn't have Wi-Fi, so it's not connecting to your wireless routers, which also [27:01.900 --> 27:05.500] makes a lot of sense, too. How would you, for example, have a wearable and, like, connect to [27:05.500 --> 27:11.180] the Wi-Fi for me? It's kind of a contrived thing that you may have to do. So what we need in [27:11.180 --> 27:14.860] this particular architecture is that this personal medical device has to communicate to the [27:14.860 --> 27:20.700] cloud over the smart phone. Now, I can tell you, you're all hackers, I bet you a bunch of you [27:20.700 --> 27:24.980] actually have lineage OS or something equivalent, your phones are probably rooted, don't [27:24.980 --> 27:30.100] trust the package managers, because you don't, they're signed, of course, Cydia signs all of [27:30.100 --> 27:34.020] its packages, but who the heck uploaded those things? And so from the perspective of the [27:34.020 --> 27:38.280] medical device manufacturer, that's not trusted, it should never be trusted, it's not even [27:38.280 --> 27:42.640] semi-trusted. It's great, you can configure your device, it's on you, it's cool, we run an [27:42.640 --> 27:47.860] application, but if there's any personal health information or PHI, don't trust that [27:47.860 --> 27:51.700] particular device to look at it, because it could siphon it off, send it somewhere else, [27:51.700 --> 27:59.900] right? Cool. So now we're going to look at, so let me draw these arrows out, too, there we go, [27:59.900 --> 28:05.360] that way I don't miss any of them, I think that's pretty good. Right, so, what would you do [28:05.360 --> 28:09.440] then? You have a BLE connection, well, if you know anything about the BLE [28:09.440 --> 28:13.820] specification, there are maybe four, I think it's four, it might be five, don't quote me, [28:13.820 --> 28:17.840] there's authentication mechanisms that you could do at the transport layer to secure these two [28:17.840 --> 28:24.600] devices. Well, requirements and design actually lead how we think about our risks and our [28:24.600 --> 28:29.780] controls and what the system actually ends up being. And so in this particular case, it was, [28:29.780 --> 28:33.500] well, that's great, I mean, we can have a pairing protocol, we can have a pin, but that [28:33.500 --> 28:38.200] seems arduous, and actually, we don't want it to impact the patient experience, we want these [28:38.200 --> 28:42.600] devices just to work. So the anecdote here is if anyone's ever had a Bluetooth speaker and you [28:42.600 --> 28:46.620] go to connect to it, and somehow your friend's phone starts playing to it, and then they [28:46.620 --> 28:49.420] disconnect, someone else disconnects, and the whole thing just turns off, it's because, well, [28:49.420 --> 28:53.680] it's kind of garbage and everyone hates trying to pair these devices, right? So in this [28:53.680 --> 28:57.420] particular case, what we had come up with is a scheme where we're going to have end-to-end [28:58.640 --> 29:03.180] encryption and authentication between these two devices, because, well, the manufacturer has [29:03.180 --> 29:06.180] access to this device when they configure it, they have access, they put the boards in, they [29:06.180 --> 29:11.400] put the plastic pieces together, and maybe they 3D print it, and that gives us a lot of power in [29:11.400 --> 29:15.700] terms of how we might write a cryptographic protocol. Now, I'm saying write the [29:15.700 --> 29:20.220] cryptographic protocol, don't misquote me, we're not inventing AES 2.0 because that's just [29:20.220 --> 29:24.620] silly and it will be broken, we're using the ciphers and the algorithms and key sizes that are [29:24.620 --> 29:28.640] recommended and mandated by standards, we're using them in an intelligent way to create a [29:28.640 --> 29:32.800] hybrid scheme that just works. Now, since I said that we're creating our own [29:32.800 --> 29:38.340] cryptographic protocol, the most fantastic part was to be able to use that same protocol to, from [29:38.340 --> 29:44.140] this device, talk to the cloud, over the phone, without the phone seeing the data. And that is [29:44.140 --> 29:50.980] what we actually came up with. So let me just hit next to see, I did miss a bullet, that's fine, [29:50.980 --> 29:54.520] that looks like it's okay, yeah, you need to be connected before you go to the cloud, that's [29:54.520 --> 30:01.660] good. And let me see, so I'm going to, I clicked through these because I actually wanted to do [30:01.660 --> 30:05.600] them in a different format or a different order. I'm going to talk about the personal medical [30:05.600 --> 30:11.920] device and the cloud first. You are in the configuration stage, how might you bootstrap the [30:11.920 --> 30:17.860] security? Well, one way is you could take the medical device as you're putting it together, you [30:17.860 --> 30:22.820] want to do secure key generation, right? So let's hope, I mean, modern architecture, if we're [30:22.820 --> 30:28.400] doing, what is it, if we're doing ARM processor, there's things like trust zone, crypto [30:28.400 --> 30:33.620] coprocessors, those types that you can put into this device to securely generate your key pair. [30:33.860 --> 30:40.540] What that means is that you have a good sense of your security protocol and how these things are [30:40.540 --> 30:44.680] generated, they're unique for every device, never, never hard code a key because you'll get [30:44.680 --> 30:48.800] owned and you'll end up at a talk here and everyone will laugh at you. So you want to generate [30:48.800 --> 30:54.280] your key this way. You're going to have a key pair, it's asymmetric, the cloud also has its own [30:54.280 --> 31:00.300] asymmetric key pair. And what you're doing since you're in the trusted manufacturing process, you [31:00.300 --> 31:05.060] do key exchange, you exchange two public keys with one another. And this is going to allow you to [31:05.060 --> 31:09.320] sort of bootstrap the end to end encryption process. And glossing over some of the details, we [31:09.320 --> 31:13.220] might argue like, oh, well, asymmetric key pair, one's for authentication, one's for encryption. [31:13.220 --> 31:18.320] Yes, it's also a hybrid based approach. So there's going to be a symmetric key. I won't talk much [31:18.320 --> 31:22.220] about that. And I have three minutes, so I should go really quickly. But the idea is that since [31:22.220 --> 31:26.600] you've bootstrapped this, once you go to put these things online, you're going to have a pairing [31:26.600 --> 31:31.140] protocol with that phone. What that phone's going to do is first it's going to pair to the cloud as [31:31.140 --> 31:35.840] part of the process. They're going to generate a key pair. It's going to exchange public keys with [31:35.840 --> 31:40.020] the cloud. The reason why you're doing this is because the public key that gets inside cloud, you [31:40.020 --> 31:45.440] want to sign it. The reason why you want to sign it is when this pairing protocol happens between [31:45.440 --> 31:49.720] these two devices, you need to verify that that phone's actually trusted. Like, do you have an [31:49.720 --> 31:54.180] account? Do you own the device? Did you talk to the cloud? And once that is done, since you've [31:54.180 --> 31:58.200] already pre-established the secrets between the cloud and the medical device, lo and behold, you [31:58.200 --> 32:01.980] can do end-to-end encryption. So you can do, for example, an elliptic curve Diffie-Hellman key [32:01.980 --> 32:08.000] exchange. Let's make it perfect forward secrecy in it. And we can encrypt data, send it back and [32:08.000 --> 32:14.480] forth. It can be PHI, PII, and the mobile device is none the wiser. And we get a giant green mark, [32:14.480 --> 32:19.200] which is great. So I'm going to have briefs for this one for three minutes. I think I can do it. [32:19.640 --> 32:25.640] Well, he said three minutes. Yeah, I'll be quick, I promise. All right, for this one, medical [32:25.640 --> 32:31.480] device, the issues that came up were all access controls. So physical access controls, maybe [32:31.480 --> 32:36.240] network-based access controls. The problem is, you know, you might only have a single set of [32:36.240 --> 32:41.680] access credentials. Your admin, your root, you have access to everything, that's probably bad. [32:43.900 --> 32:48.960] Unsecured protocols, such as FTP, Telnet, don't want those. Anyone can use your app on the data [32:48.960 --> 32:52.580] and mess with it, not good. USB port for maintenance and configuration, well, this is just [32:52.580 --> 32:57.900] another attack surface that someone can tap into. Direct access to therapeutic controls, well, [32:57.900 --> 33:00.600] you know, if an attacker has physical access, they're probably going to break it with a hammer [33:00.600 --> 33:05.440] first, but we like to mitigate as many risks as we possibly can, so maybe we put a pin to [33:05.440 --> 33:10.720] authenticate the user to touch the control pad. And finally, just separating clinical mode and [33:10.720 --> 33:15.320] operational mode. When this thing is doing its business for the patient, you shouldn't be able [33:15.320 --> 33:18.860] to do a firmware update, because that is just going to hose everything and be a whole mess of [33:18.860 --> 33:27.600] problems. So I talked about all these, that means that slide goes quickly. So fixes, as you [33:27.600 --> 33:31.760] might imagine, there's common, basically common sense, right? Get rid of unauthenticated, [33:31.760 --> 33:39.420] unencrypted protocols, use SSH, for example, use TLS, if you have HTTP. Looking at it, also [33:39.420 --> 33:44.300] requiring physical access, requires having a unique pin for every single device. Let's not [33:44.300 --> 33:48.780] have default hard-coded credentials and secrets, because again, if you figure out a pin [33:48.780 --> 33:52.400] and someone sets these up, maybe you know the pin for all hundreds of thousands of devices, [33:52.400 --> 33:58.680] probably not a good thing. The communication functions, you want to be able to partition [33:58.680 --> 34:02.960] these by hardware, so isolated worlds, if you're doing actuation, you probably don't want to be [34:02.960 --> 34:06.900] on the same board processor as the thing that's doing your TCP IP stack, because guess what, [34:06.900 --> 34:11.020] vulnerabilities happen in drivers, that's current level exploit, you get rude on the box, but you [34:11.020 --> 34:16.020] don't, again, want to affect the patient. Lastly, like I said before, if you're in clinical [34:16.020 --> 34:19.880] mode, you shouldn't do a firmware update, so these things need to be cleanly isolated, such [34:19.880 --> 34:25.720] that one cannot impact the other. And that fixes our medical device. And I'll let Avi finish on [34:25.720 --> 34:27.840] the last slide. I'm sorry, guys, I went a little over. [34:29.640 --> 34:36.100] Okay. Thanks a lot for that, Mike. So just as you saw, each of these examples showed some [34:36.100 --> 34:41.200] pretty straightforward problems and some pretty straightforward solutions, but there are so [34:41.200 --> 34:46.000] many things that you actually have to keep track of, the complexity can be really high when [34:46.000 --> 34:50.280] you look at everything together as a holistic system. So it's really not just the firmware, [34:50.280 --> 34:55.360] although the firmware is really important, but it's the entire system. I think that this [34:55.360 --> 35:00.440] industry is very lucky that it has really top-notch regulators. The people that we've [35:00.440 --> 35:05.980] spoken with on behalf of our clients are super technical people and very smart, and unlike [35:05.980 --> 35:12.140] some other industries where the regulators maybe aren't quite up to par, here they really [35:12.140 --> 35:16.520] are good. And so that's something that the medical device manufacturers actually have [35:16.520 --> 35:21.640] in their favor. And so I think we're out of time, but thanks a lot for your time and attention.