读书人

求EPROCESS/ETHREAD结构定义,该怎么解

发布时间: 2012-01-28 22:06:13 作者: rapoo

求EPROCESS/ETHREAD结构定义
求windows各个不同版本的EPROCESS/ETHREAD结构定义,至少要有w2k, XP, 和Vista的EPROCESS/ETHREAD结构及各变量偏移量,如果能详细到各个sp版本的更好。


[解决办法]
XP SP 2
_EPROCESS
+0x000 Pcb : _KPROCESS
+0x06c ProcessLock : _EX_PUSH_LOCK
+0x070 CreateTime : _LARGE_INTEGER
+0x078 ExitTime : _LARGE_INTEGER
+0x080 RundownProtect : _EX_RUNDOWN_REF
+0x084 UniqueProcessId : Ptr32 Void
+0x088 ActiveProcessLinks : _LIST_ENTRY
+0x090 QuotaUsage : [3] Uint4B
+0x09c QuotaPeak : [3] Uint4B
+0x0a8 CommitCharge : Uint4B
+0x0ac PeakVirtualSize : Uint4B
+0x0b0 VirtualSize : Uint4B
+0x0b4 SessionProcessLinks : _LIST_ENTRY
+0x0bc DebugPort : Ptr32 Void
+0x0c0 ExceptionPort : Ptr32 Void
+0x0c4 ObjectTable : Ptr32 _HANDLE_TABLE
+0x0c8 Token : _EX_FAST_REF
+0x0cc WorkingSetLock : _FAST_MUTEX
+0x0ec WorkingSetPage : Uint4B
+0x0f0 AddressCreationLock : _FAST_MUTEX
+0x110 HyperSpaceLock : Uint4B
+0x114 ForkInProgress : Ptr32 _ETHREAD
+0x118 HardwareTrigger : Uint4B
+0x11c VadRoot : Ptr32 Void
+0x120 VadHint : Ptr32 Void
+0x124 CloneRoot : Ptr32 Void
+0x128 NumberOfPrivatePages : Uint4B
+0x12c NumberOfLockedPages : Uint4B
+0x130 Win32Process : Ptr32 Void
+0x134 Job : Ptr32 _EJOB
+0x138 SectionObject : Ptr32 Void
+0x13c SectionBaseAddress : Ptr32 Void
+0x140 QuotaBlock : Ptr32 _EPROCESS_QUOTA_BLOCK
+0x144 WorkingSetWatch : Ptr32 _PAGEFAULT_HISTORY
+0x148 Win32WindowStation : Ptr32 Void
+0x14c InheritedFromUniqueProcessId : Ptr32 Void
+0x150 LdtInformation : Ptr32 Void
+0x154 VadFreeHint : Ptr32 Void
+0x158 VdmObjects : Ptr32 Void
+0x15c DeviceMap : Ptr32 Void
+0x160 PhysicalVadList : _LIST_ENTRY
+0x168 PageDirectoryPte : _HARDWARE_PTE
+0x168 Filler : Uint8B
+0x170 Session : Ptr32 Void
+0x174 ImageFileName : [16] UChar
+0x184 JobLinks : _LIST_ENTRY
+0x18c LockedPagesList : Ptr32 Void
+0x190 ThreadListHead : _LIST_ENTRY
+0x198 SecurityPort : Ptr32 Void
+0x19c PaeTop : Ptr32 Void
+0x1a0 ActiveThreads : Uint4B
+0x1a4 GrantedAccess : Uint4B
+0x1a8 DefaultHardErrorProcessing : Uint4B
+0x1ac LastThreadExitStatus : Int4B
+0x1b0 Peb : Ptr32 _PEB
+0x1b4 PrefetchTrace : _EX_FAST_REF
+0x1b8 ReadOperationCount : _LARGE_INTEGER
+0x1c0 WriteOperationCount : _LARGE_INTEGER
+0x1c8 OtherOperationCount : _LARGE_INTEGER
+0x1d0 ReadTransferCount : _LARGE_INTEGER
+0x1d8 WriteTransferCount : _LARGE_INTEGER
+0x1e0 OtherTransferCount : _LARGE_INTEGER
+0x1e8 CommitChargeLimit : Uint4B
+0x1ec CommitChargePeak : Uint4B
+0x1f0 AweInfo : Ptr32 Void
+0x1f4 SeAuditProcessCreationInfo : _SE_AUDIT_PROCESS_CREATION_INFO
+0x1f8 Vm : _MMSUPPORT
+0x238 LastFaultCount : Uint4B
+0x23c ModifiedPageCount : Uint4B
+0x240 NumberOfVads : Uint4B
+0x244 JobStatus : Uint4B
+0x248 Flags : Uint4B
+0x248 CreateReported : Pos 0, 1 Bit
+0x248 NoDebugInherit : Pos 1, 1 Bit
+0x248 ProcessExiting : Pos 2, 1 Bit
+0x248 ProcessDelete : Pos 3, 1 Bit
+0x248 Wow64SplitPages : Pos 4, 1 Bit
+0x248 VmDeleted : Pos 5, 1 Bit
+0x248 OutswapEnabled : Pos 6, 1 Bit


