Skip to content
Account takeover Write-up Advanced

Hijacking Someone Else’s DCSync

The report describes a technique to backdoor AADConnect by injecting a malicious DLL into the miiserver.exe process, which allows an attacker with local admin access to steal password hashes during the normal DCSync operation without triggering DCSync alerts. The attacker can then exfiltrate the hashes from disk.

Anthony Larcher-Gore Follow

Published on nullg0re.com

So you’re on a network doing a pentest. You’ve escalated privileges and it’s time to extract hashes from the DC.

Anthony Larcher-Gore (@nullg0re), on nullg0re.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

DCSync is a well-known technique for extracting credential material from a Domain Controller, and it is also widely monitored, so an operator who runs it on an engagement is likely to light up detections. The question this research starts from is whether the same result can be obtained without ever executing an out-of-band DCSync or triggering an alert for that activity.

The answer lies in services that perform DCSync as part of their normal operation. A Backup Domain Controller, for example, replicates from the primary DC and therefore performs a DCSync to back up its data. The target here is a different kind of server: the AADConnect server.

AADConnect servers should follow the Tier model and be treated as Tier 0 assets, but not every organisation does so. Even where they do, a pentest or a compromise can still yield Local Administrator access to the AADConnect server itself. The software is also interesting in its own right, because it contains a large amount of code that performs three actions:

  1. Perform a DCSync against a local DC to obtain user data and credentials
  2. AADConnect rehashes the users NTHashes 1,000 times
  3. AADConnect ships the hashes off to Azure AD for synchronization

The idea, then, is to backdoor AADConnect so that AADConnect performs the DCSync itself, and the attacker simply steals the credentials it is supposed to obtain for its normal operations.

Setup

The precondition is Local Administrator access on the AADConnect server. No Domain Admin rights are needed to reach this position, which is what makes the path interesting compared with a conventional DCSync.

The tooling is DnSpy. The researcher opened all of the EXE and DLL files inside the following directory and hunted for .NET classes and methods that might be of value:

Text
C:\Program Files\Microsoft Azure AD Sync

The goal was to find a method that could be overwritten to steal credentials from AADConnect after its DCSync, either before it encrypts the NT hashes or after it decrypts them during the sync.

Finding it

Nestori Syynimaa helped narrow the list down to Microsoft.Online.PasswordSynchronization.dll, which contained the class PasswordUtility and the method DecryptNtOwfPwdWithIndex. That function is called during step one of the three listed above, the DCSync against the local DC.

From the original on nullg0re.com

The screenshot shows the decompiled class. The method is a good candidate to overwrite because it has limited .NET functionality and the majority of its functions are native. That means the malicious DLL can stay relatively small, without a large amount of unnecessary code to make the final product functional.

Exploitation

Step 1: Build the DLL

The first thing needed is a method inside the DLL that loads the method to overwrite in memory, loads the malicious method, and then overwrites the method in memory. The Patch() method below performs that overwrite of the existing code with the malicious code in memory:

From the original on nullg0re.com

The remainder of the DLL is the malicious method itself. It contains all of the code from the legitimate method, so that the service does not crash, plus the functionality to write the stolen DCSync hashes to disk at C:\Windows\Temp\Hashes.txt in the secretsdump.py format:

From the original on nullg0re.com

Step 2: Find the process

The attack requires the adversary or tester to become a Local Admin of the AADConnect server and then inject the malicious DLL into the miiserver.exe process, which is the service executable of the AADConnect service.

The PID of miiserver.exe has to be identified first. Task Manager, Process Explorer, Process Hacker and even the command line are all suitable options. From CMD:

Text
tasklist | findstr miiserver.exe

Step 3: Inject the DLL

With the PID known, the adversary injects the malicious DLL:

From the original on nullg0re.com

Step 4: Trigger the sync

With the DLL injected into the miiserver.exe process, the next step is to log into Azure AD as any user and reset a compromised hybrid user's password. That kicks off the synchronization between on-premises and Azure AD. The malicious code then waits until miiserver.exe needs to decrypt the user's credentials with the AADConnect Session Key, and writes those credentials to disk at C:\Windows\Temp\Hashes.txt.

From the original on nullg0re.com

