start	end	text
0	1080	Hello, all.
1680	4920	And welcome to day four at DEF CON.
10650	12770	Thank you for joining to our talk.
12870	15210	We're going to talk about PASKEYS.
15570	20190	As you can see, it's PASKEYS spawn turning the web button against itself.
21030	22930	So, a little bit about ourselves.
22930	24170	So, I'm Shaurya.
24170	27970	I work as a principal software engineer at SquareX.
28010	30290	This is my second year at DEF CON.
30290	33170	And second main stage talk.
33170	34670	So, happy to be back here.
34730	36570	Uh, yeah.
37950	39050	Hello, everyone.
39050	39990	I'm Johnny.
39990	42710	I'm a front-end engineer at SquareX and researcher.
42710	44510	And this is my first time at DEF CON.
44510	47410	So, really excited to see all of you here.
51820	52780	Hi, everyone.
52780	53720	My name is Daniel.
53740	56840	I work as a senior front-end engineer at SquareX.
56880	58840	This is also my first DEF CON.
58840	60340	So, really happy to be here.
64520	65280	Okay.
65280	70940	So, we are part of a browser security company.
70940	77660	And as part of our work, we have to deal a lot with figuring out web threads and what could happen by the browser.
78100	81020	We have a dedicated team that works towards all of this.
81020	84480	This is just a couple of research that we have done with our team before.
84480	86260	Which has been published before.
86280	91260	Like, the second one was also, like, at the DEF CON main stage last year.
92720	98060	So, I think it's important to talk about passkeys.
98060	103820	Because we all know that all the companies are now pushing passkeys, right?
103900	106620	It was all just password protection back then.
106620	109040	But not everyone is just talking about passkeys.
109100	115880	If you look at, you know, the latest news articles, we can see, like, all the major companies are pushing passkeys.
116020	123420	And within a few years, it's gonna be the main medium of accessing applications across the web.
123420	132060	So, if you have any consumer app, or if you have any, you know, SaaS application, you will see people using passkeys more often than passwords.
132060	137320	And that's actually gonna happen, as you can see, because of the companies pushing it as well.
137480	140940	So, the first question that comes in is that why?
140940	143260	Why are they pushing passkeys?
143260	148800	So, I mean, it's, of course, like, better, I would say, in some aspects, right?
148800	153120	So, it uses a public cryptography, which comes with its own benefits.
153300	157740	The first one is protection against phishing up to a good level.
158000	166760	So, what I mean with this is that, you know, let's say you open a website, xyz.com, and then you open abc.com.
167000	174120	By default, your passkey will not appear on the second origin, because the passkeys are bound to the origin.
174220	185080	Unlike your usual phishing cases, where you can redirect a user to a random page, and by themselves, they can go ahead and enter the password on that page, right?
185080	191200	So, since it is bound by the origin, it helps us with some protection against phishing, which is pretty good.
191560	201040	Second is, it's not guessable, because you need to have a private key with you on the device, or, you know, your authenticator, but only the public key is there.
201040	207060	So, you know, people cannot just go ahead and guess your private key easily, compared to a password.
207140	210120	So, the guessability factor is also very less.
210520	218260	Lastly, if in all, a data breach happens, what's going to get exposed is just the public keys, not the private keys.
218260	221160	Because the private keys are not with the server.
221580	222480	So, that's good, right?
222480	225840	So, all these three things make them definitely better.
225840	228220	And that's why companies are pushing this.
229420	232640	Now, there are a couple of terms we're gonna talk about.
232640	235160	I'm sure some of you might be aware about them.
235160	238640	But just to, like , you know, clarify at a very basic level.
238680	241780	So, we're gonna use terms like passkeys and WebAuthn.
241780	248820	So , the implementation of passkeys itself relies on a set of standards, which are called FIDO2.
248820	256100	And then WebAuthn is one of its specifications that enables the support of passkey on browsers.
256280	262440	So, in this talk, we're gonna focus about this WebAuthn flow, which is the flow that happens via the browser.
262440	265720	And that's where most people are using passkeys these days.
265960	275640	Now, the browser, in this case, acts like a mediator between, you know, your authenticator and wherever, like, use your passkeys.
276260	281880	So, as you can see, people are saying that passwords are dead.
281880	285160	But the question is, is the replacement ready?
285180	293980	To answer that, I think it's important to understand that passkeys can be misunderstood as well, if you just focus on those three points.
294060	302440	Unlike passwords, they haven't been exposed to, you know, decades of research going through all the different ways things can go about.
302440	309300	So, I think it's the right time we start focusing on the same kind of research that goes for the passwords for passkeys as well.
309500	316940	Because before we start adopting, it's important to understand how adversaries can go and use it against people.
317040	317520	Right ?
318020	318740	So, yeah.
318740	325980	So, as you can see, this set of APIs, the WebAuthn, it's like a magic box for most websites.
326060	330700	So, they get, like, a couple of APIs that they have to call, and that's where the magic is.
330700	336540	So, you get, like, an API to do something, then you get another API to do something, and that's where the black box is.
336620	341860	Now, we'll show how people can exploit the trust boundary in the browser itself.
341900	346160	But before that, I think it's important to understand how the flow works.
346160	350340	So, I'll ask Daniel to walk us through with how the WebAuthn flow works.
353060	353740	Cool.
353740	354500	Thank you.
354620	357580	So, I'm gonna go through the WebAuthn 101.
357620	360320	And there are a couple of flows that we are concerned about.
360320	364020	Firstly, the registration flow, and secondly, the authentication flow.
364020	367860	So, both of these flows actually have a couple of, have a few involved parties.
368000	378560	There's the user, the authenticator, the client, which is usually the browser, and the relying party, which is usually the server, that relies on the authenticator to authenticate the users.
379220	381840	So, let's go through the registration flow.
382260	387120	Normally starts out with a user clicking on something like create a passkey on a website.
387260	393240	The server then gets this request and responds with a challenge and additional information for the creation of the public key.
393440	398400	The browser then gets this response and calls navigator.credentials.create.
398400	401760	So, this triggers the authenticator to generate a new key pair.
401780	410420	So, the authenticator then prompts for the biometrics or pin, generates the key pair, stores the private key, and then returns a few fields.
410420	418020	So, some of these fields include things like credential ID and attestation information, like public key, counter.
418020	424300	So, the counter is useful for preventing replay attacks because the counter is incremented every time the key is used.
424420	429200	And then flex, which has information about whether the user is present or verified, and things like that.
429300	435180	So, this information is then returned to the navigator.credentials.create call, which then formulates a response.
435900	437260	And some of the fields are included here.
437260	438860	So, this is not exhaustive.
438860	447840	So, you have things like ID, you know, raw ID, and then response, attestation object, which has the format, auth data, and then the attestation statement.
448840	456040	So, all of this is returned to the server, which then verifies this registration data, and it stores the public key and all the other data.
456180	458060	So, that's the registration flow.
458260	466160	And for the authentication flow, it's also fairly similar in that it starts by the user clicking on signing with a passkey on the website.
466440	470240	The server gets that request, and then responds with a challenge, and then the information.
471540	475720	And then the browser gets this response and calls navigator.credentials.get.
475720	479580	So, previously it was .create, but this time around it's .get for authentication.
479760	484160	And it triggers the authenticator to retrieve and use existing credentials.
484760	488240	So, the authenticator then prompts for biometrics of PIN again.
488960	495400	It retrieves a private key, increments the counter, like I mentioned earlier, and it creates the authenticated data, and then it signs it.
496460	506360	So, this information is returned back to the .get call, and then it formulates again the response, which is fairly similar as well to the .create response.
506580	514080	Some slight differences are things like the signature being a higher level field within the response over there.
514080	521300	Because previously in the .create flow, the signature was within the attestation statement, but this time around it's a field on its own within the response.
523040	528740	Then this information is returned to the server, which verifies it and handles logging the user.
529800	538240	So, Authenticator Attestation Global Unique Identifier, also known as AAGUID, is basically a way to identify the type of authenticator.
539040	545940	So, there's a UUID mapping between well-known authenticators and this value.
545940	550980	So, the server can use this AAGUID to identify what type of authenticator is being used on the client side.
551440	555300	And this is public information, so you can actually search it up for those mappings.
556320	560200	Cool, and now I'll pass the time over to Johnny to take us through security properties.
563530	564310	All right, hey guys.
564310	566590	I'll be going over the attack itself.
566930	570910	So, we're just going to review the security properties of WebAuthn really quick.
571030	578030	It's designed to be cryptographically strong, so it uses public key cryptography.
578490	580050	Cryptography, sorry.
580050	581590	I'm a little nervous.
581830	583670	Private keys are stored securely.
583670	592710	So, in Apple devices, they use something called the secure enclave, which is a separate security subsystem, and it has a completely different processing unit.
592850	602550	Credentials are bound to web origins, so if a potential victim clicks on a phishing link, there's not going to be a corresponding credential for that origin.
602550	611870	And if your device gets stolen, for example, user verification basically verifies that you can't silently reuse a passkey.
611870	615930	You're going to have to have someone's fingerprint or their face for face ID.
616630	619610	Attestation is something that is kind of used.
619610	627630	It's more generally used in corporate scenarios for internal devices, but for consumer scenarios, it's really not used that much.
627630	637550	And that basically allows corporations to authenticate the device, basically verify that the device is from that internal system.
638850	646850	So, let's discuss kind of how the model of trust was with password authentication and how it kind of changes with passkeys.
647110	652750	So, traditionally, right, we have passwords, and we have a shared secret.
652750	654430	The user has the password.
654430	657310	They have to remember it or store it in a password manager.
657550	660310	And the relying party also has to store it.
660310	665530	And we kind of trust the relying party to hash it and store it securely in some type of database.
666290	671410	With passkey authentication, the relying party only stores a public key.
671490	679070	So, that's pretty much useless for the relying party if they want to use it in a different website or in any other context.
679330	689290	So, if you think about it, trust is actually shifted away from the user and the relying party and it's shifted towards the user's device.
689290	697510	Because essentially the device stores the private key and the device is the one that verifies the user with touch ID or with face ID.
699370	709230	So, what I'm getting at with all of this is that the browser has kind of become the trust anchor and it's become much more of an attractive attack vector for us.
710410	715190	Basically developers will trust the browser to enforce certain things.
715190	725850	The authenticator never has context about the application logic and it basically acts as a middle man between the authenticator and the server.
725990	733070	And the server validates the cryptographic result but it has, it basically doesn't care how that result came to be.
733070	736130	So, if you have a valid result, it doesn't matter.
736250	738130	The server will accept it.
739130	741750	So, this leads us into the actual exploit.
742330	744770	What if your browser is lying to you?
745250	752870	So, today we are going to show you how you can inject code into the browser and basically steal and replay pass keys on any device.
753590	755750	There are two things that make our demo work.
755750	758270	One is we need an injection pathway.
758790	761450	Basically we need a way to inject code into the browser.
761590	766210	And two, we need code that can basically play the role of an authenticator.
768670	772110	Like I said before, the browser acts as kind of a middle man.
772110	776270	So, you can consider this like a man in the middle or man in the browser attack.
777790	780710	In our demo, we use a malicious browser extension.
780970	789470	And what our extension does is it essentially hooks into the credentials API, which is a web API that interfaces with the authenticator.
789890	794750	And we overwrite the create and get functions that Daniel explained earlier.
795750	800290	And this extension, of course, is just a convenient way for us to proxy the credentials API.
800290	803490	But there are other injection methods as you all know.
803610	807790	You can use cross site scripting or it could be a compromised third party script.
810300	813160	So, I'll briefly walk through the attack flow.
813500	820600	Essentially what happens is, you know, the user creates a pass key, hits the server, server provides options.
820720	827740	And then instead of calling the get function from the credentials web API, it calls our injected code.
827840	829840	So, it's calling our get function here.
829900	845580	And essentially what we do is we generate a key pair, we create the attestation, and basically we store the private information that we use later to authenticate, forge authentication responses.
848270	851670	So, with authentication, it's kind of similar.
851670	853310	You know, it hits the server.
853530	855110	It calls the get function.
855510	861550	And from here, we actually take, we pull the private key that we stored earlier and the relevant information.
861550	865950	And then we forge a challenge back to the relying party.
871600	872120	Cool.
872120	874960	I'm going to hand it over to Sharya and he's going to show you the actual demo.
877280	878000	Okay.
878080	882920	So, as you can see, what we are trying to do is just proxy the APIs.
883080	887540	And like he mentioned, you can do it via XSS or you can do it via an extension.
887720	889900	So, in this example, we're going to use an extension.
889900	892840	But the same thing applies to any kind of client-side scripting.
892980	900820	So, I think for the first demo, we're going to use a website, which is like a common website where developers go and test out the passkey flow.
901100	904460	So, I'm just going to show this to you, how it looks like.
907940	908720	Okay.
908720	913700	So, as you can see here, right now, the extension that we have made is disabled, right?
913700	917120	So, it's not enabled in the extension page.
917380	921460	Now, what we're going to do is that we're going to go to this website called WebAuthn.io.
921460	925680	It's one of those websites where you can go about and test how passkey flow is working.
925680	926620	Good for developers.
926620	928180	They can try out how the flow is.
928560	931560	As you can see, we're going to go ahead and click on register.
931960	934200	And this is how typically the flow looks like.
934200	940120	So, the browser is going to ask you for some sort of a verification to store the passkey on your machine.
940400	941740	So, we're going to give that.
942200	949080	After this is done, the passkey will now be stored in your password manager, and you can use the same passkey to log in back.
949340	952060	So, this is how a normal flow looks like.
952460	955320	Now, as you can see here, this is how it shows.
955320	958720	So, it shows, like, what is the password manager used.
958860	965360	And as we earlier showed, this is just identified based on a UUID, which is, like, tied to a given authenticator.
965360	971440	So, if the response they're receiving has that UUID, they figure out, oh, it's Google Password Manager.
971660	973740	Similarly, one password has its own.
973740	975220	iCloud has its own.
975220	977200	Everyone has its own unique identifier.
977200	980700	And that's how, like, websites figure out which authenticator you're really using.
981500	990980	Now, what we're going to do is, like, we're going to do the same flow back again, but with our extension on, which is going to go ahead and proxy everything.
991600	995060	So, as you can see here, the extension is enabled right now.
995120	999820	And we're going to select a AGUID as, let's say, one password.
1000320	1002200	Now, we're going to go ahead, click on register.
1002200	1005800	You can see that there was no biometric that came in.
1005800	1011000	So, the whole response of the function itself was done by the extension itself.
1011460	1019540	So, before it even reached your authenticator, it was able to intercept it and respond it back just by doing a simple JavaScript proxying.
1020120	1023420	Now, once the registration is done, we're going to click on authenticate.
1023420	1026020	And you can see, like, the authentication was successfully done.
1026020	1027940	And it shows up as one password.
1028560	1033200	So, this is, like, one basic example that you can see on any random website.
1033340	1041260	Now, what we're going to do is that we're going to do the same thing, but let's say on a major website.
1041260	1043820	So, let's see what happens when you do it on Gmail.
1043840	1045620	Apparently, it works there as well.
1045860	1047300	So, how it looks like.
1047300	1055960	So, if you see here, typically you have this page called Google account page where you can go and add your new passkeys.
1056360	1057880	So, how the flow looks like.
1057880	1058800	So, you go here.
1059080	1061640	Let's say this is a normal Gmail account.
1061640	1063180	You're going to search for passkeys.
1063300	1065680	You go ahead and create a new passkey.
1065680	1069900	It's going to open your iCloud or whatever you're using on your machine.
1070120	1073080	The passkey gets created and you can see it appears here.
1073360	1079320	Now, when the user logs out, they can log back in using that same passkey.
1079340	1081420	That's how the usual flow works like.
1081420	1084540	It doesn't ask you for any kind of password or anything.
1084540	1085060	Right?
1085400	1090800	Now, what we're going to do is we're going to do the same thing now, but with our extension on.
1091480	1093620	So, as you can see, the extension is on now.
1093620	1097800	We're going to head back and we're going to re-register a new passkey.
1098500	1101020	So, if you see here, it's selected as iCloud.
1101020	1102940	We're going to open passkeys.
1103940	1109440	And we're going to go ahead and delete the previous one and create a new one as an example.
1110940	1115880	So, as you can see, this time the passkey was created right away.
1115960	1121000	There was no biometric that happened because it never really reached that place.
1121580	1125700	And as you can see, it's still showing up as iCloud on the bottom.
1125820	1133280	So, since the AGUID was that, Gmail still thinks that this passkey was registered using an iCloud account.
1133360	1134960	And that's how basic this was.
1134960	1139460	Like, you know, just passing a different UID makes it think that this is the password manager you're using.
1140620	1144720	Now, how does it look when you log out and try to log back in?
1145100	1148820	So, you can see, like, you go back ahead, you're going to put it back again.
1148820	1152000	When you click on continue, it's going to pass and you're back here.
1152340	1153680	So, the passkey works.
1154100	1156920	Now, this can actually be taken further ahead.
1156920	1161220	So, apparently, once you log in using your passkey, you can go ahead and change your password as well.
1161220	1165260	So, you get the full account if you want, if you're using that same passkey.
1165600	1170340	That just shows, like, you know, having this as a primary medium can go against you as well.
1172180	1179700	Now, coming back to, you know, the next part, what was the most suspicious part in this flow?
1179700	1186940	I think as a user, the first suspicious part was that I didn't see any, you know, biometric or a face ID coming in, right?
1186940	1193620	So, that could be one thing that could look back to a user and a user can see, like, you know, hey, there is something that looks suspicious.
1194180	1197060	So, for that also, we figured out how we can do that.
1197060	1203440	We can still show a biometric to the user, but ultimately, the response is still going to come through the extension.
1203780	1206640	So, that is what we're going to call the silent mode.
1206700	1209500	So, in silent mode, it works silently.
1209500	1213040	Like, you know, you will not know anything is wrong and it's going to work the same way.
1213180	1214500	Now, how does it work?
1214500	1215800	So, it's pretty simple.
1215800	1220980	We're going to still invoke the original function, but we will not return a response to the website.
1221220	1223500	So, basically, the flow is happening twice.
1223500	1228520	One is being done by the extension and the other one is being done by the actual iCloud.
1228860	1236660	So, because of that, if the user even opens their iCloud keychain, they will still see that the website has a passkey there, but that's the wrong one.
1236660	1239960	The real passkey is with the extension, probably synced in a server.
1240660	1247960	So, that just shows, you know, that you can actually play it in a bad way and you can have the user think that they're actually using the same flow.
1248140	1249660	So, how does it look like?
1249820	1251220	Pretty same.
1252760	1255860	So, this is how this one looks like.
1260070	1262830	So, we're going to go ahead and enable the extension.
1262830	1269410	But this time, instead of going ahead with the normal mode, we're going to switch on the silent mode.
1270110	1280110	After doing this, when we go ahead and create a new passkey, like I said, we're still going to go ahead and call the original function, but we will just not return its response.
1280110	1285030	So, the user still sees the touch ID, they're going to do it, and it's going to get registered as an iCloud.
1285030	1289490	So, they will never know something went wrong, but this passkey was never actually used for registration.
1290350	1292310	And the same flow, it will work back again.
1292310	1294650	So, there also, we're going to call the original function.
1295130	1300630	So, users still think that, you know, you're going to use a touch ID, but the real response that it gets is from the extension.
1301650	1304890	So, this is just to make it less suspicious for the user.
1306530	1307450	Okay.
1307490	1313850	Now, I think after this, you know, the question that comes in, what if I'm already registered?
1313850	1314490	Right?
1314630	1319650	So, as you can see in this flow, we were doing the registration, and then we were doing the authentication.
1319750	1327450	So, this attack sort of assumes that you're going to do registration when the extension or that proxy code was present.
1327550	1331570	So, how are we going to force the user to re-register again?
1331830	1334690	So, for that, actually, there are multiple ways you can do that.
1334690	1338290	The first one is by failing the login intentionally.
1338430	1344330	So, what we can do is that as an extension, we see that we don't have a passkey for this website.
1344470	1346950	So, we will just throw an error on the website.
1346950	1350790	So, instead of returning the original function response, we will throw an error.
1350850	1356010	So, the website will feel that either the passkey is not registered or it's somehow not working.
1356410	1360510	Which will lead the user to fall back to other methods like password.
1360630	1363250	So, they will go ahead and use a password-based method.
1363250	1366350	And since it's an extension, it can easily pick up the password.
1366350	1368410	So, your password is compromised after that.
1369050	1375350	The other way a user could react is that they can go ahead and register a new passkey because they like the flow, probably.
1375510	1378910	But that's, again, going to be a problem because you have the extension there.
1378910	1383750	So, your new registration will now get stored through the extension, not the original one.
1384110	1389150	The other way you can also do it is by playing a little bit with social engineering.
1389190	1393810	Like, on that page, you can show a banner that says, like, you know, hey, your passkey seems expired.
1393810	1395150	Go ahead and create a new one.
1395150	1396750	And people can fall for that.
1397030	1397530	So, yeah.
1397530	1400850	So, you have, like, a way to fail the original call.
1400850	1404430	Or you can go ahead and trigger the password-based flow.
1404430	1407250	Or the third one is just go ahead and show some phishing banners.
1407250	1414570	In all of these cases, user will end up either using the password method or going ahead with the passkey.
1414570	1416370	So, how does that look like?
1418170	1421190	So, we're going to do the same attack.
1421190	1426830	But now we're going to turn on not just the silent mode, but also the force reset mode.
1427590	1431110	So, as you can see here, right now, we're going to register a normal passkey.
1431110	1433550	This is a passkey without the extension.
1433810	1435270	So, this is a legit one.
1435510	1439430	Now, what we're going to do is we're going to go ahead and enable the extension.
1440570	1446110	And then once we have enabled this, we will go ahead and use both the options this time.
1446110	1451690	So, we're going to use not just the normal silent mode, but we'll also use the force reset mode.
1451830	1455450	Which basically takes care that if you're already registered, I'm going to fail it.
1455790	1457110	So, you log out.
1457250	1463050	After that, when you're trying to sign back in, it says that the passkey exists.
1463050	1465690	But as you can see, it says, like, we weren't able to log in.
1465690	1468650	Because the API itself was failed by the extension.
1469650	1474830	So, the user will end up either creating a password, using, like, a password-based flow.
1474830	1484590	And after that, when they go ahead and, you know, create a new passkey, if they want to stick with the same flow, they will end up creating a passkey, which is, again, being proxy.
1485370	1488090	And, again, the same flow will work as we showed earlier.
1488650	1492930	So, this is just to answer the question, like, you know, what happens if registration was not before done?
1493930	1494730	Okay.
1496830	1500730	Now, I think we have done everything with the same machine.
1500730	1504210	But I think what's important is to share it across devices.
1504210	1506550	Because that's where the magic is, right?
1507110	1512870	Right now, we were just storing what you were seeing there on the local storage, as an example.
1512870	1518510	But now what we're going to do is we will just replace the local storage to a simple API.
1518590	1525990	So, we can have a simple API endpoint, and whatever data that we were storing on the local storage, we can send it across to that.
1526330	1541050	And on another device, which is the attacker's device, they can go ahead, install the same extension, and since those things are shared across through that API, they're going to get that passkey, and they can log in on the behalf of the user.
1541330	1545670	Which just shows how dangerous this whole flow can go in.
1547590	1549710	I'll show you how it looks like.
1549750	1553590	So, in this case, we're going to go ahead and do a registration.
1553590	1559870	So, you can see here, this is how we have just exposed a local server here.
1560110	1567290	And after running this local server, it's just going to replace your normal local storage calls with calls which are specific to an API.
1567430	1570730	We're going to go back and register a new passkey.
1572050	1574790	So, you can see that this extension is on.
1574790	1579170	And for this example, they're going to use the silent mode with 1Password.
1579710	1582830	So, you go ahead and you're going to create a new passkey.
1584770	1587830	Since the silent mode is on, it's going to show you everything.
1588130	1594370	After this is done, you can see that the passkey is now created with the name of 1Password, just because we selected that on the top.
1595510	1597650	Now, we'll head back to a different machine.
1597650	1600270	Now, this machine is the attacker machine.
1600530	1607570	So, you're going to go here, load the same extension back in, and you can see that on the top, the number says one.
1607570	1611330	So, it already has one passkey synced on the other machine.
1611930	1615690	Now, we're going to go back, turn off the silent mode, because we don't need silent mode here.
1616250	1619970	The user is going to go back, type in the same email address.
1622130	1628370	And after that, it will automatically detect that the passkey was there, and you can see the user is logged in.
1629290	1635670	So, by sharing what we were doing on the very first page, you can actually do it across devices as well.
1635770	1637370	And it works quite smoothly.
1638590	1644230	Now, I think the biggest question that comes in, how should I fix it?
1644230	1644510	Right?
1644510	1645830	That's really important.
1645990	1653070	So, I think, as you can see, most of the stuff that we were trying to do was by doing injections on the page.
1653090	1657490	So, it's really important to have your CSP policies right on the pages.
1657750	1660570	Of course, there's a limitation to what all you can do.
1660950	1663230	But it's really important to have the CSPs right.
1663230	1669530	Because if you don't have it right, you know, some basic flows can go through and you can have this injection there.
1669650	1675530	Second is that you also need to make sure that you're doing all the verifications nicely.
1675530	1678470	Like, it just should not be like a simple A-G-Y-D check.
1678470	1685490	It should also do a lot of other checks, like the certificate and other things similar to how it happens with, let's say, a hardware-bound device.
1685890	1693050	Now, it's also important to monitor and alert in case an unusual passkey usage is happening.
1693170	1695990	Similar to how companies do it with passwords.
1696110	1700030	So, let's say, you know, you're trying to log in using password on one page.
1700030	1704650	And let's say you go to an entirely different network or device, you try to log in using that password.
1705450	1710590	Ideally, if you're seeing a suspicious login, it should fall back to some additional methods.
1710730	1714270	Like, you know, you should ask for some more data to really verify that's the user.
1714270	1721750	But at least in what we were experimenting, we saw that whenever we were using passkeys, it was somehow more trusted.
1721790	1729050	And most applications were not really doing those additional checks that you would typically expect from a password-based flow.
1729710	1735550	Lastly, you know, it's really important to also log the client in some way.
1735550	1743410	So, you should also go ahead and enforce things to make sure that people couldn't fiddle too much if it is allowed to.
1743810	1755670	There have been cases where people are also doing self-access, where, you know, people would give, like, a banner or a page saying that, you know, hey, we cannot verify your capture.
1755670	1759230	You should go ahead and put this code on your DevTools.
1759230	1763290	And that's how people also end up doing a self-access attack.
1763490	1765850	So, those kinds of things are also coming these days.
1765850	1771770	It's really important to lock down on the client side as well.
1772690	1776030	Now, for the website, what can a website do?
1776030	1782450	So, I think it's really important to go back to, you know, 101 and see how you can really stop XSS.
1782450	1791190	Because, I mean, it's something we have been talking about for years, but it still happens, you always find new bugs getting reported that are of XSS.
1791190	1794010	So, that's something people really need to take it seriously.
1794170	1797130	And they should work on making sure that is not happening.
1797250	1799150	Some of the ways of doing this is mentioned here.
1799150	1800810	So, of course, you can do CSP.
1800810	1802330	You can also use trusted type.
1802330	1803870	Trusted type is really good as well.
1803870	1811990	But you can actually enforce that whenever you're trying to insert something or using something like, you know, create HTML, it's going to purify it and then use it there.
1811990	1813250	And it really helps.
1813250	1819850	I remember when we were trying this whole, you know, POC, we were trying to use a library to generate a block.
1819910	1825590	And for that, Gmail was giving us a lot of issues because they had good CSP policies there.
1825710	1832550	But by making a bit of changes, making sure that we are following the trusted flow, we were able to bypass that and have the whole thing running in.
1832550	1842730	So, you can make it difficult for people to do this by having the right set of CSP policies and having trusted type on the pages which are really required to have those checks on.
1844070	1848370	For users and admins, I think it's important to harden your browsers.
1848550	1851690	Specifically, I would say for enterprises in some way.
1852370	1855910	Many times people don't even know what extensions are being used.
1855910	1861990	And even as a consumer, it's really important to know, like, what extensions I really have on my machine.
1862070	1864310	And how many of them do I really use?
1865550	1869950	If someone is into development, you know, you can just create your own extension.
1869950	1870790	It's pretty simple.
1870790	1872570	Just have a couple of lines.
1872570	1874110	Use the management permission.
1874110	1877750	And you can see, like, what are extensions you have installed on your machine?
1877750	1879430	What was the installation method?
1879430	1885670	So, it's a good check you can do by yourself to make sure that you don't have anything that could possibly cause this.
1885670	1892530	The funny part is that the extension that we made for this demo, it only asks for host permission.
1892550	1895710	Which is pretty common in every extension out there.
1895710	1898550	It does not require any additional permission.
1898550	1899890	Just the host permissions.
1900070	1906850	So, host permission is literally found in almost every, I would say, extension out there.
1906930	1910470	Like, if you have your password managers, they need to fill in the password on the pages.
1910470	1911990	So, they need to have host permission.
1912110	1917230	If you're using Grammarly, you're checking your grammar, you need to have host permission for that page.
1917310	1921430	And it's such a common permission that most people don't even look at that.
1921430	1925750	They just install the extension and it says it has access to modify your web page.
1925750	1926590	They say, yes.
1926590	1927690	And it installs.
1927850	1932450	So, you have to be careful about if you really need that extension on your machine and only allow that.
1932510	1935810	As a website, of course, you need to stop down.
1936230	1945390	Similarly, if someone is from an enterprise background, they can also use enterprise policies on the browsers to make sure that only the approved extensions are out there.
1945390	1947730	Not like anything which is outside.
1947910	1952850	And lastly, you can also use any sort of browser security solutions or a browser security extension as well.
1953050	1959170	So, I think it's really important to understand that browser is the new OS.
1959170	1965350	Because almost, like, you know, more than 90% of the work that you do nowadays is on the browser.
1965770	1971350	I could argue that some developers might use some IDs outside or maybe terminal outside.
1971350	1976490	But if you exclude them, for most other departments, it's 99% of the work happening by the browser.
1976590	1979470	They might just use Outlook or Slack outside, but that's it.
1979790	1989250	So, it's really important to understand that the notion of the endpoint itself has transferred from the real device or your OS to the browser.
1989410	1994690	And you need to have the right set of controls that we earlier used to have for local applications.
1994690	1996510	Similarly, for the extensions as well.
1997230	1997930	So, yeah.
1998050	2001370	This is what we can do as users and admins.
2001830	2003750	So, that's it for the presentation.
2003750	2005390	I hope you all liked it.
2006050	2008010	We covered a couple of demos here.
2008010	2011650	If you have any questions, feel free to reach out to us.
2011650	2013150	We are here right behind the stage.
2013150	2015510	We'll be able to help you out with any questions that you have.
2015570	2016650	Thank you so much.
