📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

Compare the common MFA methods: SMS codes, TOTP authenticator apps, push notifications and FIDO2/WebAuthn passkeys. What makes a method phishing-resistant, how do passkeys work in ASP.NET Core Identity on .NET 10, and what do the Essential Eight require?

MFA methods and their weaknesses, why WebAuthn passkeys are phishing-resistant, passkey support in ASP.NET Core Identity (.NET 10), and the ACSC Essential Eight MFA requirements.

Mid-Level Theory Intermediate aspnet-core-identity essential-eight mfa passkeys security webauthn

🎯 Key points

  • SMS: SIM swap and interception (NIST SP 800-63B treats it as a restricted authenticator); TOTP (RFC 6238): shared secret, relayed in real time by AitM kits
  • Push: MFA fatigue; number matching mitigates
  • WebAuthn/FIDO2: public-key credential bound to the relying party ID; the browser signs the origin, so a fake site gets nothing
  • Synced passkeys (security depends on the sync account) vs device-bound security keys (for admins)
  • .NET 10 Identity: MakePasskeyCreationOptionsAsync, PerformPasskeyAttestationAsync, PasskeySignInAsync; schema version 3
  • Essential Eight November 2023 update: phishing-resistant MFA required from Maturity Level 2
  • Recovery is the weakest link: two credentials, hashed recovery codes, no email-only MFA reset for admins

⏱ 30-second answer

MFA methods differ mainly in phishing resistance.

  • SMS codes are vulnerable to SIM swap and interception. TOTP apps (RFC 6238) are better, but a fake login page can relay the code in real time. Push approvals suffer from MFA fatigue unless number matching is used.
  • WebAuthn/FIDO2 passkeys use a key pair per site: the private key never leaves the authenticator and the browser binds every signature to the relying party ID (the real domain), so a look-alike site gets nothing usable.

ASP.NET Core Identity in .NET 10 supports passkey registration and sign-in (MakePasskeyCreationOptionsAsync, PerformPasskeyAttestationAsync, PasskeySignInAsync). The ACSC Essential Eight has required phishing-resistant MFA from Maturity Level 2 since its November 2023 update.

The trade-off: passkeys are the strongest and easiest for users, but account recovery and device loss need careful design.

🗣 Full answer (senior)

How I would answer this in an interview

"Multi-factor authentication combines something you know, have or are, but the methods aren't equal. SMS is the weakest: SIM-swap attacks and SS7 interception are real, and NIST restricts it. TOTP authenticator apps generate a code from a shared secret and the time, which stops password reuse attacks, but an adversary-in-the-middle phishing kit simply asks the victim for the code and replays it within the 30-second window. Push approvals are convenient but users approve prompts they didn't start, which is MFA fatigue; number matching fixes most of that.

WebAuthn, the standard behind FIDO2 and passkeys, is different in kind. At registration the authenticator creates a key pair for that relying party; the server stores only the public key. At sign-in the server sends a challenge, the authenticator signs it after a local gesture like Face ID or a PIN, and the browser includes the origin in what's signed. A phishing site on a look-alike domain can't ask for a signature for the real domain, so there's nothing to relay, and there's no shared secret on the server to steal. Passkeys are WebAuthn credentials that can be synced across a user's devices, or device-bound on a security key. In .NET 10, ASP.NET Core Identity supports them: the Blazor template includes the UI, and the SignInManager has MakePasskeyCreationOptionsAsync, PerformPasskeyAttestationAsync and PasskeySignInAsync, with storage in a passkeys table after moving to schema version 3.

The mistake I see is strong sign-in with a weak recovery path, like resetting MFA by email. The senior line: phishing-resistant MFA is now the Essential Eight's baseline from Maturity Level 2, and passkeys are the way to meet it without making users hate you."


MFA methods compared

