关于idt的基本知识就不进行赘述了,先看一个例子

  1. 0x1000: mov eax,x1006: Int ;------->进入内核,找到中断处理例程KiTrap03
  2. 0x1007: Mov eax,

这段代码执行,触发3号中断,然后开始执行KiTrap03例程,要知道,执行完中断以后还是要回到原来的程序处继续执行的,也就是我们这的Mov eax, 1的指令,显然,发生中断时的寄存器环境就要被保存,便于之后的恢复程序运行,这里,就出现了一个结构_KTRAP_FRAME,陷阱帧。

  1. kd> dt _KTRAP_FRAME
  2. nt!_KTRAP_FRAME
  3. +0x000 DbgEbp : Uint4B
  4. +0x004 DbgEip : Uint4B
  5. +0x008 DbgArgMark : Uint4B
  6. +0x00c DbgArgPointer : Uint4B
  7. +0x010 TempSegCs : Uint2B
  8. +0x012 Logging : UChar
  9. +0x013 Reserved : UChar
  10. +0x014 TempEsp : Uint4B
  11. +0x018 Dr0 : Uint4B
  12. +0x01c Dr1 : Uint4B
  13. +0x020 Dr2 : Uint4B
  14. +0x024 Dr3 : Uint4B
  15. +0x028 Dr6 : Uint4B
  16. +0x02c Dr7 : Uint4B
  17. +0x030 SegGs : Uint4B
  18. +0x034 SegEs : Uint4B
  19. +0x038 SegDs : Uint4B
  20. +0x03c Edx : Uint4B
  21. +0x040 Ecx : Uint4B
  22. +0x044 Eax : Uint4B
  23. +0x048 PreviousPreviousMode : Uint4B
  24. +0x04c ExceptionList : Ptr32 _EXCEPTION_REGISTRATION_RECORD
  25. +0x050 SegFs : Uint4B
  26. +0x054 Edi : Uint4B
  27. +0x058 Esi : Uint4B
  28. +0x05c Ebx : Uint4B
  29. +0x060 Ebp : Uint4B
  30. +0x064 ErrCode : Uint4B
  31. +0x068 Eip : Uint4B //硬件自动填充
  32. +0x06c SegCs : Uint4B //硬件自动填充
  33. +0x070 EFlags : Uint4B //硬件自动填充
  34. //后面都是可选的,只有当我们运行的程序处于虚拟86模式异常才会有
  35. +0x074 HardwareEsp : Uint4B
  36. +0x078 HardwareSegSs : Uint4B
  37. +0x07c V86Es : Uint4B
  38. +0x080 V86Ds : Uint4B
  39. +0x084 V86Fs : Uint4B
  40. +0x088 V86Gs : Uint4B

