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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)
* i8 m0 A3 z( ?: j  ?
7 ~0 b" s4 n3 W1 U# L4 SKeyboard Interrupt Hook using I/O APIC9 q6 U! j* k/ n" _- _
! ?# l6 Z0 k6 g. D/ l
By: chpie; y0 \: V  t; y3 L3 M( f: v3 C  K# |
Keyboard Interrupt Hooking by manipulating the I/O APIC6 W. J8 T+ a: S
tested on the winXP, Pentium D Hyper-threading Enabled.0 K8 X5 k) A) y# J
' g+ c% Q6 x0 f. Y9 x

1 B3 {- H& Z  t# c+ }( J% qSummary :: Using the 8259a compatible PIC to be deliver the interrupt6 p, L2 v9 Z  x2 Q2 ]
signal by Delivery mode of the I/O APIC to be the ExtINT,; ?2 i" {/ b9 R2 q( f0 u1 Z+ m$ `
the interrupt related by the IRQ 1 able to be not refer
+ }! K2 j1 [2 h) hthe I/O APIC's Redirection Table.; v% h( N% i! A% i1 {- h
* k- u% E) }$ l, B6 x( n: [  F* T
- It is higher priority of the hooking than the direct' z; @4 n9 F) C  ~; H# T7 U
modification of the I/O APIC's vector.# `+ Z) v, F5 D9 S1 }- @3 B
- The vector can be hidden on the thread getting the keyboard/ z' c+ z5 |6 g- `& _+ R! ?
vector from the I/O APIC.( w% F* Y9 l& y; n) T1 t0 d: H5 Q+ J. V
4 H* D% E3 z9 M5 Y+ _% D! R3 `& W
Flow ::
/ Z: K* {5 d$ Y- A. a% G
, r( T. O1 ^# |4 s4 A% [: q1. IRQ 1 Assert !!!
4 o! H' L8 c6 n7 B* T1 T. \; o2. The I/O APIC receives the signal and refers the I/O Redirection table.5 \0 t  R2 o  S
3. Sending the signal from the destination Local APIC.7 o% g8 l: }+ h% M( Y' [
4. Local APIC pass the signal to the processor for its delivery mode ExtINT  @8 {1 i2 U1 A4 ]6 b& O; q
5. A processor receives the signal.' u2 m. r$ x$ f1 {# ^8 S3 o( B
6. The processor Assert the INTA signal.
) C- V0 L; N8 X; ?9 D+ h7. The I/O APIC acknowledged.; E1 H9 v, A; l' O- p
8. The processor Assert the second INTA signal.
. k. d  G6 g  ^; ]2 ?) A3 m9. The I/O APIC delivers the signal to the 8259a compatible PIC
' P& I. t! V' n9 Y3 xfor ExtINT to its Delivery mode.
5 R) r# ?0 @2 w$ n0 B+ ^. }' W10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
  b/ ~2 _: @7 l- S11. The processor execute 2 bytes sended.
5 c8 Q% y2 e. ~1 ^12. our interrupt handler executed.' ]" T! V5 N/ z4 o
& N8 @0 X& Q! R7 a, ^+ V

9 h. w/ w& G0 w. J4 \+ osourcecode and binary are available on the
) W; U2 }7 F- o0 u7 M( ehttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-11-23 20:08 , Processed in 0.056179 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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