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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)
$ b. v" G; ^& S' r) U& A. N2 \. f2 q; p; \, [2 a
Keyboard Interrupt Hook using I/O APIC( L5 W+ N2 [8 Z. ^; {: v
5 E8 N' M6 {0 a- R, A# R
By: chpie
# @' P5 {# Z* I: N. Q6 p  t- YKeyboard Interrupt Hooking by manipulating the I/O APIC; U5 W# m+ T. B8 K  d( H6 W
tested on the winXP, Pentium D Hyper-threading Enabled./ M4 n# `/ E) N8 k# G6 M
8 z" e6 i' C2 P1 {4 {# N

, k+ K6 j. y9 {& ^Summary :: Using the 8259a compatible PIC to be deliver the interrupt5 u# `% N2 ]6 e5 ?
signal by Delivery mode of the I/O APIC to be the ExtINT,( R4 w9 M) d  w6 I, ?
the interrupt related by the IRQ 1 able to be not refer
0 m7 z/ E. R9 [' e& Uthe I/O APIC's Redirection Table.. {- O! \+ E' r7 f+ Z! t
1 ]! n1 @5 [9 w
- It is higher priority of the hooking than the direct  E# F3 @7 g/ q6 l; Q
modification of the I/O APIC's vector.* T8 s3 w3 E/ K2 ?) D
- The vector can be hidden on the thread getting the keyboard
4 ], @' h3 D% h/ \vector from the I/O APIC.
( y* I+ F" m9 F9 d3 Q
! b& y/ d9 Q7 @( a6 x$ j3 o4 \7 tFlow ::. P# D8 \, W+ y+ C7 C- [) Z
. h3 l+ h. k* N
1. IRQ 1 Assert !!!+ ~6 g! [7 A  Z. R
2. The I/O APIC receives the signal and refers the I/O Redirection table.2 P$ L$ F. m- v/ Z0 U6 x! q( R
3. Sending the signal from the destination Local APIC.+ }* ]0 _3 X3 Q5 N: ?
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
* b) ~* z2 c$ x! G/ x5. A processor receives the signal.
/ j3 U/ p; j+ Y/ W& [" V& m% Y" w+ d6. The processor Assert the INTA signal., M& P% ^- T8 H: A5 }
7. The I/O APIC acknowledged.
9 J' O# Z! b7 t2 x$ |8. The processor Assert the second INTA signal.4 K. ~$ j% C, [& c& e& |, Y! C5 h
9. The I/O APIC delivers the signal to the 8259a compatible PIC
7 G% D8 g& _8 i# U' a: b" Ifor ExtINT to its Delivery mode.  z! w7 S' W6 {3 Y5 N% c2 y
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
. @& G# k+ X  k: |+ }$ E  L11. The processor execute 2 bytes sended.. L5 W( j. t7 ~2 l1 V! e0 U
12. our interrupt handler executed.  m- `- @! A" ^* Y6 r

7 h3 [- A8 b- q% q3 V# f  U
" b4 u+ D5 ^9 V( \sourcecode and binary are available on the
4 E( B+ A4 ~* z" C1 b+ fhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2024-5-20 06:53 , Processed in 0.034823 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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