无需修改注册表,从内核模式加载驱动和本地应用程序

Windows 11下RW-Everything驱动加载失败?手把手教你绕过RwDrv.sys签名限制 本文针对Windows 11 22H2系统中RW-Everything因RwDrv.sys驱动被列入微软“易受攻击驱动程序阻止列表”而加载失败的问题,提供了两种实用的解决方案。文章详细剖析了问题根源,并手把手指导用户通过修改注册表临时禁用驱动黑名单,或启用系统测试签名模式来绕过签名限制,恢复工具的正常使用,同时强调了操作时的安全注意事项。 阅读详情
Loading drivers and Native applications from kernel mode, without touching registry

    * Security

"How to load driver without touching registry from kernel mode", this is asked almost always. Today, I will give you an insight into how Windows loads its driver and then will document a new method to load a driver without touching registry.

This is required because even if you exploit kernel vulnerabilities ,you still cannot load any driver because almost all existing Antivirus solutions hijack the NTOSkrnl API's ( which let you write to specific registry locations, load drivers etc).

The first method to load driver is given below:

Windows NT loads drivers using the following function ZwLoadDriver.

Its declaration is as follows:

NTSTATUS ZwLoadDriver (IN PUNICODE_STRING DriverServiceName);

DriverServiceName: Pointer to a counted Unicode string that specifies a path to the driver's registry key, /Registry/Machine/System/CurrentControlSet/Services/DriverName, where DriverName is the name of the driver

The Second Method is given below:

After Windows 2000 start's up, It starts loading the special driver win2k.sys.It doesn't load in the traditional way (as all other drivers are loaded) by calling the following procedures ZwLoadDriver, NtLoadDriver etc.

It actually loads by the following kernel API ZwSetSystemInformation.

This API is used to set system information such as page file, loads the above driver, file cache( information working set) etc.

It is actually implemented as follows:

ZwSetSystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
//specifies operation to do
IN PVOID SystemInformation, //specifies operation data
IN ULONG SystemInformationLength ) //specifies data length

it's internally implemented as follows:

Switch (SystemInformationClass)
Case 0:

Case 1:
.
.
.
Case 5: ;this actually extends the system service descriptor table
.
.
.
MmLoadSystemImage(SystemInforMation,NULL,NULL,TRUE,imagehandle,baseaddress);

call entrypoint(driverobject,NULL) ;

break ;
case 6:
.
.
.
.
.

These 2 are the only known method of loading drivers.

Here is the third method. (No antivirus solution currently hijacks it so it is safe).

As seen above ZwSetSysteminformation loadimage function to load driver into memory and then calls its entry point.

Now we will briefly analyze the parameters and functionality of MmLoadSystemImage

MmLoadSystemImage(UNICODE STRING Imagepath, UNICODE STRING prefix optional,UNICODE STRING basename optional,
ULONG unknown=0,PVOID imagehandle,PVOID baseaddress);

ImagePath is a fully qualified NT style pathname
prefix is added to pathname when loading driver

basename is the name system shows after module has been loaded

unknown is unknown

*imagehandle is the handle to section(it's already referenced, so you will have dereference it at unload)

*baseaddress is the address at which image has been loaded in kernel memory

This function actually loads the image in memory, resolves imports,loads dependencies, etc.

In Windbg,u can find the address of above function using "d MmLoadSystemImage" (of course ,symbols are required)

NOTE:- MmLoadSystemimage internally calls and checks the image after loading it into memory so make sure the checksum for the image is fine.This functionality is done by the MiCheckSystemImage.The import resolving job and dependency loading is done by MiResolveImageReferences API.

Thee MmloadSystemimage works as follows: (PseudoCode)

1) traverse existing module list to check whether it has been alredy loaded
2) if it exists return error (image already loaded STATUS_IMAGE_ALREADY_LOADED) and return from call

