|
|
Keyboard Interrupt Hook using I/O APIC(ZT)4 F( L$ y9 g: w5 ~. W
8 v/ R/ E# p8 Y+ b$ HKeyboard Interrupt Hook using I/O APIC6 Z2 U) Q, L, a
& G# r2 w* b7 @7 W8 ^% k5 r/ K) e
By: chpie
$ g. X! e' p" }0 _0 @, NKeyboard Interrupt Hooking by manipulating the I/O APIC9 Y+ d. | J( F: p
tested on the winXP, Pentium D Hyper-threading Enabled.; u) k& s" F- w
0 ~" d, j. |+ {5 p
C4 _- E- r' n4 |4 F
Summary :: Using the 8259a compatible PIC to be deliver the interrupt
& y5 k: B2 p' T3 w! ^6 ssignal by Delivery mode of the I/O APIC to be the ExtINT,
& E5 J: R$ Z# V. qthe interrupt related by the IRQ 1 able to be not refer4 C5 r/ S7 M/ v$ j/ [* @! Y. u
the I/O APIC's Redirection Table.
( u4 L& V1 S, k& y; i
C' e- M' H: N" A& r; W4 Q0 N- It is higher priority of the hooking than the direct
2 P* Y Q: \) r8 i2 k3 j/ Gmodification of the I/O APIC's vector.
9 G+ @% _ ~ o- The vector can be hidden on the thread getting the keyboard
7 \1 `) R/ I' z/ lvector from the I/O APIC.
! G. }& e( [7 k8 F& D" j' P T
Flow ::8 y+ ]! R) J- l Y; m! l
/ N" G' `* x! G( t0 j1. IRQ 1 Assert !!!- T- n, }% `6 U4 v
2. The I/O APIC receives the signal and refers the I/O Redirection table.# u* A; ^/ j4 y# t
3. Sending the signal from the destination Local APIC.7 i/ K1 f9 a' V" p
4. Local APIC pass the signal to the processor for its delivery mode ExtINT4 v1 b3 s% G( V- v# w6 v7 m
5. A processor receives the signal.
1 L( H( e- K2 k( h* R4 [5 e! _ \6. The processor Assert the INTA signal.
0 M, F7 ]+ y2 k4 e/ H% [' R' P' n7. The I/O APIC acknowledged.) h) L$ d7 M; }; @
8. The processor Assert the second INTA signal.
: F4 N0 {8 r z& M2 l3 W9. The I/O APIC delivers the signal to the 8259a compatible PIC: K8 h. f, B2 N$ G
for ExtINT to its Delivery mode.7 @2 P5 Q0 K% k4 L6 i, b' I
10. 8259a compatible PIC sends 2 bytes after second INTA pulse., l! ~2 d, L. s2 x9 X' o
11. The processor execute 2 bytes sended.) s5 } \- |2 A2 t# b9 _
12. our interrupt handler executed." l/ [6 b( L4 \2 G
, E2 q; @8 j1 V7 F* t. l1 N: }* P" }
* \) W# u a4 lsourcecode and binary are available on the' t+ c0 g2 \9 F' H" A
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|