能力值:
(RANK:400 )
|
-
-
2 楼
应该是FILE_OBJECT吧.
|
能力值:
( LV3,RANK:20 )
|
-
-
3 楼
可是我找了FILE_OBJECT的结构,也对不上那段汇编代码 ....
|
能力值:
( LV12,RANK:210 )
|
-
-
4 楼
看了下WRK,应该是:
typedef struct _SECTION {
MMADDRESS_NODE Address;
PSEGMENT Segment;
LARGE_INTEGER SizeOfSection;
union {
ULONG LongFlags;
MMSECTION_FLAGS Flags;
} u;
MM_PROTECTION_MASK InitialPageProtection;
} SECTION, *PSECTION;
if(ObReferenceObjectByHandle(SectionHandle,
SECTION_MAP_EXECUTE,
*MmSectionObjectType,
,KernelMode,
&PsProcess,NULL) == STATUS_SUCCESS)
{
__asm
{
pushad
mov eax,PsProcess ;函数返回的PVOID 指针
mov eax,[eax+14h] ;MMADDRESS_NODE 5个DWORD,所以这里+14h取的是PSEGMENT Segment;
add eax,uImageOffset ;一个结构偏移,如果在XP以前系统值0x18,XP下为0
mov ebx,[eax] ;nt!_SEGMENT: +0x000 ControlArea : Ptr32 _CONTROL_AREA
test byte ptr[ebx+20h],20h
jz NO_IMAGE_SECTION
mov bFlag,TRUE
mov eax,[ebx+24h] ;EBX指向一个_CONTROL_AREA,+0x024 FilePointer : Ptr32 _FILE_OBJECT,所以EAX指向一个_FILE_OBJECT
mov ebx,[eax+4] ;EAX指向一个_FILE_OBJECT, +0x004 DeviceObject : Ptr32 _DEVICE_OBJECT,所以EBX指向一个DeviceObject
mov hFile,ebx ;一个句柄,上面的DeviceObject
add eax,30h
mov ObjectName,eax ;一个PUNICODE_STRING 字符串,nt!_FILE_OBJECT +0x030 FileName : _UNICODE_STRING
popad
NO_IMAGE_SECTION:
}
|
能力值:
( LV3,RANK:20 )
|
-
-
5 楼
谢谢!虽然昨天在MSDN的在线文档中找到的SECTION_OBJECT到FILE_OBJECT....但还是谢谢你这么详细的解说!
|
|
|