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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)/ p% W9 D" D. K2 s, u; m

7 R9 B3 d, _  I5 ^/ n+ h# _. TKeyboard Interrupt Hook using I/O APIC: E( P" ^3 v& U+ a% _- p
+ u4 P$ K$ m2 J3 q9 v
By: chpie
8 Q9 Q& T+ U) zKeyboard Interrupt Hooking by manipulating the I/O APIC
" q" [" z# v+ O$ ]* H9 P' m7 Htested on the winXP, Pentium D Hyper-threading Enabled.* \; S$ Z. N5 `. U9 ~9 D
) z( ~. R2 |; X+ m. t

! h& T0 ?# K( m( @6 W  @4 g# GSummary :: Using the 8259a compatible PIC to be deliver the interrupt
$ K. {  D" j8 h" m8 R" i9 wsignal by Delivery mode of the I/O APIC to be the ExtINT,
8 |& [. {" x$ O8 G6 k% a* Mthe interrupt related by the IRQ 1 able to be not refer2 h( }; t5 P4 g$ ^3 v( a  I) [
the I/O APIC's Redirection Table.% b' O0 w+ L- S2 z, r: n0 B
7 N% Z. e8 A: B& n
- It is higher priority of the hooking than the direct% n" F* i( v" ~5 {
modification of the I/O APIC's vector.' a1 E6 h  l$ Y6 B- Z& H
- The vector can be hidden on the thread getting the keyboard
7 r4 ^5 T' @+ y3 b6 fvector from the I/O APIC.
7 t& D; b% z0 y
7 d2 E7 B' f$ XFlow ::, u) T" n+ J" `! ~0 x8 w4 O
9 }* \3 c+ f, ~% l7 L
1. IRQ 1 Assert !!!
6 E- s, d1 O( s: v4 d, ^2. The I/O APIC receives the signal and refers the I/O Redirection table.$ F( h. T( a5 D4 E. A4 u* a; I
3. Sending the signal from the destination Local APIC.8 L8 f3 T. ]3 [2 ~0 L1 {7 E
4. Local APIC pass the signal to the processor for its delivery mode ExtINT
+ [! N- W, E1 ^4 v/ g$ g* Z5. A processor receives the signal./ ^$ H+ X. D) {! f/ z' @9 _- p% b5 ]
6. The processor Assert the INTA signal.
: @- h; M" G) ~# J3 e4 L7. The I/O APIC acknowledged.
/ O% ~5 P, Q$ J& W. x8 q7 e" G8. The processor Assert the second INTA signal.
- J" z% f1 I: b" k2 M9 \9. The I/O APIC delivers the signal to the 8259a compatible PIC
/ b. u3 M; c0 Q( o1 P8 L. l, v# Jfor ExtINT to its Delivery mode.
2 U* V8 }2 I# x4 {8 M* n6 E" o7 I10. 8259a compatible PIC sends 2 bytes after second INTA pulse.' p% u# h" {1 A
11. The processor execute 2 bytes sended.
, \% `3 n0 e+ {# F! A12. our interrupt handler executed.) Y' ?& n# R% K7 t

7 R- K; p* `$ Y! d+ b! `: O" @; V1 ?0 C6 G
sourcecode and binary are available on the# G( q2 o8 w/ X9 i- M& e. b4 K
http://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-2-21 07:55 , Processed in 0.244050 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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