WEBVTT

00:00.000 --> 00:02.360
Okay guys, thanks for coming to the Biohacking Village.

00:02.360 --> 00:05.040
If you've been here for earlier talks today, thank you for coming back.

00:05.040 --> 00:06.900
If it's your first one, welcome.

00:07.000 --> 00:11.380
We have, if you guys haven't, visited the CTF down the hall.

00:11.380 --> 00:13.680
It's a pretty impressive array of technologies.

00:13.680 --> 00:16.380
I suggest you guys go over there and try to break some things.

00:16.980 --> 00:25.540
Next door we have classroom stuff where actually we're assembling some prosthetics at the moment right now for somebody who gave a presentation earlier.

00:25.640 --> 00:32.200
And we also have the wonderful speaker track here where we're sharing a lot of information from some of the great research that's going on in the community.

00:32.840 --> 00:37.640
With that, in between talks, we also have some donation work here.

00:37.640 --> 00:40.200
As you know, this is a non-profit.

00:40.340 --> 00:45.760
The work done here and the money collected here is both to help fund and do the process and projects of these things around here.

00:46.000 --> 00:50.300
In exchange, we have some things that we'll give you as being a participant in that.

00:51.320 --> 00:53.240
So I'd like to introduce Dr.

00:53.240 --> 00:53.920
Avi Rubin.

00:53.920 --> 00:56.220
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:06.800
He's the founder and director of the JHU Health and Medical Security Lab and is working advancing medical devices and security in healthcare networks.

01:07.100 --> 01:13.220
He's got, he'll, he'll also introduce his co-presenter.

01:13.260 --> 01:18.180
But I want to give you an opportunity to welcome him here to speak here at the Biohacking Village.

01:29.550 --> 01:31.790
Okay, hi everyone.

01:32.810 --> 01:34.410
It's, it's nice to be here.

01:34.410 --> 01:36.070
This is my first DEF CON.

01:36.250 --> 01:47.190
I'm used to going to academic conferences and the first thing I was told when I showed up here and I presented myself as a speaker, I was wearing khaki pants and I was told you can't speak like that.

01:47.190 --> 01:50.630
This is a hacking conference and you have to change into jeans.

01:50.650 --> 01:51.470
And so I did.

01:51.470 --> 01:53.790
I followed the rules and I changed into jeans.

01:53.790 --> 02:02.070
What's really weird for me about DEF CON is I'm really not used to being the least geeky person around because in most of the circles that I go, I'm the geek.

02:02.170 --> 02:05.450
But there's a whole other level here and I'm enjoying it a lot.

02:06.290 --> 02:11.690
As the intro, 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:22.190
And I love boats and ships and I wanted a lab that was like HMS lab, right?

02:22.210 --> 02:25.570
Does anybody know, you guys look like an educated crowd here.

02:25.570 --> 02:27.490
What, what HMS stands for?

02:27.490 --> 02:29.690
Why ships are like the HMS this?

02:31.170 --> 02:31.930
That's right.

02:31.930 --> 02:33.030
Her majesty's ships.

02:33.030 --> 02:34.430
So you won't find American ships.

02:34.430 --> 02:41.050
We name our ships after presidents and states, but a lot of the British ships are the HMS this and that.

02:41.050 --> 02:43.010
So I'm the HMS lab.

02:43.010 --> 02:44.690
It's the health and medical security lab.

02:44.970 --> 02:50.950
And let me give you a little bit of background about how, um, the work that I've done, how I got there.

02:51.490 --> 02:58.690
And, uh, that'll kind of segue into the technical work that we're going to present and have a co-presenter that I'll introduce in a minute too.

02:59.170 --> 03:07.090
So I am a professor at Johns Hopkins and most of you probably know Hopkins as a medical school and a medical facility and a hospital.

03:07.230 --> 03:13.810
In fact, when I meet people socially, like the, the parents of my kids' friends, they just assume I'm a medical doctor.

03:13.810 --> 03:16.730
They'll come talk to me about their ailments and things like that.

03:16.730 --> 03:21.370
It's just, you know, if you're at Johns Hopkins, there's this kind of force to work on medical stuff.

03:21.370 --> 03:26.630
So I started out at Hopkins in 2003, working on electronic voting security.

03:26.630 --> 03:28.770
I did that for about seven or eight years.

03:28.770 --> 03:32.550
But when you're at Hopkins, there's this sucking that happens towards you.

03:32.550 --> 03:33.610
I'm not saying like we suck.

03:33.610 --> 03:38.550
I'm saying like it pulls you like the Ross Perot kind of sucking that, that it pulls you into it.

03:38.550 --> 03:44.610
And you have to work on, uh, medical stuff because the doctors will come around and say, Hey, I've got this problem.

03:44.610 --> 03:45.350
Can you help me?

03:45.350 --> 03:47.010
And their medical record systems.

03:47.010 --> 03:48.110
And I'm a security guy.

03:48.110 --> 03:55.110
And so pretty soon I found myself working on medical stuff, created the health and medical security lab, started training up students.

03:55.150 --> 03:57.510
Um, and we started looking at all kinds of things.

03:57.830 --> 04:04.370
One of the seminal things that happened in this field is a paper at the IEEE security and privacy conference.

04:04.370 --> 04:05.910
We call it the Oakland conference.

04:05.910 --> 04:11.110
It's the number one rated academic conference, uh, by some of my colleagues, Kevin Fu, Yoshi Kono.

04:11.170 --> 04:15.210
And it was where they had taken a defibrillator, wrapped it in a bunch of meat.

04:15.210 --> 04:19.310
So it would simulate being inside of a person and launched a bunch of attacks against it.