整个陷阱帧结构记录中断发生时的寄存器环境,其中,结构体最后面的几个成员只有运行于虚拟86模式下才会存在,而Eip,SegCs和EFlags三个成员由硬件自动填充,然后剩下的成员才是由KiTrap03自己构建的陷阱帧,我们可以分析下KiTrap03的代码,由于在wrk中只有asm文件,没有C源代码,用ida进行分析

  1. .text:00436C50 _KiTrap03 proc near ; DATA XREF: INIT:0077317Co
  2. .text:00436C50
  3. .text:00436C50 var_2= word ptr -
  4. .text:00436C50 arg_4= dword ptr
  5. .text:00436C50
  6. .text:00436C50 push ; Trap_frame.Errcode
  7. .text:00436C52 mov [esp++var_2], ; Trap_frame.Errcode = 0
  8. .text:00436C59 push ebp ; Trap_frame.Ebp
  9. .text:00436C5A push ebx ; Trap_frame.Ebx
  10. .text:00436C5B push esi ; Trap_frame.Esi
  11. .text:00436C5C push edi ; Trap_frame.Edi
  12. .text:00436C5D push fs ; Trap_frame.SegFs
  13. .text:00436C5F mov ebx, 30h
  14. .text:00436C64 mov fs, bx
  15. .text:00436C67 mov ebx, large fs: ; fs对应处理器相关的_KPCR结构,kpcr,那么得到的是
  16. .text:00436C67 ; kpcr.NtTib.ExceptionList
  17. .text:00436C6E push ebx ; Trap_frame.ExceptionList
  18. .text:00436C6F sub esp, ; Trap_frame.PreviousPreviousMode,在后面填充
  19. .text:00436C72 push eax ; Trap_frame.Eax
  20. .text:00436C73 push ecx ; Trap_frame.Ecx
  21. .text:00436C74 push edx ; Trap_frame.Edx
  22. .text:00436C75 push ds ; Trap_frame.SegDs
  23. .text:00436C76 push es ; Trap_frame.SegEs
  24. .text:00436C77 push gs ; Trap_frame.SegGs
  25. .text:00436C79 mov ax, 23h ; ???
  26. .text:00436C7D sub esp, 30h ; 继续增大栈空间,刚好是整个Trap_Frame的大小
  27. .text:00436C80 mov ds, ax ; ???
  28. .text:00436C83 mov es, ax
  29. .text:00436C86 mov ebp, esp ; ebp指向Trap_frame
  30. .text:00436C88 test [esp+68h+arg_4], 20000h ; Trap_frame.EFlags0x2000代表EFLAGS_V86_MASK
  31. .text:00436C88 ; 标记虚拟86模式
  32. .text:00436C90 jnz short V86_kit3_a ; 如果是虚拟86模式跳转
  33. .text:00436C92
  34. .text:00436C92 loc_436C92: ; CODE XREF: V86_kit3_a+25j
  35. .text:00436C92 mov ecx, large fs:124h ; ecx = CurrentThread
  36. .text:00436C92 ; +0x004 CurrentThread : Ptr32 _KTHREAD 当前线程 ecx
  37. .text:00436C99 cld
  38. .text:00436C9A and dword ptr [ebp+2Ch], ; Trap_frame.Dr7清零
  39. .text:00436C9E test byte ptr [ecx+], 0DFh
  40. .text:00436CA2 jnz Dr_kit3_a
  41. .text:00436CA8
  42. .text:00436CA8 loc_436CA8: ; CODE XREF: Dr_kit3_a+Dj
  43. .text:00436CA8 ; Dr_kit3_a+79j
  44. .text:00436CA8 mov ebx, [ebp+60h]
  45. .text:00436CAB mov edi, [ebp+68h]
  46. .text:00436CAE mov [ebp+0Ch], edx ; Trap_frame.DbgArgPointer = edx
  47. .text:00436CB1 mov dword ptr [ebp+], 0BADB0D00h ; Trap_frame.DbgArgMark = 0BADB0D00h
  48. .text:00436CB8 mov [ebp+], ebx ; Trap_frame.DbgEbp = kTrap_frame.Ebp
  49. .text:00436CBB mov [ebp+], edi ; Trap_frame.DbgEip = kTrap_frame.Eip
  50. .text:00436CBE cmp ds:_PoHiberInProgress,
  51. .text:00436CC5 jnz short loc_436CCE
  52. .text:00436CC7 lock inc ds:_KiHardwareTrigger
  53. .text:00436CCE
  54. .text:00436CCE loc_436CCE: ; CODE XREF: _KiTrap03+75j
  55. .text:00436CCE mov eax,
  56. .text:00436CD3
  57. .text:00436CD3 loc_436CD3: ; CODE XREF: _KiDebugService+7Aj
  58. .text:00436CD3 test byte ptr [ebp+72h],
  59. .text:00436CD7 jnz short loc_436D08
  60. .text:00436CD9 test byte ptr [ebp+6Ch], ; CS 最后一位,判断是否为UserMode
  61. .text:00436CDD jnz short loc_436CE7 ; 如果是UserMode,跳转
  62. .text:00436CDF test byte ptr [ebp+71h], ; 判断Eflags.IF位是否存在
  63. .text:00436CE3 jz short loc_436CEF
  64. .text:00436CE5 jmp short loc_436CEE
  65. .text:00436CE7 ; ---------------------------------------------------------------------------
  66. .text:00436CE7
  67. .text:00436CE7 loc_436CE7: ; CODE XREF: _KiTrap03+8Dj
  68. .text:00436CE7 cmp word ptr [ebp+6Ch], 1Bh
  69. .text:00436CEC jnz short loc_436D08
  70. .text:00436CEE
  71. .text:00436CEE loc_436CEE: ; CODE XREF: _KiTrap03+95j
  72. .text:00436CEE ; _KiTrap03+C9j
  73. .text:00436CEE sti ; IF标志位存在
  74. .text:00436CEF
  75. .text:00436CEF loc_436CEF: ; CODE XREF: _KiTrap03+93j
  76. .text:00436CEF ; _KiTrap03+D6j
  77. .text:00436CEF mov esi, ecx ; esi=CurrentThread
  78. .text:00436CF1 mov edi, edx
  79. .text:00436CF3 mov edx, eax
  80. .text:00436CF5 mov ebx, [ebp+68h] ; ebx = kTrap_frame.Eip
  81. .text:00436CF8 dec ebx ; "eip-1"是因为int 3本身占一个字节
  82. .text:00436CF9 mov ecx, ; ???在下层函数中会用到,到时候就知道了
  83. .text:00436CFE mov eax, 80000003h ; 异常类型(STATUS_BREAKPOINT)
  84. .text:00436D03 call CommonDispatchException ; 处理异常
  85. .text:00436D08
  86. .text:00436D08 loc_436D08: ; CODE XREF: _KiTrap03+87j
  87. .text:00436D08 ; _KiTrap03+9Cj
  88. .text:00436D08 mov ebx, large fs:124h
  89. .text:00436D0F mov ebx, [ebx+50h]
  90. .text:00436D12 cmp dword ptr [ebx+148h],
  91. .text:00436D19 jz short loc_436CEE
  92. .text:00436D1B push
  93. .text:00436D1D call _Ki386VdmReflectException_A@4 ; Ki386VdmReflectException_A(x)
  94. .text:00436D22 test ax, 0FFFFh
  95. .text:00436D26 jz short loc_436CEF
  96. .text:00436D28 jmp Kei386EoiHelper@0
  97. .text:00436D28 _KiTrap03 endp

