1 00:00:00,000 --> 00:00:01,340 Hello everyone. 2 00:00:01,340 --> 00:00:06,480 I'm Marco and today we will be presenting C-traps. 3 00:00:06,480 --> 00:00:11,560 C-trap client impersonation and API confusion on Fido 2. 4 00:00:13,100 --> 00:00:14,280 So I'm Marco. 5 00:00:14,280 --> 00:00:17,340 I'm a post doc at KTH in Sweden. 6 00:00:17,780 --> 00:00:21,140 I've done this work while I was doing my Ph.D. 7 00:00:21,140 --> 00:00:28,000 at Eurocom in France under Professor Antonioli which will talk with me as a co-speaker. 8 00:00:28,100 --> 00:00:35,640 My research is in security and privacy so I look at proprietary and standard protocols of IoT devices. 9 00:00:35,640 --> 00:00:39,900 For example, authenticators from Fido 2. 10 00:00:40,060 --> 00:00:48,880 I also look at mobile, so Android and transport very common ones like Bluetooth energy, Wi-Fi, NFC and so on. 11 00:00:48,880 --> 00:00:54,620 So now Daniele will have the stage for him. 12 00:00:55,160 --> 00:00:56,560 All right guys. 13 00:00:56,560 --> 00:00:58,440 Thank you for coming to our talk. 14 00:00:58,440 --> 00:00:59,800 My name is Daniele Antonioli. 15 00:00:59,800 --> 00:01:07,840 I'm an assistant professor at Eurocom, a university and research center located in Sofia Antipolis in the southern part of France. 16 00:01:08,420 --> 00:01:10,640 We do research in security and privacy. 17 00:01:10,640 --> 00:01:17,580 We cover topics including Bluetooth, electric scooters, Fido 2, web tracking and more. 18 00:01:17,580 --> 00:01:21,420 Feel free to reach out to me after the talk if you're interested in doing a Ph.D. 19 00:01:21,420 --> 00:01:23,220 or a post doc in any of these topics. 20 00:01:23,280 --> 00:01:28,160 You can also check out my website for more information about myself and my research. 21 00:01:28,400 --> 00:01:30,540 This is the CTRAPS talk outline. 22 00:01:30,540 --> 00:01:36,260 So I will start by introducing Fido 2 and the CTRAPS contributions, attacks and vulnerabilities. 23 00:01:36,520 --> 00:01:41,260 We'll talk about some background information about Fido 2 and our threat model. 24 00:01:41,260 --> 00:01:50,500 Then Marco will take over and talk about really cool attacks with demos including the client impersonation attacks, the API confusion, man in the middle attacks. 25 00:01:50,500 --> 00:02:06,540 Then he will talk about the CTRAPS vulnerabilities, a toolkit that we developed an open source implementing the attacks, our experimental results and countermeasures and responsible disclosure we did with the Fido Alliance. 26 00:02:07,080 --> 00:02:09,100 Let's jump into the talk. 27 00:02:09,240 --> 00:02:20,480 So this talk is based on a research paper that we published in 2025 at IEEE Euro S&P called CTRAPS, CTRAPS, Client Impersonation and API Confusions on Fido. 28 00:02:20,800 --> 00:02:38,800 Remember that we started this research in 2023 and it took quite a lot to get the paper accepted but when the paper got accepted then we also submitted the content of the paper to DEF CON to also showcase our results to a broader audience and not only to boring academics. 29 00:02:40,580 --> 00:02:43,080 So let's start with Fido to set the stage. 30 00:02:43,080 --> 00:02:43,700 What is Fido? 31 00:02:43,700 --> 00:02:47,260 Fido means Fast Identity Online version 2. 32 00:02:47,260 --> 00:02:51,980 This is an open authentication standard that was designed to be resilient against phishing. 33 00:02:51,980 --> 00:02:53,980 Phishing is a password compromise. 34 00:02:54,340 --> 00:02:58,420 It highly relies on the concept of authenticator. 35 00:02:58,420 --> 00:03:03,700 An authenticator can be like a USB dongle like this one. 36 00:03:03,700 --> 00:03:04,500 This is a YubiKey. 37 00:03:04,500 --> 00:03:05,240 It's quite popular. 38 00:03:05,240 --> 00:03:12,260 There are billions of authenticators like this one which are storing billions of credentials. 39 00:03:12,500 --> 00:03:17,940 These days you can also use your smartphone as a Fido authenticator. 40 00:03:17,940 --> 00:03:25,980 And then the authenticator is storing some authentication credentials which are cryptographically key pairs that you can use to authenticate. 41 00:03:26,220 --> 00:03:29,780 There are two typical use cases for Fido authentication. 42 00:03:29,780 --> 00:03:48,340 The first one is a second factor or multi-factor authentication where let's say you want to log in on Apple.com, you register with Apple.com, you register a Fido credential, and then whenever you log in, you enter your username, your password, and then you provide your authenticator to the backend. 43 00:03:48,400 --> 00:03:54,060 And this allows you to tolerate the password compromise attack. 44 00:03:54,080 --> 00:04:06,020 Because even if the attacker gets access to your password, it cannot get access to your USB authenticator, to your key pairs which is not phishable because this is a cryptographic key. 45 00:04:06,020 --> 00:04:14,420 It is not a password that can be brute forced and so cannot impersonate you on Apple.com. 46 00:04:14,480 --> 00:04:25,000 More recently, Fido also enabled what is called passwordless authentication where you can log in on a website by using your username and only the passkey. 47 00:04:25,240 --> 00:04:28,860 And this is also known as passkey authentication. 48 00:04:28,860 --> 00:04:34,020 It's a single factor authentication while the other is a second factor authentication. 49 00:04:36,890 --> 00:04:42,090 These are the entities involved in a Fido authentication ceremony. 50 00:04:42,090 --> 00:04:44,310 There is the authenticator that you've already seen. 51 00:04:44,310 --> 00:04:59,450 Then there is a Fido client which can be a smartphone, a laptop, and there is a user which usually owns the authenticator and the client and wants to authenticate to a web service via the client like Apple.com, Facebook.com, Google.com. 52 00:04:59,450 --> 00:05:02,650 And so the user is contacting the relying party. 53 00:05:02,650 --> 00:05:11,190 Relying party is just some technical jargon using the Fido standard to indicate a service who is supporting Fido authentication. 54 00:05:11,450 --> 00:05:18,430 And then Fido specifies two standard application layer protocols that are used to authenticate. 55 00:05:18,430 --> 00:05:20,210 One is called CTAP. 56 00:05:20,210 --> 00:05:23,130 CTAP stands for client to authentication protocol. 57 00:05:23,130 --> 00:05:32,950 And this protocol is used in the link between the authenticator and the user and can be transported using multiple technologies including USB and NFC. 58 00:05:33,070 --> 00:05:36,730 In fact, if you look at the authenticator, you have a USB port. 59 00:05:36,730 --> 00:05:40,550 You can plug in your authenticator in your laptop and then complete authentication. 60 00:05:40,550 --> 00:05:45,270 Or you can tap your authenticator to your smartphone. 61 00:05:45,270 --> 00:05:46,930 They are in NFC range. 62 00:05:46,930 --> 00:05:51,210 They exchange some CTAP messages and then you can complete authentication. 63 00:05:51,210 --> 00:05:52,950 Second factor or single factor. 64 00:05:53,330 --> 00:05:56,390 On the other hand of the scheme, there is WebAuthn. 65 00:05:56,390 --> 00:06:06,750 This is a communication protocol which is spoken by the client and the relying party, which is using standard internet-based technologies like TCPAP and TLS. 66 00:06:06,910 --> 00:06:14,090 And in CTAPs, we focus on the CTAP link, specifically on the security and privacy of the CTAP protocol. 67 00:06:14,390 --> 00:06:21,590 So the attacker is a protocol level attacker which is trying to find design vulnerabilities in the CTAP protocol. 68 00:06:21,650 --> 00:06:29,330 And we will see, we will focus on vulnerabilities enabling client impersonation and man-in-the-middle attacks. 69 00:06:29,470 --> 00:06:37,790 So with a client impersonation, the attacker is approaching the authenticator as a client and is trying to tamper with the client. 70 00:06:37,790 --> 00:06:45,430 In a man-in-the-middle scenario, the attacker has a man-in-the-middle channel between the authenticator and the client. 71 00:06:45,430 --> 00:06:48,890 And these attacks, they have critical impacts on the FIDO ecosystems. 72 00:06:48,890 --> 00:06:55,350 So here we talk about millions of keys and billions of credentials stored in these keys. 73 00:06:55,830 --> 00:07:12,290 And as an example of attack impact, you can delete credentials, you can track users based on their credentials, you can denial of service an authenticator, you can leak some sensitive data about the user, like the list of relying parties, the list of accounts, 74 00:07:12,290 --> 00:07:13,550 and so on and so forth. 75 00:07:13,650 --> 00:07:20,430 And interestingly, while attacking CTAP, you are kind of agnostic to the link layer. 76 00:07:20,430 --> 00:07:28,250 So if you find the vulnerabilities at the application layer, then you can attack communications over USB, over NFC, over BLE, and so on and so forth. 77 00:07:28,250 --> 00:07:33,190 Plus, you can also affect, as a side effect, the relying party. 78 00:07:33,190 --> 00:07:42,930 So we mount attacks using CTAP messages, and without even sending one single web out and message, we can affect the relying party. 79 00:07:42,930 --> 00:07:50,230 Because if we delete the credentials in the authenticator, then the user will not be able to log in on the relying party. 80 00:07:50,690 --> 00:07:56,210 This is the list of contributions that we provide with the CTAP's work. 81 00:07:56,210 --> 00:08:09,130 After doing extensive security evaluation of the protocol, the application layer protocol, we found eight critical design vulnerabilities affecting even the latest version of CTAP. 82 00:08:09,130 --> 00:08:12,750 So up to CTAP version 2.2. 83 00:08:13,310 --> 00:08:19,050 And we show how to exploit these design vulnerabilities in 11 new ways. 84 00:08:19,050 --> 00:08:36,450 So we present 11 new attacks, four of which are client impersonation ones, and seven of which are man-in-the-middle attacks, where we exploit a new attack technique in the context of FIDO that we call API confusion, which essentially means that the client wants to call APIA. 85 00:08:36,450 --> 00:08:38,950 We are in the middle, and then we play some tricks. 86 00:08:38,950 --> 00:08:48,990 We are able to bypass authorization and play some tricks to call API B on the authenticator and return an APIA OK message to the client. 87 00:08:49,530 --> 00:08:53,550 Then we also present a toolkit, which is on GitHub. 88 00:08:53,550 --> 00:08:54,950 It is open source. 89 00:08:54,950 --> 00:08:56,490 It is implementing our attacks. 90 00:08:56,490 --> 00:09:04,810 It also includes a virtual CTAP testbed that you can use to test your own authenticator without having to attack Apple.com or Microsoft.com. 91 00:09:04,810 --> 00:09:09,290 You can just test it locally, and then you can try the attack somewhere else. 92 00:09:09,290 --> 00:09:18,350 We also provide four attack clients that can be used on real devices against real devices to perform all of our attacks. 93 00:09:18,350 --> 00:09:34,350 We run an extended evaluation, experimental evaluation with real devices, where we compromise six of the most popular authenticators, including Yubico Authenticators, Faitian Authenticators, and open source Google Authenticators, and also 10 very popular reliant parties. 94 00:09:34,350 --> 00:09:39,510 So we are capable of compromising Apple.com, Microsoft.com, NVIDIA.com, and so on and so forth. 95 00:09:39,510 --> 00:09:47,290 And all the web services that are relying on their login mechanism as a piggyback. 96 00:09:47,290 --> 00:09:53,590 And then we also discuss eight fixes at the design level, because here we are focusing about the protocol. 97 00:09:53,590 --> 00:09:55,550 We are not talking about side channels, fault injection. 98 00:09:55,550 --> 00:09:57,510 We talk about the CTAP protocol. 99 00:09:57,590 --> 00:10:01,230 And we present eight design fixes, which are compliant with FIDO, too. 100 00:10:02,490 --> 00:10:02,890 All right. 101 00:10:02,890 --> 00:10:07,230 So now a very quick introduction about FIDO. 102 00:10:08,610 --> 00:10:10,710 So I talk a lot about FIDO credentials. 103 00:10:10,710 --> 00:10:11,970 What is a FIDO credential? 104 00:10:11,970 --> 00:10:16,850 This is an ECDSA key pair, where you have a private key that you are using to sign something. 105 00:10:16,850 --> 00:10:20,190 You have a public key that you are using to verify something. 106 00:10:20,290 --> 00:10:22,430 There are two types of FIDO credentials. 107 00:10:22,550 --> 00:10:24,590 First type is non-discoverable. 108 00:10:24,590 --> 00:10:30,870 These are credentials where the private key, which is encrypted, is stored on the relying party. 109 00:10:31,010 --> 00:10:35,430 And this is historically the first type of credentials that was introduced by the FIDO standard. 110 00:10:35,510 --> 00:10:48,150 And something that might sound surprising to you, it was to me when I started working on this field, is that FIDO credential, the private key of your FIDO account, is not stored on the authenticator by default. 111 00:10:48,190 --> 00:10:52,770 But it is stored on the relying party, on the Apple backend. 112 00:10:52,810 --> 00:10:59,430 And it is encrypted, this private key, with a master key that is instead stored on the YubiKey. 113 00:11:00,010 --> 00:11:03,130 Then the second type of credentials is called discoverable. 114 00:11:03,130 --> 00:11:08,310 And these are credentials that are enabling the passkey authentication thing. 115 00:11:08,310 --> 00:11:10,290 So the single factor authentication. 116 00:11:10,470 --> 00:11:16,850 And in this case, the private key is encrypted with the master key, and then it is stored on the authenticator itself. 117 00:11:17,670 --> 00:11:21,310 And a typical authentication flow with FIDO goes as follows. 118 00:11:21,310 --> 00:11:27,370 So you create a FIDO credential when you are interacting with a relying party. 119 00:11:28,530 --> 00:11:33,730 And then you use this credential whenever you want to authenticate using the client. 120 00:11:33,730 --> 00:11:45,530 So you use the client, you contact the relying party, you enter your username, your password, and then you authenticate with FIDO, or you only authenticate with FIDO. 121 00:11:45,530 --> 00:12:02,730 And the authentication under the hood is a challenge-response-based protocol, where the relying party is sending a challenge , the client is relaying the challenge to your authenticator, the authenticator is answering the challenge with a signed response using the private key corresponding to that credential, 122 00:12:02,730 --> 00:12:09,790 and then the relying party knows the public key and can verify your challenge and let you in. 123 00:12:10,570 --> 00:12:22,650 Now, within this authentication flow, there is a channel, the sit-up channel, which is providing communication means from the authenticator to the client using this sit-up protocol. 124 00:12:22,650 --> 00:12:25,050 This is a standard application layer protocol. 125 00:12:25,050 --> 00:12:29,750 As I told you, it is transported over USB, NFC, or Bluetooth Low Energy. 126 00:12:29,970 --> 00:12:32,050 And it is a request-response protocol. 127 00:12:32,050 --> 00:12:40,810 So the client is requesting something from the authenticator, like make a new credential, the authenticator is doing something, and then it is returning the credential. 128 00:12:41,150 --> 00:12:47,330 The first sit-up version was also known as UTF, or Universal Second Factor. 129 00:12:47,330 --> 00:12:58,430 And this first version of sit-up standardized in the FIDO specification two-factor authentication and provided what is known as an authenticator API. 130 00:12:58,430 --> 00:13:04,230 This keyword is very important because this is what we are attacking in the sit-ups slides later. 131 00:13:04,250 --> 00:13:11,830 The authenticator API is a way to manage, create credentials, generate authentication responses, and so on and so forth. 132 00:13:11,830 --> 00:13:14,950 Then sit-up was updated to version two. 133 00:13:15,210 --> 00:13:17,390 The latest is 2.2. 134 00:13:17,390 --> 00:13:23,630 And this standard introduced password-less authentication with discoverable credentials. 135 00:13:23,630 --> 00:13:31,310 And it also extended the authentication API with features such as protection of discoverable credential. 136 00:13:31,330 --> 00:13:40,830 And remember that our attacks are focusing on sit-up two, and so they're effective even against the latest and most secure FIDO authenticators, clients, and their line parties. 137 00:13:41,790 --> 00:13:53,370 Specifically, we focus on seven core sit-up authenticator APIs, make credentials, get assertion, credential management, client pin, reset, selection, and get info. 138 00:13:53,510 --> 00:13:57,970 The get assertion API is the one used to authenticate. 139 00:13:57,990 --> 00:14:00,010 An API can have a subcommand. 140 00:14:00,010 --> 00:14:06,530 For example, the credential management API has enum RPIs or enum credential subcommands. 141 00:14:06,530 --> 00:14:13,670 And so you send a credential management API request with subcommand enumerate, please enumerate airline parties. 142 00:14:13,750 --> 00:14:18,730 You send this message to the authenticator, and the authenticator sends back the information. 143 00:14:18,950 --> 00:14:23,530 And this communication is protected by two main authorization mechanisms. 144 00:14:23,530 --> 00:14:27,890 These authorization mechanisms are standard, so everybody's implementing this API. 145 00:14:27,950 --> 00:14:31,750 Everybody in the FIDO ecosystem must implement these authorizations. 146 00:14:31,750 --> 00:14:35,690 The first one is called user verification, and here is color-coded in blue. 147 00:14:36,190 --> 00:14:40,570 With user verification, whenever you use an authenticator, you set a pin. 148 00:14:40,850 --> 00:14:48,130 This pin is stored in the authenticator, and then you have to enter the pin in the client whenever an API requires it. 149 00:14:48,130 --> 00:14:57,670 For example, if you want to create a new credential, before being able to do that, you enter the pin on the client, on your smartphone, then the smartphone communicates to the authenticator. 150 00:14:57,670 --> 00:15:02,590 You are kind of authenticated because you know the pin, and then you can proceed. 151 00:15:02,970 --> 00:15:11,350 The second orthogonal authorization mechanism is called user presence, and here is color-coded in violet. 152 00:15:11,490 --> 00:15:18,830 This user presence is entirely managed by the authenticator, and it depends on the transport that you are using. 153 00:15:18,830 --> 00:15:27,470 If you are using USB for your authentication, your API call, as a user, you have to press a button on the authenticator. 154 00:15:27,470 --> 00:15:35,810 So you insert the authenticator, the client is asking something to the authenticator, and then the user has to press a button to confirm his presence. 155 00:15:35,870 --> 00:15:42,530 Instead, if you are using NFC, then NFC range automatically guarantees user presence. 156 00:15:42,530 --> 00:15:43,870 So you don't need to press any button. 157 00:15:43,870 --> 00:15:46,110 There is no user interaction required. 158 00:15:46,110 --> 00:15:50,030 You just have to put the devices in range. 159 00:15:51,710 --> 00:16:03,850 And this is the threat model, the CTRAPS threat model, just to understand the requirements of the attack before we talk about the attacks. 160 00:16:03,850 --> 00:16:10,450 We consider a scenario where a victim is owning a client device and an authenticator, like a smartphone and a YubiKey . 161 00:16:10,470 --> 00:16:17,230 The user is capable of performing user verification with the client and also user presence with the authenticator. 162 00:16:17,230 --> 00:16:24,150 And the client is communicating to airline party via WebO10 and also to the authenticator via CTAP. 163 00:16:24,150 --> 00:16:39,050 And we assume that there is an attacker, protocol-level attacker, focusing on design issues on CTAP, which is either trying to spoof a client, so approaching the authenticator as a client, or as a man-in-the-middle position between the authenticator and the client. 164 00:16:39,310 --> 00:16:43,650 It is important to realize that we are not assuming any compromise on the FIDO devices. 165 00:16:43,650 --> 00:16:45,910 So we are not installing malware on the client. 166 00:16:45,910 --> 00:16:48,070 We are not installing malware on the airline party. 167 00:16:48,070 --> 00:16:50,890 We are not running a side-channel attack on the authenticator. 168 00:16:50,890 --> 00:16:56,890 Here we are just sending CTAP packets and we want to exploit the CTAP protocol. 169 00:16:57,490 --> 00:17:05,010 So this concludes my part and now Marco will continue talking about the client impersonation attacks and other really good things. 170 00:17:06,110 --> 00:17:10,150 So let's look at attacks and video demonstrations. 171 00:17:10,290 --> 00:17:22,850 We start with the client impersonation, but first we must have one single stop to understand what actually happens when you call a CTAP API. 172 00:17:23,030 --> 00:17:26,950 So the user wants to call API A. 173 00:17:27,190 --> 00:17:30,990 They do this through the client. 174 00:17:30,990 --> 00:17:37,930 So the client understands if the API A requires user verification. 175 00:17:38,270 --> 00:17:45,450 If it requires user verification, the client starts the pin UV out protocol. 176 00:17:45,630 --> 00:17:47,650 This goes as follows. 177 00:17:47,650 --> 00:17:52,310 You perform a secure defilement in order to get a shared secret. 178 00:17:52,310 --> 00:18:04,270 Then the client sends encrypted a message containing the hashed pin for the authenticator that the user inputted and the permissions. 179 00:18:04,270 --> 00:18:11,430 The permissions give access control to the user verification token at the end of the process. 180 00:18:11,430 --> 00:18:19,710 Basically they restrict the token to specific API calls or end to specific relying parties. 181 00:18:20,230 --> 00:18:26,750 Now the authenticator checks if the pin is the one stored inside its memory. 182 00:18:26,750 --> 00:18:31,990 If it's correct, sends the encrypted message containing the user verification token. 183 00:18:31,990 --> 00:18:35,770 And then the client retrieves it and can use it for the whole session. 184 00:18:35,770 --> 00:18:37,970 So this token is reusable. 185 00:18:37,970 --> 00:18:44,610 You can use it as many times as you want without asking for another pin input prompt to the user. 186 00:18:44,630 --> 00:18:47,630 If you disconnect, you have to do this again. 187 00:18:48,590 --> 00:18:56,090 Now the client actually calls API A and attaches the token if it requires user verification. 188 00:18:56,590 --> 00:19:03,070 Then the authenticator understands if API A requires or not a user presence check. 189 00:19:03,070 --> 00:19:05,250 If it does, he does it. 190 00:19:05,250 --> 00:19:14,990 If it's correct, then the authenticator executes API A and sends an API A okay result. 191 00:19:15,850 --> 00:19:18,010 So this is how it works normally. 192 00:19:18,010 --> 00:19:21,150 Let's see how we tamper with it. 193 00:19:21,150 --> 00:19:26,770 So first the client impersonation attack that factory resets the authenticator. 194 00:19:26,770 --> 00:19:33,790 So we have on the left the authenticator and on the right the attacker posing as a legitimate FIDO client. 195 00:19:34,050 --> 00:19:37,030 The attacker sends a reset command. 196 00:19:37,030 --> 00:19:39,070 It's one of the sit up APIs. 197 00:19:39,250 --> 00:19:41,630 This command requires user presence. 198 00:19:41,630 --> 00:19:55,290 So connects to the authenticator, sends reset, user presence check, passes, and then the authenticator deletes the master key which invalidates all credentials because without the master key, the authenticator cannot decrypt them. 199 00:19:55,290 --> 00:19:58,130 No matter if they are discoverable or non-discoverable. 200 00:19:58,130 --> 00:20:00,030 No credential is safe. 201 00:20:00,110 --> 00:20:08,710 Then it also resets the PIN and other data and settings on authenticator and finally sends the reset okay result. 202 00:20:09,570 --> 00:20:13,150 So let's look at the first demonstration. 203 00:20:13,150 --> 00:20:14,910 So let me open the link. 204 00:20:14,910 --> 00:20:22,190 So we have the FIDO authenticator put inside the pocket of a jacket just right now. 205 00:20:22,190 --> 00:20:28,050 Then I have my malicious app that connects over NFC to it. 206 00:20:28,110 --> 00:20:29,930 I'm trying to scan for it. 207 00:20:29,990 --> 00:20:31,690 Now it works. 208 00:20:31,970 --> 00:20:38,410 And we have the message here that... sorry I will show it better a little bit later. 209 00:20:38,410 --> 00:20:43,050 So you can see the message that the factory reset was successful. 210 00:20:43,610 --> 00:20:47,690 And now I will show you that there are no credentials inside anymore. 211 00:20:47,690 --> 00:20:58,710 So I just use another function of my app to show that we connected and here it's supposed to print credentials but there is no credentials. 212 00:20:59,450 --> 00:21:01,650 So that's the factory reset. 213 00:21:05,770 --> 00:21:07,450 We have plenty more. 214 00:21:07,450 --> 00:21:13,370 So let's go to the tracking user from the authenticator credentials. 215 00:21:13,370 --> 00:21:27,590 So now I think this is very interesting because the get assertion API call is used for authentication but for us we use it to track the user by extracting identifiers. 216 00:21:28,030 --> 00:21:41,070 So get assertion usually requires user verification but if the relying party set the credential protection policy as off, it doesn't require user verification. 217 00:21:41,070 --> 00:21:44,890 And this is the case for big players like Apple and Microsoft. 218 00:21:45,850 --> 00:21:48,250 So here the attack goes as follows. 219 00:21:48,250 --> 00:21:54,390 The client, the attacker posing as a client prepares a list of insecure relying parties. 220 00:21:55,270 --> 00:21:59,330 What I mean by insecure is they have credential protection as off. 221 00:21:59,370 --> 00:22:01,850 So this skips user verification. 222 00:22:02,270 --> 00:22:08,430 Then the client, the attacker sends the get assertion API call. 223 00:22:08,550 --> 00:22:12,930 Here it is the client that decides if the user presence is required. 224 00:22:12,930 --> 00:22:14,870 So we control the client. 225 00:22:14,870 --> 00:22:16,210 We are the attacker. 226 00:22:16,210 --> 00:22:23,450 We are the attacker client so we put it as false and we don't need user presence anymore. 227 00:22:23,490 --> 00:22:29,070 And we also touch the list of relying parties that are using credential protection off. 228 00:22:29,070 --> 00:22:36,910 So the authenticator gives back a list of all credential identifiers from those relying parties and all user identifiers. 229 00:22:36,910 --> 00:22:45,670 And these are the values that bind the online relying party user account to the credential IDs. 230 00:22:45,670 --> 00:22:48,830 Both of them are uniquely identifying the user. 231 00:22:48,830 --> 00:23:01,250 So we can put them in a fingerprint list and then track the user whenever he connects to our malicious client, our attacker, whenever we connect to it. 232 00:23:01,450 --> 00:23:03,790 So we have the demo. 233 00:23:03,790 --> 00:23:06,510 This is also over NFC. 234 00:23:06,750 --> 00:23:10,630 So this time we changed the piece of clothing. 235 00:23:10,630 --> 00:23:16,130 So we have the jeans if you were wondering if they work on every clothing. 236 00:23:16,130 --> 00:23:26,550 So now we are scanning the authenticator key and we can see no user input, no user consent. 237 00:23:27,170 --> 00:23:33,810 And we detected that there is one relying party, login Microsoft com, and we have two credentials inside. 238 00:23:34,190 --> 00:23:41,430 One, we have the credential identifier for the first one, 085C, and then the user identifier. 239 00:23:41,630 --> 00:23:44,250 And also same thing for the second credential. 240 00:23:44,250 --> 00:23:46,750 So that's how we can track users. 241 00:23:51,710 --> 00:23:57,970 Just to quickly add on what Marco showed, here we can track the user because the credential ID is unique. 242 00:23:58,050 --> 00:24:02,690 And so this can act as a really strong fingerprint for a tracking attack. 243 00:24:02,690 --> 00:24:07,890 And so the first time we collect the data, we create the fingerprint. 244 00:24:07,890 --> 00:24:16,750 And then whenever the user roams around and then we scan again, the same YubiKey, we can track the user via its unique credential IDs. 245 00:24:18,070 --> 00:24:19,190 Yes. 246 00:24:19,410 --> 00:24:22,110 So we have four client impersonation attacks. 247 00:24:22,110 --> 00:24:24,210 I already shown you the first two. 248 00:24:24,210 --> 00:24:28,050 For the third one, we attack the client API. 249 00:24:28,050 --> 00:24:33,210 So here we just submit 10 incorrect pin guesses. 250 00:24:33,350 --> 00:24:38,630 So then the authenticator goes into a hard lockout mode that requires factory resetting. 251 00:24:38,630 --> 00:24:41,290 So you lose all of your credentials . 252 00:24:42,150 --> 00:24:49,130 And we also have another attack that profiles the authenticator given the hardware and software details. 253 00:24:49,590 --> 00:24:52,730 Now we go into the second attack technique . 254 00:24:52,990 --> 00:24:59,370 So in this technique, we have a man in the middle attacker between the authenticator and the client. 255 00:24:59,370 --> 00:25:04,530 So for example, a malicious USB hub, a malicious sit-up library, and so on. 256 00:25:05,390 --> 00:25:22,670 So first, if the client wants to call API A and it requires user verification, the man in the middle attacker runs the pin UV out protocol, forcing to create a user verification token that accepts all APIs and all parties. 257 00:25:22,870 --> 00:25:28,230 So we break the access control part of the protocol. 258 00:25:28,310 --> 00:25:37,150 So now that we can run any API we want on any rank party we want, we wait for the client to call API A with a token if it's needed. 259 00:25:37,150 --> 00:25:41,170 And then we instead run API B on the authenticator. 260 00:25:41,170 --> 00:25:48,650 So we change, we confound API A with API B, which is the one the attacker wants to execute. 261 00:25:48,650 --> 00:25:53,450 Now, if API B requires user presence, we do the user presence check. 262 00:25:53,450 --> 00:26:06,130 Then API B is executed, a success message is returned, and the man in the middle attacker changes it to API A success to masquerade. 263 00:26:06,990 --> 00:26:13,510 We tested API Confusion with all combinations of the seven core sit-up APIs. 264 00:26:13,510 --> 00:26:16,590 You can see the seven APIs here. 265 00:26:17,210 --> 00:26:20,190 So let's give an example. 266 00:26:20,670 --> 00:26:33,530 Here we have on the left the APIs called by the user, and on the columns, so on the top, the APIs that the attacker wants to run, to execute. 267 00:26:33,630 --> 00:26:49,470 So for example, for Reset, it works that if the user calls MakeCredential, we can call Reset instead, because MakeCredential has compatible permissions, compatible user verification, user presence, compared to Reset. 268 00:26:49,470 --> 00:26:57,510 So we can use the user presence from MakeCredential to execute the user presence that Reset requires. 269 00:26:57,710 --> 00:27:00,310 And you can see some one and choose. 270 00:27:00,310 --> 00:27:16,550 We have these requirements because if we want the attacks to be stealthy, in some cases we require NFC to have user presence, or we need credential protection to not perform user verification. 271 00:27:16,550 --> 00:27:18,330 But this is optional. 272 00:27:18,710 --> 00:27:21,170 This is just for having stealthy attacks. 273 00:27:21,170 --> 00:27:23,290 But we can run them anyway. 274 00:27:25,050 --> 00:27:30,390 Now, the first API confusion attack I will present is the Factory Reset. 275 00:27:30,390 --> 00:27:35,330 So the goal is the same as the client impersonation, but the technique is different. 276 00:27:35,330 --> 00:27:42,050 So now the client calls API A that requires user presence, because Reset requires user presence. 277 00:27:42,050 --> 00:27:44,830 For example, get assertion, selection, and so on. 278 00:27:44,830 --> 00:27:48,450 The middle attacker confounds API A into Reset. 279 00:27:48,450 --> 00:27:52,370 We do the user presence check, which the user expects. 280 00:27:52,630 --> 00:28:03,170 We delete the credentials, other data, and then we get back to the client saying API A was executed and not Reset. 281 00:28:04,050 --> 00:28:09,990 Then we have the second attacks that we are presenting for API confusion. 282 00:28:09,990 --> 00:28:15,110 So deleting discoverer credentials, which are the ones stored in the authenticator. 283 00:28:15,110 --> 00:28:19,190 Now we run the middle attack. 284 00:28:19,190 --> 00:28:27,010 We have the pin UV authentication protocol that forces the user verification for everyone. 285 00:28:27,410 --> 00:28:29,770 The client calls API A. 286 00:28:29,770 --> 00:28:33,650 We confound it with calls to credential management. 287 00:28:33,650 --> 00:28:36,450 And here credential management has different subcommands. 288 00:28:36,450 --> 00:28:41,450 So the first one you can see from the diagram is getCredentialData. 289 00:28:41,450 --> 00:28:44,830 We see if there are any discoverer credentials inside. 290 00:28:44,830 --> 00:28:52,470 If there are, we enumerate all the parties tied to those credentials, and we get a list of the relying parties. 291 00:28:52,470 --> 00:28:54,910 So like Microsoft, Apple, Google, and so on. 292 00:28:54,910 --> 00:29:03,850 Then we use this to get, with the credential API call, the list of credential identifiers. 293 00:29:03,850 --> 00:29:08,630 And now we can delete one by one all the credentials stored in the authenticator. 294 00:29:08,650 --> 00:29:13,410 And then we tell the client that API A was okay. 295 00:29:14,930 --> 00:29:20,190 So here is a demonstration that we can use the user verification token for multiple API calls. 296 00:29:21,110 --> 00:29:24,390 And now, so here we have a setup that simulates. 297 00:29:24,390 --> 00:29:26,670 I'm in the middle over USB. 298 00:29:26,750 --> 00:29:29,490 So you will see a lot of traffic. 299 00:29:29,490 --> 00:29:31,630 Let me skip here. 300 00:29:31,890 --> 00:29:34,570 Yes, so you can see a lot of traffic here. 301 00:29:34,570 --> 00:29:37,490 So this is the client pin protocol that executes. 302 00:29:37,490 --> 00:29:40,930 Then we are enumerating the relying parties, enumerating the credentials. 303 00:29:41,130 --> 00:29:47,230 And at the end, you will see that we are deleting the discoverer credentials just in a little bit. 304 00:29:47,650 --> 00:29:51,890 So yes, I will just wait two seconds. 305 00:29:52,090 --> 00:29:55,690 And you will see that the stored credentials are now zero. 306 00:29:55,770 --> 00:29:57,790 So here you can see deleteCredential. 307 00:29:57,790 --> 00:30:03,070 We deleted one, two, three, four credentials, and then zero remaining. 308 00:30:03,070 --> 00:30:07,350 So that's how you delete discoverer credentials using API Confusion. 309 00:30:13,300 --> 00:30:15,780 So we present seven API Confusion attacks. 310 00:30:15,780 --> 00:30:20,000 Some of them are similar to the ones I've shown you for the client impersonation. 311 00:30:20,000 --> 00:30:29,000 Other ones are like filling the discoverer credential memory space by using make credential API calls or denial of servicing authenticator using selection. 312 00:30:29,920 --> 00:30:33,140 So now as for the vulnerabilities and the toolkit. 313 00:30:33,680 --> 00:30:38,580 So we find eight CTAP vulnerabilities on the design of CTAP. 314 00:30:38,580 --> 00:31:00,260 So the fact that you can connect the CTAP client without authentication, the fact that there is no feedback about API calls, the fact that NFC range gives user presence, allowing us to connect without the user noticing, the fact that you can use destructive APIs without user authorization, 315 00:31:00,260 --> 00:31:11,540 trackable identifiers, issues with the user verification, user presence of reset and credential management API, and also the DOS over the selection API. 316 00:31:11,840 --> 00:31:14,120 So this is how the vulnerabilities map. 317 00:31:14,120 --> 00:31:23,180 Basically the first two are required for connection to the, for connecting impersonating the client and many in the middling, the traffic. 318 00:31:23,180 --> 00:31:30,040 The second one is for stealthiness and the other ones are specific to some or just one API. 319 00:31:31,020 --> 00:31:36,180 So then we released open source toolkit for connecting these attacks. 320 00:31:36,180 --> 00:31:47,240 We have three modules, a virtual testbed for CTAP experiments for other clients and the sectors which improved the sectors for CTAP. 321 00:31:47,320 --> 00:31:52,180 So for the testbed, we have a virtual running party and CTAP client. 322 00:31:52,380 --> 00:32:01,160 We want to test, we wanted to test physical authenticators without breaking the actual running parties, without sending web authent requests. 323 00:32:01,160 --> 00:32:04,240 So this was very practical. 324 00:32:04,240 --> 00:32:11,640 We extended the Yubico testbed for this, the FIDO2 Python repository. 325 00:32:11,640 --> 00:32:18,280 We send raw CTAP packets with this so we can change them at a byte level. 326 00:32:18,280 --> 00:32:25,500 We can customize the configuration of the virtual client , changing the requirements and the curves, extension needed. 327 00:32:25,500 --> 00:32:29,500 We also offer templates imitating, simulating real running parties. 328 00:32:29,500 --> 00:32:35,360 So the correct running party ID, identifier, the real credential protection policy and so on. 329 00:32:35,780 --> 00:32:41,240 Then for the four attack clients, we have an Android app for the client impersonation over NFC. 330 00:32:41,240 --> 00:32:49,060 So it runs on the attacker phone like this one and we got up to two centimeters of range on my phone. 331 00:32:49,060 --> 00:32:58,100 Then for the Proxmark, we have a long range antenna that deploys the attack with a range of up to 6.5 centimeters. 332 00:32:58,100 --> 00:33:00,440 So a better result. 333 00:33:00,440 --> 00:33:04,580 And also sends this custom CTAP commands over NFC. 334 00:33:04,640 --> 00:33:09,780 Also an Android app running on the victim phone that performs a client impersonation. 335 00:33:10,420 --> 00:33:15,220 And we are using our custom API instead of the Android NFC API. 336 00:33:15,220 --> 00:33:23,600 And finally, this Electron app running on desktop that can simulate API confusion over USB using the node-hid library. 337 00:33:24,080 --> 00:33:25,840 And performs that in the middle. 338 00:33:26,220 --> 00:33:31,960 So we evaluated six popular authenticators from Mubico, Feitian, Solokeys and Google. 339 00:33:31,960 --> 00:33:33,300 Some of them were open source. 340 00:33:33,300 --> 00:33:34,620 Some of them are closed source. 341 00:33:34,620 --> 00:33:37,960 They have different amounts of memory for discoverer credentials. 342 00:33:38,300 --> 00:33:43,040 And years are from 2018 to pretty recent 2023. 343 00:33:44,120 --> 00:33:47,320 Then also ten popular running parties. 344 00:33:47,320 --> 00:33:54,200 Among them are Apple and Microsoft that has the discoverer weak type here. 345 00:33:54,200 --> 00:33:59,640 Which means that they use the credential protection off on their discoverer credentials. 346 00:33:59,820 --> 00:34:04,580 Then we have sites like Adobe and the GitHub that use discoverable credentials. 347 00:34:04,580 --> 00:34:06,160 So they are stored in the authenticator. 348 00:34:06,160 --> 00:34:09,920 And then DocuSign and Facebook that use non-discoverable credentials. 349 00:34:09,920 --> 00:34:13,020 They are stored by their running party. 350 00:34:14,820 --> 00:34:18,860 So our attacks, they target the SITAP protocol. 351 00:34:18,860 --> 00:34:27,000 So they are working regardless of the hardware and software of the authenticators. 352 00:34:27,000 --> 00:34:31,500 So all of our attacks are effective on all the authenticators. 353 00:34:31,500 --> 00:34:36,020 Just one exception that four authenticators do not implement the selection API. 354 00:34:36,020 --> 00:34:40,680 So of course we couldn't implement the selection-based attack. 355 00:34:40,680 --> 00:34:43,140 Because there was no API there. 356 00:34:45,380 --> 00:34:53,480 As Daniel already told you, we have impact also on the running party despite not sending any WebO10 command. 357 00:34:54,100 --> 00:34:57,720 So for the outcomes, we have the deletion of credentials. 358 00:34:57,720 --> 00:34:58,860 So you can't log in. 359 00:34:58,860 --> 00:34:59,700 You lose the credentials. 360 00:34:59,700 --> 00:35:01,000 You can't log into the account. 361 00:35:01,000 --> 00:35:03,860 So for example for Microsoft, this is for the Microsoft account. 362 00:35:03,860 --> 00:35:10,600 But you also use these credentials for the OneDrive, for the Office and even for your Minecraft login. 363 00:35:12,000 --> 00:35:14,300 Then we have the user tracking. 364 00:35:14,340 --> 00:35:19,840 So here we track the user and it doesn't work with non-discoverable credentials. 365 00:35:19,840 --> 00:35:23,020 So that's why we have the not applicable in our table. 366 00:35:23,020 --> 00:35:26,560 We only can track the user with discoverable credentials. 367 00:35:26,620 --> 00:35:30,840 And finally we have the service authenticator meaning that it doesn't work or it is busy. 368 00:35:30,840 --> 00:35:34,480 So you cannot use it for login, for authentication. 369 00:35:35,000 --> 00:35:42,120 So for the countermeasure disclosure, we have eight countermeasures fixing the eight vulnerabilities. 370 00:35:42,120 --> 00:35:50,440 So some of them are proposals for having a trusted sit-up client like PKI or attestation. 371 00:35:50,440 --> 00:35:52,440 Then visual feedback for authenticator. 372 00:35:52,440 --> 00:35:55,440 For example, using the LED is one of the options. 373 00:35:55,440 --> 00:36:02,200 Then user interaction for the user presence even when doing NFC, when having the NFC transport. 374 00:36:02,200 --> 00:36:04,720 A different pin for destructive APIs. 375 00:36:04,720 --> 00:36:10,460 Rotating and credential protection on credential identifiers and user identifiers. 376 00:36:10,500 --> 00:36:14,860 Adjustments to the authorization of the reset and credential management. 377 00:36:14,860 --> 00:36:19,780 And rate limiting for DOS on the selection, for DOS prevention on selection. 378 00:36:20,100 --> 00:36:24,640 So for the disclosure, we informed the FIDO Alliance on November 2023. 379 00:36:24,640 --> 00:36:30,680 They answered us on May 2024 with nice feedback. 380 00:36:30,680 --> 00:36:35,540 And they also requested us to disclose our findings to the vendors. 381 00:36:35,540 --> 00:36:40,240 So we contacted Yubico, Soloveit and Google about the attacks. 382 00:36:40,240 --> 00:36:46,900 We also told Yubico that we found an implementation flaw in their firmware. 383 00:36:46,960 --> 00:36:50,100 And we got a CVE and an advisory from them. 384 00:36:50,100 --> 00:36:54,060 And now it is fixed for newer models, but not for the old ones. 385 00:36:54,060 --> 00:36:55,400 It is still there. 386 00:36:55,860 --> 00:36:58,300 And it involves data leaking. 387 00:36:59,100 --> 00:37:06,080 And then we also contacted parties using the credential protection of policy, which is Microsoft and Apple. 388 00:37:06,820 --> 00:37:09,660 So thank you for the attention. 389 00:37:09,660 --> 00:37:15,720 And if you want to meet us later, we have a live demo for most of the attacks. 390 00:37:15,720 --> 00:37:19,200 So feel free to come to us. 391 00:37:19,200 --> 00:37:20,040 Thank you. 392 00:37:20,440 --> 00:37:21,620 Thank you very much.