|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
2 K; E& I I- _ O& I) I) p
1 U$ h( Z1 b2 o% U3 FKeyboard Interrupt Hook using I/O APIC
- ?: Y8 C& O: E8 c+ g7 W2 l* K4 \: [! ^) n
By: chpie
# p# z, I- Z6 r+ oKeyboard Interrupt Hooking by manipulating the I/O APIC4 X8 u; ^! o0 C6 r
tested on the winXP, Pentium D Hyper-threading Enabled.4 S* |3 m5 Z# h9 u2 R J4 P3 q' p
! ~% @) }3 w, M) g+ F2 K7 k6 \2 |
7 ]% c5 M$ l8 q6 ?; v/ X
Summary :: Using the 8259a compatible PIC to be deliver the interrupt) ]! A. N6 p( p
signal by Delivery mode of the I/O APIC to be the ExtINT,
4 q- t" [4 G! ]; e& A1 h/ Jthe interrupt related by the IRQ 1 able to be not refer2 [5 L3 E% C6 m* i9 ?) _* S
the I/O APIC's Redirection Table.
3 r% ?1 }6 y# S8 l! O7 @& j0 p4 K2 y- r {. z" h/ y
- It is higher priority of the hooking than the direct `8 w0 {0 U/ P4 Y$ V8 X
modification of the I/O APIC's vector.; l4 M! g4 S4 [$ ?4 e& q
- The vector can be hidden on the thread getting the keyboard
0 x: t# m" ~, ~* @) cvector from the I/O APIC.* v8 y; \5 M2 a( ?! {+ |
+ v; z7 M6 `- U5 S W! E# v8 v$ D
Flow ::9 C7 q1 n2 L5 @3 n, n; E5 h
/ @/ @4 F* T4 u" X0 s0 T# B1. IRQ 1 Assert !!!
0 U" r$ N- H- u1 N7 |5 g/ c2. The I/O APIC receives the signal and refers the I/O Redirection table.4 B# ?/ V; `, q/ k! b
3. Sending the signal from the destination Local APIC.
+ S. {+ T3 `4 S4. Local APIC pass the signal to the processor for its delivery mode ExtINT, \; V, M! y% I
5. A processor receives the signal.
3 o6 t. a! P2 i9 x& k( o& e* e6. The processor Assert the INTA signal.
5 e) C1 k9 l: P) m2 h0 v: a7. The I/O APIC acknowledged.: W7 R0 l) m1 V
8. The processor Assert the second INTA signal.. b4 z) A) Y5 G+ s7 J
9. The I/O APIC delivers the signal to the 8259a compatible PIC
/ m. b5 ^; n" F, B& b- H8 zfor ExtINT to its Delivery mode.
8 S% W2 E% }0 t" g& @; d10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
. g/ G6 D7 g: M8 o$ ^1 k11. The processor execute 2 bytes sended.
4 ]3 D( q2 R9 I6 q U9 C7 t12. our interrupt handler executed.- L% L! l! v5 E
$ q6 f+ Y4 ~$ F6 g/ X, P" Z8 K: F9 s7 W: q7 K& V. q ~7 E
sourcecode and binary are available on the
7 g. b- E7 D% Y9 z# x! _http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|