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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)* y; Y2 p2 X- H
4 X+ T9 O2 g( _2 L/ e- j
Keyboard Interrupt Hook using I/O APIC, B" a3 M3 ?& ^0 l: [6 O

. g& M7 a6 I# Y. B+ }By: chpie
. v9 ]2 q& j" b7 OKeyboard Interrupt Hooking by manipulating the I/O APIC
$ \/ ~% i" J. ptested on the winXP, Pentium D Hyper-threading Enabled.
7 Z) S. a' f$ h5 A. ?% a' I' I& Q  \8 z% z' _) {4 t

, E4 l! Q/ Q) D+ X& NSummary :: Using the 8259a compatible PIC to be deliver the interrupt+ M; v7 C' H# b6 }8 D
signal by Delivery mode of the I/O APIC to be the ExtINT,
( j+ L  i1 m& ~/ g) cthe interrupt related by the IRQ 1 able to be not refer
) q" Z7 Q+ A' [# Z$ I! k  d# n% s/ ]the I/O APIC's Redirection Table.
1 w' b) |3 b. _; _3 l# u
: W% T6 b( a* ^, V; D! s! K0 Q: _/ V- It is higher priority of the hooking than the direct
# r- i# `9 n& }' zmodification of the I/O APIC's vector.  P. u) ?+ g% L2 P. _
- The vector can be hidden on the thread getting the keyboard4 n4 J! G8 C3 L
vector from the I/O APIC.
& {" V4 I8 T/ O% x
9 F2 k$ Q1 l  @- k3 [* }Flow ::
7 P* l/ H$ g3 B1 H
& G! _6 X+ Y( B9 u, e1. IRQ 1 Assert !!!! O& Y* V& L2 G! g  s; v
2. The I/O APIC receives the signal and refers the I/O Redirection table.4 i4 ~" p1 y. o9 z3 L
3. Sending the signal from the destination Local APIC.  n- K- O* D5 B* {+ a
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
7 t) x/ ?3 C0 [/ K; b! |5. A processor receives the signal.
& g# w  x4 k/ s( w0 g* s+ n- j, f6. The processor Assert the INTA signal.3 I+ P" C5 a/ W9 i! _& u
7. The I/O APIC acknowledged.
, L8 O' v- A3 P8. The processor Assert the second INTA signal.1 V9 b/ i4 s3 p& i
9. The I/O APIC delivers the signal to the 8259a compatible PIC
/ E# ]6 Z5 E9 r* z" ]$ Q' R! e4 Efor ExtINT to its Delivery mode.
% Q: s0 N3 v5 ~, f, O7 Q1 l; |10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
$ t& U4 g4 ]8 i% l! }  k11. The processor execute 2 bytes sended.9 L/ A* Y, `( N9 x8 P& A
12. our interrupt handler executed.  V3 u2 t+ L) f0 Q" [$ f
' S: t0 S6 [+ j! {2 w9 ^: ~8 W

& e3 v) O) n+ @4 Ssourcecode and binary are available on the
5 C# l$ @+ N  o# Y7 N% B6 chttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2025-4-5 00:35 , Processed in 0.031977 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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