KernelMode rootkit技术研究或教育的POC。目前专注于Windows OS。所有模块仅支持64位OS。
NOTE一些模块使用ExallocatePool2 API分配内核池内存。 ExallocatePool2 API不支持2004年Windows 10版本的OSS。如果要测试旧OS中的模块,请用ExallocatePool2 API替换ExallocatePoolWithTag API。
启用测试签名驱动程序的加载
windbg--cdb-或ntsd'setting内核模式调试
每个选项都需要禁用安全启动。
模块名称描述blocemageload pocs以阻止驱动程序加载带有加载图像通知回调方法。 BlockNewProc Pocs使用通知回调方法阻止新过程。 createToken POC可以使用ZwcreateToken()API获得完整的特权系统令牌。 DropProcaccess Pocs drop Process ander ander oppect访问使用对象通知回调。使用DKOM方法获得全部特权。 GetProchandle POC从内核模式获取完整的访问过程。用核APC注入方法进行DLL注射的注射元素POC。使用DKOM方法隐藏加载的内核驱动程序的Modhide POC。使用DKOM方法隐藏过程的Prochide POC。 procontect POC操纵受保护的过程。 QueryModule POC执行检索内核驱动程序的加载地址信息。从内核模具中窃取的POC可执行令牌钢。
通知回调文件系统迷你网络迷你滤波器
反向- a href='https:=''title='obfuscation'Obfuscation/dp/1502489309'bruce dang,Alexandre Gazet,Elias Bachaalany和SébastienJosse,SébastienJosse,Practical Reverse Engineering: x86, x64, ARM, Windows Kernel, Reversing Tools, and Obfuscation(Wiley Publish,2014年)
Greg Hoglund和Jamie Butler,Rootkits : Subverting the Windows Kernel(Addison-Wesley Professional,2005年)
逃避者/DP/144962636X'Bill Blunden,The Rootkit Arsenal: Escape and Evasion in the Dark Corners of the System, 2nd Edition(Jones Bartlett Learning,2012年)
Pavel Yosifovich,Mark E. Russianovich,Alex Ionescu和David A. Solomon,Windows Internals, Part 1: System architecture, processes, threads, memory management, and more, 7th Edition(Microsoft Press,2017年)
Andrea Allievi,Mark E. Russianovich,Alex Ionescu和David A. Solomon,Windows Internals, Part 2, 7th Edition(Microsoft Press,2021)
Matt Hand,Evading EDR - The Definitive Guide to Defeating Endpoint Detection Systems(无淀粉出版社,2023年)
NOTE一些模块使用ExallocatePool2 API分配内核池内存。 ExallocatePool2 API不支持2004年Windows 10版本的OSS。如果要测试旧OS中的模块,请用ExallocatePool2 API替换ExallocatePoolWithTag API。
Environment
在Windows 11 x64中测试了所有模块。要测试驱动程序,以下选项可用于测试机器:启用测试签名驱动程序的加载
windbg--cdb-或ntsd'setting内核模式调试
每个选项都需要禁用安全启动。
Modules
在每个项目目录中的readme.md中给出了详细信息。所有模块均在Windows 11中进行了测试。模块名称描述blocemageload pocs以阻止驱动程序加载带有加载图像通知回调方法。 BlockNewProc Pocs使用通知回调方法阻止新过程。 createToken POC可以使用ZwcreateToken()API获得完整的特权系统令牌。 DropProcaccess Pocs drop Process ander ander oppect访问使用对象通知回调。使用DKOM方法获得全部特权。 GetProchandle POC从内核模式获取完整的访问过程。用核APC注入方法进行DLL注射的注射元素POC。使用DKOM方法隐藏加载的内核驱动程序的Modhide POC。使用DKOM方法隐藏过程的Prochide POC。 procontect POC操纵受保护的过程。 QueryModule POC执行检索内核驱动程序的加载地址信息。从内核模具中窃取的POC可执行令牌钢。
TODO
更多的POC,特别是关于以下内容的添加:通知回调文件系统迷你网络迷你滤波器
Recommended References
Pavel Yosifovich,Windows Kernel Programming, 2nd Edition(独立发布,2023年)反向- a href='https:=''title='obfuscation'Obfuscation/dp/1502489309'bruce dang,Alexandre Gazet,Elias Bachaalany和SébastienJosse,SébastienJosse,Practical Reverse Engineering: x86, x64, ARM, Windows Kernel, Reversing Tools, and Obfuscation(Wiley Publish,2014年)
Greg Hoglund和Jamie Butler,Rootkits : Subverting the Windows Kernel(Addison-Wesley Professional,2005年)
逃避者/DP/144962636X'Bill Blunden,The Rootkit Arsenal: Escape and Evasion in the Dark Corners of the System, 2nd Edition(Jones Bartlett Learning,2012年)
Pavel Yosifovich,Mark E. Russianovich,Alex Ionescu和David A. Solomon,Windows Internals, Part 1: System architecture, processes, threads, memory management, and more, 7th Edition(Microsoft Press,2017年)
Andrea Allievi,Mark E. Russianovich,Alex Ionescu和David A. Solomon,Windows Internals, Part 2, 7th Edition(Microsoft Press,2021)
Matt Hand,Evading EDR - The Definitive Guide to Defeating Endpoint Detection Systems(无淀粉出版社,2023年)