|
|
Keyboard Interrupt Hook using I/O APIC(ZT)& o, b H( ]7 J# V: h) m1 Y
0 B: x' [6 X+ T4 f# f$ FKeyboard Interrupt Hook using I/O APIC* ^! Y; m- s1 D0 ^8 X7 J3 z
+ m% D/ d h {0 M+ p& F% BBy: chpie! x* z0 @9 W6 K- z" e# \ n' v
Keyboard Interrupt Hooking by manipulating the I/O APIC
0 j7 z4 Y2 o& A @) Z# U4 }tested on the winXP, Pentium D Hyper-threading Enabled.
1 z4 `- N! a& I8 [
H4 C9 ~4 l2 r8 @& J" I; J7 J3 E+ R r3 b2 U7 a/ @9 ?
Summary :: Using the 8259a compatible PIC to be deliver the interrupt9 o4 ]) p! Z& j2 j7 b U3 Z
signal by Delivery mode of the I/O APIC to be the ExtINT,9 o- s4 X) N5 Q) y# d( Z
the interrupt related by the IRQ 1 able to be not refer
+ u! k, \5 W! |6 H" X( pthe I/O APIC's Redirection Table.
6 y2 \3 D- O. o% c9 _0 R/ w: [8 N6 G. p
- It is higher priority of the hooking than the direct+ c; @* h* `0 a3 j: C/ y
modification of the I/O APIC's vector.
7 {3 r0 }: Q* U+ F" v- The vector can be hidden on the thread getting the keyboard
4 q( z. `5 ^+ M0 qvector from the I/O APIC.0 v3 U! M! O% @$ C9 ^
1 Z- @+ z l ]9 ]. T& c6 qFlow ::
, I" K" ~7 T* E8 f, j! k k9 a' D" I# Q9 z, a0 a( f
1. IRQ 1 Assert !!!
4 M9 Q2 P) w# I: d" O, Q# h2. The I/O APIC receives the signal and refers the I/O Redirection table.
\9 @$ X, G1 O; U- |3. Sending the signal from the destination Local APIC.( N" X0 `$ W% ]7 H; H- H& O0 q
4. Local APIC pass the signal to the processor for its delivery mode ExtINT( s4 H( @/ d+ C+ k9 }2 g
5. A processor receives the signal.2 J/ Y) o( e4 a
6. The processor Assert the INTA signal.
" a! N4 _& e1 A" C4 b" X6 L7 T7. The I/O APIC acknowledged.
+ @; ^4 c% F4 L& B. b6 m( G8. The processor Assert the second INTA signal.& Y! e: }0 M5 D
9. The I/O APIC delivers the signal to the 8259a compatible PIC, `5 z8 q% ^8 o
for ExtINT to its Delivery mode.! b+ T; d4 U( d* g0 a K/ o
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
6 G. l* f- r* |6 W0 Y11. The processor execute 2 bytes sended.& _* b+ C; H- u6 e% l+ u
12. our interrupt handler executed.
! T; U R/ ]5 e V6 v+ N
* E+ ~5 q* |; ~% Q8 r" O
+ V) |9 u: o* f. @sourcecode and binary are available on the9 Z( d- M+ |' S* C% F
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|