04:19.450 --> 04:26.130
And it kind of woke up the industry because the press got very interested in this and it just got very high profile.

04:26.130 --> 04:33.970
And so the field, I felt like the field of health and medical security, at least for academics really took off after that paper.

04:33.970 --> 04:47.390
And so I applied for grants and was part of a group that got a 15 and a half million dollar grant from the ONC, which is the office of the national coordinator in health and human services to do health and medical security research.

04:47.390 --> 04:51.830
When that project ended, we got a $10 million grant from NSF to do the same.

04:51.890 --> 05:01.830
And we worked on projects like encrypting of medical records using attribute-based encryption and we used, um, performing role-based access control via attribute-based encryption.

05:01.830 --> 05:02.810
That's the kind of stuff that I like.

05:02.810 --> 05:03.610
So I am a geek.

05:03.610 --> 05:06.090
I do call, I do qualify for that.

05:06.090 --> 05:09.010
Um, and we also looked at medical devices.

05:09.070 --> 05:13.250
And in my lab, I had students that we were getting our hands on medical devices.

05:13.250 --> 05:18.490
They were, uh, flashing the, the, the ROM on there and then analyzing the firmware.

05:18.570 --> 05:23.750
And so we developed a set of expertise and skills in that and, um, published a lot of papers.

05:23.930 --> 05:30.190
And then some of those students from that lab, uh, came to work for me after when I started Harbor Labs, which is my company.

05:30.190 --> 05:34.950
And Harbor Labs started because I was getting approached by a lot of medical device companies.

05:34.950 --> 05:41.330
Once I started publishing in this area saying, you know, we would like some help, some consulting help with the security of our systems.

05:41.450 --> 05:44.610
And I have all these really smart students graduating and light bulb went off.

05:44.610 --> 05:45.990
I said, why don't I start a company?

05:45.990 --> 05:48.150
We'll do this type of thing professionally.

05:48.730 --> 05:49.810
Um, and so that's what we do.

05:49.810 --> 05:53.730
So that's the long winded introduction, um, of my background.

05:53.750 --> 05:55.570
And Mike Reshanan is here.

05:55.570 --> 05:56.410
Put your hand up.

05:56.410 --> 06:03.870
Um, Mike was a PhD student of mine who finished his PhD in the HMS lab and is now the director of medical security at Harbor Labs.

06:03.870 --> 06:05.690
And he and I are going to co-speak today.

06:05.830 --> 06:10.050
So I also brought him here in case you guys ask any hard questions, direct them to him.

06:10.050 --> 06:12.090
He's more likely to be able to answer them.

06:14.090 --> 06:18.890
So, um, this is kind of the high level outline of the talk.

06:18.890 --> 06:25.570
I'm going to talk about, um, what happens when you have a medical device and you care about the security of it.

06:25.630 --> 06:36.150
Uh, and what should you do if you're building a medical device and you want to get through, uh, regulatory, uh, certification, you want to make sure that your device is actually secure.

06:36.210 --> 06:44.550
And what I'd like to do is base the talk on a tool that we built and show you the various steps that this tool can take you through.

06:44.550 --> 06:58.310
And then Mike will take you into some of the case studies of actual projects we worked on with clients who built medical devices and ran into hiccups when they tried to get certification for them and show you like how we help them solve those problems.

07:00.570 --> 07:06.930
So, um, I like to ask the audience who knows what things are because that shows me the audience is alive.

07:06.930 --> 07:08.390
So, who knows what a BOM is?

07:08.390 --> 07:09.330
B-O-M.

07:09.550 --> 07:14.650
Wow, okay, we have an audience that is way above the level that I expected for this talk.

07:14.690 --> 07:19.090
Um, for those of you that didn't, uh, raise your hands, it's a bill of materials.

07:19.230 --> 07:21.450
And why is a BOM important?

07:21.510 --> 07:25.090
Well, let me get into talking about a firmware.

07:25.250 --> 07:32.230
So, if we're looking at a medical device, the software that runs it, the logic behind it is going to be in a firmware file.

07:32.430 --> 07:44.510
And if you're in a company that builds these things, which I think many of you are, you know that you can have a team that's building the software and then you have someone on the team that puts something in there and then they leave the team and somebody else comes in.

07:44.510 --> 07:49.490
This dynamic kind of flow of people through the development of a project that lasts many years.

07:49.490 --> 07:55.090
And there may not be anyone in the organization that actually knows everything that's in this firmware.

07:55.090 --> 07:58.310
Because a firmware image, you know, it's usually a Linux distribution.

07:58.310 --> 08:00.490
It's got a lot of open source packages in there.

08:00.490 --> 08:01.530
It's got libraries.

08:01.530 --> 08:04.810
Somebody finds a tool and they say, this would be a great tool in our firmware.

08:04.810 --> 08:06.190
There's a web server in there.

08:06.190 --> 08:07.810
They put that in the, in the firmware.

08:07.970 --> 08:11.170
And then the firmware is kind of a, a living and breathing thing.

08:11.250 --> 08:18.930
And if you go to get certified for the medical device, uh, the regulators are going to say, okay, what's your bill of material?

08:19.090 --> 08:22.570
And you may not know, you may not know everything that's in there.

08:22.570 --> 08:36.270
And so one of the things that we did is, uh, built a tool that will automatically extract, it'll unpack a firmware binary and automatically extract all of the, uh, materials that are in there, all of the software that the firmware uses.

08:36.570 --> 08:48.290
And that's actually not as easy as you might think, because you're talking about binaries and the binaries may not have necessarily a string that has the name of the package that you're using or the version number.

08:48.290 --> 09:03.050
And so we used, um, all the material available at our disposal, both external to the firmware and inside the firmware and did some fuzzing matching and came up with what I think is a pretty good system for figuring out what are all the pieces that are inside of this firmware.