3) try to open file using Zwopenfile,if file cannot be opened,just return with error code
4) compute image checksum and match it with checksum stored in header
5) if checksum doesn't matches. return with error code
6) create a section with zwcreatesection and then reference it
7) map it into kernel space using mMapViewInSystemSpace
8) if necessary apply relocations to image using function LdrRelocateImage
9) resolve refrences iusing MiResolveImageReferences
10) then create an entry in psmoduleloadedlist for the module
11) make it writeprotect
12) then close file handle
13) return from call

So, now we have a function which loads image in memory, but what about calling Driver Entry (entry point of driver). This information can be obtained from the PE headers itself after the image successfully loads in memory. This method has been and can used to load and execute drivers, native applications etc directly from kernel mode

Here is the assembly code (kernel mode assembly code). it has been tested on Windows XP SP0 English Version.After minor modifation code runs on win2k,xp,2k3 etc

__asm {

;below code loads the driver in memory
loaddriver:
mov dword [Stack],esp //save stack

;paramters as always are passed in reverse
push DWORD Driverbase ;it stores driver base
push DWORD ImageHandle ;it stores section handle
push dword 0
push dword 0
push dword 0
push DWORD U_STRINGloc ;it points to unicode string containing driver to load

mov edi, 0x805c03ae ;MmLoadSystemImage address function on Win XP SP0 English version,(OS and SP dependent data)
call edi
cmp eax,0 ;check whether driver loaded successfully in memory
jne drivernotloaded ; if loading failed, exit without calling entrypoint

;since driver has loaded successfully call its init function both parameters are passed 0
mov DWORD edi, [Driverbase]
mov DWORD ebx ,[edi + 0x3c] ;to get offset of optional header
mov dword ebx,[edi + ebx + 0x18 + 0x10] ; to get entry point ofset from base of code
add edi ,ebx ; add base + entry point to get entry point in memory
push 0 ;
push 0
call edi ;call entry point (Driver Entry in case of Drivers)

drivernotloaded:
mov dword esp,[ Stack] ; correct stack so as execution continues

ret

; Here data and/or variables are stored

; This is the driver to load including path name

;DosDevices@:hooka.sys length 48
db 0x5c,0x00,0x44,0x00,0x6f,0x00,0x73,0x00,0x44,0x00,0x65,0x00,0x76,0x00,0x69,0x00,0x63,0x00,0x65,0x00,0x73,0x00,0x5c,0x00
db 0x42,0x00,0x3a,0x00,0x5c,0x00,0x68,0x00,0x6f,0x00,0x6f,0x00,0x6b,0x00,0x61,0x00,0x2e,0x00,0x73,0x00,0x79,0x00,0x73,0x00,0x00,0x00

;it's used to store driver base address
Driverbase:
dd 0
;it's used to store section handle
ImageHandle:
dd 0;

;it is used to store Stack location
Stack:
dd 0

;structure used for unicode strings in memory
struc U_STRING
Length: resw 1
MaximumLength: resw 1
Buffer: resd 1
endstruc

}

//asm code ends here

NOTE: - These API's or functions are not exported by NTOSKRNL, but these exist for internal usage.These functions are not hooked by any anti-virus solutions, so these can be used to load drivers and native application and then run them.

That's all about loading a driver from kernel mode without touching registry.
Also,the code does some error checking,so as no hard error occurs.

Have fun! 
操作系统内核模式下的进程隐藏技术 本文还有配套的精品资源,点击获取 简介:标题“Hide Process”讨论了在操作系统内核级别实现进程隐藏的技术,特别是涉及Windows驱动程序开发。进程隐藏的目的是使特定的进程在任务管理器或其他工具中不可见,这在安全和隐私保护方面有其合法用途,但也可能被用于恶意目的。技术实现涉及修改系统注册表、利用系统API、内核模式驱动编程、权限控制、代码注入等方法。本技术要点旨在... 阅读详情

相关推荐

MmLoadDriver内存加载驱动.7z

64位环境下已签名驱动中实现加载未签名驱动,程序是源代码,可修改编译

核心态加载驱动和本地应用