+0x248 Outswapped : Pos 7, 1 Bit
+0x248 ForkFailed : Pos 8, 1 Bit
+0x248 HasPhysicalVad : Pos 9, 1 Bit
+0x248 AddressSpaceInitialized : Pos 10, 2 Bits
+0x248 SetTimerResolution : Pos 12, 1 Bit
+0x248 BreakOnTermination : Pos 13, 1 Bit
+0x248 SessionCreationUnderway : Pos 14, 1 Bit
+0x248 WriteWatch : Pos 15, 1 Bit
+0x248 ProcessInSession : Pos 16, 1 Bit
+0x248 OverrideAddressSpace : Pos 17, 1 Bit
+0x248 HasAddressSpace : Pos 18, 1 Bit
+0x248 LaunchPrefetched : Pos 19, 1 Bit
+0x248 InjectInpageErrors : Pos 20, 1 Bit
+0x248 VmTopDown : Pos 21, 1 Bit
+0x248 Unused3 : Pos 22, 1 Bit
+0x248 Unused4 : Pos 23, 1 Bit
+0x248 VdmAllowed : Pos 24, 1 Bit
+0x248 Unused : Pos 25, 5 Bits
+0x248 Unused1 : Pos 30, 1 Bit
+0x248 Unused2 : Pos 31, 1 Bit
+0x24c ExitStatus : Int4B
+0x250 NextPageColor : Uint2B
+0x252 SubSystemMinorVersion : UChar
+0x253 SubSystemMajorVersion : UChar
+0x252 SubSystemVersion : Uint2B
+0x254 PriorityClass : UChar
+0x255 WorkingSetAcquiredUnsafe : UChar
+0x258 Cookie : Uint4B
_ETHREAD
+0x000 Tcb : _KTHREAD
+0x1c0 CreateTime : _LARGE_INTEGER
+0x1c0 NestedFaultCount : Pos 0, 2 Bits
+0x1c0 ApcNeeded : Pos 2, 1 Bit
+0x1c8 ExitTime : _LARGE_INTEGER
+0x1c8 LpcReplyChain : _LIST_ENTRY
+0x1c8 KeyedWaitChain : _LIST_ENTRY
+0x1d0 ExitStatus : Int4B
+0x1d0 OfsChain : Ptr32 Void
+0x1d4 PostBlockList : _LIST_ENTRY
+0x1dc TerminationPort : Ptr32 _TERMINATION_PORT
+0x1dc ReaperLink : Ptr32 _ETHREAD
+0x1dc KeyedWaitValue : Ptr32 Void
+0x1e0 ActiveTimerListLock : Uint4B
+0x1e4 ActiveTimerListHead : _LIST_ENTRY
+0x1ec Cid : _CLIENT_ID
+0x1f4 LpcReplySemaphore : _KSEMAPHORE
+0x1f4 KeyedWaitSemaphore : _KSEMAPHORE
+0x208 LpcReplyMessage : Ptr32 Void
+0x208 LpcWaitingOnPort : Ptr32 Void
+0x20c ImpersonationInfo : Ptr32 _PS_IMPERSONATION_INFORMATION
+0x210 IrpList : _LIST_ENTRY
+0x218 TopLevelIrp : Uint4B
+0x21c DeviceToVerify : Ptr32 _DEVICE_OBJECT
+0x220 ThreadsProcess : Ptr32 _EPROCESS
+0x224 StartAddress : Ptr32 Void
+0x228 Win32StartAddress : Ptr32 Void
+0x228 LpcReceivedMessageId : Uint4B
+0x22c ThreadListEntry : _LIST_ENTRY
+0x234 RundownProtect : _EX_RUNDOWN_REF
+0x238 ThreadLock : _EX_PUSH_LOCK
+0x23c LpcReplyMessageId : Uint4B
+0x240 ReadClusterSize : Uint4B
+0x244 GrantedAccess : Uint4B
+0x248 CrossThreadFlags : Uint4B
+0x248 Terminated : Pos 0, 1 Bit
+0x248 DeadThread : Pos 1, 1 Bit
+0x248 HideFromDebugger : Pos 2, 1 Bit
+0x248 ActiveImpersonationInfo : Pos 3, 1 Bit
+0x248 SystemThread : Pos 4, 1 Bit
+0x248 HardErrorsAreDisabled : Pos 5, 1 Bit
+0x248 BreakOnTermination : Pos 6, 1 Bit
+0x248 SkipCreationMsg : Pos 7, 1 Bit
+0x248 SkipTerminationMsg : Pos 8, 1 Bit
+0x24c SameThreadPassiveFlags : Uint4B
+0x24c ActiveExWorker : Pos 0, 1 Bit
+0x24c ExWorkerCanWaitUser : Pos 1, 1 Bit
+0x24c MemoryMaker : Pos 2, 1 Bit
+0x250 SameThreadApcFlags : Uint4B
+0x250 LpcReceivedMsgIdValid : Pos 0, 1 Bit
+0x250 LpcExitThreadCalled : Pos 1, 1 Bit
+0x250 AddressSpaceOwner : Pos 2, 1 Bit
+0x254 ForwardClusterOnly : UChar
+0x255 DisablePageFaultClustering : UChar