09:03.210 --> 09:06.570
And why does that matter from a security perspective?

09:06.750 --> 09:17.290
Well, there's a national vulnerability database that has these common vulnerability and exposures, which are called CVEs, that are vulnerabilities that are known for various software packages.

09:17.350 --> 09:21.810
So let's say that your firmware in this medical device has package X.

09:21.810 --> 09:24.830
It's a software package that does something that the firmware wanted to do.

09:24.830 --> 09:29.410
It's not something that was developed by the manufacturer, it was something open source that they found.

09:29.470 --> 09:34.930
And version 3 of, uh, product X has a serious security problem in it.

09:34.930 --> 09:38.010
And it has a CVE in the national vulnerability database.

09:38.110 --> 09:52.930
And so what the tool can do is, when it goes through and unpacks the firmware and it finds that package X, I'm sorry, that package X version 3 is in there, it can say, aha, there's a CVE associated with this firmware.

09:53.150 --> 09:59.990
And if that thing gets upgraded someday to version 4, maybe there's no CVE for that because the problem was patched.

09:59.990 --> 10:07.490
And so it's important to get a look into a firmware to be able to know what are the CVEs associated with this firmware.

10:08.670 --> 10:12.050
Now, if, let's see how big this is coming out on here.

10:12.450 --> 10:21.710
One of the things that you can have in, um, when you're trying, for example, to get a medical device, uh, through certification is there can be disqualifying problems.

10:21.710 --> 10:30.290
Like, for example, if you're using a weak algorithm, this says weak algorithm detected, and that has a CVSS score.

10:30.290 --> 10:34.410
CVSS is the common vulnerability scoring system, I think.

10:34.550 --> 10:41.890
And that is a standardized way that, um, the industry takes certain problems and scores them.

10:41.890 --> 10:49.930
And so this is something that you can identify in a firmware file and say, uh-oh, you know, there's something here that's going to disqualify me from passing.

10:49.930 --> 10:50.930
I need to fix that.

10:50.930 --> 10:52.750
I need to put something better in there.

10:54.470 --> 11:01.790
And so here you can see that you, the tool can look through and see all the various CVEs and all the packages.

11:01.830 --> 11:04.650
And this is what we call the pre-market CVEs.

11:04.650 --> 11:11.710
That is, you package up your firmware, you run this through it, you sell your device, and you get your score.

11:11.710 --> 11:18.870
It takes the worst score of all the CVSS scores that are found in the device and gives you that as your overall score for the firmware.

11:19.150 --> 11:25.870
However, a firmware file, believe it or not, in terms of its security, is a living , breathing thing.

11:25.870 --> 11:27.110
It's not static.

11:27.110 --> 11:28.010
Why is that?

11:28.010 --> 11:35.050
Well, imagine that you put out your firmware and it uses library X version 3, like I told you before.

11:35.110 --> 11:42.050
And you're the developer of this firmware, so you're like, oh, there's a security flaw in package X version 3.

11:42.050 --> 11:47.350
I'm going to swap out and put in version 4 in there, and now there's not a security flaw.

11:47.710 --> 11:59.010
So the product is out for a while, everything's going great, and then some DEF CON researcher looks at product X version 4 and finds a really serious vulnerability that nobody knew about.

11:59.010 --> 12:12.970
And so a CVE is issued, and now you're sitting there with a package, a firmware package, using that version 4 that is believed to be pretty secure, it's got a really good CVSS score, and it's actually not.

12:12.970 --> 12:13.370
Okay?

12:13.370 --> 12:32.490
And so what's needed is a way to constantly check the CVEs, whoops, let me, got a little ahead of myself, to constantly check the CVEs of all the packages to see if there are new ones.

12:32.490 --> 12:42.830
And what our tool does is every night it downloads the NVD database and then looks at all the packages and all the firmware that people have analyzed and see, is there a new CVE for one of these things?

12:42.830 --> 12:49.070
Let me tell you another way that your CVSS score can be misleading and where you need to stay on top of it.

12:49.190 --> 12:58.810
One of the packages is to look at crypto, to look at the various settings, the algorithms, the parameters of the crypto that's being used in the firmware package.

12:58.950 --> 13:02.830
And one of the checks is made to see if a certificate is expired.

13:02.930 --> 13:06.150
If the certificate is not expired, that's not going to hurt your score.

13:06.250 --> 13:18.490
But what happens is time moves forward and the certificate is expired, and so if you don't keep on top of it, and you don't keep checking it, you could end up with a package that's got security problems that, that you don't know about.

13:19.670 --> 13:28.450
So let me now, before I hand it over to Mike, he's going to talk about a couple, I think three or four examples, how many?

13:28.470 --> 13:36.430
Three examples of actual security work that we did with medical device manufacturers with some lessons learned from it.

13:36.430 --> 13:38.750
And the first one is about patch management.

13:38.750 --> 13:41.570
I just want to say a couple words about patch management.

13:41.570 --> 13:43.030
You all know what patch management is.

13:43.030 --> 13:49.430
It's the ability to take a software package and get new patches to download for them.

13:49.430 --> 13:52.690
And there's always the question of, when do you patch, right?

13:52.690 --> 13:55.230
And is the patch going to break my software?

13:55.230 --> 14:10.070
Because I've got a system that works really well, and now the vendor issues a patch, and you have to ask yourself the trade-off between, well, if I don't patch, I'm vulnerable to this vulnerability that the patch addresses, and everybody now knows about it because there's been a patch,

14:10.070 --> 14:13.850
but if I do patch, it might break my system, it might actually introduce new vulnerabilities.