Loading drivers and Native applications from kernel mode, without touching registry By: vipinkumar You are Responsible for everything.Also,if you develop something off this,you should give credit to

2403

KingDriver_辅助_C++_驱动_

刚刚发的那个是恢复句柄表达到破掉驱动保护。这个是直接禁止驱动加载源码。支持全系统写法。

windbg拦截驱动

驱动的加载有几种方式,查看CreateService就可以知道。 1、SERVICE_BOOT_START=0x00000000,被系统loader加载,这类驱动是最早加载的。驱动文件必须放在C:\Windows\System32\drivers目录下,因为此时系统只能读注册表,不能打开文件,不能打出调试信息。看了下面的分析就清楚了。 2、SERVICE_SYSTEM...

weixin_34244102的博客 339

ANSYS Fluent中的声学模型:实用指南

文章摘要 本文介绍了ANSYS Fluent中三种气动声学模拟方法:Ffowcs-Williams & Hawkings(FWH)模型、宽带噪声源模型和波动方程模型。FWH模型适用于外部气动声学问题,需要瞬态流场数据来预测远场噪声;宽带模型基于稳态RANS模拟,可快速识别噪声源位置,适合早期设计阶段;波动方程模型直接求解声波方程,提供全域声压分布,但仅适用于低马赫数流动。文章详细说明了各模型的使用场景、设置步骤和关键参数配置,为工程应用提供了实用指南。

weixin_45793544的博客 1333

超声波清洗机拆解实录:从电路板到换能器,一文看懂内部构造(附高清图)

本文详细拆解了超声波清洗机的内部构造,从电路板设计到换能器工作原理,揭示了其核心技术。通过高清图片和详细分析,展示了功率放大电路、高频变压器及压电换能器等关键部件,为电子爱好者和维修技术人员提供了实用的故障诊断和元件二次利用指南。

grape的博客 1206

NT下实现不通过注册表加载进程的方法

http://blog.mmbest.com/?6576发布时间2006年10月26日  翻译发布:2006年10月29日译者按:本文提供了一种在win NT下悄声无息的加载“驱动”的方法。这里所将的“驱动”并不是指平常的驱动,而是指将程序载入系统的内核中,采用该方式将不通过任何注册表项,因此将无法使用任何方法(包括各种杀毒软件)查出这一加载项,达到隐藏自身的目的。为了翻译的方便,本人暂将里面提到

1583

Nacos 从困惑到蒙圈(9)Nacos 适配 达梦数据库【最新版】

介绍Nacos适配达梦数据库的详细步骤,包括对最新版本的支持改造。

甘蓝的专栏 1382

调试驱动程序的入口

调试驱动程序的入口(1) 这是老生常谈的一个问题,先说一个一般性的方法。 将内核调试器设置成启动时断点(快捷键Ctrl+Alt+K),调试器提示: Will breakin on first symbol load at next boot. 这句话意味着 The debugger breaks into a restarted target computer ...

weixin_34309543的博客 1658

YOLO26涨点改进 | YOLO联合Mamba火热发论文改进篇 | CVPR 2025 | 引入EfficientViM 新型轻量级视觉Mamba,高效捕捉全局依赖,含二次创新、适合目标检测任务

本文提出EfficientViM,一种基于HSM-SSD的新型轻量级视觉Mamba架构,用于改进YOLO26目标检测模型。该模块通过压缩隐藏状态、多阶段特征融合和内存优化设计,在降低计算复杂度的同时提升检测精度。实验表明,EfficientViM在ImageNet-1K上实现了最佳的速度-精度平衡,相比SHViT模型性能提升0.7%且速度更快。文章详细介绍了模块原理、网络结构、核心代码实现及YOLO26集成方法,提供两种改进方案,适用于资源受限环境下的实时目标检测任务。

Ai缝合怪、助力小伙伴高效发论文 182

【GameFramework框架内置模块】8、文件系统(File System)

