vxk的rootkit 技术小结

本文深入探讨了根套件的各种隐藏技术,包括API钩子、SSDT钩子、IRP钩子等,并讨论了如何利用这些技术进行自我隐藏及权限提升。此外,还介绍了网络层面的支持方式,如TDI和NDIS的使用方法。

by vxk

My Root Kit Note

0. What the Root kit Real Mean For?

Root Kit is a kind of tools to hide itself or other files or process from normal users' eyes or take privileges for whom could control it...

1. Live With Hooks: Hook and Anti-Hook

To Hide Some Files or Process or Even Rebuild a Root kit’s Network may use hooking.

1.1 API HOOK

It's a long time this kind of hooking existed working with IAT or EAT or some time maybe inline. But it is very easy to defeat them, only to read and map a file in correct way then do right relocations, And then you would get real API address or the right code of API’s entry point.

1.2 SSDT HOOK

Sometimes when the API hook (base on pe-file structure) failed to defeat the hook-check, and some apiz wanted is non-exported, I got to SSDT way to hook, it is also a very long time since it turned to normal. And it is easy to find and fix too. One who can only read ntos kernel file and remap the SSDT could remove or check this kind of hooks.

1.3 IRP HOOK

PDriverObject->MajorFunction [MajorFunction] =XX XX XX XX

ZZ=MajorFunction*4+0x38

C7 46 ZZ [<80] XX XX XX XX mov dword ptr [esi+50h], offset _FsdSetInformation@8

C7 86 ZZ[>=80] XX XX XX XX

C7 43 ZZ [<80] XX XX XX XX mov dword ptr [ebx+50h], offset _FsdSetInformation@8

C7 83 ZZ[>=80] XX XX XX XX

Whatever FSD, TDI or other devices and drivers, they have the same thing IRP-Dispatch-Routine, which we hook only by rewrite an address in driver object structure, And it is more powerful then filter-driver(if a root kit is a filter driver it will be easy to find out. Even easily to bypass...)But still some one can read driver files ,and from the DrvierEntry point to get the real irps' VA (just taking a look at icesword by pjf),to make every one understand how to get real irps' VA,I give some details follow:

1.4 Interrupt Hook

For an example, a key logger root kit hook keyboard interrupts. Many powerful root kits to make themselves more useful use interrupts hook. It is hard to find out an interrupt hook on the range out of KiTrapXX's range (910920 put a way to read KiTrapXX’s Address from file...), and also hard to recover. But there is a will there is a way... (I do not know how to get a real address of an ISR which is not set by ntos kernel. But keyboard driver can tell me the real keyboard interrupt, it is hardcode searching...not good way)

1.5 NDIS Open Block Hook

A powerful root kit must support network in kernel mode. For this target, it may use TDI or NDISbut TDI is easy to find or be defeated by anti-spy, so NDIS may be a good choice. Some root kit use IpFltDrv to reuse sock and do its own networkhowever, it is not nice ,many anti-spy can find the IpFltDrv changing, and IpFltDrv can only register one, it would be registered by others. As far as I see, the root kit uty_rk@winXp use protocols open block hooks to own the network. But actually it would crash when it were running with some anti-spy. So there is another way on Miniport layerit is to hook NDISWAN Miniport Open Block, but there is a problem in how to get the list of NDIS miniport , see the NDIS IM Driver register course ,we know NdisIMRegisterLayeredMiniport can return a verb which is the a pointer to the list. And we can just register a fake IM to get the list pointer and then we could hook them just like hook protocol open blocks. To find this kind of hook must using hardcode search to find some VA from ndis.sys and tcpip.sys and ndiswan.sys.

1.6 Non-exported Inline Hook

Anti-spy may use inline hook to hook some important non-exported kernel mode calls and makes root kit difficult to do its work. And root kit can also use inline hook to bypass some checks. To find or recover an inline hook must use remap files and redo relocations, then compare the mappings and memory just like SVV. The recover of an inline hook might turn to a BSOD in the end.

