好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

WIN7 RC 系统服务函数变更 - Windows操作系统 - 自学

 原始出处: http://HdhCmsTestdebugman测试数据/read.php?tid=3051 文章作者:MJ0011

以下涵盖了今天大约用了2个小时分析的 Windows 7 RC内核NT*函数的变动,全部来自对WIN7 RC的内核的反汇编,没有太深入分析,包含了一些我觉得有一些意思或者影响的变动、增加的功能和函数等

这里的变动和新增,指的是相对于WRK,即WIN2003 内核的变动,因此有些很多变动在VISTA中就已经有了

(1).NtCreateFile / NtOpenFile: 以下函数将改走IopCreateFile,而不是象此前的操作系统是从IoCreateFile->IopCreateFile 因此希望像从前一样hook IoCreateFile就掌控对文件打开、创建是不再可行了 同时IopCreateFile亦有CALLBACK机制了~很猥琐

但管道和邮槽的创建仍是走IoCreateFile

(2).Nt*Key

Nt*Key(除了Create/Open等)对于KeyHandle的引用改为了CmObReferenceObjectByHandle,并对KeyObject做一些校验

这样可能导致一些爆搜方式的XX实效了~

(3).NtFreezeRegistry/NtThawRegistry 冻结和解冻注册表操作,这个在VISTA就有了可以做一些猥琐的XX

(4).NtMakePermanentObject 创建永久对象的好东东, 也是VISTA支持

(5).NtNotifyChangeSession 很有用的东东

(6).NtQueryInformationProcess/NtSetInformationProcess:

新增InformationClass:

ProcessTotalCycleTime : 38 ProcessDefaultPagePriority 39 40号ID未使用 41号ID看了半天不知道是干啥的... ProcessWorkingSetWatch 42 ProcessImageFileDosDeviceName :43 取进程全路径DOS名,这个东东很厚道~ ProcessIsSameFileProcess 44 检查指定的FileHandle是否和指定进程是同一个文件,这个东西也不错 ProcesssAffinityUpdateModeEnable 45 ProcessVmTopDown 46 ProcessActiveGroupsMask 47 ProcessVirtualizationToken 48(只能SET)

//虚拟化的TOKEN~

ProcessConsoleHostProcess 49 ProcessCopyProcessHeap 50 很强大~ (7).NtQueryInformationThread

新增InformationClass:

ThreadLastCall 21

ThreadThreadIoPriority 22 //传说中的IO优先级~

ThreadTotalCycleTime 23

ThreadPagePriority 24

ThreadFullTeb 26 //获得整个TEB

ThreadAffinty 30

ThreadProfing 32

ThreadIdealProcessor 33

(8).NtQueryInformationToken:

新增InformationClass

TokenLogonSessionFlags 18 TokenGetLogonSessionToken 19 TokenXxxTokenSid 20(不知道是啥) TokenXxxTokenFlags 21 (tokenflags & 0x810,不知道是啥) TokenAccess 22 TokenTokenFlagsPos9 23 TokenTokenFlagsPos10 24 TokenGetTokenIntergrity 25

//ADMIN完整性。。

TokenTokenFlagsPos12 26

TokenMandatoryPolicy 27

(9).NtQuerySystemInformation/NtQuerySystemInformationEx/NtSetSystemInformation

SystemBasePriorityInformation 82 (need increasebasepriority privilege) SystemRefTraceInformation 86 SystemSpecialPoolInformation 87 SystemProcessesWithFullImageNameInformation 88

这个太强大了。。。

SystemRegisterErrorPort(only set , need tcb privilege)

SystemBootEnvironmentInformation 90

获取BootIdentifier GUID(_LOADER_PARAMETER_BLOCK->LOADER_PARAMETER_EXTENSION->BootIdentifier(GUID)) 从此轻松定位BCD~

SystemEnlightenmentInformation 91 SystemVerifierInformtionEx 92 SystemCovInformation 95 SystemPartitionDeviceNameInformation 98 SystemDiskDeviceNameInformation 99 SystemPerformanceDistributionInforamtion 100 SystemNumaProximityNodeInformation 101 SystemTimeZoneInformation 102 SystemCodeIntegrityInformation 103 SystemProcessorMircoCodeUpdateInformation 104(only set) SystemtProcessorBrandStringInformation 105 SystemSystemVaInformation 106 SystemLogicalProcessorRelationshipInformation 107 SystemStoreInformation 109 SystemRegistryAppendStringInformation 110 (only set) SystemAitSamplingInformation 111(only set) SystemVhdBootInformation 112 SystemCpuQuotaInformation 113 SystemLowPriorityIoInformation 116 SystemTpmBootEntropyInformation 117(only in kernel mode) SystemVerifierInformation 118 SystemAdjustPagedPoolWorkingSetSizeInformation 119(only set) SystemAdjustSystemPtesWorkingSetSizeInformation 120(only set) SystemNumaNodesInformation 121 SystempAuditQueryResultsInformation 122 SystemCommitInformation 123(total commit pages / Total Commit limt / Peak Commitment)

(10).NtQueueApcThreadEx 强大~

目前NtQueueApcThread直接调用NtQueueApcThreadEx实现

穿越HIPS~

(11).NtSystemDebugControl

参考:http://hi.baidu测试数据/mj0011/blog/item/b3ee910a05811636b1351db5. html

查看更多关于WIN7 RC 系统服务函数变更 - Windows操作系统 - 自学的详细内容...

  阅读:83次