Step 5: Exfiltrate

The adversary then only needs to exfiltrate that file off the disk. At that point they have performed a DCSync without ever actually executing an out-of-band DCSync.

From the original on nullg0re.com

Root cause

The design of AADConnect means the service legitimately decrypts NT hashes with the AADConnect Session Key during its normal synchronisation cycle. Overwriting DecryptNtOwfPwdWithIndex in Microsoft.Online.PasswordSynchronization.dll inside the running miiserver.exe process lets an attacker who already holds Local Administrator rights capture those credentials at the moment they are decrypted, before they are rehashed and shipped to Azure AD. The method was chosen partly because its limited .NET surface keeps the replacement small.

Existing defences did not stop this because, as MSRC assessed, no security boundary is crossed: the attacker already has administrative control of the AADConnect server. The report notes that AADConnect servers should be treated as Tier 0 assets, and that even organisations that do so can lose Local Administrator access to them during an engagement.

Impact

An attacker with Local Administrator access to an AADConnect server can obtain the credential material that AADConnect collects from the local DC, written to disk in secretsdump.py format, without executing a DCSync themselves and therefore without triggering the traditional alarms associated with that activity. The trigger is logging into Azure AD as any user and resetting a compromised hybrid user's password, which starts the synchronisation. The report frames this as a way to perform a DCSync quietly during a pentest; it does not assign a severity or a CVSS score.

Fix

No fix is described. The research was submitted to MSRC on 15 September 2023, with the expectation that Microsoft would call it "by design" or classify it as "Not a vulnerability" because no security boundary is crossed. MSRC responded on 21 September 2023 agreeing with that assessment.

From the original on nullg0re.com
  • Look for other services that perform DCSync as part of normal operation, such as replication or backup components, and check whether a method they call during that operation can be overwritten in memory. A positive result is a replacement method that captures credentials without crashing the service.
  • Enumerate other .NET methods in the AADConnect binaries under C:\Program Files\Microsoft Azure AD Sync that handle credentials around the sync cycle. A positive result is a method with limited .NET surface whose overwrite yields usable hashes.
  • Check whether the same in-memory patching approach works against other processes that decrypt credentials with a session key. A positive result is credentials written to disk in a parseable format after a normal operation triggers decryption.
  • Review whether AADConnect servers in the environment are reachable with Local Administrator rights from a standard foothold. A positive result is administrative access to the server without Domain Admin privileges.

SYGNIA researchers found an alternate path to the same objective; their write-up is linked in the report.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 17 min read.

What happened, in plain words

Imagine a company has two copies of its staff directory: one on its own computers (on-premises) and one in a cloud service run by Microsoft (Azure AD, now called Entra ID). To keep the two in step, the company runs a piece of Microsoft software called AADConnect on a server inside its own network. Every so often, AADConnect reads user accounts and their passwords from the company's main directory server (the Domain Controller, or DC) and sends a scrambled version of the passwords up to the cloud.

The way AADConnect reads those passwords from the DC is a technique called DCSync. DCSync is normally something an attacker does after breaking into a network: it pulls password hashes (scrambled passwords) straight out of the DC. Because it is so commonly used by attackers, security tools watch for it closely and raise alarms.

The researcher in this report asked a simple question: what if we could get the same password hashes without ever running DCSync ourselves? The answer: let AADConnect do the DCSync for us, as part of its normal job, and quietly steal the passwords at the moment AADConnect handles them.

To do that, the attacker needs two things:

  1. Administrator rights on the AADConnect server itself. Not the all-powerful Domain Admin rights, just local admin on that one machine. That is a much lower bar, and it is often reachable during a penetration test (a paid, authorised break-in test) or a real compromise.
  2. A way to slip malicious code into the AADConnect service while it runs, so that when the service decrypts passwords, the malicious code copies them to a file first.

The researcher found a specific function inside AADConnect that handles decrypted passwords, worked out how to replace it in memory with their own version, and demonstrated that the stolen hashes land in a text file on disk. They reported it to Microsoft's Security Response Center (MSRC) on 15 September 2023. Microsoft replied on 21 September 2023 saying this is not a vulnerability, because the attacker already has administrator control of the server, so no security boundary is crossed.

From the original on nullg0re.com