Method Factor Main attack Phishing-resistant?
SMS / voice code Have (phone number) SIM swap, interception, real-time relay No
Email code / magic link Have (mailbox) Mailbox takeover, relay No
TOTP app (RFC 6238) Have (shared secret) Real-time relay by AitM kits, secret theft No
Push with number matching Have (device) Relay possible, fatigue reduced No
FIDO2 security key Have (+ PIN) Physical theft + PIN Yes
Passkey (synced) Have (+ biometric/PIN) Compromise of the sync account Yes
Smart card / Windows Hello for Business Have (+ PIN) Device compromise Yes

Essential Eight and MFA (as of November 2026)

The November 2023 maturity model update moved phishing-resistant MFA down to Maturity Level 2 for users of online services and systems, and online customer-facing services should offer customers a phishing-resistant option. Check the current ASD maturity model text when a client needs exact control wording for an assessment.

Production example

For [a staff portal] we added passkeys alongside TOTP in [Identity / Entra ID]; within [three months] [~70%] of users had registered one, sign-in time dropped from [~25 s] to [~6 s], and the [two] phishing campaigns that followed captured passwords but produced [zero] successful sign-ins for passkey users.

🔍 What the interviewer is checking

Checks that the candidate understands why some MFA methods resist phishing and can apply current .NET and Australian guidance.

Green flags

  • Explains origin binding in WebAuthn rather than just 'passkeys are better'
  • Knows TOTP can be relayed in real time
  • Knows .NET 10 Identity supports passkeys and roughly how the flow works
  • Mentions the Essential Eight ML2 phishing-resistant requirement
  • Raises recovery as the weak point

Red flags

  • Considers SMS MFA strong
  • Thinks passkeys store a secret on the server
  • Ignores account recovery

📚 Learn in depth

1. Why TOTP is phishable

Victim -> fake-login.example (AitM proxy) -> real-login.example
  password ------------------------------------> accepted
  TOTP 123456 ---------------------------------> accepted (within 30 s)
  <- session cookie captured by the proxy

The code is not bound to where it is typed. Evilginx-style kits automate this.

2. How WebAuthn binds to the site

Registration:
 server -> challenge, rp.id = "portal.example.com.au", user.id
 authenticator -> new key pair for (rp.id, user.id); returns public key + attestation
 server stores credentialId + public key

Sign-in:
 server -> challenge, allowCredentials
 browser -> clientDataJSON { type, challenge, origin: "https://portal.example.com.au" }
 authenticator -> signs (authenticatorData(rpIdHash, flags, signCount) + hash(clientDataJSON))
 server verifies signature, rpIdHash, origin, challenge, user-verified flag

The browser fills in the origin, not the page; a phishing site at portal-example.com has a different RP ID, so the authenticator has no credential for it.

3. Passkeys

Synced passkeys live in a platform credential manager (iCloud Keychain, Google Password Manager, Windows, or third-party managers) and survive device loss; their security depends on that account. Device-bound passkeys (security keys) never leave the hardware and suit admins. The backup eligible and backed up flags in authenticator data tell the server which kind it got.

4. ASP.NET Core Identity in .NET 10

  • Set IdentityOptions.Stores.SchemaVersion = IdentitySchemaVersions.Version3 and add a migration for the passkey table.
  • Configure IdentityPasskeyOptions (for example ServerDomain, the RP ID).
  • Registration: MakePasskeyCreationOptionsAsync -> browser navigator.credentials.create() -> PerformPasskeyAttestationAsync -> UserManager.AddOrUpdatePasskeyAsync.
  • Sign-in: MakePasskeyRequestOptionsAsync -> navigator.credentials.get() -> PasskeySignInAsync.
  • The implementation is scoped to authentication; for advanced WebAuthn extensions the community fido2-net-lib remains an option. Early .NET 10 preview articles use method names that changed before release, so check the API reference.

5. Recovery

Recovery codes, a second passkey, or identity re-verification through support. Never let email alone remove MFA for privileged users.

