|
|
Keyboard Interrupt Hook using I/O APIC(ZT)0 m" `( _/ A( J% t! B1 e9 g
1 g+ o% d$ d9 R0 |# O
Keyboard Interrupt Hook using I/O APIC; A- b% W0 T6 d+ L, F
& i$ G: p: y; C, \; ^By: chpie
0 b$ N$ ~4 B P @Keyboard Interrupt Hooking by manipulating the I/O APIC
$ H$ a; b+ V' Q2 Jtested on the winXP, Pentium D Hyper-threading Enabled.
0 f8 ]7 W3 w# z9 N( K ?; f% u9 a8 @ l# O
( P4 P9 a5 Q x: Q* `Summary :: Using the 8259a compatible PIC to be deliver the interrupt1 u! H, ?9 \8 H0 h0 L. ?) H6 i6 d
signal by Delivery mode of the I/O APIC to be the ExtINT,6 @2 r' {" [) u4 G* t& S- K
the interrupt related by the IRQ 1 able to be not refer+ D3 J3 `, b( O. t3 }' q
the I/O APIC's Redirection Table.# c9 ]- f3 U2 D" B
4 Q; p* h; P9 S% q$ [3 o- It is higher priority of the hooking than the direct
$ E/ |' E2 Y ~, f* F) z7 C1 omodification of the I/O APIC's vector.
1 b& a! Y, ~( [: C7 d& ]5 h- The vector can be hidden on the thread getting the keyboard
6 @8 ]" O* k' l* Z; o9 d6 U6 Y# H. \vector from the I/O APIC.
' J" U! L2 L7 T5 Y! {- U u6 g! G8 A3 U# O; a" ^: D
Flow ::- Z& O u1 D; ^! X: K
: y% u& C. |0 h9 g# q' M; X( k
1. IRQ 1 Assert !!!
* I4 ^7 F [7 t( ^7 ]2. The I/O APIC receives the signal and refers the I/O Redirection table.6 r2 X& q' S5 d
3. Sending the signal from the destination Local APIC. g5 u6 p9 R' H! C
4. Local APIC pass the signal to the processor for its delivery mode ExtINT( `" u/ R6 ^6 D" J
5. A processor receives the signal.
9 f/ {- f8 Z% q: [8 L q. ^6. The processor Assert the INTA signal.
2 g* i) E, @: ]5 o" h7. The I/O APIC acknowledged.: Q3 g' u/ X( G/ {8 H# [) x
8. The processor Assert the second INTA signal.( p, o* s: w3 }0 P% R
9. The I/O APIC delivers the signal to the 8259a compatible PIC6 ?1 H- Z& `5 Z! c+ Y( w+ B
for ExtINT to its Delivery mode.
0 C3 X( b% z& h: C- H$ a10. 8259a compatible PIC sends 2 bytes after second INTA pulse. q) H( L' a# j! T2 V0 Z" f( A
11. The processor execute 2 bytes sended.
/ o1 Y2 i8 x" y( W8 j1 E12. our interrupt handler executed.; c$ u% M. G5 J$ [# ?
4 i7 K1 E7 l! x# w2 o& p7 D S3 }! z/ i3 X! e
sourcecode and binary are available on the% t8 N% Y9 j. K2 A, f0 V% X
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|