|
Keyboard Interrupt Hook using I/O APIC(ZT)
+ W+ z$ W2 ^" `' [5 N% E: y# ]! n& n H6 c* Q1 c8 H
Keyboard Interrupt Hook using I/O APIC+ v+ n* P8 o* `- @
8 F6 j1 Z6 N% j/ D# E4 X: Q9 H- [By: chpie
; m! e9 ?! P7 m+ W8 oKeyboard Interrupt Hooking by manipulating the I/O APIC
, z9 ?: p' T( ?- z/ Jtested on the winXP, Pentium D Hyper-threading Enabled.( L/ c9 \. H+ `7 M9 e; ?) h. K! T
. f$ ~6 y0 f5 C) g7 |
# V. M. N8 x) h( A2 j( N- i! l4 TSummary :: Using the 8259a compatible PIC to be deliver the interrupt: u3 u. {% E: x( b d, k9 a
signal by Delivery mode of the I/O APIC to be the ExtINT,1 M; D Q5 {7 g& d4 g. e
the interrupt related by the IRQ 1 able to be not refer
4 _ ]4 ^; a- ^% @" t" ithe I/O APIC's Redirection Table.
# M: {) R3 i. w, }7 F. G0 C$ V5 O3 r
- It is higher priority of the hooking than the direct
! Z& t E" [" v9 ^0 xmodification of the I/O APIC's vector.' i( U5 c) ?6 G) n
- The vector can be hidden on the thread getting the keyboard
' @! A# \- h; o& ?" B, F! Mvector from the I/O APIC.
7 k1 C0 |8 a3 _3 D* M7 o2 a- H# M. _, t) i% u/ F) Q3 O
Flow ::
* g: I- q- [2 T
. U8 r5 |& E M% z6 b( f B1. IRQ 1 Assert !!! @9 K8 u' ^* [; K; j2 B# E. G. `/ T
2. The I/O APIC receives the signal and refers the I/O Redirection table.
6 \+ l! ~: X3 r% j% C7 x( z7 z( s3. Sending the signal from the destination Local APIC." \/ {' p/ p. n5 \4 y. y) a
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
. J+ m, Z' A7 @1 W, n5 i5. A processor receives the signal.
- L0 O- ~% R& Q4 T6. The processor Assert the INTA signal.
; a/ J* C% T' G$ ^0 a* v z7. The I/O APIC acknowledged.
0 T i2 } P7 X; q4 B ^8. The processor Assert the second INTA signal.6 L' @- h7 W; S0 Z/ Z! q" x3 ?
9. The I/O APIC delivers the signal to the 8259a compatible PIC$ ?1 R$ F# f: [; O/ W+ a
for ExtINT to its Delivery mode.
5 s2 l, I# p: ~, `10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
3 L1 C4 _( L8 Z. T5 U3 e11. The processor execute 2 bytes sended.
M0 S& u) k1 I2 ^5 ]12. our interrupt handler executed.
- o# y; h7 ?# B* A
- u% @2 s6 H0 F& H1 f4 O3 U8 F3 i! t/ ^( u
sourcecode and binary are available on the) i" J+ R' F# M) `" x# @5 y
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|