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

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

[复制链接]
发表于 2007-11-16 12:13:14 | 显示全部楼层 |阅读模式
Keyboard Interrupt Hook using I/O APIC(ZT)
) O6 x# R* S* I& {4 b3 Q$ ~& G- b0 g' V. i& e
Keyboard Interrupt Hook using I/O APIC
& p, u% p0 r% d6 P1 N7 `& E; x) j% l3 W5 v
By: chpie
1 s3 e& T/ P4 I$ _. D6 l( xKeyboard Interrupt Hooking by manipulating the I/O APIC7 u- g$ a( I3 w! a
tested on the winXP, Pentium D Hyper-threading Enabled.+ ]$ x/ H( T5 p" W- X* B7 i
7 \" i/ g9 e" b
% H9 [; L. z6 F
Summary :: Using the 8259a compatible PIC to be deliver the interrupt2 v. q2 Y0 {8 V8 d8 f  J
signal by Delivery mode of the I/O APIC to be the ExtINT,
& d: z% Y7 F, \+ _; R2 wthe interrupt related by the IRQ 1 able to be not refer, [( Z  A1 q, H' Q/ g$ ^, F
the I/O APIC's Redirection Table., Y2 b7 F# e4 I3 G1 h3 w: F; U

6 l* p! N  j8 L1 e, K6 U2 ]- It is higher priority of the hooking than the direct& o  i! i! I% P6 @6 _; s5 i# c1 X/ l
modification of the I/O APIC's vector.2 t6 A7 f+ [# J" f* w/ M
- The vector can be hidden on the thread getting the keyboard$ o! p$ \3 c- F5 ?' x+ T
vector from the I/O APIC.
1 o. Q& u; O- C1 N: R, Q; c: n  K  q. J
Flow ::
* j& y! p6 g1 w% [# ^7 q( f; T" |0 W- {
1. IRQ 1 Assert !!!
0 l3 J7 m/ H- X5 _2. The I/O APIC receives the signal and refers the I/O Redirection table.+ }+ I$ P& j7 B4 a2 T$ n
3. Sending the signal from the destination Local APIC.
' m4 e% ~, ~4 a4. Local APIC pass the signal to the processor for its delivery mode ExtINT
, x( Z" N( q- v. g2 ^* G* ?) x5. A processor receives the signal.
8 t6 y2 {. M3 _4 u+ _" C6. The processor Assert the INTA signal.1 [$ A7 j$ ?! x4 m9 f
7. The I/O APIC acknowledged.+ v' V% m4 `8 c9 S( r. w
8. The processor Assert the second INTA signal.
0 @' D/ m9 \, d9 r  c  J9. The I/O APIC delivers the signal to the 8259a compatible PIC
9 @5 I6 p2 ^# d" h3 b) S( x3 b, u; }! vfor ExtINT to its Delivery mode.3 J  w0 S3 k0 v3 b& a7 n) ^8 ~
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
6 {3 b  @' y/ G3 [% s11. The processor execute 2 bytes sended.( {" e* Q5 K& W, _: P
12. our interrupt handler executed.
7 Q" O6 A$ F- L& x: b
* ~- g9 k% u1 l, _* H% B/ L. W: ^! z( d% N3 ?9 p
sourcecode and binary are available on the( G; c# T! X$ N
http://www.rootkit.com/vault/chpie/apic_keyboard.zip

本帖子中包含更多资源

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

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

本版积分规则

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

GMT+8, 2026-10-20 09:25 , Processed in 0.065737 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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