The rest of this article walks through the same steps the researcher took, explaining every concept from scratch.

Background: what DCSync is and why it is noisy

A Domain Controller is the server in a Windows network that holds the master list of users, computers and their passwords. When you log in to a company laptop, your computer asks the DC to check your password. The DC stores passwords not as plain text but as hashes: long strings of characters produced by a one-way mathematical function. You cannot turn a hash back into the password easily, but attackers can still use hashes to impersonate accounts in many situations, which is why stealing them matters.

DCSync is a feature of Windows domain networks that lets one DC copy account data from another. It exists so that backup domain controllers and similar services can stay in sync. The catch is that the same mechanism can be abused: if an attacker has the right permissions, they can ask a DC to hand over password hashes as if they were another DC. Tools such as Mimikatz automate this.

Because DCSync abuse is so well known, defenders monitor for it. The report links to a primer on DCSync attacks and detection, and notes plainly that DCSync attacks are widely known and widely detected. So an attacker who runs DCSync on a penetration test is likely to set off alarms. The research starts from the question: can we get the same result without ever executing an out-of-band DCSync (that is, without running the attack ourselves from outside the normal flow) and without triggering an alert for that activity?

The idea: let a legitimate service do the dirty work

Some services perform DCSync as part of their standard operating procedures. A Backup Domain Controller, for example, replicates data from the primary DC, so it performs a DCSync to back up all of its data. That is normal and expected.

The researcher looked for another device or service that performs DCSync but that an attacker could reach without Domain Admin privileges. The answer: AADConnect servers.

What AADConnect is

AADConnect (Microsoft Azure Active Directory Connect) is Microsoft software that synchronises user accounts between a company's on-premises Active Directory and Azure AD in the cloud. Think of it as a courier that regularly carries a copy of the staff directory from the office filing cabinet to a cloud storage locker, so that both copies match.

AADConnect servers should follow what is called the Tier model and be treated as Tier 0 assets. The Tier model is a way of classifying systems by how much power they hold: Tier 0 systems are the most sensitive, the ones whose compromise would let an attacker control everything. Domain Controllers are Tier 0. AADConnect servers should be too, because they handle password material for the whole organisation. But not all organisations treat them that way. And even in organisations that do, a penetration test or a real compromise can still end with the attacker holding Local Administrator access to the AADConnect server itself. Local Administrator means full control of that one machine, but not of the domain.

What AADConnect actually does

The report describes AADConnect as containing a large amount of code that performs three actions:

  1. Perform a DCSync against a local DC to obtain user data and credentials
  2. AADConnect rehashes the users NTHashes 1,000 times
  3. AADConnect ships the hashes off to Azure AD for synchronization

Let us unpack those three steps.

Step 1: DCSync against a local DC. AADConnect asks the nearby Domain Controller for user data, including password hashes. This is the same DCSync mechanism attackers abuse, but here it is the software's legitimate job.

Step 2: Rehash the NTHashes 1,000 times. An NT hash (also called an NTLM hash) is the form in which Windows stores a user's password. It is a fixed-length scrambled value. AADConnect does not send the raw NT hash to the cloud. Instead it runs the hash through a hashing function again, 1,000 times, producing a different value. This is a deliberate design choice: the cloud never sees the original hash, only a heavily transformed version. The report links to Microsoft's documentation on how password hash synchronization works for more detail.

Step 3: Ship the hashes to Azure AD. The transformed hashes are sent to Microsoft's cloud service so that users can sign in to cloud services with the same password they use on-premises.

The plan

The researcher's idea was to backdoor AADConnect: modify it so that AADConnect performs the DCSync as normal, but the attacker steals the credentials that AADConnect is supposed to obtain for its normal operations. The service does the noisy work; the attacker quietly takes a copy of the results.

Finding the right place to intervene

Opening the software with DnSpy

DnSpy is a free tool for inspecting and editing .NET programs. .NET is a software framework from Microsoft; programs built with it are compiled into files with extensions like .EXE (executable programs) and .DLL (dynamic link libraries, which are collections of code that programs load and use). Because .NET programs keep a lot of readable structure inside the compiled files, a tool like DnSpy can show you the original class and method names and even decompile the code back into something close to source code.