很明显,在KiTrap03中没有进行太多的处理,只是判断是否是虚拟86模式来构建了一个不同的陷阱帧结构,之后调用了CommonDispatchException 函数来处理异常。

在虚拟86模式下将会跳转到V86_kit3_a,我们可以看下实现

  1. .text:00436C28 V86_kit3_a proc near ; CODE XREF: _KiTrap03+40j
  2. .text:00436C28 mov eax, [ebp+84h]
  3. .text:00436C2E mov ebx, [ebp+88h]
  4. .text:00436C34 mov ecx, [ebp+7Ch]
  5. .text:00436C37 mov edx, [ebp+80h]
  6. .text:00436C3D mov [ebp+50h], ax ; Trap_frame.SegFs = Trap_frame.V86Fs
  7. .text:00436C41 mov [ebp+30h], bx ; Trap_frame.SegGs = Trap_frame.V86Gs
  8. .text:00436C45 mov [ebp+34h], cx ; Trap_frame.SegEs = Trap_frame.V86Es
  9. .text:00436C49 mov [ebp+38h], dx ; Trap_frame.SegDs = Trap_frame.V86Ds
  10. .text:00436C4D jmp short loc_436C92
  11. .text:00436C4D V86_kit3_a endp

可以看到V86_kit3_a中没有进行处理,只是将陷阱帧中保存的寄存器的值对应为虚拟86模式特有的值。