14:13.850 --> 14:21.030
And so , system administrators have the unenviable task of figuring out how to manage patches and when is the right time to patch.

14:21.030 --> 14:37.370
If you think that that's difficult, consider a paper, I believe it was authored out of David Wagner's lab a couple of years ago, in one of the academic security conferences, where they talk about, I think the title of the paper was something like, automatic exploit generation from patches.

14:37.630 --> 14:39.730
And so, think about what's going on here.

14:39.730 --> 14:46.810
You've got a software package, and somebody finds a vulnerability, so the vendor issues a patch, and releases it.

14:46.970 --> 15:02.090
What this tool does, it's a security tool, but it's one that hackers could have as well, or could have built and not told anyone, is, it looks at the patch, and based on what the patch is doing, and based on the original binary, reverse engineers the vulnerability,

15:02.090 --> 15:06.670
and then builds an exploit to take advantage of that vulnerability, you know, in milliseconds.

15:06.670 --> 15:08.170
It's all fully automated.

15:08.170 --> 15:15.370
You take a patch , and the output of their tool is an exploit that takes advantage of the vulnerability that the patch was addressing.

15:15.370 --> 15:20.910
Now, you really don't have a lot of time, if you've got, like, an online system, to get that patch in there really quickly.

15:21.150 --> 15:21.470
Okay.

15:21.470 --> 15:24.670
So, with that, I'll hand it over to Mike.

15:29.720 --> 15:30.360
All right.

15:30.360 --> 15:31.020
Thanks, Avi.

15:31.020 --> 15:32.440
Hey, everybody.

15:32.660 --> 15:35.860
I'm going to talk about some war stories, as it were.

15:35.860 --> 15:40.420
Working with some of our clients, with respect to three different scenarios.

15:40.420 --> 15:43.480
So, Avi gave a great introduction to patch management.

15:43.860 --> 15:47.740
In this particular case, we were working with a medical device manufacturer.

15:48.000 --> 15:50.620
They were going, it's a class three device.

15:50.780 --> 15:57.340
So, this is, you know, it has the potential to cause great patient harm, and they were going through a PMA evaluation.

15:57.440 --> 16:09.840
So, that's working directly with the FDA, to review their protocol, to see if all risks are mitigated, and this includes cyber security risks, of course, because we're cyber security experts, and that's why we were working with said client.

16:10.220 --> 16:16.380
Now, what had happened is when they approached us, they described their current patch management.

16:16.380 --> 16:18.840
And so, let's go ahead and diagram this out.

16:19.180 --> 16:22.380
And just note, I'm using medical device here sort of arbitrarily.

16:22.380 --> 16:23.540
We love and respect our clients.

16:23.540 --> 16:24.680
I would never use their names.

16:24.680 --> 16:25.960
So, please don't ask.

16:26.360 --> 16:27.180
Cool.

16:27.300 --> 16:27.600
All right.

16:27.600 --> 16:30.160
So, the original process, we have a medical device.

16:30.200 --> 16:32.100
It's sending out a patch request.

16:32.160 --> 16:35.080
You'll note that there is this manufacturer's CDN.

16:35.080 --> 16:36.960
So, this is a public cloud.

16:37.000 --> 16:42.060
I'll oftentimes interchangeably say AWS, because it's typically the cloud that I work with and prefer.

16:42.360 --> 16:46.560
So, we'll have more details in terms of why that actually matters in a bit.

16:46.720 --> 16:54.740
So, medical device makes a patch request, goes to the cloud, and the cloud is going to send a patch.

16:54.740 --> 16:56.260
Well, it's an unsigned patch.

16:56.580 --> 17:01.520
So, what could possibly go wrong with an unauthenticated patch?

17:01.840 --> 17:05.820
Well, I wish the text didn't overlap, but it's subject to tampering, right?

17:05.820 --> 17:12.300
And in this particular case, when we're working with the manufacturer, we had to think about what the threat model is and who are the attackers, right?

17:12.620 --> 17:17.860
So, in this particular patch request, I haven't even said if it is a secure and authenticated channel.

17:17.860 --> 17:20.020
So, let's imagine that it's not TLS to begin with.

17:20.140 --> 17:22.480
Well, if you have a passive eavesdropper, what's going to happen?

17:22.680 --> 17:24.000
You're going to see the raw bytes.

17:24.200 --> 17:34.000
And as Avi alluded to, when I go about a security analysis, the first thing I'm going to look at is, well, if I can capture some of those patches, I'm going to find out what libraries are changing.

17:34.000 --> 17:40.840
I'm going to find out what binaries you're actually changing and updating, and that will inform how I do and perform my analysis to break your device.

17:41.080 --> 17:43.920
And let's not be fooled, any attacker is going to do the same thing.

17:44.180 --> 17:51.640
Now, another issue with this is just to assume that the next more powerful attacker is an active attacker.

17:51.640 --> 17:55.640
Well, an active attacker can modify, jam, or drop this traffic, right?

17:55.640 --> 18:06.300
So, this becomes problematic because that sort of higher level of an attacker, if they can just change bytes in that patch, they've effectively controlled the software that's going to be delivered to your system.

18:06.540 --> 18:19.300
If your particular medical device doesn't actually verify a signature on this particular patch, well, then you're going to install it haphazardly and be very happy, and lo and behold, you're running a code that an attacker directly controls.

18:19.600 --> 18:27.660
I should also mention, I mean, we're talking about patches here, but it is the case oftentimes that this could be an entire firmware, so it's not just some of the functionality.

18:27.800 --> 18:36.520
And if anyone doesn't believe me, if anyone has like Windows 10, for example, and your update process is like 20 gigs, it's because it's putting the whole entire operating system on there again.

