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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT): j  {, V- Q( b3 e; ^7 N

  `' z# e2 `; A) y# H$ UKeyboard Interrupt Hook using I/O APIC% T/ {; A. h; Z2 t- Z% D: E

, L& I* a3 ^5 S" \4 y2 r$ pBy: chpie- v* s- q, s& A
Keyboard Interrupt Hooking by manipulating the I/O APIC
( e5 E6 R6 {* O: E( mtested on the winXP, Pentium D Hyper-threading Enabled.# {1 d; z' l( K; Y; G

/ X: l, E' B. |7 Z: L7 m, W$ {1 b9 _/ U  A! x2 U1 h5 B* w
Summary :: Using the 8259a compatible PIC to be deliver the interrupt4 w( n2 M; D' s) A; x
signal by Delivery mode of the I/O APIC to be the ExtINT,
8 q0 }& L/ H7 dthe interrupt related by the IRQ 1 able to be not refer
# c8 W  E3 q: K: z0 N, K7 Cthe I/O APIC's Redirection Table.
- [2 c$ M" J$ P  x% c3 `8 d7 j% b8 ^1 d3 R  q, o. Y
- It is higher priority of the hooking than the direct
/ b4 Q5 n5 a; k$ P. G- Bmodification of the I/O APIC's vector.
' G9 l% L' A2 j' K- The vector can be hidden on the thread getting the keyboard8 W' G4 C; X* h1 p) N; M
vector from the I/O APIC.5 m7 T& y: }1 M7 @, i
- Q& Z. d; p2 Y" l9 c' n
Flow ::& m3 F. k; p; a+ J$ m
" d& w7 i: e& t
1. IRQ 1 Assert !!!% }& ]) [+ h) R" C
2. The I/O APIC receives the signal and refers the I/O Redirection table.* w4 A7 x8 ]2 N3 P& K# U
3. Sending the signal from the destination Local APIC.# i+ M: }  G7 f5 I( P
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
1 f; \0 O. G0 _5. A processor receives the signal.
- ?: W! }4 {% |4 g6 s% l3 \4 t6. The processor Assert the INTA signal.
  A& O2 n  i. I$ ~2 D4 e5 P7. The I/O APIC acknowledged.5 e/ [; W2 C! a) f
8. The processor Assert the second INTA signal.! @+ f; {9 E# \( S" |
9. The I/O APIC delivers the signal to the 8259a compatible PIC
$ j% {/ S# D4 H9 Rfor ExtINT to its Delivery mode.
% r/ z4 D2 o/ D0 `$ z/ g3 i10. 8259a compatible PIC sends 2 bytes after second INTA pulse.4 B# U- @5 r5 \5 O! l3 e/ T
11. The processor execute 2 bytes sended.
+ t7 @& A' R  r$ ?12. our interrupt handler executed.
# `2 f; }' o. ~/ ?/ _- U5 r  F. e
5 C7 {5 \/ W; m4 j: A2 m* [) C: P1 B) T" y9 f4 j6 E1 C
sourcecode and binary are available on the
7 s: V/ O4 N7 n$ f( P3 C8 m! chttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-9-21 21:26 , Processed in 0.547177 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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