|
Keyboard Interrupt Hook using I/O APIC(ZT)+ y! Z" ^4 h6 g- M( i& f
1 L) @; _$ q/ ^: k# LKeyboard Interrupt Hook using I/O APIC- e- i3 l9 }+ ^, O8 R0 a
* X, J1 u# t# Z9 u, K
By: chpie0 E$ x% h" P: @# m
Keyboard Interrupt Hooking by manipulating the I/O APIC
: Q( x a" p% \8 x# k- n7 [tested on the winXP, Pentium D Hyper-threading Enabled.
5 N! R+ W: D% @* `4 \3 L x' o/ ?" r; F& S7 b& n& G
" z( x1 H/ q% [+ K- i4 t
Summary :: Using the 8259a compatible PIC to be deliver the interrupt
3 A: \1 H! a" v! Tsignal by Delivery mode of the I/O APIC to be the ExtINT,
/ Q9 n/ F6 T7 T5 {- ]the interrupt related by the IRQ 1 able to be not refer+ w* o" K0 b4 N# v
the I/O APIC's Redirection Table.* K7 Q4 `7 h" Y/ h! W' P
$ Y& b8 F) O+ E6 I1 f
- It is higher priority of the hooking than the direct
* c% o* q C* K9 A3 ~modification of the I/O APIC's vector./ o" X4 `6 G' V
- The vector can be hidden on the thread getting the keyboard, Z' N& x- {9 j s& A
vector from the I/O APIC.
- b, Y; [8 }! b9 H& u
# t2 c# E( c$ E* p6 H5 d, `Flow ::6 V0 y2 f8 _( s& r- z4 C
1 {. z" k( N$ p! K
1. IRQ 1 Assert !!!
9 _1 V* w) s, K6 {2. The I/O APIC receives the signal and refers the I/O Redirection table.$ j K# H# n" ] b9 d# Y
3. Sending the signal from the destination Local APIC.
% \8 N$ l0 E9 O' e" N4. Local APIC pass the signal to the processor for its delivery mode ExtINT
( B. Y/ G0 r# n2 v# |7 v D5. A processor receives the signal.
% I. a, U- F( N* M: e6. The processor Assert the INTA signal.: f: M% h% l2 @ ?3 z7 \
7. The I/O APIC acknowledged.
" p/ A6 X$ |0 g8 i- g" i8. The processor Assert the second INTA signal.
: a+ \" x( y' b Q @, C0 e9. The I/O APIC delivers the signal to the 8259a compatible PIC$ g9 h- |7 i b" @
for ExtINT to its Delivery mode.
1 [7 V$ W) n1 U" V& L10. 8259a compatible PIC sends 2 bytes after second INTA pulse.9 x( x' p+ s2 I1 a
11. The processor execute 2 bytes sended.4 L- G4 m2 j+ U! L/ a, y
12. our interrupt handler executed.' _1 g) V6 {* u+ c
& Y) Y4 B) R$ o) B2 S- c0 ~3 W. ?& I r- p$ o
sourcecode and binary are available on the5 [0 \8 U t$ z1 q
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|