18:36.720 --> 18:38.920
So, this is pretty big.

18:39.320 --> 18:43.980
And so, what we have to do, we have to talk to the manufacturer and say, all right, what do you guys care about, right?

18:43.980 --> 18:48.560
And we, of course, mentioned this issue, we say, well, do you care about confidentiality?

18:48.560 --> 18:53.340
Like, you could potentially have IP in this firmware for this device.

18:53.440 --> 18:58.460
And they said, you know, we're not too concerned about our IP, which is a weird statement, but it was fine.

18:58.720 --> 19:03.040
But what they did say is, yes, being actively able to modify is a big, big problem.

19:03.040 --> 19:05.200
How would you guys go about solving this?

19:05.200 --> 19:07.180
And this is where we start collaborating together.

19:09.340 --> 19:10.100
All right.

19:10.100 --> 19:13.620
So, first solution we come up with, we sort of brainstorm through.

19:13.880 --> 19:15.720
Again, we have our patch request.

19:15.880 --> 19:18.680
This time, let's just assume this is TLS and we'll get into that for a second.

19:18.680 --> 19:22.780
So, we at least have a secure channel between, say, medical device and the cloud.

19:23.320 --> 19:30.500
And in the cloud, what's happening now is that the cloud will have that patch pre-existing somewhere.

19:30.500 --> 19:33.880
So, if this is AWS, it would be an S3, for example.

19:34.140 --> 19:39.640
What the cloud is going to do, the cloud actually can access a hardware security module.

19:39.640 --> 19:44.220
And so, for people that don't know HSMs, I'll do the brief 101 as fast as I possibly can.

19:44.220 --> 19:52.660
Crypto device, tamper proof, tamper evidence, secure key generation with random number generator that's been certified.

19:52.840 --> 19:56.060
If you're an academic like me, you might not put too much clout into FIPS.

19:56.060 --> 19:59.860
Everyone else is from the industry, you love FIPS because people and regulators tell you it's good.

19:59.860 --> 20:00.920
And of course it is.

20:01.000 --> 20:06.940
The appropriate algorithms, the appropriate ciphers, the appropriate key sizes, and make sure you don't make any funny mistakes.

20:06.940 --> 20:11.380
No one wants to see you implement a Caesar cipher because that's not crypto, you will be broken.

20:11.720 --> 20:20.540
And so, this hardware security module exists, typically they're clustered, which gives you a great benefit in that if one fails, you have encrypted contents elsewhere.

20:21.000 --> 20:26.940
Because if you delete, say, private key, for example, which is non-extractable, if you lose a hardware security module, well, guess what?

20:26.940 --> 20:32.760
You've just lost the ability to perform any of these signing operations again, and you have to reboot your system.

20:32.900 --> 20:33.880
So all of this is great.

20:33.880 --> 20:35.080
I thought this was fantastic.

20:35.120 --> 20:38.460
Yes, use the cloud, use hardware security modules.

20:38.860 --> 20:41.880
And so we send a signed patch, and we look at the medical device.

20:42.240 --> 20:43.980
And we say, oh, no, guess what?

20:43.980 --> 20:45.440
This is still subject to tampering.

20:45.460 --> 20:46.320
Guess why?

20:47.000 --> 20:56.160
We were talking to the great FDA reviewers and regulators, and I'm not saying great, just kind of cheeky, they really are super smart people to work with.

20:56.160 --> 20:59.420
And one of them had mentioned, well, all right, where's your trust boundary?

20:59.420 --> 21:01.220
I'm like, oh, you know, I trust the cloud.

21:01.220 --> 21:02.500
Like, I don't trust the cloud.

21:02.760 --> 21:04.720
All right, well, you're the regulator, and I believe you.

21:04.720 --> 21:06.620
I, too, do not trust the cloud right now.

21:06.800 --> 21:10.840
And so we reworked the solution based on this dialogue because it made a lot of sense.

21:10.840 --> 21:13.320
And in terms of security, it's going to bolster the security.

21:13.480 --> 21:16.640
So then we'll come up with our next sort of brainstorming approach.

21:17.120 --> 21:20.440
Again, medical device, do a patch request.

21:21.260 --> 21:22.980
We don't trust the cloud anymore.

21:23.440 --> 21:25.960
So what we're going to do, my big head, I'm sorry, I'm very tall.

21:26.240 --> 21:28.900
We're going to generate a private and public key pair.

21:28.900 --> 21:31.840
We're going to do that locally during the manufacturing process.

21:32.520 --> 21:33.760
This is a secured network.

21:33.760 --> 21:35.480
It's within our trust boundary.

21:35.840 --> 21:38.580
And what's great about it is you can still use hardware security modules.

21:38.580 --> 21:43.620
They're like $25,000, and usually, I don't know, medical device manufacturers have a ton of money to throw away.

21:43.620 --> 21:45.180
So I love saying, yeah, you should get that one.

21:45.520 --> 21:47.040
And that's precisely what they did.

21:47.040 --> 21:49.660
They did the secure key generation their side.

21:49.660 --> 21:54.280
They used the private key in that secured network manufacturing environment.

21:54.640 --> 22:03.140
They can sign a patch, and they can upload the patch and the sign, the signature to their content delivery network, which is the cloud.

22:03.140 --> 22:03.560
So great.

22:03.560 --> 22:09.100
So these two things are existing in AWS, and we pulled out sort of our, from our trust boundary, that cloud.

22:10.360 --> 22:11.960
We sent the signed patch across.

22:12.780 --> 22:13.960
We thought we were good.

22:14.240 --> 22:19.660
Lo and behold, if you think about the process, and during the brainstorming process, well, you know, you have an authenticated patch.