A class is a named bundle of code and data in object-oriented programming. A method is a single named action inside a class, like a recipe with a name. When a program runs, it calls methods to do things.

The researcher opened all of the EXE and DLL files inside this directory and started hunting for .NET classes and methods that might be of value:

Text
C:\Program Files\Microsoft Azure AD Sync

This is the folder where AADConnect's program files live. The goal was to find a method that could be overwritten, so that the attacker could steal credentials from AADConnect after its DCSync, either before it encrypts the NT hashes or after it decrypts them during the sync. In other words: find the exact point in the code where the passwords are briefly in readable form, and hijack it.

The method that stood out

Nestori Syynimaa helped narrow the list down to Microsoft.Online.PasswordSynchronization.dll, which contained the class PasswordUtility and the method DecryptNtOwfPwdWithIndex. That function is called during step one of the three listed above, the DCSync against the local DC.

In plain terms: inside one particular DLL file, there is a class called PasswordUtility, and inside that class there is a method called DecryptNtOwfPwdWithIndex. The name tells you what it does: it decrypts a password (the NT hash) using an index. This is the moment when the password material is briefly readable, before it gets rehashed and sent to the cloud. That makes it the perfect place to intercept.

From the original on nullg0re.com

The screenshot shows the decompiled class: DnSpy's view of the code inside PasswordUtility, including the method the researcher chose.

Why this method was a good target

The method is a good candidate to overwrite because it has limited .NET functionality and the majority of its functions are native. That needs unpacking.

Native code is code compiled for the specific processor and operating system, rather than running inside the .NET framework. When a .NET method mostly calls native functions, it means the method itself is thin: it does not contain a lot of .NET logic that the attacker would have to reproduce. That means the malicious DLL can stay relatively small, without a large amount of unnecessary code to make the final product functional. A smaller, simpler replacement is easier to write, easier to keep stable, and less likely to crash the service.

Building the malicious DLL

The Patch() method

The first thing needed is a method inside the DLL that loads the method to overwrite in memory, loads the malicious method, and then overwrites the method in memory. The Patch() method below performs that overwrite of the existing code with the malicious code in memory:

From the original on nullg0re.com

What this does, step by step:

  1. Load the method to overwrite in memory. The running AADConnect service already has the legitimate DecryptNtOwfPwdWithIndex method loaded in its memory. The Patch() method locates it there.
  2. Load the malicious method. The attacker's replacement code is also brought into memory.
  3. Overwrite the method in memory. The bytes of the legitimate method are replaced with the bytes of the malicious method, so that any future call to DecryptNtOwfPwdWithIndex actually runs the attacker's code.

This is called in-memory patching. Nothing on disk changes: the original DLL file on the server stays untouched. The change exists only in the running process's memory, which makes it harder to spot with simple file-integrity checks.

The malicious method

The remainder of the DLL is the malicious method itself. It contains all of the code from the legitimate method, so that the service does not crash, plus the functionality to write the stolen DCSync hashes to disk at C:\Windows\Temp\Hashes.txt in the secretsdump.py format:

From the original on nullg0re.com

Two things matter here:

  • It keeps the legitimate behaviour. The replacement method does everything the original did, so AADConnect keeps working normally. If the replacement broke the decryption, the service would crash or misbehave, and the attacker would be noticed. Keeping the original logic means the theft is invisible to the service itself.
  • It adds a copy step. On top of the legitimate work, it writes the decrypted hashes to a file at C:\Windows\Temp\Hashes.txt. The format is the one used by secretsdump.py, a script from the Impacket toolkit that extracts and displays credential material. Using that format means the stolen file can be read directly by existing tools, with no conversion needed.

Carrying out the attack

The precondition

The attack requires the adversary or tester to become a Local Admin of the AADConnect server. That is the starting point: without local administrator rights on that machine, you cannot inject code into its processes. The point of the research is that this position is reachable without Domain Admin privileges.

Step 1: Find the process

The next step is to inject the malicious DLL into the miiserver.exe process, which is the service executable of the AADConnect service. A process is a running instance of a program: the EXE file on disk is the recipe, the process is the meal being cooked. miiserver.exe is the program file that runs the AADConnect sync service, so it is the process that will call DecryptNtOwfPwdWithIndex.

