|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
: \6 Z8 Z: ~, ~- ?1 \ {9 O
7 E. y8 U- o6 N2 VKeyboard Interrupt Hook using I/O APIC
P) I! i0 I; x1 I& f4 f9 U+ _
1 h; Y. ^. z. g' F& TBy: chpie# I2 v* m1 u+ V) d
Keyboard Interrupt Hooking by manipulating the I/O APIC4 E7 T' T1 T+ k+ i" K
tested on the winXP, Pentium D Hyper-threading Enabled.- e& X# I9 p# D( p; E3 X
% K4 d# e* u3 c8 r$ |# ?5 ^8 N
) d0 _' T/ D4 G3 F' n. `+ s- jSummary :: Using the 8259a compatible PIC to be deliver the interrupt
2 x y/ d. W- u F* C3 G+ D: Fsignal by Delivery mode of the I/O APIC to be the ExtINT,' f( s# E( q: q6 C. s/ E! I' L
the interrupt related by the IRQ 1 able to be not refer. x9 V9 A* v5 \# E
the I/O APIC's Redirection Table. Z7 k4 T K, j% ?. }, G" X( C7 B
) M0 n0 n6 G8 s0 B+ S7 O1 L ?2 B- It is higher priority of the hooking than the direct0 y8 M7 |% m, ?' N3 j8 z6 h
modification of the I/O APIC's vector.
. z$ B0 V+ Q$ I# N" P- The vector can be hidden on the thread getting the keyboard# n$ p9 p! p: [4 H2 }- ~
vector from the I/O APIC.
* r! S- z$ ~. @! U2 X& o
2 a/ z* u% D; F8 \6 p7 _# q6 ZFlow ::* Z0 A8 G1 \4 o3 A
) p( O( o1 L6 N) b2 E
1. IRQ 1 Assert !!!" h: @! V2 T* f7 {6 W0 e: {
2. The I/O APIC receives the signal and refers the I/O Redirection table.
2 ~) I0 c# Y( @6 \$ F# ^3. Sending the signal from the destination Local APIC.8 K' L. e3 ^2 M0 D
4. Local APIC pass the signal to the processor for its delivery mode ExtINT( W6 ?2 ^$ m' J
5. A processor receives the signal.# O, N1 ~9 [) j% \
6. The processor Assert the INTA signal.
" E6 B' O8 c& b% Q0 b6 S7. The I/O APIC acknowledged.! L, b- M6 T( X* N
8. The processor Assert the second INTA signal.
1 i7 L$ ^1 B8 A) D- e( d9. The I/O APIC delivers the signal to the 8259a compatible PIC4 I* I- K0 ~4 {5 |& q* I7 W V' K. N
for ExtINT to its Delivery mode. }8 Y5 K7 O; k: s( X9 h& q# a
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
6 o$ w! V5 x$ J% _; a9 u, h11. The processor execute 2 bytes sended.2 h# T6 A* k5 j8 f1 B
12. our interrupt handler executed.
/ |4 z& P! N2 M& S/ G/ q# Y3 h$ X @1 U
X, {, T7 _% q) g0 z8 _
sourcecode and binary are available on the z. R; r2 I! Z( `7 T5 \; j
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|