|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
* R* Q: ?% c! M! Y4 ^; B5 | i5 D& U7 W, t: q7 w
Keyboard Interrupt Hook using I/O APIC
5 S: L5 s6 v, B% z5 ?4 D- B, _0 l/ }! y% A0 F$ v& L
By: chpie
; E0 u( q% r' X5 K9 |* L# cKeyboard Interrupt Hooking by manipulating the I/O APIC7 X3 C4 \; W0 w3 d7 s" Z
tested on the winXP, Pentium D Hyper-threading Enabled.
# F3 C7 a j% m) O
. J! `4 G& c" I4 j* a3 R* {+ x( q6 x
Summary :: Using the 8259a compatible PIC to be deliver the interrupt; r3 f, }& ?5 K5 q7 n2 C2 Y
signal by Delivery mode of the I/O APIC to be the ExtINT,5 t: n# W# M. C8 N9 T( F- V
the interrupt related by the IRQ 1 able to be not refer' ~6 i* t* q8 X3 S
the I/O APIC's Redirection Table.
+ F& c, L6 A; `$ @ c) T2 k$ T/ ^! P: Z2 C2 z, I0 W
- It is higher priority of the hooking than the direct
u8 u+ |9 p y1 H2 o1 Bmodification of the I/O APIC's vector.
3 E X+ G t0 r# g; P+ H- The vector can be hidden on the thread getting the keyboard0 C& I X8 r- q; s4 f. V' P
vector from the I/O APIC.
# }( y, W: Q# h
" A& O" [( r3 k$ R4 a$ HFlow ::5 h2 ?. H6 G6 n* I: a9 _4 [
1 F% @, @1 p9 J& p( O
1. IRQ 1 Assert !!!
9 I* w$ w" |! k$ k5 S! t, O2. The I/O APIC receives the signal and refers the I/O Redirection table.! n% b2 k. X* u3 v. U' a
3. Sending the signal from the destination Local APIC.
4 b5 ?( i* @) h' C s; |3 i4. Local APIC pass the signal to the processor for its delivery mode ExtINT
! P4 m5 r6 i2 v4 {6 _9 T5. A processor receives the signal.
( L/ L2 j h, ^9 G- H" N" g6. The processor Assert the INTA signal.- u+ G+ k) @9 E$ y
7. The I/O APIC acknowledged., ?4 x" @5 X3 ]
8. The processor Assert the second INTA signal.! n+ I F0 S& S% w
9. The I/O APIC delivers the signal to the 8259a compatible PIC! F7 g3 j. _& P; f! C
for ExtINT to its Delivery mode.7 V2 C% O; @; S2 q. g
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.1 l& C5 ]7 H$ v! j( U2 u7 D
11. The processor execute 2 bytes sended., u, n9 g5 L& K- z3 W( j
12. our interrupt handler executed.
6 |9 v3 K [5 O! I) p
+ r9 k1 N( d9 i$ P; j0 I; q2 v' v/ R7 f! m$ U2 g5 v! F
sourcecode and binary are available on the0 p) a; V, J; l' Q3 o
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|