|
Keyboard Interrupt Hook using I/O APIC(ZT)
. R, @9 @7 A6 [( m: x
+ C& U2 j, S& c4 _Keyboard Interrupt Hook using I/O APIC
, T( q$ N3 Z) i% Z3 N3 V9 U' p% @" D# p% B. P* I3 B# ?
By: chpie
k/ G6 s6 i8 x* r, q! J& \8 {Keyboard Interrupt Hooking by manipulating the I/O APIC
0 r. I f h$ {tested on the winXP, Pentium D Hyper-threading Enabled.
' G% q. C2 {- U: Z3 T" O) h/ K2 ?/ h2 Y$ w: S K2 e% }- ^9 U
1 U* y: b$ E" m
Summary :: Using the 8259a compatible PIC to be deliver the interrupt1 c" n+ T9 Y& p: ~
signal by Delivery mode of the I/O APIC to be the ExtINT,2 A f) m3 p2 [: D) J( j
the interrupt related by the IRQ 1 able to be not refer
2 A3 H% h! u; P% }) v# P. v' Cthe I/O APIC's Redirection Table.
% W k" x1 n1 Z8 L9 | H& t- \9 Y6 k# x$ o2 {% [
- It is higher priority of the hooking than the direct6 z8 G. |4 \) I; X7 \
modification of the I/O APIC's vector.
% y- S: o; `- d3 c! E8 w5 H- The vector can be hidden on the thread getting the keyboard
% c5 O# |: X/ ~+ S2 avector from the I/O APIC.9 P1 C% k0 ^2 k( q2 b
# u8 z' g( ]3 e/ n) Z6 T2 B* ]Flow ::
( @- c) o$ K7 r$ D
1 Q/ O! V9 c( ~3 S+ [1. IRQ 1 Assert !!!4 {# `# l: k! u# W
2. The I/O APIC receives the signal and refers the I/O Redirection table.7 u4 c8 g. |; {) m9 K
3. Sending the signal from the destination Local APIC.. d0 R @: A3 T1 I+ m
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
: J( l' k# ~7 @. Y1 l6 c8 o! c5. A processor receives the signal., n- G. \7 a1 ^1 p7 U% Q: a
6. The processor Assert the INTA signal.& c5 }" Z9 `) y. g9 e7 S* U) m) |
7. The I/O APIC acknowledged.0 n0 @# K5 g+ W
8. The processor Assert the second INTA signal.
5 O7 U- s, m* X' b( \0 h; N9. The I/O APIC delivers the signal to the 8259a compatible PIC
$ C( e& G) P1 j: a! B- T6 e; `/ wfor ExtINT to its Delivery mode.& K* v% @/ J3 X( ~
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
6 N7 R& [" e9 o* f1 ]11. The processor execute 2 bytes sended.* x+ Q* H" y& q( r' Q4 |2 a
12. our interrupt handler executed.
% P- T7 i) ~9 |5 K
2 m7 H) @! A5 ^1 I. G
+ l( c. s& x4 J. R+ `7 Qsourcecode and binary are available on the1 c6 y2 A3 M+ m- @% s+ Z- L
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|