找回密码
 加入计匠网
搜索
热搜: BIOS ACPI CPU Windows
查看: 14642|回复: 0

[转载]Keyboard Interrupt Hook using I/O APIC

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)
" f! {2 m" [" W4 w; ]( M
( c1 H2 @! M& b$ UKeyboard Interrupt Hook using I/O APIC
" J' N/ `3 q" A7 x: s( k% F% i6 K6 `  [1 D
By: chpie+ k% k$ O* k+ u9 V$ u
Keyboard Interrupt Hooking by manipulating the I/O APIC$ A- z- Q7 c0 c4 R: v- E! Z
tested on the winXP, Pentium D Hyper-threading Enabled.3 Z" {& q& p  ]( m; J1 W( E: L+ N

$ I* o' Q8 M3 p. z) \6 ^/ I/ H$ I8 T4 x/ f# v$ v! u, b
Summary :: Using the 8259a compatible PIC to be deliver the interrupt
2 G, J1 c7 ?( O4 Ysignal by Delivery mode of the I/O APIC to be the ExtINT,
9 f" ^8 Z# b2 d& g- c: B) b8 rthe interrupt related by the IRQ 1 able to be not refer+ V, a" Z+ f. E( K
the I/O APIC's Redirection Table.
) G6 k% o* w# V1 z  m+ k9 M
" V8 @- g( H; L: b- It is higher priority of the hooking than the direct7 c: F% Q1 I3 `
modification of the I/O APIC's vector.4 Q  r! J0 P) H0 i. y! M& b0 s+ B% V: b
- The vector can be hidden on the thread getting the keyboard
# k* S' |+ |7 J1 v& S0 Yvector from the I/O APIC.
  ]; h- i$ \  W2 R3 X8 c7 {  ]# u( p. m" A+ o% C3 b' ]8 W
Flow ::
9 S1 {! w3 u; \' d! Z" k' f0 y
. }: X* e3 Q. [% F8 G9 z1. IRQ 1 Assert !!!
) w' Y  l( @6 N% ^3 X1 _2. The I/O APIC receives the signal and refers the I/O Redirection table.
. F5 D/ k! g+ t3. Sending the signal from the destination Local APIC.
5 J7 y4 r, a9 c7 E+ K6 N* f. n. g' Q4. Local APIC pass the signal to the processor for its delivery mode ExtINT
. W: Y& l0 [" }  i8 t5. A processor receives the signal.
9 |; \& `; ?2 W4 n6 r) J$ }6. The processor Assert the INTA signal.
' N, p2 w6 ~# x) z6 e2 Z# J/ D4 u7. The I/O APIC acknowledged.4 o5 }& O2 z  v) |& z4 a: M" J
8. The processor Assert the second INTA signal.
" L0 s) |) e/ `( n. b* ?; ^  Y3 g3 ?9. The I/O APIC delivers the signal to the 8259a compatible PIC8 b, s6 V2 R: Z' |% X
for ExtINT to its Delivery mode.' B8 f: u* [. b
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.* v; J3 @: `( u+ A
11. The processor execute 2 bytes sended." o0 K: z! t3 a9 T3 a& D
12. our interrupt handler executed.
, n+ `, C: @' T! p$ F' ?3 r" _, m( m+ {+ \% m
# k! T4 [4 {  Y' C
sourcecode and binary are available on the
% F& u2 O' G- C2 B. |5 Y  _$ Yhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入计匠网

×
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

Archiver|手机版|小黑屋|计匠网

GMT+8, 2025-6-13 07:12 , Processed in 0.090362 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表