微软已知的DLL
HKML\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs
KnownDLL 的用途是什么?(为了更快地加载某些 Dll?)
如果我有管理员令牌,我可以控制注册表值。
难道就没有安全漏洞吗?
微软为何支持该功能?
HKML\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs
What is the purpose of the KnownDLLs?(To load some Dlls faster?)
If I have a admin's token, I can control the registry values.
Isn't there any security hole?
Why did Microsoft support the feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
KnownDLL 唯一做的就是防止从应用程序文件夹中加载隐式加载的 DLL。
出于安全原因,“KnownDll”唯一有效的文件夹是 c:\Windows\System32(或本地化的等效文件夹),并且此文件夹在搜索列表中位于进程文件夹之后的第二个文件夹。
从本质上讲,它可以防止从应用程序文件夹加载系统 dll 的恶意副本(例如 kernel32.dll)。
它不会阻止应用程序使用完全限定路径加载 dll。它不会停止对路径的长时间搜索或在路径中发现系统 dll - 无论如何,总是在这些位置之前搜索 system32。
The only thing KnownDLLs does is prevent implicitly loaded DLLs being loaded from the applications folder.
For security reasons, the only folder that a "KnownDll" is valid in is c:\Windows\System32 (or your localized equivalent) - and this folder is 2nd on the search list after the folder of the process.
In essence, it prevents rogue copies of system dll's - such as kernel32.dll - being loaded from an applications folder.
It doesn't stop an an application loading a dll using a fully qualified path. It doesn't stop a lengthy search of the path or the discovery of system dlls in the path - system32 is always searched before those locations anyway.
这允许忽略正常的 DLL 搜索路径,并加载指定的版本。
虽然本身不是一个安全漏洞(因为您已经需要拥有管理员权限才能更改该值),但可以通过恶意 DLL 重定向调用。
这是为了提高性能而添加的功能,因为无需扫描多个可能较大的目录来查找 DLL。
This allows the normal DLL search path to be ignored, and load the specified version.
Whilst not a security hole per se (as you already need to be have admin rights to change the value), it would be possible to redirect calls to go via a rogue DLL.
It was a feature added to improve performance, as there is no need to scan several potentially large directories to find the DLL.
如果它依赖于您的管理员身份,那么这不是一个安全漏洞。如果您已经是管理员,则可以通过更简单的方法将恶意 DLL 引入系统(例如,将它们复制到操作系统顶部)。
这是 Raymond Chen 所说的 这个气密舱口的另一侧。
It's not a security hole if it relies on you being admin. If you're already admin, there are easier ways to introduce rogue DLLs into the system (for instance, copying them over the top of the OS).
This is an example of what Raymond Chen calls being on the other side of this airtight hatchway.
微软添加该功能是为了阻止安全漏洞。
通过将
win32k.sys
声明为已知 dll,流氓恶意软件无法将其自己的win32k.sys
放入您的应用程序文件夹中,并且诱骗您运行攻击者的代码。所有已知的 dll 只会从其正确的、受保护的位置加载。
Microsoft added the feature to stop a security hole.
By declaring
win32k.sys
as a Known dll, a piece of rogue malware can't drop it's ownwin32k.sys
in your application folder and trick you into running attacker's code.All known dlls will only be loaded from their correct, protected, location.