设为首页收藏本站喵玉殿官方微博

 找回密码
 少女注册中
搜索
查看: 4930|回复: 1

[编程算法] DKOM学习笔记

[复制链接]
发表于 2011-8-19 12:54:09 | 显示全部楼层 |阅读模式
本帖最后由 十二 于 2011-8-19 12:58 编辑
  1. nt!PsGetCurrentProcess:
  2. 8329d344 64a124010000    mov     eax,dword ptr fs:[00000124h]
  3. 8329d34a 8b4050          mov     eax,dword ptr [eax+50h]
  4. 8329d34d c3              ret

  5. nt!_KPCR
  6.    +0x000 NtTib            : _NT_TIB
  7.    +0x000 Used_ExceptionList : Ptr32 _EXCEPTION_REGISTRATION_RECORD
  8.    +0x004 Used_StackBase   : Ptr32 Void
  9.    +0x008 Spare2           : Ptr32 Void
  10.    +0x00c TssCopy          : Ptr32 Void
  11.    +0x010 ContextSwitches  : Uint4B
  12.    +0x014 SetMemberCopy    : Uint4B
  13.    +0x018 Used_Self        : Ptr32 Void
  14.    +0x01c SelfPcr          : Ptr32 _KPCR
  15.    +0x020 Prcb             : Ptr32 _KPRCB
  16.    +0x024 Irql             : UChar
  17.    +0x028 IRR              : Uint4B
  18.    +0x02c IrrActive        : Uint4B
  19.    +0x030 IDR              : Uint4B
  20.    +0x034 KdVersionBlock   : Ptr32 Void
  21.    +0x038 IDT              : Ptr32 _KIDTENTRY
  22.    +0x03c GDT              : Ptr32 _KGDTENTRY
  23.    +0x040 TSS              : Ptr32 _KTSS
  24.    +0x044 MajorVersion     : Uint2B
  25.    +0x046 MinorVersion     : Uint2B
  26.    +0x048 SetMember        : Uint4B
  27.    +0x04c StallScaleFactor : Uint4B
  28.    +0x050 SpareUnused      : UChar
  29.    +0x051 Number           : UChar
  30.    +0x052 Spare0           : UChar
  31.    +0x053 SecondLevelCacheAssociativity : UChar
  32.    +0x054 VdmAlert         : Uint4B
  33.    +0x058 KernelReserved   : [14] Uint4B
  34.    +0x090 SecondLevelCacheSize : Uint4B
  35.    +0x094 HalReserved      : [16] Uint4B
  36.    +0x0d4 InterruptMode    : Uint4B
  37.    +0x0d8 Spare1           : UChar
  38.    +0x0dc KernelReserved2  : [17] Uint4B
  39.    +0x120 PrcbData         : _KPRCB

  40. nt!_KPRCB
  41.    +0x000 MinorVersion     : Uint2B
  42.    +0x002 MajorVersion     : Uint2B
  43.    +0x004 CurrentThread    : Ptr32 _KTHREAD
  44.    +0x008 NextThread       : Ptr32 _KTHREAD
  45.    +0x00c IdleThread       : Ptr32 _KTHREAD
  46.    +0x010 LegacyNumber     : UChar
  47.    +0x011 NestingLevel     : UChar
  48.    +0x012 BuildType        : Uint2B
  49.    +0x014 CpuType          : Char
  50.    +0x015 CpuID            : Char
  51.    +0x016 CpuStep          : Uint2B
  52.    +0x016 CpuStepping      : UChar
  53.    +0x017 CpuModel         : UChar
  54.    +0x018 ProcessorState   : _KPROCESSOR_STATE
  55.    +0x338 KernelReserved   : [16] Uint4B
  56.    +0x378 HalReserved      : [16] Uint4B
  57.    .................
  58.    ............

  59. nt!_KTHREAD
  60.    +0x000 Header           : _DISPATCHER_HEADER
  61.    +0x010 CycleTime        : Uint8B
  62.    +0x018 HighCycleTime    : Uint4B
  63.    +0x020 QuantumTarget    : Uint8B
  64.    +0x028 InitialStack     : Ptr32 Void
  65.    +0x02c StackLimit       : Ptr32 Void
  66.    +0x030 KernelStack      : Ptr32 Void
  67.    +0x034 ThreadLock       : Uint4B
  68.    +0x038 WaitRegister     : _KWAIT_STATUS_REGISTER
  69.    +0x039 Running          : UChar
  70.    +0x03a Alerted          : [2] UChar
  71.    +0x03c KernelStackResident : Pos 0, 1 Bit
  72.    +0x03c ReadyTransition  : Pos 1, 1 Bit
  73.    +0x03c ProcessReadyQueue : Pos 2, 1 Bit
  74.    +0x03c WaitNext         : Pos 3, 1 Bit
  75.    +0x03c SystemAffinityActive : Pos 4, 1 Bit
  76.    +0x03c Alertable        : Pos 5, 1 Bit
  77.    +0x03c GdiFlushActive   : Pos 6, 1 Bit
  78.    +0x03c UserStackWalkActive : Pos 7, 1 Bit
  79.    +0x03c ApcInterruptRequest : Pos 8, 1 Bit
  80.    +0x03c ForceDeferSchedule : Pos 9, 1 Bit
  81.    +0x03c QuantumEndMigrate : Pos 10, 1 Bit
  82.    +0x03c UmsDirectedSwitchEnable : Pos 11, 1 Bit
  83.    +0x03c TimerActive      : Pos 12, 1 Bit
  84.    +0x03c Reserved         : Pos 13, 19 Bits
  85.    +0x03c MiscFlags        : Int4B
  86.    +0x040 ApcState         : _KAPC_STATE
  87.    +0x040 ApcStateFill     : [23] UChar
  88.    +0x057 Priority         : Char
  89.    +0x058 NextProcessor    : Uint4B
  90.    +0x05c DeferredProcessor : Uint4B
  91.    +0x060 ApcQueueLock     : Uint4B
  92.    +0x064 ContextSwitches  : Uint4B
  93.    +0x068 State            : UChar
  94.    +0x069 NpxState         : Char
  95.    +0x06a WaitIrql         : UChar
  96.    +0x06b WaitMode         : Char
  97.    +0x06c WaitStatus       : Int4B
  98.    +0x070 WaitBlockList    : Ptr32 _KWAIT_BLOCK
  99.    +0x074 WaitListEntry    : _LIST_ENTRY
  100.    +0x074 SwapListEntry    : _SINGLE_LIST_ENTRY
  101.    +0x07c Queue            : Ptr32 _KQUEUE
  102.    +0x080 WaitTime         : Uint4B
  103.    +0x084 KernelApcDisable : Int2B
  104.    +0x086 SpecialApcDisable : Int2B
  105.    +0x084 CombinedApcDisable : Uint4B
  106.    +0x088 Teb              : Ptr32 Void
  107.    +0x090 Timer            : _KTIMER
  108.    +0x0b8 AutoAlignment    : Pos 0, 1 Bit
  109.    +0x0b8 DisableBoost     : Pos 1, 1 Bit
  110.    +0x0b8 EtwStackTraceApc1Inserted : Pos 2, 1 Bit
  111.    +0x0b8 EtwStackTraceApc2Inserted : Pos 3, 1 Bit
  112.    +0x0b8 CalloutActive    : Pos 4, 1 Bit
  113.    +0x0b8 ApcQueueable     : Pos 5, 1 Bit
  114.    +0x0b8 EnableStackSwap  : Pos 6, 1 Bit
  115.    +0x0b8 GuiThread        : Pos 7, 1 Bit
  116.    +0x0b8 UmsPerformingSyscall : Pos 8, 1 Bit
  117.    +0x0b8 VdmSafe          : Pos 9, 1 Bit
  118.    +0x0b8 ReservedFlags    : Pos 10, 22 Bits
  119.    +0x0b8 ThreadFlags      : Int4B
  120.    +0x0bc ServiceTable     : Ptr32 Void
  121.    +0x0c0 WaitBlock        : [4] _KWAIT_BLOCK
  122.    +0x120 QueueListEntry   : _LIST_ENTRY
  123.    +0x128 TrapFrame        : Ptr32 _KTRAP_FRAME
  124.    +0x12c FirstArgument    : Ptr32 Void
  125.    +0x130 CallbackStack    : Ptr32 Void
  126.    +0x130 CallbackDepth    : Uint4B
  127.    +0x134 ApcStateIndex    : UChar
  128.    +0x135 BasePriority     : Char
  129.    +0x136 PriorityDecrement : Char
  130.    +0x136 ForegroundBoost  : Pos 0, 4 Bits
  131.    +0x136 UnusualBoost     : Pos 4, 4 Bits
  132.    +0x137 Preempted        : UChar
  133.    +0x138 AdjustReason     : UChar
  134.    +0x139 AdjustIncrement  : Char
  135.    +0x13a PreviousMode     : Char
  136.    +0x13b Saturation       : Char
  137.    +0x13c SystemCallNumber : Uint4B
  138.    +0x140 FreezeCount      : Uint4B
  139.    +0x144 UserAffinity     : _GROUP_AFFINITY
  140.    +0x150 Process          : Ptr32 _KPROCESS
  141.    +0x154 Affinity         : _GROUP_AFFINITY
  142.    +0x160 IdealProcessor   : Uint4B
  143.    +0x164 UserIdealProcessor : Uint4B
  144.    +0x168 ApcStatePointer  : [2] Ptr32 _KAPC_STATE
  145.    +0x170 SavedApcState    : _KAPC_STATE
  146.    +0x170 SavedApcStateFill : [23] UChar
  147.    +0x187 WaitReason       : UChar
  148.    +0x188 SuspendCount     : Char
  149.    +0x189 Spare1           : Char
  150.    +0x18a OtherPlatformFill : UChar
  151.    +0x18c Win32Thread      : Ptr32 Void
  152.    +0x190 StackBase        : Ptr32 Void
  153.    +0x194 SuspendApc       : _KAPC
  154.    +0x194 SuspendApcFill0  : [1] UChar
  155.    +0x195 ResourceIndex    : UChar
  156.    +0x194 SuspendApcFill1  : [3] UChar
  157.    +0x197 QuantumReset     : UChar
  158.    +0x194 SuspendApcFill2  : [4] UChar
  159.    +0x198 KernelTime       : Uint4B
  160.    +0x194 SuspendApcFill3  : [36] UChar
  161.    +0x1b8 WaitPrcb         : Ptr32 _KPRCB
  162.    +0x194 SuspendApcFill4  : [40] UChar
  163.    +0x1bc LegoData         : Ptr32 Void
  164.    +0x194 SuspendApcFill5  : [47] UChar
  165.    +0x1c3 LargeStack       : UChar
  166.    +0x1c4 UserTime         : Uint4B
  167.    +0x1c8 SuspendSemaphore : _KSEMAPHORE
  168.    +0x1c8 SuspendSemaphorefill : [20] UChar
  169.    +0x1dc SListFaultCount  : Uint4B
  170.    +0x1e0 ThreadListEntry  : _LIST_ENTRY
  171.    +0x1e8 MutantListHead   : _LIST_ENTRY
  172.    +0x1f0 SListFaultAddress : Ptr32 Void
  173.    +0x1f4 ThreadCounters   : Ptr32 _KTHREAD_COUNTERS
  174.    +0x1f8 XStateSave       : Ptr32 _XSTATE_SAVE

  175. nt!_KAPC_STATE
  176.    +0x000 ApcListHead      : [2] _LIST_ENTRY
  177.    +0x010 Process          : Ptr32 _KPROCESS
  178.    +0x014 KernelApcInProgress : UChar
  179.    +0x015 KernelApcPending : UChar
  180.    +0x016 UserApcPending   : UChar

  181. nt!_Eprocess
  182.    +0x000 Pcb              : _KPROCESS
  183.    +0x098 ProcessLock      : _EX_PUSH_LOCK
  184.    +0x0a0 CreateTime       : _LARGE_INTEGER
  185.    +0x0a8 ExitTime         : _LARGE_INTEGER
  186.    +0x0b0 RundownProtect   : _EX_RUNDOWN_REF
  187.    +0x0b4 UniqueProcessId  : Ptr32 Void
  188.    +0x0b8 ActiveProcessLinks : _LIST_ENTRY
  189.    +0x0c0 ProcessQuotaUsage : [2] Uint4B
  190.    +0x0c8 ProcessQuotaPeak : [2] Uint4B
  191.    +0x0d0 CommitCharge     : Uint4B
  192.    +0x0d4 QuotaBlock       : Ptr32 _EPROCESS_QUOTA_BLOCK
  193.    +0x0d8 CpuQuotaBlock    : Ptr32 _PS_CPU_QUOTA_BLOCK
  194.    +0x0dc PeakVirtualSize  : Uint4B
  195.    +0x0e0 VirtualSize      : Uint4B
  196.    +0x0e4 SessionProcessLinks : _LIST_ENTRY
  197.    +0x0ec DebugPort        : Ptr32 Void
  198.    +0x0f0 ExceptionPortData : Ptr32 Void
  199.    +0x0f0 ExceptionPortValue : Uint4B
  200.    +0x0f0 ExceptionPortState : Pos 0, 3 Bits
  201.    +0x0f4 ObjectTable      : Ptr32 _HANDLE_TABLE
  202.    +0x0f8 Token            : _EX_FAST_REF
  203.    +0x0fc WorkingSetPage   : Uint4B
  204.    +0x100 AddressCreationLock : _EX_PUSH_LOCK
  205.    +0x104 RotateInProgress : Ptr32 _ETHREAD
  206.    +0x108 ForkInProgress   : Ptr32 _ETHREAD
  207.    +0x10c HardwareTrigger  : Uint4B
  208.    +0x110 PhysicalVadRoot  : Ptr32 _MM_AVL_TABLE
  209.    +0x114 CloneRoot        : Ptr32 Void
  210.    +0x118 NumberOfPrivatePages : Uint4B
  211.    +0x11c NumberOfLockedPages : Uint4B
  212.    +0x120 Win32Process     : Ptr32 Void
  213.    +0x124 Job              : Ptr32 _EJOB
  214.    +0x128 SectionObject    : Ptr32 Void
  215.    +0x12c SectionBaseAddress : Ptr32 Void
  216.    +0x130 Cookie           : Uint4B
  217.    +0x134 Spare8           : Uint4B
  218.    +0x138 WorkingSetWatch  : Ptr32 _PAGEFAULT_HISTORY
  219.    +0x13c Win32WindowStation : Ptr32 Void
  220.    +0x140 InheritedFromUniqueProcessId : Ptr32 Void
  221.    +0x144 LdtInformation   : Ptr32 Void
  222.    +0x148 VdmObjects       : Ptr32 Void
  223.    +0x14c ConsoleHostProcess : Uint4B
  224.    +0x150 DeviceMap        : Ptr32 Void
  225.    +0x154 EtwDataSource    : Ptr32 Void
  226.    +0x158 FreeTebHint      : Ptr32 Void
  227.    +0x160 PageDirectoryPte : _HARDWARE_PTE
  228.    +0x160 Filler           : Uint8B
  229.    +0x168 Session          : Ptr32 Void
  230.    +0x16c ImageFileName    : [15] UChar
  231.    +0x17b PriorityClass    : UChar
  232.    +0x17c JobLinks         : _LIST_ENTRY
  233.    +0x184 LockedPagesList  : Ptr32 Void
  234.    +0x188 ThreadListHead   : _LIST_ENTRY
  235.    +0x190 SecurityPort     : Ptr32 Void
  236.    +0x194 PaeTop           : Ptr32 Void
  237.    +0x198 ActiveThreads    : Uint4B
  238.    +0x19c ImagePathHash    : Uint4B
  239.    +0x1a0 DefaultHardErrorProcessing : Uint4B
  240.    +0x1a4 LastThreadExitStatus : Int4B
  241.    +0x1a8 Peb              : Ptr32 _PEB
  242.    +0x1ac PrefetchTrace    : _EX_FAST_REF
  243.    +0x1b0 ReadOperationCount : _LARGE_INTEGER
  244.    +0x1b8 WriteOperationCount : _LARGE_INTEGER
  245.    +0x1c0 OtherOperationCount : _LARGE_INTEGER
  246.    +0x1c8 ReadTransferCount : _LARGE_INTEGER
  247.    +0x1d0 WriteTransferCount : _LARGE_INTEGER
  248.    +0x1d8 OtherTransferCount : _LARGE_INTEGER
  249.    +0x1e0 CommitChargeLimit : Uint4B
  250.    +0x1e4 CommitChargePeak : Uint4B
  251.    +0x1e8 AweInfo          : Ptr32 Void
  252.    +0x1ec SeAuditProcessCreationInfo : _SE_AUDIT_PROCESS_CREATION_INFO
  253.    +0x1f0 Vm               : _MMSUPPORT
  254.    +0x25c MmProcessLinks   : _LIST_ENTRY
  255.    +0x264 HighestUserAddress : Ptr32 Void
  256.    +0x268 ModifiedPageCount : Uint4B
  257.    +0x26c Flags2           : Uint4B
  258.    +0x26c JobNotReallyActive : Pos 0, 1 Bit
  259.    +0x26c AccountingFolded : Pos 1, 1 Bit
  260.    +0x26c NewProcessReported : Pos 2, 1 Bit
  261.    +0x26c ExitProcessReported : Pos 3, 1 Bit
  262.    +0x26c ReportCommitChanges : Pos 4, 1 Bit
  263.    +0x26c LastReportMemory : Pos 5, 1 Bit
  264.    +0x26c ReportPhysicalPageChanges : Pos 6, 1 Bit
  265.    +0x26c HandleTableRundown : Pos 7, 1 Bit
  266.    +0x26c NeedsHandleRundown : Pos 8, 1 Bit
  267.    +0x26c RefTraceEnabled  : Pos 9, 1 Bit
  268.    +0x26c NumaAware        : Pos 10, 1 Bit
  269.    +0x26c ProtectedProcess : Pos 11, 1 Bit
  270.    +0x26c DefaultPagePriority : Pos 12, 3 Bits
  271.    +0x26c PrimaryTokenFrozen : Pos 15, 1 Bit
  272.    +0x26c ProcessVerifierTarget : Pos 16, 1 Bit
  273.    +0x26c StackRandomizationDisabled : Pos 17, 1 Bit
  274.    +0x26c AffinityPermanent : Pos 18, 1 Bit
  275.    +0x26c AffinityUpdateEnable : Pos 19, 1 Bit
  276.    +0x26c PropagateNode    : Pos 20, 1 Bit
  277.    +0x26c ExplicitAffinity : Pos 21, 1 Bit
  278.    +0x270 Flags            : Uint4B
  279.    +0x270 CreateReported   : Pos 0, 1 Bit
  280.    +0x270 NoDebugInherit   : Pos 1, 1 Bit
  281.    +0x270 ProcessExiting   : Pos 2, 1 Bit
  282.    +0x270 ProcessDelete    : Pos 3, 1 Bit
  283.    +0x270 Wow64SplitPages  : Pos 4, 1 Bit
  284.    +0x270 VmDeleted        : Pos 5, 1 Bit
  285.    +0x270 OutswapEnabled   : Pos 6, 1 Bit
  286.    +0x270 Outswapped       : Pos 7, 1 Bit
  287.    +0x270 ForkFailed       : Pos 8, 1 Bit
  288.    +0x270 Wow64VaSpace4Gb  : Pos 9, 1 Bit
  289.    +0x270 AddressSpaceInitialized : Pos 10, 2 Bits
  290.    +0x270 SetTimerResolution : Pos 12, 1 Bit
  291.    +0x270 BreakOnTermination : Pos 13, 1 Bit
  292.    +0x270 DeprioritizeViews : Pos 14, 1 Bit
  293.    +0x270 WriteWatch       : Pos 15, 1 Bit
  294.    +0x270 ProcessInSession : Pos 16, 1 Bit
  295.    +0x270 OverrideAddressSpace : Pos 17, 1 Bit
  296.    +0x270 HasAddressSpace  : Pos 18, 1 Bit
  297.    +0x270 LaunchPrefetched : Pos 19, 1 Bit
  298.    +0x270 InjectInpageErrors : Pos 20, 1 Bit
  299.    +0x270 VmTopDown        : Pos 21, 1 Bit
  300.    +0x270 ImageNotifyDone  : Pos 22, 1 Bit
  301.    +0x270 PdeUpdateNeeded  : Pos 23, 1 Bit
  302.    +0x270 VdmAllowed       : Pos 24, 1 Bit
  303.    +0x270 CrossSessionCreate : Pos 25, 1 Bit
  304.    +0x270 ProcessInserted  : Pos 26, 1 Bit
  305.    +0x270 DefaultIoPriority : Pos 27, 3 Bits
  306.    +0x270 ProcessSelfDelete : Pos 30, 1 Bit
  307.    +0x270 SetTimerResolutionLink : Pos 31, 1 Bit
  308.    +0x274 ExitStatus       : Int4B
  309.    +0x278 VadRoot          : _MM_AVL_TABLE
  310.    +0x298 AlpcContext      : _ALPC_PROCESS_CONTEXT
  311.    +0x2a8 TimerResolutionLink : _LIST_ENTRY
  312.    +0x2b0 RequestedTimerResolution : Uint4B
  313.    +0x2b4 ActiveThreadsHighWatermark : Uint4B
  314.    +0x2b8 SmallestTimerResolution : Uint4B
  315.    +0x2bc TimerResolutionStackRecord : Ptr32 _PO_DIAG_STACK_RECORD

复制代码
至此得到Eprocess指针。+B8得到ActiveProcessLinks指针。
  1. nt!_List_Entry
  2.    +0x000 Flink            : Ptr32 _LIST_ENTRY
  3.    +0x004 Blink            : Ptr32 _LIST_ENTRY
复制代码
根据Flink得到本进程的后一个进程List_entry和根据Blink得到前一进程的List_entry,修改后一进程的Blink为前一进程的List_enty,同样修改前一进程的Flink为后一进程的List_enty即可。

修改Blink为Flink也行不过,不知道为什么我这么修改后隐藏俩个进程- = 求解
发表于 2011-8-27 16:38:49 | 显示全部楼层
这个看上去像个大结构体的东东是什么?
Windows的进程控制块(PCB)么?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 少女注册中

本版积分规则

合作与事务联系|无图版|手机版|小黑屋|喵玉殿

GMT+8, 2025-10-31 10:42

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表