start	end	text
0	3940	Okay guys, thanks for coming to the Biohacking Village. If you've been here for earlier talks today,
3940	8720	thank you for coming back. If it's your first one, welcome. We have, if you guys haven't,
8720	14620	visited the CTF down the hall. It's a pretty impressive array of technologies. I suggest you
14620	19280	guys go over there and try to break some things. Next door we have classroom stuff where actually
19280	24740	we're assembling some prosthetics at the moment right now for somebody who gave a presentation
24740	29580	earlier. And we also have the wonderful speaker track here where we're sharing a lot of information
29580	35500	from some of the great research that's going on in the community. With that, in between talks,
35500	41640	we also have some donation work here. As you know, this is a non-profit. The work done here and the
41640	45200	money collected here is both to help fund and do the process and projects of these things around
45200	50300	here. In exchange, we have some things that we'll give you as being a participant in that.
51320	56220	So I'd like to introduce Dr. Avi Rubin. He's a professor at Johns Hopkins University.
56220	60120	He also serves as the technical director of the JHU Information Security Institute.
60720	64720	He's the founder and director of the JHU Health and Medical Security Lab and is working advancing
64720	71880	medical devices and security in healthcare networks. He's got, he'll, he'll also introduce
71880	76120	his co-presenter. But I want to give you an opportunity to welcome him here to speak
76120	95110	here at the Biohacking Village. Okay, hi everyone. It's, it's nice to be here. This is my first
95110	101290	DEF CON. I'm used to going to academic conferences and the first thing I was told when I showed up
101290	106110	here and I presented myself as a speaker, I was wearing khaki pants and I was told you can't
106110	111570	speak like that. This is a hacking conference and you have to change into jeans. And so I did. I
111570	116630	followed the rules and I changed into jeans. What's really weird for me about DEF CON is I'm
116630	121030	really not used to being the least geeky person around because in most of the circles that I go,
121030	127770	I'm the geek. But there's a whole other level here and I'm enjoying it a lot. As the intro,
127770	131690	introduction mentioned, I'm the director of the health and medical security lab at Hopkins.
131790	136970	When you're a professor at a university, you get to create your own lab and you get to name it.
136970	143510	And I love boats and ships and I wanted a lab that was like HMS lab, right? Does anybody know,
143510	148950	you guys look like an educated crowd here. What, what HMS stands for? Why ships are like the HMS
148950	155210	this? That's right. Her majesty's ships. So you won't find American ships. We name our ships
156110	161310	after presidents and states, but a lot of the British ships are the HMS this and that. So I'm
161310	166850	the HMS lab. It's the health and medical security lab. And let me give you a little bit of background
166850	174010	about how, um, the work that I've done, how I got there. And, uh, that'll kind of segue into the
174010	177850	technical work that we're going to present and have a co-presenter that I'll introduce in a
177850	184630	minute too. So I am a professor at Johns Hopkins and most of you probably know Hopkins as a medical
184630	189790	school and a medical facility and a hospital. In fact, when I meet people socially, like the,
189790	194550	the parents of my kids' friends, they just assume I'm a medical doctor. They'll come talk to me
194550	198610	about their ailments and things like that. It's just, you know, if you're at Johns Hopkins,
198610	204410	there's this kind of force to work on medical stuff. So I started out at Hopkins in 2003,
204410	208770	working on electronic voting security. I did that for about seven or eight years.
208770	213250	But when you're at Hopkins, there's this sucking that happens towards you. I'm not saying like we
213250	217990	suck. I'm saying like it pulls you like the Ross Perot kind of sucking that, that it pulls you
217990	223290	into it. And you have to work on, uh, medical stuff because the doctors will come around and
223290	227290	say, Hey, I've got this problem. Can you help me? And their medical record systems. And I'm
227390	232390	a security guy. And so pretty soon I found myself working on medical stuff, created the health and
232390	236650	medical security lab, started training up students. Um, and we started looking at all kinds
236650	243250	of things. One of the seminal things that happened in this field is a paper at the IEEE security and
243250	247150	privacy conference. We call it the Oakland conference. It's the number one rated academic
247150	252750	conference, uh, by some of my colleagues, Kevin Fu, Yoshi Kono. And it was where they had taken
253170	257050	a defibrillator, wrapped it in a bunch of meat. So it would simulate being inside of a person
257050	261390	and launched a bunch of attacks against it. And it kind of woke up the industry because
261390	267550	the press got very interested in this and it just got very high profile. And so the field, I felt
267550	273270	like the field of health and medical security, at least for academics really took off after that
273270	279470	paper. And so I applied for grants and was part of a group that got a 15 and a half million dollar
279470	284630	grant from the ONC, which is the office of the national coordinator in health and human services
284630	289870	to do health and medical security research. When that project ended, we got a $10 million grant
289870	295370	from NSF to do the same. And we worked on projects like encrypting of medical records using
295370	300310	attribute-based encryption and we used, um, performing role-based access control via
300310	304170	attribute-based encryption. That's the kind of stuff that I like. So I am a geek. I do call,
304170	311050	I do qualify for that. Um, and we also looked at medical devices. And in my lab, I had students
311050	316170	that we were getting our hands on medical devices. They were, uh, flashing the, the, the ROM on
316170	321450	there and then analyzing the firmware. And so we developed a set of expertise and skills in that
321970	327730	and, um, published a lot of papers. And then some of those students from that lab, uh, came to work
327730	332530	for me after when I started Harbor Labs, which is my company. And Harbor Labs started because I was
332530	336630	getting approached by a lot of medical device companies. Once I started publishing in this area
336630	341330	saying, you know, we would like some help, some consulting help with the security of our systems.
341450	344790	And I have all these really smart students graduating and light bulb went off. I said,
344790	349590	why don't I start a company? We'll do this type of thing professionally. Um, and so that's what we
349590	355670	do. So that's the long winded introduction, um, of my background. And Mike Reshanan is here. Put
355670	361770	your hand up. Um, Mike was a PhD student of mine who finished his PhD in the HMS lab and is now
361770	366570	the director of medical security at Harbor Labs. And he and I are going to co-speak today. So I
366570	370390	also brought him here in case you guys ask any hard questions, direct them to him. He's more
370390	379190	likely to be able to answer them. So, um, this is kind of the high level outline of the talk. I'm
379190	384490	going to talk about, um, what happens when you have a medical device and you care about the
384490	389430	security of it. Uh, and what should you do if you're building a medical device and you want to
389430	394870	get through, uh, regulatory, uh, certification, you want to make sure that your device is
394870	401810	actually secure. And what I'd like to do is base the talk on a tool that we built and show you the
401810	406850	various steps that this tool can take you through. And then Mike will take you into some of the
406850	412570	case studies of actual projects we worked on with clients who built medical devices and ran into
412570	417190	hiccups when they tried to get certification for them and show you like how we help them solve
417190	425210	those problems. So, um, I like to ask the audience who knows what things are because that
425210	431110	shows me the audience is alive. So, who knows what a BOM is? B-O-M. Wow, okay, we have an
431110	436010	audience that is way above the level that I expected for this talk. Um, for those of you that
436010	442590	didn't, uh, raise your hands, it's a bill of materials. And why is a BOM important? Well, let me
442590	448630	get into talking about a firmware. So, if we're looking at a medical device, the software that
448630	454310	runs it, the logic behind it is going to be in a firmware file. And if you're in a company that
454310	458510	builds these things, which I think many of you are, you know that you can have a team that's
458510	462430	building the software and then you have someone on the team that puts something in there and
462430	466370	then they leave the team and somebody else comes in. This dynamic kind of flow of people
466370	471250	through the development of a project that lasts many years. And there may not be anyone in the
471250	475590	organization that actually knows everything that's in this firmware. Because a firmware
475590	479870	image, you know, it's usually a Linux distribution. It's got a lot of open source packages
479870	484030	in there. It's got libraries. Somebody finds a tool and they say, this would be a great tool in
484030	488490	our firmware. There's a web server in there. They put that in the, in the firmware. And then
488490	494250	the firmware is kind of a, a living and breathing thing. And if you go to get certified for the
494250	499410	medical device, uh, the regulators are going to say, okay, what's your bill of material? And you
499410	504130	may not know, you may not know everything that's in there. And so one of the things that we did
504130	509510	is, uh, built a tool that will automatically extract, it'll unpack a firmware binary and
509510	515030	automatically extract all of the, uh, materials that are in there, all of the software that the
515030	520350	firmware uses. And that's actually not as easy as you might think, because you're talking
520350	526110	about binaries and the binaries may not have necessarily a string that has the name of the
526110	531230	package that you're using or the version number. And so we used, um, all the material available
531230	535470	at our disposal, both external to the firmware and inside the firmware and did some fuzzing
535470	540370	matching and came up with what I think is a pretty good system for figuring out what are all
540370	545450	the pieces that are inside of this firmware. And why does that matter from a security
545450	550590	perspective? Well, there's a national vulnerability database that has these common
550590	555450	vulnerability and exposures, which are called CVEs, that are vulnerabilities that are known
555450	560770	for various software packages. So let's say that your firmware in this medical device has
560770	565110	package X. It's a software package that does something that the firmware wanted to do. It's
565110	568450	not something that was developed by the manufacturer, it was something open source that
568450	575450	they found. And version 3 of, uh, product X has a serious security problem in it. And it has
575570	580850	a CVE in the national vulnerability database. And so what the tool can do is, when it
580850	586830	goes through and unpacks the firmware and it finds that package X, I'm sorry, that package X
586830	593570	version 3 is in there, it can say, aha, there's a CVE associated with this firmware. And if
593570	598630	that thing gets upgraded someday to version 4, maybe there's no CVE for that because the
598630	604390	problem was patched. And so it's important to get a look into a firmware to be able to know
604390	610710	what are the CVEs associated with this firmware. Now, if, let's see how big this is
610710	616210	coming out on here. One of the things that you can have in, um, when you're trying, for
616210	621090	example, to get a medical device, uh, through certification is there can be disqualifying
621090	626690	problems. Like, for example, if you're using a weak algorithm, this says weak algorithm
626690	633790	detected, and that has a CVSS score. CVSS is the common vulnerability scoring system, I
633790	640730	think. And that is a standardized way that, um, the industry takes certain problems and
640730	646110	scores them. And so this is something that you can identify in a firmware file and say,
646110	650090	uh-oh, you know, there's something here that's going to disqualify me from passing. I
650090	657710	need to fix that. I need to put something better in there. And so here you can see that you,
657710	662450	the tool can look through and see all the various CVEs and all the packages. And this is
662450	667850	what we call the pre-market CVEs. That is, you package up your firmware, you run this
667850	673490	through it, you sell your device, and you get your score. It takes the worst score of all
673490	678010	the CVSS scores that are found in the device and gives you that as your overall score for
678010	684990	the firmware. However, a firmware file, believe it or not, in terms of its security, is a
684990	690470	living, breathing thing. It's not static. Why is that? Well, imagine that you put out your
690470	696790	firmware and it uses library X version 3, like I told you before. And you're the developer
696790	702330	of this firmware, so you're like, oh, there's a security flaw in package X version 3. I'm
702330	708270	going to swap out and put in version 4 in there, and now there's not a security flaw. So the
708270	712670	product is out for a while, everything's going great, and then some DEF CON researcher
713470	718230	looks at product X version 4 and finds a really serious vulnerability that nobody knew
718230	723930	about. And so a CVE is issued, and now you're sitting there with a package, a firmware
723930	729010	package, using that version 4 that is believed to be pretty secure, it's got a really good
729010	737190	CVSS score, and it's actually not. Okay? And so what's needed is a way to constantly check
737190	750290	the CVEs, whoops, let me, got a little ahead of myself, to constantly check the CVEs of all
750290	754490	the packages to see if there are new ones. And what our tool does is every night it
754490	758350	downloads the NVD database and then looks at all the packages and all the firmware that
758350	763590	people have analyzed and see, is there a new CVE for one of these things? Let me tell you
763590	768470	another way that your CVSS score can be misleading and where you need to stay on top of
768470	774230	it. One of the packages is to look at crypto, to look at the various settings, the
774230	779210	algorithms, the parameters of the crypto that's being used in the firmware package. And
779210	783750	one of the checks is made to see if a certificate is expired. If the certificate is not
783750	788270	expired, that's not going to hurt your score. But what happens is time moves forward and
788270	792130	the certificate is expired, and so if you don't keep on top of it, and you don't keep
792130	797430	checking it, you could end up with a package that's got security problems that, that you
797430	805010	don't know about. So let me now, before I hand it over to Mike, he's going to talk about a
805010	812590	couple, I think three or four examples, how many? Three examples of actual security work
812590	816930	that we did with medical device manufacturers with some lessons learned from it. And the
816930	820830	first one is about patch management. I just want to say a couple words about patch
820830	825930	management. You all know what patch management is. It's the ability to take a software
825930	831390	package and get new patches to download for them. And there's always the question of, when
831390	836130	do you patch, right? And is the patch going to break my software? Because I've got a
836130	840870	system that works really well, and now the vendor issues a patch, and you have to ask
840870	845850	yourself the trade-off between, well, if I don't patch, I'm vulnerable to this vulnerability
845850	850310	that the patch addresses, and everybody now knows about it because there's been a patch, but
850310	854130	if I do patch, it might break my system, it might actually introduce new vulnerabilities. And
854130	859250	so, system administrators have the unenviable task of figuring out how to manage patches
859250	864810	and when is the right time to patch. If you think that that's difficult, consider a paper, I
864810	869090	believe it was authored out of David Wagner's lab a couple of years ago, in one of the
869090	873490	academic security conferences, where they talk about, I think the title of the paper was
873490	878750	something like, automatic exploit generation from patches. And so, think about what's
878750	884430	going on here. You've got a software package, and somebody finds a vulnerability, so the
884430	889890	vendor issues a patch, and releases it. What this tool does, it's a security tool, but it's
889890	894950	one that hackers could have as well, or could have built and not told anyone, is, it
894950	899350	looks at the patch, and based on what the patch is doing, and based on the original
899350	904070	binary, reverse engineers the vulnerability, and then builds an exploit to take advantage
904070	909010	of that vulnerability, you know, in milliseconds. It's all fully automated. You take a
909010	913090	patch, and the output of their tool is an exploit that takes advantage of the
913090	916970	vulnerability that the patch was addressing. Now, you really don't have a lot of time, if
916970	921830	you've got, like, an online system, to get that patch in there really quickly. Okay. So,
921830	924670	with that, I'll hand it over to Mike.
929720	935300	All right. Thanks, Avi. Hey, everybody. I'm going to talk about some war stories, as it
935300	940880	were. Working with some of our clients, with respect to three different scenarios. So, Avi
940880	945780	gave a great introduction to patch management. In this particular case, we were working
945780	951200	with a medical device manufacturer. They were going, it's a class three device. So, this
951200	955240	is, you know, it has the potential to cause great patient harm, and they were going
955240	960380	through a PMA evaluation. So, that's working directly with the FDA, to review their
960380	965840	protocol, to see if all risks are mitigated, and this includes cyber security risks, of
965840	969040	course, because we're cyber security experts, and that's why we were working with said
969040	975160	client. Now, what had happened is when they approached us, they described their current
975160	980340	patch management. And so, let's go ahead and diagram this out. And just note, I'm using
980340	984080	medical device here sort of arbitrarily. We love and respect our clients. I would never use
984080	989260	their names. So, please don't ask. Cool. All right. So, the original process, we have a
989260	994340	medical device. It's sending out a patch request. You'll note that there is this
994340	999680	manufacturer's CDN. So, this is a public cloud. I'll oftentimes interchangeably say AWS,
999680	1004260	because it's typically the cloud that I work with and prefer. So, we'll have more details
1004260	1009660	in terms of why that actually matters in a bit. So, medical device makes a patch request, goes
1009660	1017660	to the cloud, and the cloud is going to send a patch. Well, it's an unsigned patch. So, what
1017660	1024240	could possibly go wrong with an unauthenticated patch? Well, I wish the text didn't overlap,
1024240	1028280	but it's subject to tampering, right? And in this particular case, when we're working with the
1028280	1031840	manufacturer, we had to think about what the threat model is and who are the attackers,
1031840	1036920	right? So, in this particular patch request, I haven't even said if it is a secure and
1036920	1040800	authenticated channel. So, let's imagine that it's not TLS to begin with. Well, if you have a
1040800	1045360	passive eavesdropper, what's going to happen? You're going to see the raw bytes. And as Avi
1045360	1050380	alluded to, when I go about a security analysis, the first thing I'm going to look at is, well,
1050380	1054140	if I can capture some of those patches, I'm going to find out what libraries are changing. I'm
1054140	1057920	going to find out what binaries you're actually changing and updating, and that will inform how
1057920	1062560	I do and perform my analysis to break your device. And let's not be fooled, any attacker is
1062560	1068680	going to do the same thing. Now, another issue with this is just to assume that the next more
1068680	1074400	powerful attacker is an active attacker. Well, an active attacker can modify, jam, or drop
1074400	1079500	this traffic, right? So, this becomes problematic because that sort of higher level of an
1079500	1084080	attacker, if they can just change bytes in that patch, they've effectively controlled the
1084080	1088120	software that's going to be delivered to your system. If your particular medical device doesn't
1088120	1093140	actually verify a signature on this particular patch, well, then you're going to install it
1093140	1097780	haphazardly and be very happy, and lo and behold, you're running a code that an attacker
1097780	1102500	directly controls. I should also mention, I mean, we're talking about patches here, but it is the
1102500	1106780	case oftentimes that this could be an entire firmware, so it's not just some of the
1106780	1111380	functionality. And if anyone doesn't believe me, if anyone has like Windows 10, for example, and
1111380	1115260	your update process is like 20 gigs, it's because it's putting the whole entire operating
1115260	1121620	system on there again. So, this is pretty big. And so, what we have to do, we have to talk to
1121620	1125680	the manufacturer and say, all right, what do you guys care about, right? And we, of course,
1125680	1129820	mentioned this issue, we say, well, do you care about confidentiality? Like, you could
1129820	1134820	potentially have IP in this firmware for this device. And they said, you know, we're not too
1134820	1139760	concerned about our IP, which is a weird statement, but it was fine. But what they did say
1139760	1144640	is, yes, being actively able to modify is a big, big problem. How would you guys go about
1144640	1150660	solving this? And this is where we start collaborating together. All right. So, first
1150660	1155720	solution we come up with, we sort of brainstorm through. Again, we have our patch request.
1155880	1159000	This time, let's just assume this is TLS and we'll get into that for a second. So, we at least
1159000	1165140	have a secure channel between, say, medical device and the cloud. And in the cloud, what's
1165140	1171720	happening now is that the cloud will have that patch pre-existing somewhere. So, if this is
1171720	1177360	AWS, it would be an S3, for example. What the cloud is going to do, the cloud actually can
1177360	1182280	access a hardware security module. And so, for people that don't know HSMs, I'll do the brief
1182280	1188180	101 as fast as I possibly can. Crypto device, tamper proof, tamper evidence, secure key
1188180	1193920	generation with random number generator that's been certified. If you're an academic like me,
1193920	1197720	you might not put too much clout into FIPS. Everyone else is from the industry, you love FIPS
1197720	1201780	because people and regulators tell you it's good. And of course it is. The appropriate
1201780	1205820	algorithms, the appropriate ciphers, the appropriate key sizes, and make sure you don't make
1205820	1209840	any funny mistakes. No one wants to see you implement a Caesar cipher because that's not
1209840	1214660	crypto, you will be broken. And so, this hardware security module exists, typically they're
1214660	1219800	clustered, which gives you a great benefit in that if one fails, you have encrypted contents
1219800	1224900	elsewhere. Because if you delete, say, private key, for example, which is non-extractable, if
1224900	1228440	you lose a hardware security module, well, guess what? You've just lost the ability to
1228440	1233260	perform any of these signing operations again, and you have to reboot your system. So all of
1233260	1237680	this is great. I thought this was fantastic. Yes, use the cloud, use hardware security
1237680	1242920	modules. And so we send a signed patch, and we look at the medical device. And we say, oh,
1242920	1248600	no, guess what? This is still subject to tampering. Guess why? We were talking to the
1248600	1254180	great FDA reviewers and regulators, and I'm not saying great, just kind of cheeky, they really
1254180	1258620	are super smart people to work with. And one of them had mentioned, well, all right, where's
1258620	1261960	your trust boundary? I'm like, oh, you know, I trust the cloud. Like, I don't trust the
1261960	1265680	cloud. All right, well, you're the regulator, and I believe you. I, too, do not trust the
1265680	1270460	cloud right now. And so we reworked the solution based on this dialogue because it made a
1270460	1273980	lot of sense. And in terms of security, it's going to bolster the security. So then we'll
1273980	1279540	come up with our next sort of brainstorming approach. Again, medical device, do a patch
1279540	1284820	request. We don't trust the cloud anymore. So what we're going to do, my big head, I'm
1284820	1289300	sorry, I'm very tall. We're going to generate a private and public key pair. We're going to do
1289300	1294420	that locally during the manufacturing process. This is a secured network. It's within our
1294420	1298580	trust boundary. And what's great about it is you can still use hardware security modules.
1298580	1302800	They're like $25,000, and usually, I don't know, medical device manufacturers have a ton of
1302800	1306680	money to throw away. So I love saying, yeah, you should get that one. And that's precisely what
1306680	1311820	they did. They did the secure key generation their side. They used the private key in that
1311820	1318160	secured network manufacturing environment. They can sign a patch, and they can upload the
1318160	1323240	patch and the sign, the signature to their content delivery network, which is the cloud. So
1323240	1327840	great. So these two things are existing in AWS, and we pulled out sort of our, from our
1327840	1333960	trust boundary, that cloud. We sent the signed patch across. We thought we were good.
1334240	1338300	Lo and behold, if you think about the process, and during the brainstorming process, well, you
1338300	1342100	know, you have an authenticated patch. But the problem here is that, well, we don't have a
1342100	1346440	nonce. We don't have a time stamp. We don't have any uniqueness. And the reason this
1346440	1350700	matters is, well, you've opened yourself up to a replay attack, right? And so there are a
1350700	1354000	number of ways to mitigate this, and some of them aren't even security. I'll just blatantly
1354000	1357600	tell you that, and I can tell you what that particular solution is, because you can combine
1357600	1362700	it with actual security, and it works well. And so the scenario, let me just play it out this
1362700	1367620	way, right? If I were an active attacker, not even active, maybe I'm an eavesdropper, and I
1367620	1375840	see a patch that's put out in like 2006. I saved that patch. I know that at some point, even
1375840	1379320	that patch is going to have some vulnerabilities inside of it. So some software gets old.
1379320	1385780	Software ages like milk. Go figure. I wait, and I see patch happens five years later. And I
1385780	1388960	see exactly what changed, and I look at the old patch, and I go, oh, well, these binaries
1388960	1394560	also changed. I had this entire thing. Well, if there's no replay protection mechanism, what's
1394560	1399860	to stop me from attacker as to replaying that original patch, overwriting the good one, and
1399860	1404680	putting the system back into a bad state? Now, I won't lie to you, that scenario may be a bit
1404680	1408120	contrived, and the reason is because you can implement controls inside of the medical device
1408120	1413080	that say, all right, well, you're signed. I need one of those bytes to actually specify what the
1413080	1417360	firmware version is, and I will never downgrade. That's a reasonable approach, and that's one
1417360	1420480	thing that we did build in, but at the same time, we wanted to go ahead and mitigate this
1420480	1427980	particular risk as well. So we end up with the next patch process. Patch request to the cloud.
1428260	1434200	Still doing our on-premise signing and uploading signature and patch. And then we're sending a
1435520	1440100	signed patch and or firmware and a time stamp, which is also signed. I'll talk, we're missing
1440100	1444880	some text on there, but I'll explain. And now we're authenticated with a nonce, and this gives
1444880	1450620	us a better security implementation than we had before. Now, I said there's something missing,
1450620	1454700	and let me just walk over here real quick, so that way, when the purist asks me the questions,
1454700	1459180	and I say, well, dude, you messed up, how did you sign that? One approach that we can take, we
1459180	1464780	have the on-premise signing of the patch or the firmware. We still have hardware secure modules
1464780	1468620	that exist in the cloud. And so this is a semi-trusted environment. I won't say that it's
1468620	1472940	untrusted, because, for example, you're putting the patches in here to begin with, so you have to
1472940	1478480	have some trust or some notion of trust. So what we can do, we can have, yet again, another
1478480	1484580	symmetric or asymmetric key pair, excuse me, and we will go ahead and sign the inner payload,
1484580	1489960	which is signed itself, with an outer payload, bake in that time stamp, ship that off to the
1489960	1494160	medical device, and what happens? Well, you verify the outer, go ahead, pull it apart, check
1494160	1501500	out the time stamp, verify the inner, and there you go, you have a secure protocol. Cool. And
1501500	1506920	so that is the patch process experience that we have with one medical device manufacturer.
1508600	1514500	Awesome. So the next thing we're going to talk about is communication protocols. And the
1514500	1518960	reason why I bring this up is I actually talked to some of the device manufacturers next
1518960	1522760	door, and one of the guys, we had a dialogue, and I was like, wow, this is really close to our
1522760	1525660	system, and I was like, yeah, I've seen this in multiple places, you must be doing okay.
1525960	1529520	Here's my card, you should call me. But it's okay, so we're going to talk through this
1529520	1533760	process. So let me take a step back, we see three beautiful images on here that I did not
1533760	1539060	make, but they look great, and we're going to talk about what the relationship is. So in this
1539060	1543020	particular case, we have a personal medical device, this is a wearable, it's on you all the
1543020	1549180	time. We have a mobile device, so smartphone, Android, iOS. This is going to be in
1549180	1554620	direct communication with this particular device. And we still have our cloud component. So
1554620	1558200	one might imagine, well, how the heck are these things going to communicate, and where is your
1558200	1561680	trust boundary, and those are all fantastic questions. Before I get ahead of myself, I'm
1561680	1563860	going to hit the right arrow a couple of times, because I'm going to mess up these
1563860	1571960	transitions. Come on, is there one more? No, that looks like it. Yep. Cool, they're all up
1571960	1575640	there, they're just not showing there. So let's think about it this way. You're going to
1575640	1579920	have this smartphone, smartphone is going to configure the actuation of this particular
1579920	1583900	device. We're going to make some assumptions, close physical proximity, you might
1583900	1589560	imagine, well, what protocols would you use there? BLE, of course. And then, you know, there
1589560	1593580	might be, this is all patient configurable, but the medical device, since it's doing
1593580	1598340	actuation, it's also doing sensing, right? And so we have to imagine, medical devices are
1598340	1603680	oftentimes, like, I hate when people argue, it can't have really good robust hardware,
1603680	1607580	because, let's face it, raspberry pies have four gigs of RAM now, anything can have good
1607580	1613060	hardware. But the argument is that, well, these won't have a NIC, and I can buy that. So,
1613060	1617240	you know, I might have a Bluetooth BLE module such that it can talk and some driver around
1617240	1621900	it, but it doesn't have Wi-Fi, so it's not connecting to your wireless routers, which also
1621900	1625500	makes a lot of sense, too. How would you, for example, have a wearable and, like, connect to
1625500	1631180	the Wi-Fi for me? It's kind of a contrived thing that you may have to do. So what we need in
1631180	1634860	this particular architecture is that this personal medical device has to communicate to the
1634860	1640700	cloud over the smart phone. Now, I can tell you, you're all hackers, I bet you a bunch of you
1640700	1644980	actually have lineage OS or something equivalent, your phones are probably rooted, don't
1644980	1650100	trust the package managers, because you don't, they're signed, of course, Cydia signs all of
1650100	1654020	its packages, but who the heck uploaded those things? And so from the perspective of the
1654020	1658280	medical device manufacturer, that's not trusted, it should never be trusted, it's not even
1658280	1662640	semi-trusted. It's great, you can configure your device, it's on you, it's cool, we run an
1662640	1667860	application, but if there's any personal health information or PHI, don't trust that
1667860	1671700	particular device to look at it, because it could siphon it off, send it somewhere else,
1671700	1679900	right? Cool. So now we're going to look at, so let me draw these arrows out, too, there we go,
1679900	1685360	that way I don't miss any of them, I think that's pretty good. Right, so, what would you do
1685360	1689440	then? You have a BLE connection, well, if you know anything about the BLE
1689440	1693820	specification, there are maybe four, I think it's four, it might be five, don't quote me,
1693820	1697840	there's authentication mechanisms that you could do at the transport layer to secure these two
1697840	1704600	devices. Well, requirements and design actually lead how we think about our risks and our
1704600	1709780	controls and what the system actually ends up being. And so in this particular case, it was,
1709780	1713500	well, that's great, I mean, we can have a pairing protocol, we can have a pin, but that
1713500	1718200	seems arduous, and actually, we don't want it to impact the patient experience, we want these
1718200	1722600	devices just to work. So the anecdote here is if anyone's ever had a Bluetooth speaker and you
1722600	1726620	go to connect to it, and somehow your friend's phone starts playing to it, and then they
1726620	1729420	disconnect, someone else disconnects, and the whole thing just turns off, it's because, well,
1729420	1733680	it's kind of garbage and everyone hates trying to pair these devices, right? So in this
1733680	1737420	particular case, what we had come up with is a scheme where we're going to have end-to-end
1738640	1743180	encryption and authentication between these two devices, because, well, the manufacturer has
1743180	1746180	access to this device when they configure it, they have access, they put the boards in, they
1746180	1751400	put the plastic pieces together, and maybe they 3D print it, and that gives us a lot of power in
1751400	1755700	terms of how we might write a cryptographic protocol. Now, I'm saying write the
1755700	1760220	cryptographic protocol, don't misquote me, we're not inventing AES 2.0 because that's just
1760220	1764620	silly and it will be broken, we're using the ciphers and the algorithms and key sizes that are
1764620	1768640	recommended and mandated by standards, we're using them in an intelligent way to create a
1768640	1772800	hybrid scheme that just works. Now, since I said that we're creating our own
1772800	1778340	cryptographic protocol, the most fantastic part was to be able to use that same protocol to, from
1778340	1784140	this device, talk to the cloud, over the phone, without the phone seeing the data. And that is
1784140	1790980	what we actually came up with. So let me just hit next to see, I did miss a bullet, that's fine,
1790980	1794520	that looks like it's okay, yeah, you need to be connected before you go to the cloud, that's
1794520	1801660	good. And let me see, so I'm going to, I clicked through these because I actually wanted to do
1801660	1805600	them in a different format or a different order. I'm going to talk about the personal medical
1805600	1811920	device and the cloud first. You are in the configuration stage, how might you bootstrap the
1811920	1817860	security? Well, one way is you could take the medical device as you're putting it together, you
1817860	1822820	want to do secure key generation, right? So let's hope, I mean, modern architecture, if we're
1822820	1828400	doing, what is it, if we're doing ARM processor, there's things like trust zone, crypto
1828400	1833620	coprocessors, those types that you can put into this device to securely generate your key pair.
1833860	1840540	What that means is that you have a good sense of your security protocol and how these things are
1840540	1844680	generated, they're unique for every device, never, never hard code a key because you'll get
1844680	1848800	owned and you'll end up at a talk here and everyone will laugh at you. So you want to generate
1848800	1854280	your key this way. You're going to have a key pair, it's asymmetric, the cloud also has its own
1854280	1860300	asymmetric key pair. And what you're doing since you're in the trusted manufacturing process, you
1860300	1865060	do key exchange, you exchange two public keys with one another. And this is going to allow you to
1865060	1869320	sort of bootstrap the end to end encryption process. And glossing over some of the details, we
1869320	1873220	might argue like, oh, well, asymmetric key pair, one's for authentication, one's for encryption.
1873220	1878320	Yes, it's also a hybrid based approach. So there's going to be a symmetric key. I won't talk much
1878320	1882220	about that. And I have three minutes, so I should go really quickly. But the idea is that since
1882220	1886600	you've bootstrapped this, once you go to put these things online, you're going to have a pairing
1886600	1891140	protocol with that phone. What that phone's going to do is first it's going to pair to the cloud as
1891140	1895840	part of the process. They're going to generate a key pair. It's going to exchange public keys with
1895840	1900020	the cloud. The reason why you're doing this is because the public key that gets inside cloud, you
1900020	1905440	want to sign it. The reason why you want to sign it is when this pairing protocol happens between
1905440	1909720	these two devices, you need to verify that that phone's actually trusted. Like, do you have an
1909720	1914180	account? Do you own the device? Did you talk to the cloud? And once that is done, since you've
1914180	1918200	already pre-established the secrets between the cloud and the medical device, lo and behold, you
1918200	1921980	can do end-to-end encryption. So you can do, for example, an elliptic curve Diffie-Hellman key
1921980	1928000	exchange. Let's make it perfect forward secrecy in it. And we can encrypt data, send it back and
1928000	1934480	forth. It can be PHI, PII, and the mobile device is none the wiser. And we get a giant green mark,
1934480	1939200	which is great. So I'm going to have briefs for this one for three minutes. I think I can do it.
1939640	1945640	Well, he said three minutes. Yeah, I'll be quick, I promise. All right, for this one, medical
1945640	1951480	device, the issues that came up were all access controls. So physical access controls, maybe
1951480	1956240	network-based access controls. The problem is, you know, you might only have a single set of
1956240	1961680	access credentials. Your admin, your root, you have access to everything, that's probably bad.
1963900	1968960	Unsecured protocols, such as FTP, Telnet, don't want those. Anyone can use your app on the data
1968960	1972580	and mess with it, not good. USB port for maintenance and configuration, well, this is just
1972580	1977900	another attack surface that someone can tap into. Direct access to therapeutic controls, well,
1977900	1980600	you know, if an attacker has physical access, they're probably going to break it with a hammer
1980600	1985440	first, but we like to mitigate as many risks as we possibly can, so maybe we put a pin to
1985440	1990720	authenticate the user to touch the control pad. And finally, just separating clinical mode and
1990720	1995320	operational mode. When this thing is doing its business for the patient, you shouldn't be able
1995320	1998860	to do a firmware update, because that is just going to hose everything and be a whole mess of
1998860	2007600	problems. So I talked about all these, that means that slide goes quickly. So fixes, as you
2007600	2011760	might imagine, there's common, basically common sense, right? Get rid of unauthenticated,
2011760	2019420	unencrypted protocols, use SSH, for example, use TLS, if you have HTTP. Looking at it, also
2019420	2024300	requiring physical access, requires having a unique pin for every single device. Let's not
2024300	2028780	have default hard-coded credentials and secrets, because again, if you figure out a pin
2028780	2032400	and someone sets these up, maybe you know the pin for all hundreds of thousands of devices,
2032400	2038680	probably not a good thing. The communication functions, you want to be able to partition
2038680	2042960	these by hardware, so isolated worlds, if you're doing actuation, you probably don't want to be
2042960	2046900	on the same board processor as the thing that's doing your TCP IP stack, because guess what,
2046900	2051020	vulnerabilities happen in drivers, that's current level exploit, you get rude on the box, but you
2051020	2056020	don't, again, want to affect the patient. Lastly, like I said before, if you're in clinical
2056020	2059880	mode, you shouldn't do a firmware update, so these things need to be cleanly isolated, such
2059880	2065720	that one cannot impact the other. And that fixes our medical device. And I'll let Avi finish on
2065720	2067840	the last slide. I'm sorry, guys, I went a little over.
2069640	2076100	Okay. Thanks a lot for that, Mike. So just as you saw, each of these examples showed some
2076100	2081200	pretty straightforward problems and some pretty straightforward solutions, but there are so
2081200	2086000	many things that you actually have to keep track of, the complexity can be really high when
2086000	2090280	you look at everything together as a holistic system. So it's really not just the firmware,
2090280	2095360	although the firmware is really important, but it's the entire system. I think that this
2095360	2100440	industry is very lucky that it has really top-notch regulators. The people that we've
2100440	2105980	spoken with on behalf of our clients are super technical people and very smart, and unlike
2105980	2112140	some other industries where the regulators maybe aren't quite up to par, here they really
2112140	2116520	are good. And so that's something that the medical device manufacturers actually have
2116520	2121640	in their favor. And so I think we're out of time, but thanks a lot for your time and attention.
