|
|
Keyboard Interrupt Hook using I/O APIC(ZT): M* I; ~2 p# Q' w$ |! j* W- O7 x
' U' N3 b: A; Z. K9 ?+ d
Keyboard Interrupt Hook using I/O APIC
* K3 k h; B' Y" p7 p2 h' t
4 J/ ?! o; i" j$ U- eBy: chpie9 t2 O. t8 }$ X1 g4 P; `
Keyboard Interrupt Hooking by manipulating the I/O APIC) v) L! Y3 M* w3 U8 q- [8 \* A }
tested on the winXP, Pentium D Hyper-threading Enabled.
; w/ f; ^2 _7 [+ @# } d/ g1 N2 w0 T# p5 M E
$ J5 m3 P9 M8 ]7 R0 S N& GSummary :: Using the 8259a compatible PIC to be deliver the interrupt
7 ^$ s; }1 w4 G+ |0 K4 lsignal by Delivery mode of the I/O APIC to be the ExtINT,4 W. C+ n5 t+ m. s; K9 T
the interrupt related by the IRQ 1 able to be not refer" a, O' _4 G$ i& M3 o2 Q
the I/O APIC's Redirection Table.( s7 k& e% E! \2 _5 Q' }4 E
1 w i8 l2 K7 ]/ s; a' o1 s: D
- It is higher priority of the hooking than the direct2 S1 D' b* u) t
modification of the I/O APIC's vector.
2 M( ~! \! s! ~& q- The vector can be hidden on the thread getting the keyboard) d" Q% z* o/ [- I. X0 |- p& T* v
vector from the I/O APIC.
* c7 u* g3 }; n( \$ l4 T8 d) u1 u: D0 O) S* u: L2 {3 D
Flow ::" N; l4 Y9 u. c V. g& U5 L
8 N3 A" I) x. I. L; e* Y
1. IRQ 1 Assert !!!: D; V. |) x+ I1 a3 y1 o2 f0 O
2. The I/O APIC receives the signal and refers the I/O Redirection table.
) Y: f$ i3 z, C4 h1 x/ @# D9 z/ `3. Sending the signal from the destination Local APIC.- }# ~0 a& X% ^! |
4. Local APIC pass the signal to the processor for its delivery mode ExtINT( r* ~( W; Q9 Y2 h
5. A processor receives the signal.( K' c6 ^0 Z3 d3 q& u
6. The processor Assert the INTA signal.4 J. Y' R4 w( T# H
7. The I/O APIC acknowledged.
9 x5 Q1 p M+ \' ^ I S* }8. The processor Assert the second INTA signal.
6 Y) l& t8 U; G8 {$ Y4 s9. The I/O APIC delivers the signal to the 8259a compatible PIC9 E* X$ x( b* N, y+ U2 r# L
for ExtINT to its Delivery mode.
8 Y, @5 S# S, h: G10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
y, S% P% X7 u11. The processor execute 2 bytes sended.
l# M S& W% g' a# `2 G12. our interrupt handler executed.6 ]7 m/ p% A) w
6 U' m0 d1 ?+ }* d. {* u4 h3 b
sourcecode and binary are available on the
r" u7 K& Q2 X2 A) ?/ khttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|