------解决方案--------------------


敲错了,我是说offsetof,比如 offsetof(_EPROCESS, Peb)给出Peb的偏移。

如果想看偏移量,用Windbg-> Kernel Debug-> Local,然后

!symfix
.reload -f nt
dt _EPROCESS

就可以了, Vista 下:

0: kd> vertarget
Windows Vista Kernel Version 6000 MP (2 procs) Free x86 compatible
Built by: 6000.16386.x86fre.vista_rtm.061101-2205
Kernel base = 0x81800000 PsLoadedModuleList = 0x81908ab0
Debug session time: Fri Aug 31 16:16:35.457 2007 (GMT-7)
System Uptime: 0 days 0:00:18.191

0: kd> dt _EPROCESS
ntdll!_EPROCESS
+0x000 Pcb : _KPROCESS
+0x080 ProcessLock : _EX_PUSH_LOCK
+0x088 CreateTime : _LARGE_INTEGER
+0x090 ExitTime : _LARGE_INTEGER
+0x098 RundownProtect : _EX_RUNDOWN_REF
+0x09c UniqueProcessId : Ptr32 Void
+0x0a0 ActiveProcessLinks : _LIST_ENTRY
+0x0a8 QuotaUsage : [3] Uint4B
+0x0b4 QuotaPeak : [3] Uint4B
+0x0c0 CommitCharge : Uint4B
+0x0c4 PeakVirtualSize : Uint4B
+0x0c8 VirtualSize : Uint4B
+0x0cc SessionProcessLinks : _LIST_ENTRY
+0x0d4 DebugPort : Ptr32 Void
+0x0d8 ExceptionPortData : Ptr32 Void
+0x0d8 ExceptionPortValue : Uint4B
+0x0d8 ExceptionPortState : Pos 0, 3 Bits
+0x0dc ObjectTable : Ptr32 _HANDLE_TABLE
+0x0e0 Token : _EX_FAST_REF
+0x0e4 WorkingSetPage : Uint4B
+0x0e8 AddressCreationLock : _EX_PUSH_LOCK
+0x0ec RotateInProgress : Ptr32 _ETHREAD
+0x0f0 ForkInProgress : Ptr32 _ETHREAD
+0x0f4 HardwareTrigger : Uint4B
+0x0f8 PhysicalVadRoot : Ptr32 _MM_AVL_TABLE
+0x0fc CloneRoot : Ptr32 Void
+0x100 NumberOfPrivatePages : Uint4B
+0x104 NumberOfLockedPages : Uint4B
+0x108 Win32Process : Ptr32 Void
+0x10c Job : Ptr32 _EJOB
+0x110 SectionObject : Ptr32 Void
+0x114 SectionBaseAddress : Ptr32 Void
+0x118 QuotaBlock : Ptr32 _EPROCESS_QUOTA_BLOCK
+0x11c WorkingSetWatch : Ptr32 _PAGEFAULT_HISTORY
+0x120 Win32WindowStation : Ptr32 Void
+0x124 InheritedFromUniqueProcessId : Ptr32 Void
+0x128 LdtInformation : Ptr32 Void
+0x12c VadFreeHint : Ptr32 Void
+0x130 VdmObjects : Ptr32 Void
+0x134 DeviceMap : Ptr32 Void
+0x138 EtwDataSource : Ptr32 Void
+0x13c FreeTebHint : Ptr32 Void
+0x140 PageDirectoryPte : _HARDWARE_PTE_X86
+0x140 Filler : Uint8B
+0x148 Session : Ptr32 Void
+0x14c ImageFileName : [16] UChar
+0x15c JobLinks : _LIST_ENTRY
+0x164 LockedPagesList : Ptr32 Void
+0x168 ThreadListHead : _LIST_ENTRY
+0x170 SecurityPort : Ptr32 Void
+0x174 PaeTop : Ptr32 Void
+0x178 ActiveThreads : Uint4B
+0x17c ImagePathHash : Uint4B
+0x180 DefaultHardErrorProcessing : Uint4B
+0x184 LastThreadExitStatus : Int4B
+0x188 Peb : Ptr32 _PEB
+0x18c PrefetchTrace : _EX_FAST_REF
+0x190 ReadOperationCount : _LARGE_INTEGER
+0x198 WriteOperationCount : _LARGE_INTEGER
+0x1a0 OtherOperationCount : _LARGE_INTEGER
+0x1a8 ReadTransferCount : _LARGE_INTEGER
+0x1b0 WriteTransferCount : _LARGE_INTEGER
+0x1b8 OtherTransferCount : _LARGE_INTEGER
+0x1c0 CommitChargeLimit : Uint4B
+0x1c4 CommitChargePeak : Uint4B
+0x1c8 AweInfo : Ptr32 Void
+0x1cc SeAuditProcessCreationInfo : _SE_AUDIT_PROCESS_CREATION_INFO
+0x1d0 Vm : _MMSUPPORT
+0x218 MmProcessLinks : _LIST_ENTRY
+0x220 ModifiedPageCount : Uint4B
+0x224 Flags2 : Uint4B


