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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)* ~  R" [$ b9 G) D2 G+ E2 L" ~& s

. a. y# B( V) c  t) QKeyboard Interrupt Hook using I/O APIC
8 @! r6 E& i4 i8 X
( C; F& G1 C! d) }By: chpie  ]; |  a- p- H0 M9 I! d/ [
Keyboard Interrupt Hooking by manipulating the I/O APIC( U3 V' w1 Y8 z  M
tested on the winXP, Pentium D Hyper-threading Enabled.9 C+ w6 H2 B; k1 t

& @/ l9 F0 b0 o$ ]1 j9 E: d4 r& r, |$ r5 R6 ~
Summary :: Using the 8259a compatible PIC to be deliver the interrupt
2 E6 H! A* @: a$ L' bsignal by Delivery mode of the I/O APIC to be the ExtINT,
- u! M- Z/ p* C6 b( u, Cthe interrupt related by the IRQ 1 able to be not refer
, Y$ O- ^7 L6 g5 ]' Y6 hthe I/O APIC's Redirection Table.2 H0 C7 B4 B# b' W# a$ Y% l

- f. \) T$ o; O- It is higher priority of the hooking than the direct
7 Z; I) B8 t$ A3 a0 a4 nmodification of the I/O APIC's vector.
4 N2 j4 l% R+ I+ B/ m2 I4 _- The vector can be hidden on the thread getting the keyboard
4 h& ?8 {( X0 M6 q+ U- I( ?% Gvector from the I/O APIC.- V1 q# g1 E5 H2 g3 D0 L

) @( G2 q0 I: {: i0 E5 NFlow ::
, ^% e9 A6 Y4 W! p; h% n* F8 W" t
+ a) w; B6 N# s! T1. IRQ 1 Assert !!!' E) @& z1 j. @$ L- N4 x
2. The I/O APIC receives the signal and refers the I/O Redirection table.) Q' K  [; R7 t( J4 `$ l2 n  ?7 i  G
3. Sending the signal from the destination Local APIC.
$ Y& j0 s4 \; u" F- @4. Local APIC pass the signal to the processor for its delivery mode ExtINT5 h' c* ]! b9 h9 e$ E3 C" Z" N. ?" s
5. A processor receives the signal.6 X& m, h' u; A
6. The processor Assert the INTA signal.5 _- z& _8 s2 h& f1 C
7. The I/O APIC acknowledged.% b7 i) A+ V- v3 L) |8 u2 K
8. The processor Assert the second INTA signal.
* ]7 I1 s5 s9 O- w' G9. The I/O APIC delivers the signal to the 8259a compatible PIC& p, h4 d; H$ ]& O# S' T: }' j
for ExtINT to its Delivery mode.$ a: m+ t) _8 ?( J  u2 ~5 V' e
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
* F8 V/ l! u3 Q9 T) R& L. k11. The processor execute 2 bytes sended./ S1 H  ?5 D2 C4 `
12. our interrupt handler executed.
. K! R# X+ m  l; [$ D4 x1 D8 j" b" ]+ I8 z
9 _" I% ?! l, N- B1 F! c' ]
sourcecode and binary are available on the
4 f3 y1 r0 Q2 G+ z- v  ?- R1 j% @1 nhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-1-12 00:35 , Processed in 0.099199 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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