|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
( I+ k' _9 K. q" {5 l% ^. c/ a- A! G3 k, \5 _+ g
Keyboard Interrupt Hook using I/O APIC
0 \8 F5 ]( [! k4 B* V
, F. d# k; D7 v- A$ D' G& vBy: chpie
, ^) K& O7 P+ IKeyboard Interrupt Hooking by manipulating the I/O APIC# d3 r4 R' s9 E4 g7 a
tested on the winXP, Pentium D Hyper-threading Enabled.
3 o8 P {. ]& y& ^0 r; D: ^- m2 I, e5 Q
' J# ~8 [+ f' |9 ?5 h4 F1 J3 ~ A, {
Summary :: Using the 8259a compatible PIC to be deliver the interrupt! f8 X3 z% L) j5 J* w$ t
signal by Delivery mode of the I/O APIC to be the ExtINT,3 U! K/ ~9 l% D( q0 b; \
the interrupt related by the IRQ 1 able to be not refer. ?1 Z) V& m* ]; `, x6 l( h
the I/O APIC's Redirection Table.
1 e5 k1 I' y$ @8 v
8 m' P1 Q' p8 Y t" r- It is higher priority of the hooking than the direct
' U1 g; l8 X+ I1 R% ^modification of the I/O APIC's vector., ]/ l; R! ~/ ~7 b8 W6 E
- The vector can be hidden on the thread getting the keyboard5 D2 _0 w( [+ G6 ~3 _
vector from the I/O APIC.9 a/ H' ~; _$ X' d$ ~
6 J: M2 y s; t2 c6 K* ]
Flow ::
# ?% d. [: M" J9 `- Q! ` t7 w) F# |! b( t( ]7 N; D1 Z
1. IRQ 1 Assert !!!
. x5 o/ U5 Q9 ^& q0 M2 a2. The I/O APIC receives the signal and refers the I/O Redirection table.
3 L/ H$ Y$ t) U0 @0 p% ~3. Sending the signal from the destination Local APIC.( B8 I- M, Z2 S8 h$ d- F2 f
4. Local APIC pass the signal to the processor for its delivery mode ExtINT/ N# S7 w# ~: t& A; }, X8 Z
5. A processor receives the signal.
7 h% |$ o; `. h! m, i6. The processor Assert the INTA signal.
3 ^ O5 g' |; f2 x- F7. The I/O APIC acknowledged.; t! v& U# _1 W F% Y
8. The processor Assert the second INTA signal.
1 b) X& \1 D/ E, ~( S3 B( R W9 [9. The I/O APIC delivers the signal to the 8259a compatible PIC( \) }0 ^# D/ _! s0 P; T9 d' C
for ExtINT to its Delivery mode." s$ Y) |- P, k/ T- [, z. ?$ {* w
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.& e3 w9 z: G& _" Q
11. The processor execute 2 bytes sended.9 M' }1 H9 n9 g" G J+ j
12. our interrupt handler executed.' m+ @. Q- v. c4 }- h* }
2 }7 [/ t7 Y7 V0 n- D
$ K" P3 E" r& t0 Z7 Xsourcecode and binary are available on the
$ d2 m: i; V& @2 y) j+ Z* w1 i2 S' Ghttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|