Guest Article - Introduction to Registry Filtering in Vista (Part I) (By: The NT Insider, Vol 15, Issue 1, March- April 2008 | Published: 28-May-08| Modified: 28-May-08)By Jerry KelleyThe Registry Filtering Model (RFM) provides the developer with a framework to develop registry filters quickly and safely. Before the RFM, filter developers had to resort to potentially unsafe hacks to hook the registry service calls. With the RFM, a skeleton filter can be assembled in short order by anyone with any familiarity of filtering. This is the first of two articles which will present a whirlwind tour of the RFM in Vista. In this article, I'll show you how to put together a simple filter from which you can build upon to add functionality to suit your needs.What can it do for me? Let's get started by going over what the RFM actually does for the developer. It provides a framework whereby a driver can be developed that provides callbacks for registry IO that it's interested in. These callbacks are registered with the RFM and are called whenever specific registry IO is processed. All of the RFM interfaces that the driver uses are provided by the Configuration Manager (CM). In addition to managing the callbacks, the RFM also provides for three types of contexts that a driver can use to associate private information with an object or operation. Those who know the file system Filter Manager should already be acquainted with these features. The Filter Manager does provide a broader API than the RFM but, to be fair, it's been out there longer and file system filters are among the hardest drivers to develop so a lot of effort has gone into the Filter Manager to ease their burden.Not exactly the new kid in town You may have noticed that the RFM has been around since XP. The API was very limited in XP and expanded in Server 2003. The biggest change in Server 2003 was that the RFM added support for pre and post operation callbacks meaning the driver gets a callback before and after the CM processes an operation. (In XP, only a single operation callback is available which just announces the IO). Vista added callbacks for key flush, load, and unload as well as key security query and set.Altitude is everything Registry filters are assigned altitudes by the type of application they perform. An altitude arranges the layering of filters so that no matter when they load, they'll load within a pre-determined level based on their function. The altitude categories are the same as those for the file system minifilters and vendors who already have altitudes for their minifilters will use them for their registry filters as well. Altitudes can be requested from Microsoft via the WHDC Minifilter Altitude Allocation Web site.Callbacks, of course Before we discuss registering with CM for callbacks, let's take a look at the format of the callback routines. All of the callbacks are of the PEX_CALLBACK_FUNCTION type definition in WDM.H. The three input values represent, respectively, the registration context, the operation type, and a pointer to the operation's information structure. The PEX_CALLBACK_FUNCTION is shown in Figure 1.typedef NTSTATUS (*PEX_CALLBACK_FUNCTION)(IN PVOID CallbackContext,IN PVOID Argument1,IN PVOID Argument2);The callback context is really a registration context created when a filter registers with CM (This will be discussed further when we talk about registration). When a filter registers at an altitude it can set a private context that the filter can use to identify a specific registration. Argument1 is not really a pointer but an enumeration value of the REG_NOTIFY_CLASS type. This value indicates the specific registry operation. Sample enumeration values include RegNtPreDeleteKey, RegNtPostDeleteKey, RegNtPreCreateKeyEx, and RegNtPostCreateKeyEx. Be sure to treat it as an enumeration and not a pointer since it'll never hold a valid pointer value.Argument2 is a pointer to an operation-specific structure. There are distinct pre-op and post-op structures that your filter will have to deal with. The pre-op structure depends on the operation. As an example, consider pre-create (CreateKeyEx), Argument2 is a REG_CREATE_KEY_INFORMATION pointer (See Figure 2).typedef struct _REG_CREATE_KEY_INFORMATION {PUNICODE_STRING CompleteName;PVOID RootObject;PVOID ObjectType;ULONG CreateOptions;PUNICODE_STRING Class;PVOID SecurityDescriptor;PVOID SecurityQualityOfService;ACCESS_MASK DesiredAccess;ACCESS_MASK GrantedAccess;PULONG Disposition;PVOID *ResultObject;PVOID CallContext;PVOID Reserved;} REG_CREATE_KEY_INFORMATION, REG_OPEN_KEY_INFORMATION,*PREG_CREATE_KEY_INFORMATION, *PREG_OPEN_KEY_INFORMATION;Figure 2 - REG_CREATE_KEY_INFORMATION Structure In the pre-query key callback Argument2 provides a pointer to a REG_QUERY_KEY_INFORMATION structure (See Figure 3).typedef struct _REG_QUERY_KEY_INFORMATION {PVOID Object;KEY_INFORMATION_CLASS KeyInformationClass;PVOID KeyInformation;ULONG Length;PULONG ResultLength;PVOID CallContext;PVOID ObjectContext;PVOID Reserved;} REG_QUERY_KEY_INFORMATION, *PREG_QUERY_KEY_INFORMATION;Figure 3 - REG_QUERY_KEY_INFORMATION Structure
You'll notice that REG_OPEN_KEY_INFORMATION is the same as REG_CREATE_KEY_INFORMATION. The pre-op structure for create-key and open-key are overloaded but the pre-op structures for the rest of the operations are not. These structures are defined in WDM.H and documented in the WDK documentation.The pre-op structures all contain several common members that help the filter identify the target of the operation. Some contain only these values because nothing else is needed. Take delete-key for example. In Figure 4, the REG_DELETE_KEY _INFORMATION structure has only three members (ignoring Reserved) and this is all that's required to define the key to be deleted.typedef struct _REG_DELETE_KEY_INFORMATION {PVOID Object;PVOID CallContext;PVOID ObjectContext;PVOID Reserved;} REG_DELETE_KEY_INFORMATION, *PREG_DELETE_KEY_INFORMATION;Figure 4 - REG_DELETE_KEY_INFORMATION Structure
The first three parameters are common to all pre-op structures except for create and open. To be exact, CallContext is used in all structures including create and open but Object does not exist until the create (or open) completes and ObjectContext is not valid unless it has been set on the registry object. Other pre-op structures may have more members but they all will have at least these three.All post-op routines are passed a pointer to a REG_POST_OPERATION_INFORMATION structure providing common completion information regardless of the operation type. Figure 5 contains the definition of the REG_POST_OPERATION_INFORMATION structure.typedef struct _REG_POST_OPERATION_INFORMATION {PVOID Object;NTSTATUS Status;PVOID PreInformation;NTSTATUS ReturnStatus;PVOID CallContext;PVOID ObjectContext;PVOID Reserved;} REG_POST_OPERATION_INFORMATION,*PREG_POST_OPERATION_INFORMATION;Figure 5 - REG_POST_OPERATION_INFORMATION StructureNotice the three primary fields discussed previously - Object, CallContext, and ObjectContext. These give us the registry object and context information we need to properly identify the operation target. The Status field is the actual status from CM for the operation while ReturnStatus is what will be returned to the caller. Because a filter may choose to return a status other than Status the ReturnStatus member is where the filter can set the status it wants returned to the caller. This is covered in the section on completion processing. The PreInformation member is a pointer to the pre-op structure and provides the post-op routine with the original values defining the operation.There's one more callback to cover, the context cleanup callback. This callback must be provided if your filter sets contexts on registry objects. This callback is executed when a registry object's handle is closed or the filter unregisters. In the unregister case, the filter will get a callback for every outstanding registry context assignment. This callback is where the filter releases any registry context resources. It is a PEX_CALLBACK_FUNCTION just like the rest of the other callbacks.Callback templates The callbacks have been discussed as far as their function prototype and structures passed so now we'll look at a template for a pre-op callback and then a post-op callback. For these examples I'm using CreateKeyEx but the template applies to any operation. The pre-op template shown in Figure 6 breaks down to enclosing the buffer access in a try/except block, casting Argument2 to a REG_CREATE_KEY_INFORMATION pointer, processing it and returning.NTSTATUS PreCreateKeyExCallback(IN PVOID CallbackContext,IN PVOID Argument1,IN PVOID Argument2){__try{PREG_CREATE_KEY_INFORMATION pPreInfo =(PREG_CREATE_KEY_INFORMATION)pInfo;//// perform pre-op processing//}__except(EXCEPTION_EXECUTE_HANDLER){NTSTATUS Status = GetExceptionCode();//// handle the exception as required//}return STATUS_SUCCESS;}Figure 6 - Pre-Op TemplateThe post-op template in Figure 7 is similar to the pre-op template but adds an extra step where a pointer to the pre-op structure is extracted to a local as a shortcut. The processing is left to the filter implementation.NTSTATUS PostCreateKeyExCallback(IN PVOID CallbackContext,IN PVOID Argument1,IN PVOID Argument2){NTSTATUS Status = STATUS_SUCCESS;__try{PREG_POST_OPERATION_INFORMATION pPostInfo =(PREG_POST_OPERATION_INFORMATION)pInfo;PREG_CREATE_KEY_INFORMATION pPreInfo =(PREG_CREATE_KEY_INFORMATION)pPostInfo->PreInformation;//// perform post-op processing//}__except(EXCEPTION_EXECUTE_HANDLER){Status = GetExceptionCode();//// handle the exception as required//}return STATUS_SUCCESS;}Figure 7 - Post-Op TemplateThe pre and post-op callbacks have to be careful when using the buffer pointer in Argument2 since this can be a user-space pointer. With that in mind, all access to the buffer must take place in a try/except block. The processing depends on the filter's application, so just remember to use the Argument2 pointer safely.The power of the registry IO handler Now that we've looked at the callback templates and the structures used, we can take that a step further and talk about what a registry filter can do - or to be more precise - what a registry IO handler can do. In this case, the term handler refers to the pre-op and post-op callback pair. A handler considers the pre and post routines as a unit which processes a single registry IO operation. With that model in mind, we can quickly describe the primary functions of a registry filter; monitoring, blocking, and modifying.The monitoring filter is passive in that it does not interfere with any of the registry IO other than to "sniff" it and possibly record it for an application. This is a common use of registry filtering and is found in many applications. The blocking filter uses criteria to determine if registry IO should be allowed. In this type of filter, the pre-op routine does the vast majority of the work since the idea is to stop IO before it can be passed on to CM. The criteria could be user, process, operation type, and so on. The final type of filter considered is one that modifies operations. There can be modifications made to the target of the operation or to the data itself. A typical modification is to the target in order to redirect the operation somewhere else in the registry. Another example is modifying the data of a value to encrypt or decrypt it.What the Ex? CreateKeyEx (and OpenKey by reference) were used in previous examples and we are discussing the Vista RFM implementation but let's diverge just for a moment to see just how different the "Ex" versions are from their predecessors. The "Ex" versions appeared in Server 2003 and replaced the "non-Ex" versions in XP. These "Ex" versions live up to their name by adding a wealth of new parameters describing the create or open. We've seen the REG_CREATE_KEY_I NFORMATION structure already; now let's look back at the REG_PRE_CREATE_KEY_INFORMATION used by CreateKey in Figure 8.typedef struct _REG_PRE_CREATE_KEY_INFORMATION {PUNICODE_STRING CompleteName;} REG_PRE_CREATE_KEY_INFORMATION, *PREG_PRE_CREATE_KEY_INFORMATION;Figure 8 - REG_PRE_CREATE_KEY_INFORMATION Structure
It's quite a bit thinner than REG_CREATE_KEY_ INFORMATION and the same is true for the structure used by OpenKey when compared to OpenKeyEx. The other thing about these older routines is that they have their own post-op structures. Figure 9 shows the REG_POST_CREATE_KEY_ INFORMATION structure.typedef struct _REG_POST_CREATE_KEY_INFORMATION {PUNICODE_STRING CompleteName;PVOID Object;NTSTATUS Status;} REG_POST_CREATE_KEY_INFORMATION, *PREG_POST_CREATE_KEY_INFORMATION;Figure 9 - _POST_CREATE_KEY_INFORMATION StructureCompare REG_POST_CREATE_KEY_INFORMATION with REG_POST_OPERATION_INFORMATION and you'll again see that the "Ex" API's provide much more information to the filter.Be sure to get registered Once your callbacks have been defined you're almost ready to register with CM to start receiving notifications. The registration routine takes a PEX_CALLBACK_ FUNCTION that it calls for all registry IO sent to your filter. This callback is the central point from which you'll pass on the calls to your IO callbacks which we have discussed so far. Using a single dispatch callback is relatively easy to implement. To begin with, define an array of PEX_CALLBACK_ FUNCTION entries that'll contain pointers to each operation callback you have implemented. The array definition is shown in Figure 10.PEX_CALLBACK_FUNCTION g_pCallbackFcns[MaxRegNtNotifyClass];Figure 10 - Defining the Callback ArrayInitialize the array such that each callback pointer is located based on its REG_NOTIFY_CLASS enumeration value. Figure 11 shows the initialization for a filter that only monitors creates, opens, and deletes. Your filter can use whatever combination of operation monitoring it needs for your application.memset(g_pCallbackFcns, 0, sizeof(g_pCallbackFcns));g_pCallbackFcns[RegNtPreCreateKeyEx] = PreCreateKeyExCallback;g_pCallbackFcns[RegNtPostCreateKeyEx] = PostCreateKeyExCallback;g_pCallbackFcns[RegNtPreOpenKeyEx] = PreOpenKeyEx;g_pCallbackFcns[RegNtPostOpenKeyEx] = PostOpenKeyEx;g_pCallbackFcns[RegNtPreDeleteKey] = PreDeleteKeyCallback;g_pCallbackFcns[RegNtPostDeleteKey] = PostDeleteKeyCallback;Figure 11 - Initializing the Callback ArrayWith the array defined, the dispatch callback simply has to cast Argument1 to a USHORT and use it as an index into the array to obtain the callback pointer. Be sure to check for a NULL entry in the array before attempting to use the callback. Figure 12 shows how the dispatch callback could be implemented.NTSTATUS DispatchCallback(IN PVOID CallbackContext,IN PVOID Argument1,IN PVOID Argument2){USHORT Class = (USHORT)Argument1;if (NULL == g_pCallbackFcns[Class]){return STATUS_SUCCESS;}return (*(g_pCallbackFcns[Class]))(CallbackContext, Argument1, Argument2);}Figure 12 - The Dispatch Callback FunctionIf you don't handle a specific type of IO (the array entry is NULL) you must return STATUS_SUCCESS. This is required because the operation must continue and should not be interrupted just because your filter doesn't care about a particular type of IO.We're now ready to notify CM that we want to filter registry IO. You can register your filter whenever makes the most sense for your application. Many filters will register in DriverEntry while others will register later. When you register, it's for all registry IO since you provide a single callback to CM. Therefore, the callback array should have NULL entries for any IO class (operation) you don't care about. This is why the dispatch callback must check for NULL entries (besides being a prudent practice anyway).In addition to a pointer to the dispatch callback, the registration API takes a string description of the altitude, a pointer to the filter's driver object, a pointer to a registration context for the filter, and a pointer to a variable to receive a special cookie identifying the registration. The string description of the altitude is simply a UNICODE_STRING of the altitude. The registration context is optional and opaque to CM. It is a means for the filter to associate information regarding a particular registration. This context is passed into each callback in the CallbackContext parameter. The cookie is a LARGE_INTEGER that is opaque to the filter and used by CM to identify a registration. It is required by certain CM routines and thus the filter must maintain this value. A typical usage of CmRegisterCallbackEx is shown in Figure 13.RtlInitUnicodeString(&altitudeString, L"360055");NTSTATUS Status = CmRegisterCallbackEx(DispatchCallback,(PCUNICODE_STRING)&altitudeString,pDriver,&g_RegistrationContext1,&g_RegistrationContext1.Cookie,Null);Figure 13 - Calling CmRegisterCallbackExA filter can register at more than one altitude provided it has been assigned multiple altitudes. It's up to the filter designer to determine how to differentiate IO at each altitude. You can still use the same dispatch callback and callback array but specify a different registration context for each altitude registered. When any of the callbacks are called, the altitude is determined by the callback using the registration context. Of course, a filter could define a separate dispatch callback and set of callbacks for each altitude but, depending on the application, this may result in a lot of duplicate code and more code to be debugged and maintained.When the filter no longer needs to filter registry IO it must unregister with CM. This would typically be done in the driver's unload routine but depending on the functionality of the filter it could occur anywhere. A filter unregisters by calling CmUnRegisterCallback. This routine takes only the cookie that the filter received when it registered with CM. Continuing our example from Figure 13; Figure 14 depicts unregistering the same filter.NTSTATUS Status = CmUnRegisterCallback(g_RegistrationContext1.Cookie)Figure 14 - Calling CmUnRegisterCallbackAs covered so far, there are several types of contexts available to a filter. Contexts allow a driver to associate private information with a distinct object or operation that is typically managed by another subsystem such as a service in the operating system. This means, for example, a driver can allocate and initialize a private blob of information that it attaches to an object, like a registry object in this case, and (nearly) every time the driver gets the object from operating system the context comes with it. So why is this useful? Well, those of us who developed file system filters prior to the Filter Manager can attest to the magnitude of overhead necessary to, say, track all open file and stream objects. Once we had context support it was so much easier to just allocate our private contexts and attach them to file system objects. Anytime we processed IO we just had to retrieve our contexts and we had the information that we used to have to track ourselves in trees or lists.There are three types of contexts available to a registry filter:
- Registration
- Registry object
- Registry operation
When we looked at registration earlier you'll recall we could pass a pointer to our initialized registration context. A filter uses this context to store per-registration information. This context is passed as the first parameter to every callback. This gives all callbacks access to the filter's private registration context to use as determined by the filter.A registry filter can set a context on a registry object with a call to CmSetCallbackObjectContext (See Figure 15 for the prototype). This is very useful because registry objects are the central focus of registry IO (surprise) and with a context on each object the filter can easily track per-object information and status. For example, a registry object context could store the root and path, create/open options and the process and thread that created/opened it. The context is typically set in the create/open post-op if the create/open was successful. However, CmSetCallbackObjectContext can be called anytime from post-create (or post-open) to prior to the handle close pre-op to set the context. Once the context has been successfully set on the object, the filter will receive a RegNtCallbackObjectContextCleanup notification when the object's handle has been closed or the filter has unregistered. Therefore, if you're going to use object contexts you must register a context cleanup callback that releases your resources for the context.NTSTATUS CmSetCallbackObjectContext(IN OUT PVOID Object,IN PLARGE_INTEGER Cookie,IN PVOID NewContext,OUT OPTIONAL PVOID *OldContext);Figure 15 - CmSetCallbackObjectContext PrototypeThe filter can track the context but it is passed to every pre-op callback in the ObjectContext member of the REG_Xxx_KEY_INFORMATION structure. If a filter registers at more than one altitude, different contexts for the same registry object can be assigned for each registration by using the cookies to delineate the assignments. CmSetCallbackObjectContext also lets you replace a context on a registry object. If you call CmSetCallbackObjectContext and a context already exists, it will remove the old context, attach the new one, and return a pointer to the old one in OldContext. If OldContext comes back non-NULL the filter is responsible for cleaning it up.The registry operation context covers the scope between the pre-op and the post-op callbacks. It is passed from the pre-op to the post-op of a single operation. It does not span across operations and is not propagated beyond the operation by CM. The filter uses this context to pass private information from a pre-op to a post-op routine. This means the filter will allocate a context in the pre-op and free it in the post-op. The context is set in the CallContext member of REG_Xxx_KEY_ INFORMATION in the pre-op and retrieved from the CallContext member of REG_POST_OPERATION_ INFORMATION in the post-op.Modification of Registry IO Calls We're almost done with this discussion of registry filters but we have an important subject left to cover: modifying registry IO calls. There are generally four distinct areas of modifications and they can be combined:
- Input parameters
- Output parameters
- Return value
- Completion processing
The filter's pre-op callback can modify input parameters in the REG_Xxx_KEY_INFORMATION structure and pass the new value(s) on. Likewise, the post-op callback can alter values in REG_POST_OPERATION_INFORMATION and return the modified information (Think of redirection as an example). In the case where the filter's post-op wants to change the return value to the caller, it sets the ReturnStatus member of REG_POST_OPERATION_INFORMATION with the status value that it wants the caller to receive and returns STATUS_CALLBACK_BYPASS. This halts further processing on the operation and immediately returns ReturnStatus to the caller. The caveat here is that the filter is responsible for cleanup of any CM objects if the status is changed from a success to a failure. If it is changed from failure to success the filter will need to provide proper parameter values in REG_POST_OPERATION_ INFORMATION. If the filter wants to fail the operation, it sets ReturnStatus to the error status to be returned to the caller and returns an error status other than STATUS_CALLBACK_BYPASS (STATUS_CALLBACK_ BYPASS is defined as an error value by the way).A filter can handle the operation completely and bypass the intended operation path. To do this, the pre-op callback processes the operation however it wants and returns STATUS_CALLBACK_BYPASS. The post-op callback is not called in this case because CM will immediately return STATUS_SUCCESS to the caller without calling any other registry filters or CM routines beyond what is necessary to complete the operation. The filter must set the corresponding REG_Xxx_KEY_INFORMATION structure with proper parameters to be returned to the caller.More to Come This article has covered a lot of material in a relatively short amount of space. The WDK provides fairly good coverage of this information but there are some crucial elements left out - I know because I had to fill in a lot of these holes to get my first registry filter working. I have tried to provide enough coverage for a developer to become familiar with the concepts and components of a registry filter. The next article will cover transactions and how to build a non-durable resource manager since the RFM doesn?t provide one (Your filter will need one to support transactions and there is no known public documentation on how to build one).Jerry Kelley is a file system filter driver developer working on software virtualization systems for a major security software corporation in the U.S. He has twenty-five years of development experience including embedded systems with the last nine years in filter development. He can be reached at jerryjkelley@msn.com.Figure 1 - Callback Routine Template
相关推荐
注册表R0监控
函数//注册一个可监控注册表操作的函数 CmRegisterCallback(回调函数地址,NULL,&返回的handle);//或CmRegisterCallbackEx,可设置高度NTSTATUS MyRegistryCallback( __in PVOID CallbackContext, __in_opt PVOID Argument1,//标识操作类型 REG_NOTIFY_CLA
RegistryCallback routine(CmRegisterCallback 注册表操作监控介绍)
RegistryCallback routine 过滤器驱动程序的常规RegistryCallback可以监视,阻止或修改一个注册表操作。 句法 C ++ EX_CALLBACK_FUNCTION RegistryCallback; NTSTATUS RegistryCallback( 标签:APIWinHTTP PVO
深入注册表监控
注册表是windows的重要数据库,存放了很多重要的信息以及一些应用的设置,对注册表进行监控并防止篡改是十分有必要的。在64位系统下微软提供了这个回调函数来实时监控注册表的操作,那么既然这里微软提供了这么一个方便的接口,病毒木马自然也会利用,这里我们就来探究其实现的原理和如何利用这个回调函数进行对抗。
Windows内核沙盒原理详解
沙盒 在计算机领域指一种虚拟技术,它实际上是一种安全体系,且多用于计算机安全技术。其原理是通过重定向技术,把程序生成和修改的文件定向到自身文件夹中。本文主要探讨沙盒的内核实现原理
ntoskrnl.exe.c 导出函数 常用2000 个内核函数名
//CmRegisterCallback 监控注册表 //CmRegisterCallbackEx 监控注册表 //PsRemoveCreateThreadNotifyRoutine //取消线程拦截 取消线程监控 //PsRemoveLoadImageNotifyRoutine //取消模块拦截 取消模块监控 //PsRestoreImpersonation //PsResumeProcess //PsReturnPoolQuota //PsReturnProcessNonPagedPoolQuota //PsReturnProcessPagedPoolQuota //PsRevertThreadToSelf //PsRevertToSelf //PsSetContextThread //设置线程环境 //PsSetCreateProcessNotifyRoutine //拦截进程 //PsSetCreateProcessNotifyRoutineEx //拦截进程 进程监控 //PsSetCreateThreadNotifyRoutine //线程监控 线程拦截 //PsSetCurrentThreadPrefetching //PsSetJobUIRestrictionsClass //PsSetLegoNotifyRoutine //PsSetLoadImageNotifyRoutine 拦截模块加载 //PsSetProcessPriorityByClass
模拟IC设计笔记:拆解一个经典的时钟占空比校正(DCC)电路模块,从理论到SPICE仿真
本文深入解析了时钟占空比校正(DCC)电路在模拟IC设计中的关键作用,特别是在高速ADC应用中。通过晶体管级拆解,详细介绍了基于电荷泵和积分器的模拟反馈型DCC电路设计,包括占空比检测、误差放大与校正执行单元的实现。文章还提供了SPICE仿真验证方法,确保电路在100MHz时钟下的稳定性和性能。
windows驱动 - 注册表回调
0x00 函数 CmRegisterCallbackEx() //回调函数绑定 CmUnRegisterCallback() //注销注册表回调 NTSTATUS ExCallbackFunction(PVOID CallbackContext,PVOID Argument1,PVOID Argument2) //注册表回调,具体内容看文档 0x01 代码 #include <ntifs.h> #include <ntddk.h> #include <wdm...
高通8797虚拟机软件架构
Gear VM 会在 PVM 之前启动,以便为 PVM/GVM 提供通用的 SoC 服务(如时钟、电源调节器等)。Gunyah 虚拟机监视器提供多种服务,包括将虚拟 CPU (vCPU) 调度到物理 CPU (pCPU)、中断 (IRQ) 虚拟化、PSCI 管理、内存管理、进程间通信 (IPC)、虚拟定时器以及调试等。该架构基于 Gunyah 虚拟机监视器并支持多个 GVM,代表了高通支持的各种配置的超集。图中展示了多个客户机(guests)作为该架构下的一种可能性。
利用CmRegisterCallback函数在Windows下保护注册表项
<br />一般在Windows下保护注册表有以下几种方法:<br /> <br />1. Ring3 hook <br /> 实现简单。可利用微软的Detour库,第三方的mhook库,或者自己实现。<br /> 但是如果是做产品的话不得不考虑兼容性的问题,纵使周知,大量的病毒、木马和恶意程序使用同样的方法来隐藏或者保护自身<br /> 的注册表项和键值,基本上所有基于行为监控的安全类软件都会向用户报告此类程序为恶意程序。<br />2. Ring0 hook<br /> 原理和Ring3 hook基本上
别再混淆了!5分钟搞懂机器人导纳控制与阻抗控制的本质区别(附Simulink对比仿真)
本文深入解析机器人柔顺控制中的导纳控制与阻抗控制的本质区别,通过信号流方向、架构对比和应用场景三个关键视角进行详细阐述。文章还提供Simulink对比仿真案例,帮助读者快速理解两种控制策略的差异及其适用场景,特别适合机器人控制领域的研究者和工程师参考。
新手必看!Stata工具变量分析中的三大陷阱:如何正确解读LM统计量、CDW检验和Hansen J值
本文深度解析Stata工具变量分析中的三大核心检验:不可识别检验、弱IV检验和过度识别检验,帮助新手避开常见陷阱。详细解读LM统计量、CDW检验和Hansen J值的正确使用方法,提供实战案例和Stata操作指南,确保研究结论的可靠性。
注册表回调笔记
NTSTATUS CmRegisterCallbackEx( PEX_CALLBACK_FUNCTION Function,//回调函数 PCUNICODE_STRING Altitude,//高度 PVOID Driver, PVOID Context, PLARGE_INTEGER C...
ros2 gazebo仿真阿克曼小车搭载livox mid360雷达流程
流程简介:仿真环境的搭建需要安装ROS2和Gazebo。使用的是Humble版本,需要确认是否已经正确安装。然后是阿克曼小车模型的URDF,需要包括底盘、转向机构、驱动轮等,需要参考现有的阿克曼模型,比如ClearPath的Husky,但需要调整参数。Livox Mid360雷达在Gazebo中的仿真可能没有现成的插件,需要使用通用3D LiDAR插件来模拟。IMU的仿真相对简单,但需要注意噪声模型,以接近真实数据。
电脑老蓝屏
电脑蓝屏 终止代码:REGISTRY_FILTER_DRIVER_EXCEPTION 失败的操作:hotfixplatform.sys。
DTS 数据迁移
支持关系型数据库(MySQL, Oracle, SQL Server等)、NoSQL数据库、大数据系统等。DTS数据迁移是现代化数据架构调整和云迁移过程中的重要工具,能够大大降低数据迁移的复杂度和风险。DTS (Data Transmission Service) 是一种数据迁移和同步服务,:先迁移历史数据(全量),再实时同步新增变化(增量):不同数据库类型间迁移,如Oracle到MySQL。:将单库数据迁移到分库分表架构。:将业务数据迁移到分析型数据库。:将本地数据库迁移到云数据库。
Qt Creator 下载和安装
在线安装程序是一个小型的安装程序,它将在您的计算机上下载和安装 Qt Creator。离线安装程序是一个较大的安装包,您可以将其保存在本地,并在没有网络连接的情况下安装 Qt Creator。在 Qt 官方网站上,您可以找到 Qt Creator 的下载页面。Qt Creator 是一款跨平台的集成开发环境(IDE),用于开发基于 Qt 框架的应用程序。在这一步中,您可以选择是否安装 Qt Creator 的附加组件。一旦您完成了组件的选择,安装程序将开始将 Qt Creator 安装到您的计算机上。
Windows内核
这就是PNP_INITIALIZE_BAD_CRITICAL_DRIVERS和PNP_INITIALIZE_BAD_DRIVERS策略之间的主要区别:后者允许加载所有驱动程序,包括已知为恶意的非关键驱动程序。因此,在这个阶段对驱动程序的保护不是很有效。在 Windows 内核加载阶段,控制权会移交给Windows加载器Winload.exe,它会加载必要的内核文件如Ntoskrnl.exe,在此时会加载注册表中配置为 引导启动类型(Boot Start Type)的驱动程序,包括ELAM模块。
反激电源及其变压器计算与绕制
本内容以一个宽电压输入 24V3A 输出的 72W 反激电源为例来计算电路的各个参数和器件选型,包含反激变压器的计算与绕制方法。
RegistryCallback routine
RegistryCallback routine A filter driver's RegistryCallback routine can monitor, block, or modify a registry operation. Syntax C++ EX_CALLBACK_FUNCTION RegistryCallba
汉书HE8,好用的汇编代码编写工具
汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大
锂电池充电器电路设计 里面有电路
锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。
内核回调函数
Kernel Callback Functions
WINCC7.3破解文件
WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!
Moving to Windows Vista x64(codeproject)
Moving to Windows Vista x64 By Daniel Pistelli. An article about x64 and Windows Vista. GenericWindo
全球国家地区城市数据
MySQL全球国家地区城市数据报。。。。。。。。。。。。
Windows下CmRegisterCallback简单分析
IDA看一下 进入Internal函数 signed __int64 __fastcall CmpRegisterCallbackInternal(__int64 Function, __int64 Context, const void **CmLegacyAltitude, char c_1, _QWORD *Cookie) { __int64 _Context; // rsi __int6...
【Python】成功解决NameError: name ‘os‘ is not defined
【🐍Python小妙招】拯救你的代码!告别NameError: name 'os' is not defined 🚫 😲初遇NameError,你是否一脸懵圈? 🤔为何os总是未定义?原来你没导入它! 💡深入理解import语句,让模块为你所用。 🔍排查NameError,不再被小错误绊倒。 📚掌握技巧,轻松避免NameError的尴尬。 💼os模块实战应用,文件操作更高效! 🎓总结经验,成为Python编程高手! 不再让NameError阻挡你的编程之路,轻松掌握Python os模
Registry Filter
本文使用驱动机制,可以实现对注册表操作进行拦截,而且拦截的路径可以自定义。就像杀毒软件的注册表监控一样。 同样,本程序只能运行在管理员权限下。若想要在非管理员权限下运行,则须写一个服务程序,并且在服务程序里加载这个驱动即可,不过我没有写。谁若要有兴趣,可以继续完善一下。 我的邮箱: qqliuyong007@163.com 源代码下载地址:
REG Delete用法
reg delete 从注册表删除项或子项 语法:reg delete KeyName [{/v EntryName|/ve|/va}] [/f] 参数 KeyName 指定子项的完全路径。对于远程计算机,请在\ComputerName\PathToSubkey中的子项路径前包含计算机名称。忽略ComputerName会导致默认对本地计算...
774



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