22:19.660 --> 22:22.120
But the problem here is that, well, we don't have a nonce .

22:22.120 --> 22:22.880
We don't have a time stamp.

22:22.880 --> 22:24.260
We don't have any uniqueness.

22:24.900 --> 22:29.500
And the reason this matters is , well, you've opened yourself up to a replay attack, right?

22:29.540 --> 22:33.100
And so there are a number of ways to mitigate this, and some of them aren't even security.

22:33.100 --> 22:39.460
I'll just blatantly tell you that, and I can tell you what that particular solution is, because you can combine it with actual security, and it works well.

22:40.340 --> 22:43.420
And so the scenario, let me just play it out this way, right?

22:43.780 --> 22:50.640
If I were an active attacker, not even active, maybe I'm an eavesdropper, and I see a patch that's put out in like 2006.

22:50.640 --> 22:51.760
I saved that patch.

22:51.920 --> 22:58.080
I know that at some point, even that patch is going to have some vulnerabilities inside of it.

22:58.080 --> 22:59.320
So some software gets old.

22:59.320 --> 23:00.660
Software ages like milk.

23:00.660 --> 23:01.460
Go figure.

23:01.940 --> 23:05.280
I wait, and I see patch happens five years later.

23:05.480 --> 23:09.820
And I see exactly what changed, and I look at the old patch, and I go, oh, well, these binaries also changed.

23:09.820 --> 23:11.320
I had this entire thing.

23:11.460 --> 23:22.200
Well, if there's no replay protection mechanism, what's to stop me from attacker as to replaying that original patch, overwriting the good one, and putting the system back into a bad state?

23:22.200 --> 23:30.500
Now, I won't lie to you, that scenario may be a bit contrived, and the reason is because you can implement controls inside of the medical device that say, all right, well, you're signed.

23:30.620 --> 23:35.520
I need one of those bytes to actually specify what the firmware version is, and I will never downgrade.

23:35.780 --> 23:41.780
That's a reasonable approach, and that's one thing that we did build in, but at the same time, we wanted to go ahead and mitigate this particular risk as well.

23:42.880 --> 23:45.780
So we end up with the next patch process.

23:46.240 --> 23:47.980
Patch request to the cloud.

23:48.260 --> 23:52.020
Still doing our on-premise signing and uploading signature and patch.

23:52.640 --> 23:59.320
And then we're sending a signed patch and or firmware and a time stamp, which is also signed.

23:59.320 --> 24:01.920
I'll talk, we're missing some text on there, but I'll explain.

24:02.640 --> 24:09.080
And now we're authenticated with a nonce, and this gives us a better security implementation than we had before.

24:09.420 --> 24:16.940
Now, I said there's something missing, and let me just walk over here real quick, so that way, when the purist asks me the questions, and I say, well, dude, you messed up, how did you sign that?

24:17.500 --> 24:22.760
One approach that we can take, we have the on-premise signing of the patch or the firmware.

24:23.300 --> 24:25.920
We still have hardware secure modules that exist in the cloud.

24:26.140 --> 24:27.800
And so this is a semi-trusted environment.

24:27.800 --> 24:35.440
I won't say that it's untrusted, because, for example, you're putting the patches in here to begin with, so you have to have some trust or some notion of trust.

24:35.860 --> 24:50.680
So what we can do, we can have, yet again, another symmetric or asymmetric key pair, excuse me, and we will go ahead and sign the inner payload, which is signed itself, with an outer payload, bake in that time stamp, ship that off to the medical device,

24:50.680 --> 24:51.320
and what happens?

24:51.320 --> 24:58.000
Well, you verify the outer, go ahead, pull it apart, check out the time stamp, verify the inner, and there you go, you have a secure protocol.

25:00.700 --> 25:01.400
Cool.

25:01.400 --> 25:06.920
And so that is the patch process experience that we have with one medical device manufacturer.

25:08.600 --> 25:09.320
Awesome.

25:09.480 --> 25:13.700
So the next thing we're going to talk about is communication protocols.

25:13.840 --> 25:24.540
And the reason why I bring this up is I actually talked to some of the device manufacturers next door, and one of the guys, we had a dialogue, and I was like, wow, this is really close to our system, and I was like, yeah, I've seen this in multiple places,

25:24.540 --> 25:25.660
you must be doing okay.

25:25.960 --> 25:27.640
Here's my card, you should call me.

25:28.120 --> 25:30.060
But it's okay, so we're going to talk through this process.

25:30.060 --> 25:37.840
So let me take a step back, we see three beautiful images on here that I did not make, but they look great, and we're going to talk about what the relationship is.

25:37.960 --> 25:43.620
So in this particular case, we have a personal medical device, this is a wearable, it's on you all the time.

25:44.240 --> 25:48.000
We have a mobile device, so smartphone, Android, iOS.

25:48.320 --> 25:52.280
This is going to be in direct communication with this particular device.

25:52.560 --> 25:54.560
And we still have our cloud component.

25:54.560 --> 26:00.440
So one might imagine, well, how the heck are these things going to communicate, and where is your trust boundary, and those are all fantastic questions.

26:00.680 --> 26:04.680
Before I get ahead of myself, I'm going to hit the right arrow a couple of times, because I'm going to mess up these transitions.

26:06.400 --> 26:07.640
Come on, is there one more?

26:07.840 --> 26:09.580
No, that looks like it.

26:09.900 --> 26:10.420
Yep.

26:11.160 --> 26:13.100
Cool, they're all up there, they're just not showing there.

26:13.140 --> 26:14.760
So let's think about it this way.

26:15.360 --> 26:20.740
You're going to have this smartphone, smartphone is going to configure the actuation of this particular device.