最近好忙,鸽了好久。不能颓废了,继续发力。今天分享的是GF框架的文件系统。首先,引用比较官方的说法:GF的FileSystem虚拟文件系统,使用类似磁盘存储的感念对零散的文件进行集中管理,优化资源加载时产生的内存分配,也可以对资源进行局部片段加载,极大的提升了资源加载的性能。通俗点讲就是,我这个模块就是加载磁盘文件的,优化加载时产生的内存分配。那么,它是怎么优化的呢?

CSDN博客专家,Unity3D高级软件工程师,《Unity 3D从入门到实战》作者。 2455

使用ZwLoadDriver加载驱动

勿在浮沙筑高台 999

还在用 RaiDrive/Rclone 挂载网盘?教您使用Windows 原生 WebDAV 丝滑直连 AList/Openlist,让你的网盘秒变本地硬盘!

网盘文件分散管理?😩 别再依赖第三方工具了!本文教你如何在 Windows 下,利用原生 WebDAV 功能,将 Openlist 网盘直接映射为本地硬盘!💻 操作简单,告别繁琐,让你的云端文件像本地文件一样丝滑!🚀 轻松实现高效管理,快来体验吧!

XiaoqiangClub的博客 2996

用于修改HTTP流量的用户模式和内核模式应用程序的比较

在本文中,您可以学习如何拦截HTTP流量,以便将自定义代码注入Windows HTML标记。 为此,有两种完全不同的方法:一种采用内核模式,另一种采用用户模式。 为了简单起见,将没有掩盖的HTTPS流量。 本文用作代码示例的详细示例,以更广泛地讨论用户模式与内核模式实现比较。 HTTP响应数据注入算法 在开始讨论不同的方法之前,让我们看一下将数据注入HTTP响应的算法。 该算法包括以下数...

IT与开发人员的地盘 366

ModuleNotFoundError: No module named‘langchain.schema.output parserlangchain.schema is not a package

电脑里现有的langchain库版本与import所需的不同,卸载原有langchain,重新下载最新的langchain。在步骤1后,若仍不可运行。在确保已重新下载新langchain后,重启python后,可正常运行。在版本号中填入所需的langchain版本号,可在requirements.txt查看。运行如下代码时,出现error。

weixin_45751925的博客 1716

使用GitLab限制开发者使用CI/CD的权限,三种方案

使用三种方案来限制开发人员的CI/CD权限。

知无涯 5107

HidHide技术原理:Windows内核模式过滤驱动的实现揭秘

HidHide是一款基于Windows内核模式的过滤驱动工具,能够帮助用户实现对HID设备的精细化管理与隐藏控制。通过内核层的驱动过滤技术,HidHide可以在系统级别拦截并处理设备枚举请求,为特定应用程序提供设备访问控制能力,同时保持对系统稳定性的最小影响。 ## 核心工作机制:内核驱动的设备拦截技术 HidHide的核心功能由内核模式驱动实现,其工作原理基于Windows的WDM(Wind

gitblog_01053的博客 1101

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

如何彻底解决OpenArk内核模式加载问题:5步完整指南

OpenArk是一款功能强大的Windows反Rootkit(ARK)工具,为逆向工程师和系统安全分析师提供全面的内核级分析能力。然而,许多用户在尝试进入内核模式时可能会遇到驱动加载失败、权限不足等问题。本文将为您提供完整的解决方案,帮助您快速诊断并彻底解决OpenArk内核模式加载问题。 ## 📊 快速诊断:识别问题类型 在开始解决之前,首先需要确定您遇到的具体问题类型。OpenArk内核

gitblog_00809的博客 746

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

OpenArk内核模式加载失败终极解决方案:快速修复指南

