|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
; z/ a- F- Z5 d- o/ i( Q# n& I: B1 l+ ]* H' ~) W! c7 r
Keyboard Interrupt Hook using I/O APIC! R: @' V8 X4 A1 z
/ ^4 V; d4 b1 ]. L( x2 i* ?
By: chpie( q) G, G, x+ Y. Q7 F: {/ r
Keyboard Interrupt Hooking by manipulating the I/O APIC
0 r" a0 z, H# a$ i v4 f- Q6 ntested on the winXP, Pentium D Hyper-threading Enabled.3 P$ t4 ^3 n% c7 M# I% Z( v- V7 T
# d+ ~ z6 D+ V. X! t' G: Q
7 X6 L- w8 J3 @" _: E) F+ \; Z8 X. DSummary :: Using the 8259a compatible PIC to be deliver the interrupt* {% L0 w2 n6 e2 ~, g, x8 O
signal by Delivery mode of the I/O APIC to be the ExtINT,4 H5 @! z( N( B8 ` l: }, ]
the interrupt related by the IRQ 1 able to be not refer s7 U F; z' a. {; Y
the I/O APIC's Redirection Table.- H5 X& |' n( E" D. Z# E i
4 I6 x- S+ f3 L; l' }
- It is higher priority of the hooking than the direct& l B9 x' _' q/ }
modification of the I/O APIC's vector.( Y0 n1 C- R' R$ L. @
- The vector can be hidden on the thread getting the keyboard
$ {: r* m1 L0 E1 H( x& z+ Dvector from the I/O APIC.
; U4 D. b/ N) j$ \1 ]
% w+ F( B' ?! i4 CFlow ::
: R" A) {; m1 V- L" H: X9 y; G; M7 ^" U# p% b8 \$ A% t' z; V
1. IRQ 1 Assert !!!. h3 V" u f! J. w" d7 o( k2 b/ f
2. The I/O APIC receives the signal and refers the I/O Redirection table.
0 t/ X5 n7 b6 P2 L( F7 u& L9 y3. Sending the signal from the destination Local APIC.! U& G: h# l5 ]3 G2 H- W# u# Z' n
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
( ?* T7 L% a% @5 i1 K' \5. A processor receives the signal.' E2 T2 B& X: J
6. The processor Assert the INTA signal.! w5 d$ V3 _0 r B) a; Q
7. The I/O APIC acknowledged.
- ]5 I! K/ f2 l8. The processor Assert the second INTA signal.
5 J8 d m; c" m9. The I/O APIC delivers the signal to the 8259a compatible PIC
2 E* }5 C* G, P7 ^" e/ Gfor ExtINT to its Delivery mode.
% h1 t+ L. a* t- @9 k5 D10. 8259a compatible PIC sends 2 bytes after second INTA pulse.' _" d& i4 Y8 i% l
11. The processor execute 2 bytes sended.6 J G/ h9 S" E4 ?% ^9 z5 B
12. our interrupt handler executed.
& ?/ w; ^( p4 g! D2 Q$ `
) T7 Q. A9 V( L* H- O: [
) a# t! \( f- o/ Lsourcecode and binary are available on the
9 [2 T3 g. b2 z6 D1 @- U5 zhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|