|
|
Keyboard Interrupt Hook using I/O APIC(ZT)1 s+ V# a6 ^# z$ K
4 C$ O5 y! ~/ L) zKeyboard Interrupt Hook using I/O APIC
, x1 ?/ s# c' a, n- u4 m" g5 Y1 f$ J% U0 n: H' J/ }7 V5 ?" W
By: chpie
9 y& v8 U4 S2 q. m3 u7 vKeyboard Interrupt Hooking by manipulating the I/O APIC
$ w: i/ V* |5 N8 wtested on the winXP, Pentium D Hyper-threading Enabled.
' C8 z' I+ y. a# T! S$ D0 Y2 f( r4 J) m1 |
5 z5 T: Z8 d$ k* S8 W9 P! L0 C$ @3 m
Summary :: Using the 8259a compatible PIC to be deliver the interrupt9 S. z' L" g7 |$ r0 ?
signal by Delivery mode of the I/O APIC to be the ExtINT,
; D( Q3 T+ ~7 Z4 v( zthe interrupt related by the IRQ 1 able to be not refer; v, @6 Z4 M: `, |4 x
the I/O APIC's Redirection Table., H I6 R# g* @" e
' f* @$ w# J4 m- It is higher priority of the hooking than the direct
3 r( _* i" Y V3 t( r" D4 Smodification of the I/O APIC's vector.1 @3 n, {1 W2 k) o# P$ A% D" }
- The vector can be hidden on the thread getting the keyboard
% Q% {' \* \1 q9 s$ e' `vector from the I/O APIC.0 i- J1 W t$ Z6 q
! v. K P% {0 T/ o( t
Flow ::
. T; v4 Z7 {( ^. [
. ^) D: | r1 m3 g4 j0 v1. IRQ 1 Assert !!!
6 o* E3 t3 F1 e4 g/ t7 Q2. The I/O APIC receives the signal and refers the I/O Redirection table.( o+ o3 C9 g: s. b. l& U/ Q5 W. ^
3. Sending the signal from the destination Local APIC.3 P4 V9 h* r9 ^- Z. j! O" J* ?3 T
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
" O5 e& A" }) b" Y7 ^$ A5. A processor receives the signal.
) q, p# ^; H# n/ {7 c) P ?6. The processor Assert the INTA signal.
+ d: G8 v8 S9 q7. The I/O APIC acknowledged.1 O, Y: V* e( Q9 Y
8. The processor Assert the second INTA signal.
/ N' u8 \! ?% {: L; L5 Q( ^: q) k$ k9. The I/O APIC delivers the signal to the 8259a compatible PIC' F2 Y0 l; }5 E" E$ V+ ?( D# b# h8 r
for ExtINT to its Delivery mode.6 W" K/ b7 I: [% v3 B$ u- v
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.* i O. p9 d& S1 ?0 k
11. The processor execute 2 bytes sended., S2 d3 l$ l: v4 n
12. our interrupt handler executed.7 U6 Z6 J- ?" D" C8 n
& @: Z, Z0 v# K* {1 `) e/ Z& v# L4 M: J
sourcecode and binary are available on the. r% T( j& A' J2 z9 A7 B2 |$ B
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|