OpenArk作为新一代Windows反Rootkit工具,其内核模式提供了强大的系统底层操作能力。然而在实际使用中,许多用户遇到了内核驱动加载失败的问题,这直接影响了工具的核心功能发挥。本文将深入解析问题根源并提供实用的快速修复方案。 [![OpenArk工具界面](https://raw.gitcode.com/GitHub_Trending/op/OpenArk/raw/361fb2e0a

gitblog_00415的博客 1534

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

OpenArk项目内核模式加载失败问题分析与解决方案

OpenArk是一款功能强大的Windows系统工具,它提供了用户模式和内核模式两种工作方式。内核模式能够提供更底层的系统操作能力,但在实际使用中,许多用户遇到了无法成功进入内核模式的问题。本文将深入分析这一问题的成因,并提供多种解决方案。 ## 问题表现 当用户尝试在OpenArk中切换到内核模式时,通常会遇到以下错误信息: 1. 驱动加载失败(NtLoadDriver错误代码c00004...

gitblog_01133的博客 700

如何快速解决OpenArk内核模式加载失败:完整故障排除指南

OpenArk内核模式是这款强大Windows系统工具的核心功能,但许多用户在尝试切换时都会遇到驱动加载失败的困扰。本文将从实际问题出发,带你一步步解决OpenArk内核模式加载失败的各种情况,让你重新获得完整的系统分析能力。 ## 用户故事:从挫败到成功 小王是一名网络安全工程师,最近需要使用OpenArk分析一个可疑进程。当他点击切换到内核模式时,却看到"驱动加载失败"的错误提示。这让他十

gitblog_00506的博客 1067

Gemini Voyager「隐藏最近项与 Gems」功能全解析:从界面操作到源码实现

::: info **注意**:本文介绍的功能由 Gemini Voyager 提供,支持 1.1.9 及后续版本。 ::: ## 导读 Gemini™ 首页的「最近保存」(Recently saved)区域与侧边栏中的 **Gems** 列表,常常成为公共场合泄露隐私或干扰视线的来源。Gemini Voyager 为这两个区域提供了一套优雅的「隐藏 / 恢复」开关:鼠标悬停时浮现隐藏按钮,隐

gitblog_00718的博客 884

深度解析OpenArk内核模式加载机制:Windows安全工具的高级内核调试技术

OpenArk是一款面向Windows平台的下一代开源Anti-Rootkit(ARK)工具,专为系统管理员和逆向工程师设计,提供深度系统监控和内核级调试功能。该工具通过创新的内核驱动加载机制,实现了对Windows内核的全面访问和控制能力,为系统安全分析和恶意软件检测提供了强大的技术支撑。 ## 技术背景与架构设计 OpenArk采用分层架构设计,将用户态界面与内核态驱动分离,通过高效的进程

gitblog_00865的博客 542

WINCE的注册表中加载驱动的属性

原文地址::http://blog.csdn.net/armeasy/article/details/5694783 相关网帖 1、Wince6.0驱动开发----http://wenku.baidu.com/view/2560b76a7e21af45b307a82f.html

xqhrs232的专栏 904

内核术语--内核模式,用户模式,内核对象,内核调试,安全,注册表,Unicode,驱动

内核模式 VS 用户模式 为了防止普通的应用程序修改或访问临界区的操作系统的数据,Windows使用两种访问模式:内核模式和用户模式。用户级别的应用程序代码运行在用户模式下,操作系统的代码运行在内核模式(比如系统服务和驱动)。内核模式下有权限访问所有内存和所有的CPU指令。内核模式比用户模式权限高的目的是保证系统的稳定性。 注意:X86和X64处理器定义了4个级别的代码执行权限(也叫做ring

gnimgnot 2574

如何让系统加载自己写的驱动程序?

  如何让系统加载自己写的驱动程序?   两种办法:  1、在[HKEY_LOCAL_MACHINE/Drivers/BuiltIn]下添加注册键。  2、在应用程序中调用ActivateDeviceEx。     在一些文件中用分号来表示注释,例如下面的内容   ; @CESYSGEN IF SERVERS_MODULES_HTTPD  ; @CESYSGEN ENDIF  在“CESY

fangfang的专栏 1万+
上一篇: 机器狗写入到userinit.exe文件的下载者源码
下一篇: NT下实现不通过注册表加载进程的方法
iiprogram
博客等级 码龄25年 1068粉丝 1515原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址