2. Kernel Network: TDI and NDISBlue or Goal 

Every useful root kit must support networking with kernel socket.

2.1 TDI

       Most of free versions of root kit are using TDI Client Technology to make a kernel socket. But with the time changing, it is not useful today.

2.2 NDIS

       hug_ntrootkit4.0@winNt/2k used registering NDIS Protocol to do its networking; uty_rk@winXp used NDIS Protocol Open Block Hooks to do the same thing. EVA_rk@winNt (no public version) used NDIS Miniport Open Block Hooks, and iceberg wrote a full-version tcp sock based on NDIS Miniport Open Block Hooks. But in my project bdrk and winss (no public version and still in construction), NDIS Miniport Open Block Hooks sit many blue screens…

3. KDOM: Fast to Die or A Good Way ?

       Fu_rk@winNT brings a new way to hide process and get privileges and do some things only by modifying some structures in system memory.

      Every coin has two faces, KDOM can do nearly every things but the target which will be modified is hard to get the right positions. And hardcode the offset or address may cause the system crashed. To find the KDOM modified is easy, only to use another link list or another database head…

 

4. Final

       I am Chinese, and my English is very poor.

       Contact me:

                            cvcvxk@gmail.com

                           

参考资源链接:[Python鸢尾花分类BP神经网络项目教程](https://wenku.youkuaiyun.com/doc/ogxfp55vxk?utm_source=wenku_answer2doc_content) 在机器学习和数据挖掘中,使用BP神经网络对鸢尾花数据集进行分类是一种经典的应用案例。为了帮助你深入理解BP神经网络的实现过程,我推荐查看这份资料:《Python鸢尾花分类BP神经网络项目教程》。这份资源能够为你提供从理论到实践的完整指导。 首先,我们需要对BP神经网络有一个基本的理解。BP神经网络是一种多层前馈神经网络,通过反向传播算法进行训练。它包括输入层、隐藏层(一个或多个)和输出层。在处理鸢尾花分类问题时,我们将使用BP算法来最小化预测误差,并通过调整权重和偏置来训练网络。 以下是使用Python实现BP神经网络的基本步骤和示例代码: 1. 导入必要的库,如numpy进行数学运算,matplotlib进行绘图等。 2. 加载鸢尾花数据集,并对数据进行预处理,包括归一化处理和划分训练集与测试集。 3. 定义BP神经网络的结构,包括输入层、隐藏层和输出层的神经元数量。 4. 初始化网络权重和偏置。 5. 实现前向传播过程,计算每个神经元的加权输入和输出。 6. 实现误差计算,根据实际输出和期望输出计算总误差。 7. 实现反向传播过程,根据误差调整权重和偏置。 8. 使用训练集对网络进行训练,直到网络的总误差降至可接受范围。 9. 使用测试集对训练好的网络进行评估,计算准确率等指标。 示例代码涉及到了Python编程语言的核心操作,包括数组操作、函数定义和循环结构。完整代码实现会涉及到大量的细节处理,从数据预处理到网络训练,再到模型评估和优化。 通过实际编写代码并运行,你可以深入理解BP神经网络的工作原理以及如何应用它来解决实际问题。此外,为了进一步提升你的技能,建议在完成基础分类任务后,尝试优化网络结构,比如增加隐藏层的神经元数量或引入正则化技术,以及使用不同的优化算法来提升网络的性能。 在完成上述过程后,如果你希望继续深入了解Python编程在数据科学领域的其他应用,或者希望了解更多关于BP神经网络的高级话题,比如不同的激活函数、损失函数和优化器的选择,我建议你查阅《Python鸢尾花分类BP神经网络项目教程》中提供的更多资料和项目实战案例。这份资源不仅能够帮助你巩固当前学习的内容,还能够提供更广泛的知识,支持你在数据分析和机器学习领域的持续进步。 参考资源链接:[Python鸢尾花分类BP神经网络项目教程](https://wenku.youkuaiyun.com/doc/ogxfp55vxk?utm_source=wenku_answer2doc_content)
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值