然后跟入CommonDispatchException 函数

  1. .text:0043641C CommonDispatchException proc near ; CODE XREF: _KiTrap00-253p
  2. .text:0043641C ; _KiTrap00-247p _KiTrap00-23Bp
  3. .text:0043641C ; _KiTrap03+B3p _KiTrap0E+21Ap
  4. .text:0043641C ; sub_671B78+24p
  5. .text:0043641C
  6. .text:0043641C var_50= dword ptr -50h
  7. .text:0043641C var_4C= dword ptr -4Ch
  8. .text:0043641C var_48= dword ptr -48h
  9. .text:0043641C var_44= dword ptr -44h
  10. .text:0043641C var_40= dword ptr -40h
  11. .text:0043641C var_3C= byte ptr -3Ch
  12. .text:0043641C
  13. .text:0043641C sub esp, 50h ; EXCEPTION_RECORD结构空间,ExceptionRecord
  14. .text:0043641F mov [esp+50h+var_50], eax ; eax是上层调用设置的错误码,这里是
  15. .text:0043641F ; ExceptionRecord->ExceptionCode = eax
  16. .text: xor eax, eax
  17. .text: mov [esp+50h+var_4C], eax ; ExceptionRecord->ExceptionFlags = 0
  18. .text: mov [esp+50h+var_48], eax ; ExceptionRecord->ExceptionRecord = 0
  19. .text:0043642C mov [esp+50h+var_44], ebx ; ebx是上层调用设置的异常发生处地址,
  20. .text:0043642C ; ExceptionRecord->ExceptionAddress = ebx
  21. .text: mov [esp+50h+var_40], ecx ; ExceptionRecord->NumberParameters = ecx
  22. .text: ; 表示ExceptionRecord->ExceptionInformation数组的数量
  23. .text: cmp ecx, ; ExceptionRecord->NumberParameters为零跳转
  24. .text: jz short loc_436445
  25. .text: lea ebx, [esp+50h+var_3C] ; ebx = ExceptionRecord->ExceptionInformation
  26. .text:0043643D mov [ebx], edx ; 开始填充ExceptionInformation的信息
  27. .text:0043643F mov [ebx+], esi
  28. .text: mov [ebx+], edi
  29. .text:
  30. .text: loc_436445: ; CODE XREF: CommonDispatchException+1Bj
  31. .text: mov ecx, esp ; ecx = ExceptionRecord
  32. .text: test byte ptr [ebp+72h], ; ebp还是指向TrapFrame,TrapFrame->EFlags
  33. .text: ; 这里是EFlags的高2字节,判断是否为虚拟86模式
  34. .text:0043644B jz short loc_436454
  35. .text:0043644D mov eax, 0FFFFh ; ????
  36. .text: jmp short loc_436457
  37. .text: ; ---------------------------------------------------------------------------
  38. .text:
  39. .text: loc_436454: ; CODE XREF: CommonDispatchException+2Fj
  40. .text: mov eax, [ebp+6Ch] ; eax = TrapFrame->SegCs
  41. .text:
  42. .text: loc_436457: ; CODE XREF: CommonDispatchException+36j
  43. .text: and eax, ; Cs的低两位得到处理器模式
  44. .text:0043645A push ; FirstChance
  45. .text:0043645C push eax ; PreviousMode
  46. .text:0043645D push ebp ; TrapFrame
  47. .text:0043645E push ; ExceptionFrame
  48. .text: push ecx ; void *
  49. .text: call _KiDispatchException@20 ; 对异常进行分发处理
  50. .text: mov esp, ebp ; 修正esp,然后执行退出操作
  51. .text: jmp Kei386EoiHelper@0
  52. .text: CommonDispatchException endp

可以看到CommonDispatchException也没有进行处理,只是构建了一个ExceptionRecord的结构体,就对异常进行了分发处理,进入了熟悉的KiDispatchException函数。

了解了陷阱帧的构建,再看idt表的基本结构,每个CPU的核心都有自己的idt表,

  1. typedef struct _IDTR
  2. {
  3. USHORT limit; //整个表所占内存大小
  4. ULONG base; //IDT表项起始地址
  5. }IDTR,*PIDTR;

在我的虚拟机上 limit= 0x7ff (包含0)  0x800  = 2048  Entry每项大小8字节,就2048/8 = 256 成员,idt表有256个例程

可以使用kd> !idt -a  命令来查看idt表的详细信息,可以发现就是有256个例程

idt表中的每一项对应一种中断处理例程,结构体如下,我们最关心的是LowOffset和HiOffset这两个成员,他们组成了处理例程地址的高16位和低16位

  1. typedef struct _IDTENTRY
  2. {
  3. unsigned short LowOffset;
  4. unsigned short selector;
  5. unsigned char retention:;
  6. unsigned char zero1:;
  7. unsigned char gate_type:;
  8. unsigned char zero2:;
  9. unsigned char interrupt_gate_size:;
  10. unsigned char zero3:;
  11. unsigned char zero4:;
  12. unsigned char DPL:;
  13. unsigned char P:;
  14. unsigned short HiOffset;
  15. } IDTENTRY,*PIDTENTRY;

