|
入手阶段,先收集了两个driver的loader的代码,两者都是通过从ntdll.dll的导出的内核函数进行动态的驱动加载,这两个方式都是通常比较常见的方式.我这里对收集到的代码进行了整理,分离,修改,并在我机器WinXP SP2+VS 2005下编译测试.
ps: 更常见的通过SCM加载驱动的代码就不表了,其实最后就是调用ZwLoadDriver. 最后附上Windows NT 2000 Native API Reference里的几段相关的文字: SystemLoadAndCallImage Unlike ZwLoadDriver,which loads the module in the context of the system process,ZwSetSystemInformation loads the module and invokes the entry point in the context of the current process. ZwLoadDriver SeLoadDriverPrivilege is required to load a driver. StartService directs the Service Control Manager process to The Win32 function execute this function on behalf of the caller. ”riverServiceName of the form The Service Control Managerprocess provides a ° /Registry/Machine/System/8urrent8ontrolSet/Services/Tcpip.° 程序代码如下: ZwSetSystemInformation方式,代码修改自 http://www.xfocus.net/articles/200309/619.html
复制内容到剪贴板
代码:#include <windows.h>
|
通过ZwSetSystemInformation和ZwLoadDriver加载驱动
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
1.5k累计阅读
1.6k平均单平台
已同步平台
CSDN
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄25年




被折叠的 条评论
为什么被折叠?