The PID (process ID) of miiserver.exe has to be identified first. Task Manager, Process Explorer, Process Hacker and even the command line are all suitable options. From CMD (the Windows command prompt):

Text
tasklist | findstr miiserver.exe

Line by line:

  • tasklist is a built-in Windows command that lists all running processes, with their names and PIDs.
  • | is the pipe symbol. It takes the output of the command on its left and feeds it as input to the command on its right.
  • findstr miiserver.exe searches that input for lines containing the text miiserver.exe and prints only those lines.

So the whole command means: list every running process, then show only the line for miiserver.exe. The PID in that line is what the attacker needs next.

Step 2: Inject the DLL

With the PID known, the adversary injects the malicious DLL:

From the original on nullg0re.com

DLL injection means forcing a running process to load a DLL that it did not originally intend to load. Once the DLL is inside the process, its code runs with the same privileges as the process itself. Because miiserver.exe is the AADConnect service, the injected code inherits its access to the decryption routines and the session key.

Step 3: Trigger the sync

With the DLL injected into the miiserver.exe process, the next step is to log into Azure AD as any user and reset a compromised hybrid user's password. That kicks off the synchronization between on-premises and Azure AD.

A hybrid user is an account that exists both on-premises and in the cloud, linked together by AADConnect. Resetting that user's password in Azure AD is a normal administrative action. But it has a side effect: it tells AADConnect that something changed, so AADConnect runs its synchronisation cycle. That cycle includes the DCSync against the local DC and the decryption of the user's credentials.

The malicious code then waits until miiserver.exe needs to decrypt the user's credentials with the AADConnect Session Key, and writes those credentials to disk at C:\Windows\Temp\Hashes.txt.

The AADConnect Session Key is a cryptographic key that AADConnect uses to encrypt and decrypt the credential material it handles. When the service needs the plain NT hash, it decrypts it with this key. The malicious method sits exactly at that moment, so it sees the decrypted value before it is rehashed and sent to the cloud.

From the original on nullg0re.com

Step 4: Exfiltrate

The adversary then only needs to exfiltrate that file off the disk. Exfiltration means copying data out of the environment, for example by uploading it somewhere or transferring it over the network. At that point they have performed a DCSync without ever actually executing an out-of-band DCSync.

From the original on nullg0re.com

That is the whole trick: the DCSync was performed by AADConnect itself, as part of its normal operation, without triggering the traditional alarms for DCSync activity. The attacker simply collected the output.

Why it works: the root cause

The design of AADConnect means the service legitimately decrypts NT hashes with the AADConnect Session Key during its normal synchronisation cycle. Overwriting DecryptNtOwfPwdWithIndex in Microsoft.Online.PasswordSynchronization.dll inside the running miiserver.exe process lets an attacker who already holds Local Administrator rights capture those credentials at the moment they are decrypted, before they are rehashed and shipped to Azure AD. The method was chosen partly because its limited .NET surface keeps the replacement small.

Existing defences did not stop this because, as MSRC assessed, no security boundary is crossed: the attacker already has administrative control of the AADConnect server. In security terms, a security boundary is a line that the vendor promises attackers cannot cross. If you already have administrator rights on a machine, you are on the trusted side of that machine's boundary, so reading data the machine can read is not considered a boundary violation. The report notes that AADConnect servers should be treated as Tier 0 assets, and that even organisations that do so can lose Local Administrator access to them during an engagement.

What an attacker gets: impact

An attacker with Local Administrator access to an AADConnect server can obtain the credential material that AADConnect collects from the local DC, written to disk in secretsdump.py format, without executing a DCSync themselves and therefore without triggering the traditional alarms associated with that activity. The trigger is a password reset of a compromised hybrid user performed in Azure AD by any user, which starts the synchronisation. The report frames this as a way to perform a DCSync quietly during a pentest; it does not assign a severity or a CVSS score.

Was it fixed?

No fix is described. The research was submitted to MSRC on 15 September 2023, with the expectation that Microsoft would call it "by design" or classify it as "Not a vulnerability" because no security boundary is crossed. MSRC responded on 21 September 2023 agreeing with that assessment.

From the original on nullg0re.com