26:21.020 --> 26:25.600
We're going to make some assumptions, close physical proximity, you might imagine, well, what protocols would you use there?

26:25.600 --> 26:26.920
BLE, of course.

26:28.140 --> 26:35.620
And then, you know, there might be, this is all patient configurable, but the medical device, since it's doing actuation, it's also doing sensing, right?

26:35.760 --> 26:48.220
And so we have to imagine, medical devices are oftentimes, like, I hate when people argue, it can't have really good robust hardware, because, let's face it, raspberry pies have four gigs of RAM now, anything can have good hardware.

26:48.960 --> 26:52.740
But the argument is that, well, these won't have a NIC, and I can buy that.

26:52.740 --> 27:02.800
So, you know, I might have a Bluetooth BLE module such that it can talk and some driver around it, but it doesn't have Wi-Fi, so it's not connecting to your wireless routers, which also makes a lot of sense, too.

27:02.800 --> 27:06.680
How would you, for example, have a wearable and, like, connect to the Wi-Fi for me?

27:06.680 --> 27:09.440
It's kind of a contrived thing that you may have to do.

27:09.740 --> 27:17.580
So what we need in this particular architecture is that this personal medical device has to communicate to the cloud over the smart phone.

27:17.840 --> 27:30.660
Now, I can tell you, you're all hackers, I bet you a bunch of you actually have lineage OS or something equivalent, your phones are probably rooted, don't trust the package managers, because you don't, they're signed, of course, Cydia signs all of its packages,

27:30.660 --> 27:32.500
but who the heck uploaded those things?

27:32.580 --> 27:39.340
And so from the perspective of the medical device manufacturer, that's not trusted, it should never be trusted, it's not even semi-trusted.

27:39.360 --> 27:52.220
It's great, you can configure your device, it's on you, it's cool, we run an application, but if there's any personal health information or PHI, don't trust that particular device to look at it, because it could siphon it off, send it somewhere else, right?

27:54.400 --> 27:55.040
Cool.

27:55.440 --> 28:02.460
So now we're going to look at, so let me draw these arrows out, too, there we go, that way I don't miss any of them, I think that's pretty good.

28:03.480 --> 28:05.900
Right, so, what would you do then?

28:05.900 --> 28:18.640
You have a BLE connection, well, if you know anything about the BLE specification, there are maybe four, I think it's four, it might be five, don't quote me, there's authentication mechanisms that you could do at the transport layer to secure these two devices.

28:19.120 --> 28:27.840
Well, requirements and design actually lead how we think about our risks and our controls and what the system actually ends up being.

28:27.860 --> 28:39.420
And so in this particular case, it was, well, that's great, I mean, we can have a pairing protocol, we can have a pin, but that seems arduous, and actually, we don't want it to impact the patient experience, we want these devices just to work.

28:39.560 --> 28:49.420
So the anecdote here is if anyone's ever had a Bluetooth speaker and you go to connect to it, and somehow your friend's phone starts playing to it, and then they disconnect, someone else disconnects, and the whole thing just turns off, it's because, well,

28:49.420 --> 28:53.020
it's kind of garbage and everyone hates trying to pair these devices, right?

28:53.240 --> 29:05.320
So in this particular case, what we had come up with is a scheme where we're going to have end-to-end encryption and authentication between these two devices, because, well, the manufacturer has access to this device when they configure it, they have access,

29:05.320 --> 29:14.660
they put the boards in, they put the plastic pieces together, and maybe they 3D print it, and that gives us a lot of power in terms of how we might write a cryptographic protocol.

29:14.800 --> 29:30.240
Now, I'm saying write the cryptographic protocol, don't misquote me, we're not inventing AES 2.0 because that's just silly and it will be broken, we're using the ciphers and the algorithms and key sizes that are recommended and mandated by standards, we're using them in an intelligent way to create a hybrid scheme that just works.

29:30.660 --> 29:43.140
Now, since I said that we're creating our own cryptographic protocol, the most fantastic part was to be able to use that same protocol to, from this device, talk to the cloud, over the phone, without the phone seeing the data.

29:43.340 --> 29:46.900
And that is what we actually came up with.

29:47.040 --> 29:55.060
So let me just hit next to see, I did miss a bullet, that's fine, that looks like it's okay, yeah, you need to be connected before you go to the cloud, that's good.

29:58.380 --> 30:04.080
And let me see, so I'm going to, I clicked through these because I actually wanted to do them in a different format or a different order.

30:04.260 --> 30:07.420
I'm going to talk about the personal medical device and the cloud first.

30:08.680 --> 30:12.740
You are in the configuration stage, how might you bootstrap the security?

30:13.020 --> 30:20.300
Well, one way is you could take the medical device as you're putting it together, you want to do secure key generation, right?

30:20.320 --> 30:33.620
So let's hope, I mean, modern architecture, if we're doing, what is it, if we're doing ARM processor, there's things like trust zone, crypto coprocessors, those types that you can put into this device to securely generate your key pair.

30:33.860 --> 30:47.660
What that means is that you have a good sense of your security protocol and how these things are generated, they're unique for every device, never, never hard code a key because you'll get owned and you'll end up at a talk here and everyone will laugh at you.

30:47.820 --> 30:49.840
So you want to generate your key this way.

30:50.100 --> 30:55.480
You're going to have a key pair, it's asymmetric, the cloud also has its own asymmetric key pair.

30:55.480 --> 31:03.580
And what you're doing since you're in the trusted manufacturing process, you do key exchange, you exchange two public keys with one another.

31:03.580 --> 31:07.660
And this is going to allow you to sort of bootstrap the end to end encryption process.

31:07.660 --> 31:13.220
And glossing over some of the details, we might argue like, oh, well, asymmetric key pair, one's for authentication, one's for encryption.