利用MAKELONG 的宏,可以得到处理例程的真正地址

  1. #define MAKELONG(a, b) ((LONG)(((WORD)(((DWORD_PTR)(a)) & 0xffff)) | ((DWORD)((WORD)(((DWORD_PTR)(b)) & 0xffff))) << 16))

idt表的获得可以通过sidt指令或者时_KPCR中的成员获得,在内核态fs段寄存器是指向_KPCR结构。

  1. kd> dt _kpcr
  2. ......
  3. +0x038 IDT ; Ptr32 _KIDTENTRY
  4. ......

下面的代码打印了每次触发INT 3断点的地址,可以用OD下普通的断点进行测试,可以打印出断点的地址。

  1. ULONG_PTR g_OrigKiTrap03;
  2. KIRQL Irql;
  3.  
  4. _declspec(naked) void NewKiTrap03()
  5. {
  6.  
  7. __asm
  8. {
  9. //测试
  10. //jmp g_OrigKiTrap03
  11.  
  12. //构建Trap03的异常帧
  13. //保存现场环境,和原始Trap03一样
  14. push ;ErrorCode
  15. push ebp
  16. push ebx
  17. push esi
  18. push edi
  19. push fs
  20. mov ebx,30h
  21. mov fs,bx
  22. mov ebx,dword ptr fs:[]
  23. push ebx
  24. sub esp,
  25. push eax
  26. push ecx
  27. push edx
  28. push ds
  29. push es
  30. push gs
  31.  
  32. sub esp,30h //esp此时就指向陷阱帧
  33.  
  34. push esp //FilterExceptionInfo自己清理了
  35.  
  36. call FilterExceptionInfo //过滤函数
  37.  
  38. add esp , 0x30
  39. pop gs
  40. pop es
  41. pop ds
  42. pop edx
  43. pop ecx
  44. pop eax
  45. add esp ,
  46. pop ebx
  47. pop fs
  48. pop edi
  49. pop esi
  50. pop ebx
  51. pop ebp
  52. add esp , 0x4
  53. jmp g_OrigKiTrap03
  54. }
  55. }
  56.  
  57. VOID __stdcall FilterExceptionInfo(PX86_KTRAP_FRAME pTrapFrame)
  58. {
  59.  
  60. //eip的值减一过int3,汇编代码分析中dec,
  61. DbgPrint("Eip:%x\r\n",(pTrapFrame->Eip)-);
  62. }
  63.  
  64. NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryString)
  65. {
  66. NTSTATUS Status = STATUS_SUCCESS;
  67. IDTR Idtr;
  68. PIDTENTRY pIdtArray = NULL;
  69. ULONG_PTR Index = ;
  70.  
  71. DriverObject->DriverUnload = UnloadDriver;
  72. __asm sidt Idtr
  73. //虚拟机是单核的,只用一个就可以了
  74. if(KeGetIdt(&pIdtArray))
  75. {
  76. DbgPrint("%x---%x\r\n",Idtr.base,Idtr.limit);
  77. for (Index =;Index<(Idtr.limit+)/sizeof(IDTENTRY);Index++)
  78. {
  79. DbgPrint("TrapHandle[%d]:%x\r\n",Index,MAKELONG(pIdtArray[Index].LowOffset,pIdtArray[Index].HiOffset));
  80. }
  81.  
  82. g_OrigKiTrap03 = MAKELONG(pIdtArray[].LowOffset,pIdtArray[].HiOffset);
  83.  
  84. WPOFF();
  85. pIdtArray[].LowOffset = (ULONG_PTR)NewKiTrap03 & 0xFFFF; //低16位
  86. pIdtArray[].HiOffset = (ULONG_PTR)NewKiTrap03 >> ; //高16位
  87. WPON();
  88.  
  89. }
  90.  
  91. //limit 0x7ff (包含0) 0x800 = 2048 Entry每项大小8字节,就2048/8 = 256 成员
  92. //!idt -a 0ff = 256
  93. //MAKELONG
  94. //#define MAKELONG(a, b) ((LONG)(((WORD)(((DWORD_PTR)(a)) & 0xffff)) | ((DWORD)((WORD)(((DWORD_PTR)(b)) & 0xffff))) << 16))
  95. return Status;
  96. }
  97.  
  98. BOOLEAN KeGetIdt(PIDTENTRY *pIdtArray)
  99. {
  100. ULONG Index,Affinity,CurrentAffinity;
  101. pfnKESETAFFINITYTHREAD fnpKeSetAffinityThread;
  102.  
  103. UNICODE_STRING usFuncName;
  104. PIDTENTRY pIdtEntry;
  105.  
  106. RtlInitUnicodeString(&usFuncName,L"KeSetAffinityThread");
  107. fnpKeSetAffinityThread = (pfnKESETAFFINITYTHREAD)MmGetSystemRoutineAddress(&usFuncName);
  108.  
  109. if (fnpKeSetAffinityThread==)
  110. {
  111. return FALSE;
  112. }
  113.  
  114. Affinity = KeQueryActiveProcessors();
  115. //KeQueryActiveProcessors获取处理器相关的位图
  116. //(这里的位图可以理解为个数,比如返回1代表一个处理器,返回3表示两个处理器,返回7表示三个处理器,依此类推。
  117. //也就是说从有多少个处理器,那么Affinity的值就会从低位到高位依此填充多少位)
  118.  
  119. CurrentAffinity = ;
  120. Index = ;
  121. while(Affinity)
  122. {
  123. //下面只是个简单的算法,使当前线程运行到不同的处理器上
  124. Affinity &= ~CurrentAffinity;
  125. fnpKeSetAffinityThread(PsGetCurrentThread(),(KAFFINITY)CurrentAffinity);
  126. CurrentAffinity <<= ;
  127.  
  128. __asm{
  129. push eax
  130. mov eax,fs:[0x38]
  131. mov pIdtEntry,eax
  132. pop eax
  133. }
  134. //得到我们要的东西
  135. pIdtArray[Index] = pIdtEntry;
  136. Index++;
  137. }
  138.  
  139. return TRUE;
  140. }
  141.  
  142. VOID WPOFF()
  143. {
  144. ULONG_PTR cr0 = ;
  145. Irql = KeRaiseIrqlToDpcLevel();
  146. cr0 =__readcr0();
  147. cr0 &= 0xfffffffffffeffff;
  148. __writecr0(cr0);
  149.  
  150. }
  151.  
  152. VOID WPON()
  153. {
  154.  
  155. ULONG_PTR cr0=__readcr0();
  156. cr0 |= 0x10000;
  157. __writecr0(cr0);
  158. KeLowerIrql(Irql);
  159. }
  160.  
  161. VOID UnloadDriver(PDRIVER_OBJECT DriverObject)
  162. {
  163. //恢复
  164. PIDTENTRY pIdtEntry;
  165. if (g_OrigKiTrap03 && KeGetIdt(&pIdtEntry))
  166. {
  167. WPOFF();
  168. pIdtEntry[].LowOffset = g_OrigKiTrap03 & 0xFFFF;
  169. pIdtEntry[].HiOffset = g_OrigKiTrap03 >> ;
  170. WPON();
  171. }
  172. }

