|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
% e W: n5 W+ {" D) I \1 U; f) }% n- q
Keyboard Interrupt Hook using I/O APIC
% C% ^: X, o9 e9 h T ^1 ^% G0 [5 h5 j/ A/ L$ j- v# h9 \
By: chpie! f6 w1 v/ r( h. V' V4 ~$ ^# T0 G4 F
Keyboard Interrupt Hooking by manipulating the I/O APIC- n+ [' i, t _1 Y$ j
tested on the winXP, Pentium D Hyper-threading Enabled.' k) e+ I2 |- P+ a- V5 Y
- Z- d/ M. j. v8 G
9 N' A9 Z+ e9 a# ISummary :: Using the 8259a compatible PIC to be deliver the interrupt! D; w4 h( S! n# O; Z* C. r, ~6 r$ X
signal by Delivery mode of the I/O APIC to be the ExtINT,1 N3 \- H) G5 u
the interrupt related by the IRQ 1 able to be not refer
' O! k7 q [6 k5 y2 ?the I/O APIC's Redirection Table.
2 E- q- v+ r \ I9 X9 r
) V7 D+ H' X- k. V* J- It is higher priority of the hooking than the direct/ k: w8 ]9 ~7 G4 V# g
modification of the I/O APIC's vector.7 G" D2 e6 b: C$ A% q/ B: S
- The vector can be hidden on the thread getting the keyboard
. Z. q1 `" }. X7 l/ d" i% m1 E! Zvector from the I/O APIC.
% _" ^3 V! j; V2 Y' U1 q
+ S+ [3 J7 k. K) w0 FFlow ::/ j: W4 C* U j: z$ J
* Y1 k! x( E& }( i5 e. n2 |6 c9 J
1. IRQ 1 Assert !!!0 k3 V3 S/ `# t4 _, _& m
2. The I/O APIC receives the signal and refers the I/O Redirection table.
{3 y. m3 H! | U5 D3. Sending the signal from the destination Local APIC.
+ J, U) W1 h: `' X4. Local APIC pass the signal to the processor for its delivery mode ExtINT! [ Y$ ~3 ~2 w' L+ f) S5 R, _" d
5. A processor receives the signal.
' R. D0 ~# x& q8 G4 v% d% h6. The processor Assert the INTA signal.
; B7 T0 h) _, I) S3 P" M$ c7. The I/O APIC acknowledged.* Z0 ]- L: o9 B( ~6 Q
8. The processor Assert the second INTA signal.
. }3 L/ ?4 u+ O: R9 Q9 F) o: Z9. The I/O APIC delivers the signal to the 8259a compatible PIC; G6 D2 k% Y5 i5 }6 E
for ExtINT to its Delivery mode.; q! G9 f# u" l s
10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
( O& L- o7 L, g* x5 [. ]11. The processor execute 2 bytes sended.
1 p9 Z4 d: c0 g' T0 d5 Y" Z" y- o12. our interrupt handler executed.
: n. {& [- y7 Q* b+ y4 y& G4 d; E, i& h
2 I* k/ A5 r- k7 d2 J- X2 hsourcecode and binary are available on the
) {& p5 ?/ n6 \$ c) |5 D: lhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|