The report lists variants worth testing:

  • Look for other services that perform DCSync as part of normal operation, such as replication or backup components, and check whether a method they call during that operation can be overwritten in memory. A positive result is a replacement method that captures credentials without crashing the service.
  • Enumerate other .NET methods in the AADConnect binaries under C:\Program Files\Microsoft Azure AD Sync that handle credentials around the sync cycle. A positive result is a method with limited .NET surface whose overwrite yields usable hashes.
  • Check whether the same in-memory patching approach works against other processes that decrypt credentials with a session key. A positive result is credentials written to disk in a parseable format after a normal operation triggers decryption.
  • Review whether AADConnect servers in the environment are reachable with Local Administrator rights from a standard foothold. A positive result is administrative access to the server without Domain Admin privileges.

Related research

Researchers at SYGNIA found an alternate path to achieve the same objective. They have an incredibly detailed write-up that is linked in the report.

Glossary

  • AADConnect: Microsoft software that synchronises user accounts and password hashes between an on-premises Active Directory and Azure AD (now Entra ID).
  • AADConnect Session Key: the cryptographic key AADConnect uses to encrypt and decrypt the credential material it handles during synchronisation.
  • Active Directory: Microsoft's directory service that stores users, computers and their credentials on a Windows network.
  • Azure AD: Microsoft's cloud identity service (now called Entra ID) that holds user accounts for cloud services.
  • Backdoor: a deliberate modification that lets an attacker access or steal data through a legitimate component without being noticed.
  • Backup Domain Controller: a secondary domain controller that replicates data from the primary DC, performing DCSync as part of normal operation.
  • Class: a named bundle of code and data in object-oriented programming.
  • CMD: the Windows command prompt, a text interface for running commands.
  • CVSS: Common Vulnerability Scoring System, a standard way of scoring the severity of a vulnerability.
  • DC (Domain Controller): the server that holds the master list of users, computers and password hashes in a Windows domain.
  • DCSync: a Windows mechanism that lets one domain controller copy account data from another; also abused by attackers to extract password hashes.
  • DLL (Dynamic Link Library): a file containing code that programs load and use at runtime.
  • DLL injection: forcing a running process to load a DLL it did not intend to load, so the DLL's code runs inside that process.
  • DnSpy: a free tool for inspecting, decompiling and editing .NET programs.
  • Domain Admin: the highest-privilege account type in a Windows domain, able to control all domain-joined machines.
  • .NET: Microsoft's software framework for building and running applications, with readable structure inside compiled files.
  • EXE: an executable program file.
  • Exfiltration: copying data out of an environment, for example by uploading or transferring it over the network.
  • Hash: a fixed-length scrambled value produced by a one-way function; used to store passwords without keeping them in plain text.
  • Hybrid user: an account that exists both on-premises and in the cloud, linked by AADConnect.
  • Impacket: a collection of Python tools for working with network protocols, including secretsdump.py.
  • In-memory patching: replacing the code of a running process in memory, leaving the file on disk unchanged.
  • Local Administrator: an account with full control of a single machine, but not of the domain.
  • Method: a single named action inside a class.
  • miiserver.exe: the service executable of the AADConnect service.
  • MSRC: Microsoft Security Response Center, Microsoft's team that receives and assesses vulnerability reports.
  • Native code: code compiled for the specific processor and operating system, rather than running inside the .NET framework.
  • NT hash (NTLM hash): the form in which Windows stores a user's password.
  • Penetration test (pentest): an authorised simulated attack on a network to find weaknesses.
  • PID (process ID): the number the operating system assigns to a running process.
  • Pipe (|): a symbol that feeds the output of one command into another command.
  • Process: a running instance of a program.
  • secretsdump.py: a script from the Impacket toolkit that extracts and displays credential material; also a file format for such output.
  • Security boundary: a line the vendor promises attackers cannot cross; crossing it is what makes something a vulnerability in the vendor's view.
  • Tier model: a way of classifying systems by how much power they hold, with Tier 0 being the most sensitive.
  • Tier 0 asset: a system whose compromise would let an attacker control everything, such as a Domain Controller or an AADConnect server.

More by Anthony Larcher-Gore

View all

1 more disclosed report, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.