cmdkey:通用凭证目标类型之间有什么区别

cmdkey: what's the difference between generic credential target types

我重新发现了cmdkey.exe,我以前在Win2K域环境下经常用到。从那时起我就退休了,所以域凭据功能可能不再有用。不过,似乎 Windows 10/OneDrive 可能 会给我一些类似的便利功能,也许没有 Kerberos 的安全性。我试图记住 [=11] 列出的 TypesTargetsUsers 有哪些不同=]意思是

几个月前我买了一台新的开发机器,现在 cmdkey /list 向我显示了很多存储的凭据。 (太糟糕了,上面没有显示日期。)是否有文档可以帮助我解码包含的各种“目标”字符串?

例如,这里列出了一些目标类型(已编辑 PII):

LegacyGeneric:target=git:https://github.com
LegacyGeneric:target=git:https://<redacted>.visualstudio.com
LegacyGeneric:target=GitHub - https://api.github.com/<redacted>
LegacyGeneric:target=GoPro_Desktop_App
LegacyGeneric:target=GoPro_Entitlement_Credentials
LegacyGeneric:target=https://index.docker.io/v1/
LegacyGeneric:target=MicrosoftAccount:user=<redacted>@hotmail.com
LegacyGeneric:target=MSIX-Skype for Desktop/live:<redacted>
LegacyGeneric:target=OneDrive Cached Credential
LegacyGeneric:target=OneDrive Cached Credential Business - Business1
LegacyGeneric:target=vscodevscode.github-authentication/github.auth
LegacyGeneric:target=WindowsLive:(token):name=<redacted>@hotmail.com;serviceuri=scope=service::user.auth.xboxlive.com::mbi_ssl
LegacyGeneric:target=www.bing.com
WindowsLive:target=virtualapp/didlogical

因为我从来没有手动输入过这些,一些应用程序(例如 GoPro_Desktop_App)肯定有。我想知道这些应用程序是否可以访问其他应用程序创建的凭据(例如 github)?

cmdkey 工具仅管理凭据管理器中的凭据。如果您愿意,可以通过 control /name Microsoft.CredentialManager 查看 UI。

有几种类型。 LegacyGeneric 只是对任何类型的非 Windows-Integrated-Auth-specific 凭证的包罗万象,这意味着 Windows 不能用它做任何特殊的事情。这与 CRED_TYPE_DOMAIN_* 凭据形成对比,其中 Windows 知道它们是特殊的并且可以做特殊的事情,例如将它们用于 Kerberos,或使用 Credential Guard 保护它们。所有 the types are documented. For completeness, there's actually also a third type that is sort of the logical successor to credman, which is the PasswordVault 个 API。它在幕后使用相同的功能,但与 win32 API 分开。

Target 表示凭证的用途或用途。在一般情况下,它是一个任意值。在域的情况下,它是一个与主机名或领域相匹配的服务标识符,表示 'when connecting to this service you can use this cred'.

因此不可能说出每个目标代表什么。他们中的大多数在名字上都相当明显。

CRED_TYPE_GENERIC = 1 (0x1)

凭证是通用凭证。任何特定的身份验证包都不会使用该凭据。凭据将被安全存储,但没有其他重要特征。

CRED_TYPE_DOMAIN_PASSWORD = 2 (0x2)

该凭据为密码凭据,为微软认证包所特有。连接到指定目标时,NTLM、Kerberos 和协商身份验证包将自动使用此凭据。

CRED_TYPE_DOMAIN_CERTIFICATE = 3 (0x3)

该凭据为证书凭据,是微软认证包专用的。 Kerberos、Negotiate 和 Schannel 身份验证包在连接到指定目标时自动使用此凭据。

CRED_TYPE_DOMAIN_VISIBLE_PASSWORD = 4 (0x4)

不再支持此值。 Windows Server 2003 和 Windows XP:凭据是密码凭据,特定于 Microsoft 的身份验证包。 Passport 身份验证包将在连接到指定目标时自动使用此凭据。

将来会定义其他值。应编写应用程序以允许他们不理解的凭据类型。

CRED_TYPE_GENERIC_CERTIFICATE = 5 (0x5)

凭证是证书凭证,是通用的认证包。 Windows Server 2008、Windows Vista、Windows Server 2003 和 Windows XP:不支持此值。

CRED_TYPE_DOMAIN_EXTENDED = 6 (0x6)

扩展协商包支持凭据。 Windows Server 2008、Windows Vista、Windows Server 2003 和 Windows XP:不支持此值。