|
|
Keyboard Interrupt Hook using I/O APIC(ZT)& m4 x) p: ~3 {1 ?4 }
- a6 M& o2 R, U9 d& C
Keyboard Interrupt Hook using I/O APIC
) U6 Y. {! C1 N4 J8 D/ h" |& D7 C2 j0 [( c. X. D9 y
By: chpie; m m- B% r1 {% h% H; W$ C2 k
Keyboard Interrupt Hooking by manipulating the I/O APIC
( P. `1 [, @+ j( n( Ztested on the winXP, Pentium D Hyper-threading Enabled.
; X x9 r2 j- W" h7 x+ m2 P5 b- k6 e
$ \8 T- |1 c3 u' z% g
( e# B* B; T: n4 O: gSummary :: Using the 8259a compatible PIC to be deliver the interrupt
# }6 e4 {, e+ d+ Isignal by Delivery mode of the I/O APIC to be the ExtINT,6 ^' t* P$ N% n8 v7 a |
the interrupt related by the IRQ 1 able to be not refer
Z5 P& ]5 q6 L9 I: D! hthe I/O APIC's Redirection Table.. K. F) X4 e* K$ c2 y9 M$ p
" R, e7 l( Y @6 D- It is higher priority of the hooking than the direct) V. x- e3 n4 w& H4 g$ Y+ Q) \
modification of the I/O APIC's vector.+ n! o: Q, q9 D+ N, O9 E
- The vector can be hidden on the thread getting the keyboard, f$ T3 ^7 c) h% P; Q& }
vector from the I/O APIC.
, k8 ^* F) U4 { ]
" f1 O4 g9 K3 q; M9 g+ `Flow ::
# Q1 Y9 M& v3 p& t' Z! P+ C" b' o, O: f' @2 [3 h8 c. _
1. IRQ 1 Assert !!!
% v. v" O8 g. d3 |( a2. The I/O APIC receives the signal and refers the I/O Redirection table.
2 R' t6 i" X; g* O2 C/ x3. Sending the signal from the destination Local APIC.$ y5 u6 T! r$ B. s+ s
4. Local APIC pass the signal to the processor for its delivery mode ExtINT" Z4 C: V# |1 x# K# ]: X
5. A processor receives the signal.
8 y7 {) u+ i; m0 x( D6. The processor Assert the INTA signal.. i; }0 [6 @3 _& f n4 v
7. The I/O APIC acknowledged.
% P& J5 d* ] t# q' h7 U8. The processor Assert the second INTA signal.
& L" k3 U0 f) @- q5 _9. The I/O APIC delivers the signal to the 8259a compatible PIC
8 U9 Q' H. f8 ^& a( Xfor ExtINT to its Delivery mode.% r8 Y& ]2 i) D
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.( ?( z" U1 b4 H2 H" ~( Q* X
11. The processor execute 2 bytes sended.
) y7 {7 g: G5 Z. f& P1 I7 S12. our interrupt handler executed.3 ?7 `& T; j: R: B% ~
) _- `7 _6 Y- X( j9 a/ H
( L x/ D- G8 N' k5 F3 psourcecode and binary are available on the
$ J! {. a& C2 D4 shttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|