您的位置:首页 > 编程语言 > Go语言

Windows NT WinLogon Notify

2017-06-10 23:26 288 查看
参考文章:http://www.programlife.net/windows-nt-winlogon-notify.html

今天试了下 WinLogon Notify,怎么都不成功,原来是WIN7不支持该功能了?


In Windows Vista and later, Winlogon notification packages are no
longer supported. Winlogon notification packages are discussed in detail in the next section. After upgrading systems to Windows Vista, Winlogon will not load Winlogon notification packages. Organizations that are using Winlogon notification packages must
either remove the functionality or create a new solution when deploying Windows Vista and later.

https://technet.microsoft.com/zh-cn/library/cc721961(v=ws.10).aspx

贴下原文:

在NT系列Windows操作系统中,恶意软件可以通过关联Winlogon特定的事件来使自身被启动,如Lock,Logoff,Logon,Shutdown,StartScreenSaver,StartShell,Startup,StopScreenSaver,Unlock等,这甚至能够使得恶意软件在安全模式下被加载。WinLogon的通知事件在注册表的位置是:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify

当WinLogon.exe产生一个事件通知的时候,Windows会检查注册表里面指定的DLL并调用DLL指定的导出函数。示例(当屏幕锁定时调用WinLogonDemo.dll导出的LockFun函数):

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\Test]
@=""
"DLLName"="WinLogonDemo.dll"
"Asynchronous"=dword:00000001
"Impersonate"=dword:00000001
"Lock"="LockFun"

从Windows Vista开始,这项特性被取消了。可以通过注册一个服务来监听相应的事件(部分事件不支持),参见Using Service Control Manager (SCM) Notifications
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息