麻烦大家帮我看个问题....实在是没头绪
NTSTATUS DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath )
{
PCSTR ModuleName[256];--------------->>>>关键一
PCSTR T;
PVOID ModuleBaseAdress[256];
unsigned int ModuleLimit[256];
ULONG size,index,ulMax,i;
PULONG buf;
NTSTATUS status;
PSYSTEM_MODULE_INFORMATION module;
unsigned int index2;
unsigned int* SSDTBase;
ZwQuerySystemInformation(SystemModuleInformation,&size, 0, &size);
if(NULL==(buf = (PULONG)ExAllocatePool(PagedPool, size)))
{
DbgPrint("failed alloc memory failed \n");
return 0;
}
status=ZwQuerySystemInformation(SystemModuleInformation,buf, size , 0);
if(!NT_SUCCESS( status ))
{
DbgPrint("failed query\n");
return 0;
}
module = (PSYSTEM_MODULE_INFORMATION)(( PULONG )buf + 1);
for (index = 0; index < *buf; index++)
{
ModuleName[index]=module[index].ImageName;
ModuleBaseAdress[index]=module[index].Base;
ModuleLimit[index]=module[index].Size;
DbgPrint("%s ",ModuleName[index]);----------->>>关键二,这句输出正常
}
ExFreePool(buf);
DbgPrint("%s ",ModuleName[2]);-------------->>>>>关键三,这句就蓝屏,为什么啊,关键二那里正常,这里就蓝屏
...
...
}
[培训]科锐逆向工程师培训第53期2025年7月8日开班!