Try it yourself

  1. Create a .NET 10 Blazor Web App with Individual Accounts and register a passkey with your phone or a browser profile.
  2. Inspect the AspNetUserPasskeys row and identify the credential id and public key.
  3. Use Chrome DevTools' WebAuthn panel to create a virtual authenticator and test sign-in without hardware.
  4. Change ServerDomain and see existing passkeys stop working (the RP ID changed).
  5. Write down your recovery flow and threat-model it: what can an attacker who controls the user's email do?

💻 Code

Passkey sign-in endpoints using ASP.NET Core Identity in .NET 10 (the browser calls navigator.credentials.get() between the two calls). Check the exact signatures against the API reference for your SDK version.

// Program.cs (.NET 10)
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<AppDbContext>(o => o.UseSqlServer(builder.Configuration.GetConnectionString("App")));

builder.Services.AddIdentity<AppUser, IdentityRole>(o =>
    {
        o.Stores.SchemaVersion = IdentitySchemaVersions.Version3;   // adds passkey storage
    })
    .AddEntityFrameworkStores<AppDbContext>()
    .AddDefaultTokenProviders();

// The relying party ID: passkeys only work on this domain and its subdomains.
builder.Services.Configure<IdentityPasskeyOptions>(o => o.ServerDomain = "portal.example.com.au");

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();

// 1. Server creates a challenge; the JSON goes to navigator.credentials.get().
app.MapPost("/passkey/request-options", async (SignInManager<AppUser> signIn) =>
    Results.Content(await signIn.MakePasskeyRequestOptionsAsync(user: null), "application/json"));

// 2. Browser posts the assertion; Identity verifies origin, challenge and signature, then signs in.
app.MapPost("/passkey/sign-in", async (PasskeySignInRequest request, SignInManager<AppUser> signIn) =>
{
    var result = await signIn.PasskeySignInAsync(request.CredentialJson);
    return result.Succeeded ? Results.NoContent() : Results.Unauthorized();
});

app.Run();

public sealed record PasskeySignInRequest(string CredentialJson);
public sealed class AppUser : IdentityUser;
public sealed class AppDbContext(DbContextOptions<AppDbContext> o) : IdentityDbContext<AppUser>(o);
// Browser side (simplified): the origin is added by the browser, which is what defeats phishing.
const options = await (await fetch('/passkey/request-options', { method: 'POST' })).json();
const credential = await navigator.credentials.get({ publicKey: PublicKeyCredential.parseRequestOptionsFromJSON(options) });
await fetch('/passkey/sign-in', { method: 'POST', headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ credentialJson: JSON.stringify(credential.toJSON()) }) });

⚠ Common mistakes

  • Mistake: Treating any MFA as phishing-resistant. Why it is wrong: SMS, email and TOTP codes are relayed in real time by AitM kits. Instead: WebAuthn passkeys, security keys or smart cards for anything sensitive, as the Essential Eight now expects from ML2.
  • Mistake: Letting users reset MFA with only an email link. Why it is wrong: the attacker who owns the mailbox removes the strongest factor. Instead: recovery codes, a second registered passkey, or verified support processes.
  • Mistake: Push approvals without number matching. Why it is wrong: MFA fatigue attacks rely on users tapping 'Approve'. Instead: number matching and context (app, location) in the prompt.
  • Mistake: Changing the domain after users register passkeys. Why it is wrong: credentials are bound to the RP ID and stop working. Instead: choose the RP ID (often the registrable parent domain) before launch.
  • Mistake: Storing TOTP secrets in plain text. Why it is wrong: a database leak lets attackers generate codes. Instead: encrypt them (Identity stores the authenticator key; protect the database and consider column encryption).
  • Mistake: Requiring MFA only at sign-in. Why it is wrong: a stolen session cookie skips it. Instead: step-up re-authentication for sensitive actions and short sessions for admins.

🏛 Senior insight: trade-offs

The industry has moved from 'turn on MFA' to 'make MFA phishing-resistant', and Australian guidance followed with the 2023 Essential Eight update. Passkeys are the rare control that improves both security and usability, so the rollout plan matters more than the technology: offer them at sign-in, keep TOTP as a fallback for a while, and require device-bound keys for administrators.