31:13.220 --> 31:15.700
Yes, it's also a hybrid based approach.

31:15.700 --> 31:17.500
So there's going to be a symmetric key.

31:17.500 --> 31:18.780
I won't talk much about that.

31:18.780 --> 31:20.780
And I have three minutes, so I should go really quickly.

31:21.040 --> 31:28.100
But the idea is that since you've bootstrapped this, once you go to put these things online, you're going to have a pairing protocol with that phone.

31:28.360 --> 31:32.360
What that phone's going to do is first it's going to pair to the cloud as part of the process.

31:32.460 --> 31:34.080
They're going to generate a key pair.

31:34.200 --> 31:36.700
It's going to exchange public keys with the cloud.

31:36.700 --> 31:41.380
The reason why you're doing this is because the public key that gets inside cloud, you want to sign it.

31:41.460 --> 31:48.860
The reason why you want to sign it is when this pairing protocol happens between these two devices, you need to verify that that phone's actually trusted.

31:48.860 --> 31:50.300
Like, do you have an account?

31:50.380 --> 31:51.460
Do you own the device?

31:51.460 --> 31:52.580
Did you talk to the cloud?

31:52.840 --> 31:59.380
And once that is done, since you've already pre-established the secrets between the cloud and the medical device, lo and behold, you can do end-to-end encryption.

31:59.660 --> 32:02.820
So you can do, for example, an elliptic curve Diffie-Hellman key exchange.

32:02.820 --> 32:05.920
Let's make it perfect forward secrecy in it.

32:05.920 --> 32:08.240
And we can encrypt data, send it back and forth.

32:08.240 --> 32:11.300
It can be PHI, PII, and the mobile device is none the wiser.

32:12.840 --> 32:15.180
And we get a giant green mark, which is great.

32:16.420 --> 32:18.240
So I'm going to have briefs for this one for three minutes.

32:18.240 --> 32:19.200
I think I can do it.

32:19.640 --> 32:21.260
Well, he said three minutes.

32:21.480 --> 32:23.540
Yeah, I'll be quick, I promise.

32:24.000 --> 32:30.160
All right, for this one, medical device, the issues that came up were all access controls.

32:30.160 --> 32:33.080
So physical access controls, maybe network-based access controls.

32:33.340 --> 32:38.080
The problem is, you know, you might only have a single set of access credentials.

32:38.420 --> 32:41.680
Your admin, your root, you have access to everything, that's probably bad.

32:43.900 --> 32:47.540
Unsecured protocols, such as FTP, Telnet, don't want those.

32:47.720 --> 32:50.280
Anyone can use your app on the data and mess with it, not good.

32:50.400 --> 32:54.780
USB port for maintenance and configuration, well, this is just another attack surface that someone can tap into.

32:55.540 --> 33:07.940
Direct access to therapeutic controls, well, you know, if an attacker has physical access, they're probably going to break it with a hammer first, but we like to mitigate as many risks as we possibly can, so maybe we put a pin to authenticate the user to touch the control pad.

33:08.480 --> 33:11.620
And finally, just separating clinical mode and operational mode.

33:11.620 --> 33:19.640
When this thing is doing its business for the patient, you shouldn't be able to do a firmware update, because that is just going to hose everything and be a whole mess of problems.

33:22.040 --> 33:24.840
So I talked about all these, that means that slide goes quickly.

33:26.260 --> 33:30.380
So fixes, as you might imagine, there's common, basically common sense, right?

33:30.380 --> 33:36.800
Get rid of unauthenticated, unencrypted protocols, use SSH, for example, use TLS, if you have HTTP.

33:37.340 --> 33:43.920
Looking at it, also requiring physical access, requires having a unique pin for every single device.

33:43.920 --> 33:53.480
Let's not have default hard-coded credentials and secrets, because again, if you figure out a pin and someone sets these up, maybe you know the pin for all hundreds of thousands of devices, probably not a good thing.

33:54.540 --> 34:08.520
The communication functions, you want to be able to partition these by hardware, so isolated worlds, if you're doing actuation, you probably don't want to be on the same board processor as the thing that's doing your TCP IP stack, because guess what, vulnerabilities happen in drivers,

34:08.520 --> 34:12.980
that's current level exploit, you get rude on the box, but you don't, again, want to affect the patient.

34:13.720 --> 34:21.540
Lastly, like I said before, if you're in clinical mode, you shouldn't do a firmware update, so these things need to be cleanly isolated, such that one cannot impact the other.

34:22.520 --> 34:24.240
And that fixes our medical device.

34:24.500 --> 34:26.660
And I'll let Avi finish on the last slide.

34:26.660 --> 34:27.840
I'm sorry, guys, I went a little over.

34:29.640 --> 34:30.360
Okay.

34:31.660 --> 34:32.940
Thanks a lot for that, Mike.

34:32.940 --> 34:48.600
So just as you saw, each of these examples showed some pretty straightforward problems and some pretty straightforward solutions, but there are so many things that you actually have to keep track of, the complexity can be really high when you look at everything together as a holistic system.

34:48.600 --> 34:54.040
So it's really not just the firmware, although the firmware is really important, but it's the entire system.

34:54.040 --> 34:59.320
I think that this industry is very lucky that it has really top-notch regulators.

34:59.320 --> 35:12.880
The people that we've spoken with on behalf of our clients are super technical people and very smart, and unlike some other industries where the regulators maybe aren't quite up to par, here they really are good.

35:12.880 --> 35:17.540
And so that's something that the medical device manufacturers actually have in their favor.

35:17.880 --> 35:21.640
And so I think we're out of time, but thanks a lot for your time and attention.

