{"id":8021,"date":"2022-01-10T10:14:13","date_gmt":"2022-01-10T10:14:13","guid":{"rendered":"https:\/\/emtunc.org\/blog\/?p=8021"},"modified":"2022-01-10T10:14:14","modified_gmt":"2022-01-10T10:14:14","slug":"webauthn-the-future-of-strong-user-authentication","status":"publish","type":"post","link":"https:\/\/emtunc.org\/blog\/01\/2022\/webauthn-the-future-of-strong-user-authentication\/","title":{"rendered":"WebAuthn &#8211; the future of strong user authentication"},"content":{"rendered":"\n<p><em>Web Authentication<\/em>, or <em>WebAuthn<\/em> is a standard for strong user authentication and is a core part of the FIDO2 specification. I&#8217;m not going to go into too much technical detail about the spec in this blog because there already exists a plethora of awesome documents and demonstrations which explain WebAuthn better than I ever could; I&#8217;ll include those in the <em>Additional Reading<\/em> section below.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What is WebAuthn?<\/h2>\n\n\n\n<p>Phishing is still one of the (if not <em>the<\/em>) most common entry point into organisations today. The reason it&#8217;s the most common attack vector is because it&#8217;s fairly simple to carry out; even by low-skilled criminals.<\/p>\n\n\n\n<p>WebAuthn is a modern authentication standard designed to mitigate against this threat. It also helps mitigate against <em>man in the middle (MiTM)<\/em> attacks where the attacker is able to manipulate network traffic.<\/p>\n\n\n\n<p>In the WebAuthn world, you have two types of <em>authenticator<\/em>. A <em>roaming authenticator<\/em> and a <em>platform authenticator<\/em>. <em>Roaming authenticators<\/em> are cross-platform authenticators; they usually come in the form of FIDO2 capable USB security keys like YubiKeys. <em>Platform authenticators<\/em> are those that are built into the platform, or device. For example, TouchID on a modern Mac, FaceID on a modern iPhone or Windows Hello on a modern Windows laptop.<\/p>\n\n\n\n<p>What makes WebAuthn special is that a tightly scoped set of credentials (public and private key) are created for <em>each and every<\/em> relying party, or website you register your WebAuthn factor with. Each credential contains metadata; one of the most important is the <em>relying party identifier<\/em>, or domain name. What makes this so special is that each credential is effectively <em>locked<\/em> to a domain. This means that if you are tricked into visiting a fake website, the credentials on your <em>roaming<\/em> or <em>platform<\/em> authenticator won&#8217;t match up with the fake website and thus won&#8217;t give up any secrets; keeping you and your identity safe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How does it compare to existing authentication mechanisms?<\/h2>\n\n\n\n<p>I&#8217;m going to refer to a table I created to compare WebAuthn against the <em>most common<\/em> user-authentication mechanisms available today.<\/p>\n\n\n\n<p>From weakest to strongest:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Strength<\/th><th>Authentication Mechanism <br>(when used as part of MFA)<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Why would you do this to yourself?<\/td><td>None<\/td><td>Hopefully it should be obvious why not having any secondary authentication factor is a bad idea. Unfortunately, users of a system are often not given a choice.<\/td><\/tr><tr><td>Weak<\/td><td>SMS<\/td><td>SMS is not ideal but is better than nothing at all. It will deter almost all <em>drive-by<\/em>, untargeted attacks. The security isn&#8217;t great and there are many articles which demonstrate <em>real<\/em> attack paths where criminals are able to grab the SMS OTP codes. The user experience is just as bad; you require a network signal and on occasion, text messages can take several minutes to go through, assuming they don&#8217;t get blocked by your network provider for looking like spam.<\/td><\/tr><tr><td>Strong<\/td><td>Push based authentication<\/td><td>Push based authentication is offered by the likes of Duo, Okta Push, OneLogin Protect and many others. It provides a good user experience but arguably (well, I think so anyway) poorer security experience.<br>Many organisations which implement push based authentication do it poorly which means an attacker could frustrate a victim by bombarding them with push prompts. In these situations, it is inevitable the victim will begrudgingly accept one of the prompts; out of pure frustration or by accident.<br>It is also susceptible to MiTM attacks which could end in successful compromise of the account.<\/td><\/tr><tr><td>Stronger<\/td><td>Time Based OTP (TOTP)<\/td><td>This is the most popular form of secondary authentication &#8211; the most common apps which enable use of TOTP are <em>Google Authenticator<\/em> and <em>Authy<\/em>.<br>TOTP-based authentication is great; it provides a good user experience (you don&#8217;t have to wait several minutes for a text to arrive!) and good security. The secret or <em>seed<\/em> is stored locally on your device (or encrypted on a remote server in the case of Authy) and it is not trivial for someone with ill intentions to obtain your codes remotely.<br><meta charset=\"utf-8\">However it is also susceptible to MiTM attacks which could end in successful compromise of the account.<\/td><\/tr><tr><td>Strongest<\/td><td>Web Authentication<\/td><td>WebAuthn hits the ball out of the park when it comes to user experience and security. It is able to provide the fastest-time-to-authenticate but more importantly, is able to resist phishing attacks.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Hold on. What do you mean it&#8217;s able to resist phishing? I thought TOTP-factors were able to do this already?!<\/h2>\n\n\n\n<p>Don&#8217;t get me wrong, <em>Time based OTP<\/em> authentication is\/was great and served us well. It certainly <em>does<\/em> resist phishing attacks <em>if and only if<\/em> an attacker isn&#8217;t able to socially engineer or phish the victim&#8217;s OTP (usually valid for 30 to 60 seconds) in near real time.<\/p>\n\n\n\n<p>That last sentence is crucial here. <em>If<\/em> an attacker is able to phish a victim in real time, they are able to steal and abuse the OTP <em>or<\/em> simply steal the session cookie\/token returned by the application after a successful login.<\/p>\n\n\n\n<p>You might be thinking to yourself that such an attack is farfetched and <em>would never happen<\/em>. I&#8217;ll say that I have personally seen such an attack successfully take place and that there are plenty of frameworks available that make it incredibly easy for low-skilled criminals to carry out.<\/p>\n\n\n\n<p>So what makes WebAuthn phish-resistant? To cut a long story short, the credentials generated on the authenticator (this can be a USB security key like a YubiKey or it can be the fingerprint sensor on your phone or laptop) are <em>scoped<\/em> to the domain they were generated for.<\/p>\n\n\n\n<p>What this means is that even if you are duped into entering your username and password into a very convincing phishing page (say <em>evil.example.com<\/em>), the browser would relay the domain name of the phishing site to the authenticator at which point the authenticator will reply with <em>&#8220;Sorry old chap, I don&#8217;t have any credentials for evil.example.com&#8221;<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Should I care?<\/h2>\n\n\n\n<p>In short and to the point: if you value the security, privacy and safety of your employees, infrastructure and customers then I would strongly encourage you to make plans to upgrade to WebAuthn backed factors as soon as you are able to.<\/p>\n\n\n\n<p>If you already use a modern Identity Provider then a lot of the hard work is already done for you.<\/p>\n\n\n\n<p>I&#8217;ll create a follow-up post to this one detailing my experience deploying WebAuthn, some things I did to ensure a smooth rollout and other things I would do better next time.<\/p>\n\n\n\n<p>Leave a comment if there&#8217;s anything else you&#8217;d like to know about and I&#8217;ll either edit this post or include it in the next.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Reading<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" href=\"https:\/\/static.googleusercontent.com\/media\/research.google.com\/en\/\/pubs\/archive\/45409.pdf\" data-type=\"URL\" data-id=\"https:\/\/static.googleusercontent.com\/media\/research.google.com\/en\/\/pubs\/archive\/45409.pdf\" target=\"_blank\">Security Keys: Practical Cryptographic Second<br>Factors for the Modern Web<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.w3.org\/TR\/webauthn-2\/\" data-type=\"URL\" data-id=\"https:\/\/www.w3.org\/TR\/webauthn-2\/\" target=\"_blank\">WebAuthn Spec<\/a><\/li><li><a href=\"https:\/\/fidoalliance.org\/specifications\/download\/\" data-type=\"URL\" data-id=\"https:\/\/fidoalliance.org\/specifications\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">FIDO Auth Specs by FIDO Alliance<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/webauthn.me\/\" data-type=\"URL\" data-id=\"https:\/\/webauthn.me\/\" target=\"_blank\">WebAuthn Demo by Auth0<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/webauthn.io\/\" data-type=\"URL\" data-id=\"https:\/\/webauthn.io\/\" target=\"_blank\">WebAuthn Demo by Duo Labs<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Web Authentication, or WebAuthn is a standard for strong user authentication and is a core part of the FIDO2 specification. I&#8217;m not going to go into too much technical detail about the spec in this blog because there already exists a plethora of awesome documents and demonstrations which explain WebAuthn better than I ever could; [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1],"tags":[270,269],"class_list":["post-8021","post","type-post","status-publish","format-standard","hentry","category-tech","tag-mfa","tag-webauthn"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1trTO-25n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/8021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/comments?post=8021"}],"version-history":[{"count":24,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/8021\/revisions"}],"predecessor-version":[{"id":8059,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/8021\/revisions\/8059"}],"wp:attachment":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/media?parent=8021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/categories?post=8021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/tags?post=8021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}