Option When it fits Cost When not to
Synced passkeys Customers and most staff Recovery design, user education Highest-privilege admins (prefer device-bound)
Security keys (FIDO2) Admins, break-glass accounts Hardware, logistics Large consumer bases
TOTP Fallback, legacy clients Phishable As the only factor for sensitive systems
SMS Last-resort recovery only SIM swap risk Anything privileged

Measure passkey adoption, MFA method mix, sign-in success rate and recovery requests; recovery volume tells you whether the design is working.

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions ASP.NET Core Identity Why: Checks what else Identity provides and when to use an external IdP
    How to answer

    ASP.NET Core Identity is a membership library: user and role stores (usually EF Core), password hashing with PasswordHasher (PBKDF2 with HMAC-SHA512 and 100,000 iterations), lockout after failed attempts, email confirmation, password reset tokens, two-factor with authenticator apps and recovery codes, the security stamp, and since .NET 10 passkeys. MapIdentityApi adds ready-made register, login and refresh endpoints for SPAs and mobile apps.

    Use it when one app owns its own users. Choose an external identity provider (Microsoft Entra ID for staff, Entra External ID, Auth0 or similar for customers) when you need single sign-on across apps, federation with other organisations, conditional access, or you don't want to own password security and compliance yourself.

    The trade-off: Identity is free and fully in your control, but every security feature and incident is yours to run.

  2. When: Candidate says passkeys solve phishing Why: Checks they know recovery is the weakest link
    How to answer

    Prevent the problem first: prompt users to register two credentials (a synced passkey plus a second device or security key) and issue one-time recovery codes stored hashed. Then treat recovery as a high-risk event: require a recovery code, or identity re-verification proportionate to the account (for example a document check or a video call with support for administrators), plus risk signals such as a known device, IP history and account age. Notify the user on every channel, apply a cool-off period (for example 24–72 hours before the new credential can change payout details or export data), and log and alert on recovery events. Never let email alone remove MFA for privileged users; that turns a mailbox takeover into an account takeover.

🛠 Real-world problems: how you handle them

AitM phishing campaign bypasses TOTP for staff accounts
Situation
A [professional services firm] with [~600] staff used passwords plus TOTP for its [client portal admin area] built on ASP.NET Core Identity. A phishing campaign used a reverse-proxy kit on a look-alike domain.
Signals
Users reported an 'odd login page'; sign-in logs showed successful logins with valid TOTP from [an overseas hosting provider IP] seconds after the user's own attempt; [three] admin sessions created data exports.
Investigation
Correlated Identity sign-in events and IP addresses in Application Insights; confirmed the session cookies were replayed from the proxy's IP; reviewed the phishing domain and kit behaviour; identified affected accounts and what data the exports contained, and assessed the incident under the NDB scheme with [the privacy officer].
Resolution
Immediately updated security stamps for affected users (invalidating cookies), reset passwords, blocked the phishing domain at the mail gateway and reported it. Then rolled out passkeys using .NET 10 Identity support, required them for admin roles, added step-up re-authentication for exports and shortened admin session lifetime to [1 hour].
Prevention
Phishing-resistant MFA required for privileged roles (Essential Eight ML2), alerts on sign-ins from hosting-provider ASNs, export actions logged and alerted, periodic phishing simulations, and a recovery process that doesn't fall back to email for admins.

How to tell it (STAR)

**S:** A phishing kit relayed passwords and TOTP codes for [three] admin accounts on our [client portal], and exports were made from the stolen sessions. **T:** I was responsible for the application-side containment and the fix. **A:** We invalidated sessions by updating security stamps, reset credentials and worked through the NDB assessment, then I implemented passkeys with .NET 10 Identity, made them mandatory for admins, and added step-up authentication before exports. **R:** Within [six weeks] [100%] of admins and [~65%] of other staff used passkeys, and a similar campaign [two months later] produced [zero] successful sign-ins.

↩ Usually asked after

More in Authentication

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me