首页
社区
课程
招聘
[旧帖] [求助]不理解一段代码,求解 0.00雪花
发表于: 2009-10-29 16:34 3049

[旧帖] [求助]不理解一段代码,求解 0.00雪花

2009-10-29 16:34
3049
ns=  ObReferenceObjectByHandle(  sectionhandle,  0,  NULL,  KernelMode,  &pKey,  NULL  )  ;     
        pFile=(PVOID)*(ULONG  *)((char  *)pKey+20);  
        pFile=(PVOID)*(ULONG  *)((char  *)pFile);  
        pFile=(PVOID)*(ULONG  *)((char  *)pFile+36);  

ZwCreateProcess 根据传递进去的sectionhandle取进程的路径.

nt!_SECTION_OBJECT
   +0x000 StartingVa       : Ptr32 Void
   +0x004 EndingVa         : Ptr32 Void
   +0x008 Parent           : Ptr32 Void
   +0x00c LeftChild        : Ptr32 Void
   +0x010 RightChild       : Ptr32 Void
   +0x014 Segment          : Ptr32 _SEGMENT_OBJECT

lkd> dt _SEGMENT_OBJECT
nt!_SEGMENT_OBJECT
   +0x000 BaseAddress      : Ptr32 Void
   +0x004 TotalNumberOfPtes : Uint4B
   +0x008 SizeOfSegment    : _LARGE_INTEGER
   +0x010 NonExtendedPtes  : Uint4B
   +0x014 ImageCommitment  : Uint4B
   +0x018 ControlArea      : Ptr32 _CONTROL_AREA
   +0x01c Subsection       : Ptr32 _SUBSECTION
   +0x020 LargeControlArea : Ptr32 _LARGE_CONTROL_AREA
   +0x024 MmSectionFlags   : Ptr32 _MMSECTION_FLAGS
   +0x028 MmSubSectionFlags : Ptr32 _MMSUBSECTION_FLAGS

pFile=(PVOID)*(ULONG  *)((char  *)pFile);  这句取的是BaseAddress     
BaseAddress     这个对应的是什么啊??  
所以后面的 + 36 看不懂了。。谢谢解答。

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 235
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
BaseAddress     指的是  ControlArea      ??
然后取ControlArea      的FilePointer      ?

nt!_CONTROL_AREA
   +0x000 Segment          : Ptr32 _SEGMENT
   +0x004 DereferenceList  : _LIST_ENTRY
   +0x00c NumberOfSectionReferences : Uint4B
   +0x010 NumberOfPfnReferences : Uint4B
   +0x014 NumberOfMappedViews : Uint4B
   +0x018 NumberOfSubsections : Uint2B
   +0x01a FlushInProgressCount : Uint2B
   +0x01c NumberOfUserReferences : Uint4B
   +0x020 u                : __unnamed
   +0x024 FilePointer      : Ptr32 _FILE_OBJECT
   +0x028 WaitingForDeletion : Ptr32 _EVENT_COUNTER
   +0x02c ModifiedWriteCount : Uint2B
   +0x02e NumberOfSystemCacheViews : Uint2B
2009-10-29 16:37
0
游客
登录 | 注册 方可回帖
返回
//