IDT hook KiTrap03的更多相关文章

  1. Windows xp下IDT Hook和GDT的学习

    一.前言   对于IDT第一次的认知是int 2e ,在系统调用的时候原来R3进入R0的方式就是通过int 2e自陷进入内核,然后进入KiSystemService函数,在根据系统服务调用号调用系统服 ...

  2. IDT HOOK思路整理

    IDT(中断描述符表)分为IRQ(真正的硬件中断)和软件中断(又叫异常). HOOK的思路为,替换键盘中断处理的函数地址为自己的函数地址.这样在键盘驱动和过滤驱动之前就可以截获键盘输入. 思路确定之后 ...

  3. RootKit学习之 IDT Hook

    0x00 前言  IDT(Interrupt Descriptor Table)中断描述符表,中断就是停下现在的活动,去完成新的任务.一个中断可以起源于软件或硬件.比如,出现页错误,调用IDT中的0x ...

  4. IDTHook 深入学习

    在之前的一篇文章中介绍了替换IDT向量表中的地址来达到Hook的目的 IDT hook KiTrap03 但是这样很容易就可以被检测了.接下来要学习就是通过patch GDT来达到Hook IDT的目 ...

  5. IDT系统中断描述表以及绕过Xurtr检测的HOOK姿势

    什么是中断?  指当出现需要时,CPU暂时停止当前程序的执行转而执行处理新情况的程序和执行过程.即在程序运行过程中,系统出现了一个必须由CPU立即处理的情况,此时,CPU暂时中止程序的执行转而处理这个 ...

  6. hook技术分类

    1.HOOK SERVICE TABLE:HOOK SSDT 这种方法对于拦截 NATIVE API 来说用的比较多. SSDT hook,一句话——Windows把需要调用的内核API地址全都存在了 ...

  7. Windows Dll Injection、Process Injection、API Hook、DLL后门/恶意程序入侵技术

    catalogue 1. 引言2. 使用注册表注入DLL3. 使用Windows挂钩来注入DLL4. 使用远程线程来注入DLL5. 使用木马DLL来注入DLL6. 把DLL作为调试器来注入7. 使用c ...

  8. hook 9大类

    HOOK技术主要分为两大类,一是内核层HOOK,一是用户层HOOK. 用户层HOOK也就是在ring3环境下hook kenerl32.dll.User3.dll.Gui32.dll.Advapi.d ...

  9. Hook基本知识

    一.什么是HOOK(钩子) Windows系统,建立在事件驱动机制上,就是整个系统都是通过消息传递实现的.hook(钩子)是一种特殊的消息处理机制,它可以监视系统或者进程中的各种事件消息,截获发往目标 ...

