|
Keyboard Interrupt Hook using I/O APIC(ZT): r, U2 A, v+ A. r
4 F6 H8 y+ W4 x& I( b
Keyboard Interrupt Hook using I/O APIC
2 C5 }( P7 ]- Z+ {/ K6 f2 e! O$ d3 S; t$ S+ I. ]2 F+ D, t
By: chpie# O7 m6 ?: g! @' \* w5 Q. I2 u6 [
Keyboard Interrupt Hooking by manipulating the I/O APIC( g- V/ @# ~" T$ J3 m+ n
tested on the winXP, Pentium D Hyper-threading Enabled.
" s6 t8 }0 c: Q! b- C: \. Y X* ]9 }) t5 n" L3 C! z
) y5 p6 {% F2 R
Summary :: Using the 8259a compatible PIC to be deliver the interrupt# Q& F: P! C0 h G# S5 }
signal by Delivery mode of the I/O APIC to be the ExtINT,
7 t1 [0 T! l# \3 K, {; qthe interrupt related by the IRQ 1 able to be not refer
( F: a$ f" q5 @' J5 J; ?# H* ]the I/O APIC's Redirection Table.
9 H; {4 V3 E% q$ E# ~. _
; L$ O! i7 y8 H0 S, O( i% D- It is higher priority of the hooking than the direct
1 C O. P! }. mmodification of the I/O APIC's vector.$ j) }2 P9 a1 \4 N
- The vector can be hidden on the thread getting the keyboard
! h+ @; J5 G( @' a, [ ~vector from the I/O APIC.
. n: C b5 ^4 k6 s% D; {8 _( D+ F- _* q
Flow ::. V: ~5 s4 |2 \5 Q5 ^" `4 m6 K
3 F( m% U+ h0 t# d& j
1. IRQ 1 Assert !!!
. I& S# _ r. v2 u! \: k2. The I/O APIC receives the signal and refers the I/O Redirection table.: s& N/ r8 S. |% x% p
3. Sending the signal from the destination Local APIC.
" {5 L6 P. o! A t1 {+ x' ^4. Local APIC pass the signal to the processor for its delivery mode ExtINT9 d3 y4 m: u( B% k* ~. ^3 \# T
5. A processor receives the signal.# J5 {* {5 R+ X$ F- s
6. The processor Assert the INTA signal.
) r6 T( H5 C/ j* S" W7. The I/O APIC acknowledged.4 {) k6 f$ k3 R: R6 E6 ?
8. The processor Assert the second INTA signal.& z Z* w2 i7 V9 n- r q7 a
9. The I/O APIC delivers the signal to the 8259a compatible PIC
; w5 m `+ e1 J$ Efor ExtINT to its Delivery mode.
9 B; `8 v* j2 e% Y10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
# H$ i3 S( g/ c. t# R0 x( D( v) Y11. The processor execute 2 bytes sended.
$ d, ~2 M7 Q- l9 {/ H2 d12. our interrupt handler executed.9 q: l- H! w, v, V* {
4 R9 u$ O# H* t" \7 U
7 f' ?# N' R$ N. t$ b' qsourcecode and binary are available on the
; E; }# q) H0 B4 xhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|