+0x224 JobNotReallyActive : Pos 0, 1 Bit
+0x224 AccountingFolded : Pos 1, 1 Bit
+0x224 NewProcessReported : Pos 2, 1 Bit
+0x224 ExitProcessReported : Pos 3, 1 Bit
+0x224 ReportCommitChanges : Pos 4, 1 Bit
+0x224 LastReportMemory : Pos 5, 1 Bit
+0x224 ReportPhysicalPageChanges : Pos 6, 1 Bit
+0x224 HandleTableRundown : Pos 7, 1 Bit
+0x224 NeedsHandleRundown : Pos 8, 1 Bit
+0x224 RefTraceEnabled : Pos 9, 1 Bit
+0x224 NumaAware : Pos 10, 1 Bit
+0x224 ProtectedProcess : Pos 11, 1 Bit
+0x224 DefaultPagePriority : Pos 12, 3 Bits
+0x224 PrimaryTokenFrozen : Pos 15, 1 Bit
+0x224 ProcessVerifierTarget : Pos 16, 1 Bit
+0x224 StackRandomizationDisabled : Pos 17, 1 Bit
+0x228 Flags : Uint4B
+0x228 CreateReported : Pos 0, 1 Bit
+0x228 NoDebugInherit : Pos 1, 1 Bit
+0x228 ProcessExiting : Pos 2, 1 Bit
+0x228 ProcessDelete : Pos 3, 1 Bit
+0x228 Wow64SplitPages : Pos 4, 1 Bit
+0x228 VmDeleted : Pos 5, 1 Bit
+0x228 OutswapEnabled : Pos 6, 1 Bit
+0x228 Outswapped : Pos 7, 1 Bit
+0x228 ForkFailed : Pos 8, 1 Bit
+0x228 Wow64VaSpace4Gb : Pos 9, 1 Bit
+0x228 AddressSpaceInitialized : Pos 10, 2 Bits
+0x228 SetTimerResolution : Pos 12, 1 Bit
+0x228 BreakOnTermination : Pos 13, 1 Bit
+0x228 DeprioritizeViews : Pos 14, 1 Bit
+0x228 WriteWatch : Pos 15, 1 Bit
+0x228 ProcessInSession : Pos 16, 1 Bit
+0x228 OverrideAddressSpace : Pos 17, 1 Bit
+0x228 HasAddressSpace : Pos 18, 1 Bit
+0x228 LaunchPrefetched : Pos 19, 1 Bit
+0x228 InjectInpageErrors : Pos 20, 1 Bit
+0x228 VmTopDown : Pos 21, 1 Bit
+0x228 ImageNotifyDone : Pos 22, 1 Bit
+0x228 PdeUpdateNeeded : Pos 23, 1 Bit
+0x228 VdmAllowed : Pos 24, 1 Bit
+0x228 SmapAllowed : Pos 25, 1 Bit
+0x228 ProcessInserted : Pos 26, 1 Bit
+0x228 DefaultIoPriority : Pos 27, 3 Bits
+0x228 SparePsFlags1 : Pos 30, 2 Bits
+0x22c ExitStatus : Int4B
+0x230 Spare7 : Uint2B
+0x232 SubSystemMinorVersion : UChar
+0x233 SubSystemMajorVersion : UChar
+0x232 SubSystemVersion : Uint2B
+0x234 PriorityClass : UChar
+0x238 VadRoot : _MM_AVL_TABLE
+0x258 Cookie : Uint4B
+0x25c AlpcContext : _ALPC_PROCESS_CONTEXT

读书人网 >VC/MFC

热点推荐