英文:
Does the credential manager have a limit for the number of credentials stored?
问题
我正在使用 CredWriteW
来存储一些凭据,并在用户会话中保持持久性。由于我们将不得不存储许多不同帐户的凭据,我想知道:凭据管理器中可以存储多少个凭据是否有某种限制?
我找到了这篇文档 Credential limit per app | Microsoft Learn,但不清楚它是否仅适用于RDP,还是适用于凭据管理器一般,或者是其他什么情况。我尝试搜索这个限制,但似乎一切都指回了同一篇文档。
以下是代码供参考:
CREDENTIAL credential = {0};
credential.Type = CRED_TYPE_DOMAIN_PASSWORD;
credential.TargetName = account;
credential.CredentialBlobSize = credentialBlobSize;
credential.CredentialBlob = (LPBYTE)password;
credential.Persist = CRED_PERSIST_SESSION;
credential.UserName = (LPWSTR)userName;
// Write the credential in the user space
if (!CredWriteW(&credential, 0))
{
// ...
}
英文:
I'm using CredWriteW
to store some credentials and persisting through the user session. As we will have to store the credentials for lots of different accounts, I'm wondering: is there some kind of limit as to how many credentials can be stored on the credential manager?
I found this doc Credential limit per app | Microsoft Learn , but it's not clear whether it applies only to RDP, or to Credential Manager in general, or to something else. I've tried searching for this limit, but everything seems to point back to that same doc.
This is the code for reference:
CREDENTIAL credential = {0};
credential.Type = CRED_TYPE_DOMAIN_PASSWORD;
credential.TargetName = account;
credential.CredentialBlobSize = credentialBlobSize;
credential.CredentialBlob = (LPBYTE)password;
credential.Persist = CRED_PERSIST_SESSION;
credential.UserName = (LPWSTR)userName;
// Write the credential in the user space
if (!CredWriteW(&credential, 0))
{
// ...
}
答案1
得分: 1
这个API间接提及/在你的RDP/远程桌面链接中使用的称为“Vault”,它不是与CredWrite
相同的API。
Vault是一个未记录的API。在这里查看Stack Overflow上的示例:https://stackoverflow.com/questions/37523752/reverse-engineering-the-function-arguments-of-vaultremoveitem,或者在GitHub的mimikatz上查看。
CredWrite
没有记录任何合理的限制,以下是我刚刚使用它创建的100个凭据:
英文:
This API indirectly mentioned/used in your RDP/Remote Deskop link is called "Vault", it's not the same API that the one used by CredWrite
.
Vault is an undocumented API. See here for example on SO: https://stackoverflow.com/questions/37523752/reverse-engineering-the-function-arguments-of-vaultremoveitem or here on github's mimikatz
CredWrite
is not documented to have any reasonable limit, here are 100 credentials I've just created with it:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论