随机推荐

  1. iOS App Launch Option

    iOS 程序启动时总会调用application:didFinishLaunchingWithOptions:,其中第二个参数launchOptions为NSDictionary类型的对象,里面存储有 ...

  2. wordpress 为文章内容添加自动过滤,例如为出站链接添加nofollow,也可以将淘宝客链接转换。。

    做seo的都明白,反向链接对与网站的优化有着很重要的作用,是搜索引擎给网站排名的一个重要因素.为了添加反向链接,SEO作弊者会在论坛和博客等大量发布带无关链接的 内容.这些垃圾链接的存在给搜索引擎对网 ...

  3. Linux android开发环境问题:Unexcepted exception:cannot run program "android-sdk-linux/platfor-tools/adb" :err=2,No such file or directory.

    出现这个问题的原因: 我的linux是64位 ,而adb目前只有32位的,所以要安装运行32的环境. 不同的linux系统需要安装的不同: 我的Centos  解决方案如下 其他linux操作系统(参 ...

  4. ASP运行流程(主要的类笔记)

    个人笔记:参考汤姆大叔的MVC之前那些事系列整理  client端发送页面请求,被IIS的某个进程截获,它根据申请的页面后缀(.aspx)不同,调用不同的页面处理程序(.asp->asp.dll ...

  5. EF6 在原有数据库中使用 CodeFirst 总复习(二、新的需求,简单修改原有表)

    一.为当前实体模型启用数据迁移 基础搭建好了,也就是原有的数据库有了,原有数据库的实体对象也有了,但生成的上下文中并没有标记当前数据库是否已经存在,当前实体是否修改过(以前版本好像有标记的),所以,要 ...

  6. [网络配置相关]——ifconfig命令、ip命令、route命令

    ifconfig命令 1. 查看已被激活的网卡的详细信息 # ifconfig eth0 Link encap:Ethernet HWaddr 00:30:67:F2:10:CF inet addr: ...

  7. JAVA标签的使用跳出循环

    public static void main(String args[]) { int i=10,j=10; outer: while (i > 0) { inner: while (j &g ...

  8. 移植net-snmp到开发板(mini210)

    1.安装交叉编译工具arm-linux-gcc 2.下载net-snmp源码安装包 3.解压安装包 4../configure --build=i686-linux --host=arm-linux ...

  9. xml之Schema架构

    1.什么是Schema架构 2.Schema文档结构  3.Schema元素类型 1>element元素 <!--简单数据:类型--> <xs:element name=&qu ...

  10. 【BZOJ】【2480】【SPOJ 3105】Mod

    扩展BSGS Orz zyf……然而他的题解对AC大神的题解作了引用……而坑爹的百度云……呵呵了... 扩展BSGS模板题 /************************************* ...