1

I developed a custom credential provider by using C# and it works both unlock and logon scenario locally. When its CREDUI scenario, i can logon or unlock remote computer with my local Credential provider.

My filter is registered in regedit. Same DLL but different classes.

  1. What I cannot to do is, catch logon or unlock scenario on remote computer with my custom credential provider. I implemented filter interface. UpdateRemoteCredential not working. What could i missing? How can I say "use this credential provider while logging in" in server machine. Thanks.
22
  • your credential provider must be on target comp, not on comp from where rdp connect Commented May 16, 2023 at 12:47
  • My credential provider (same provider) is installed on the remote machine. But i always need to logon twice because NLA is enabled. I want to enter my credentials in client machine CREDUI then catch credentials on remote machine and go on my operation. Commented May 16, 2023 at 12:49
  • if you correct register filter on target comp, UpdateRemoteCredential will be called (if client pass some credentials). NLA not affect cred providers. not need logon twice Commented May 16, 2023 at 12:52
  • What do you mean by "correct"? Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Provider Filters and Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers these keys right? Commented May 16, 2023 at 12:58
  • 1
    here need look under debugger on target system, not on your code Commented May 16, 2023 at 13:07

1 Answer 1

2

Finally I did it and covered all scenarios both interactive and remote logon. Firstly, UpdateRemoteCredential is firing on target system (i didn't know that). Credential Filter must be installed correctly on target machine. After UpdateRemoteCredential fires, I needed to hold serialized credentials in SetSerialization method (ICredentialProvider implementation). After that, in ICredentialProviderCredential2 implementation, SetSelected method fires. In SetSelected method, I set pbAutoLogon to 1 (because i have credentials). After that, GetSerialization method is fired and its done.

Method order in RDP connections;

  • UpdateRemoteCredential (get serialized credentials)
  • SetSerialization (hold serialized credentials in implementation)
  • SetSelected (set auto logon property to 1)
  • GetSerialization (give serialized credentials to system)
Sign up to request clarification or add additional context in comments.

1 Comment

more correct in GetCredentialCount set pbAutoLogonWithDefault to true and return pdwDefault

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.