密码信息
我想使用 Visual C++ 以编程方式获取存储在我的计算机中的各种用户帐户密码。 有没有 API 可以帮助我做到这一点?
I want to get the various user account passwords which are stored in my computer programatically using Visual C++. Are there any APIs to help me do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
无法通过 Win32 API 检索 Windows 密码或大多数其他程序的密码。
对于 Windows 密码,您通常必须要求用户输入用户名/密码并进行验证,这一切都通过使用 LogonUser 进行。
对于其他程序,它们通常存储在由主机应用程序加密的磁盘上。
There is no way to retrieve windows passwords nor passwords to most other programs via Win32 APIs.
For Windows passwords you typically have to ask the user to enter their username/password and verify it, all by using LogonUser.
For other programs they are usually stored on disk encrypted by the host application.
这在 Windows 上是绝对不允许的。
考虑让任何给定程序获取密码的后果。 这意味着像 Solitaire 这样的程序将能够获取您的密码并以多种邪恶的方式使用它。 更糟糕的是,该程序可以使用该密码访问其他机器中的资源。
简而言之,它将把安全性抛到九霄云外
This is most definitely not allowed on Windows.
Consider the consequences of letting any given program obtain passwords. That would mean that programs like Solitaire would be able to get your password and use it in any number of nefarious ways. Worse, the program could use the password to access other machines in resources.
In short, it would throw security out the window
不,那将是一个安全漏洞。 请参阅本文。
No. That would be a security hole. See this article.
这取决于您想要获取什么密码?
有些密码无法找回,例如 Windows 登录密码。 其他一些密码存储在磁盘或注册表中的某个位置(纯密码或加密密码),具体取决于应用程序存储它们的方式。
例如,Win32 API CredEnumerate 可以为您提供某些应用程序的用户凭据(登录名和密码)(Internet Explorer 密码等)。
It depends what passwords are you trying to get?
Some passwords can not be retrieved, like the Windows login passwords. Some other password are stored (plain or encrypted) somewhere in the disk or registry, depending on how the application stores them.
The Win32 API CredEnumerate, for example, can give you the user credentials (login and password) for some of the applications (Internet explorer passwords, ... etc).
您只能恢复哈希密码,而不能恢复密码本身。
You can only recover the hashed password, not the password itself.
我对此没有个人经验,但有人告诉我,有一些实用程序(通常在 .ru 网站上找到;))可以为您完成此类工作。 看到这种情况发生是令人震惊的,让你变得偏执。 然而,我不能建议使用特定的工具来做到这一点,但我想反对所有那些一直说这是不可能的人。
I have no personal experience with this but I was once told that there are utilities out there (usually found on .ru sites ;)) that will do this sort of job for you. And that it's appalling to see how this happens, makes you paranoid. I can't however suggest a particular tool for doing this, but would like to oppose to all those that keep saying it's not possible.