|
|
Keyboard Interrupt Hook using I/O APIC(ZT); _6 c& a; d% W, }- s; D/ e( `
: {; U9 X4 `- l. [# k
Keyboard Interrupt Hook using I/O APIC9 t$ }% f: S1 T2 @, F' `$ y! L* ?
$ s0 Z& e& u2 P+ W
By: chpie
2 ?* B3 C; N6 g8 U+ Q& WKeyboard Interrupt Hooking by manipulating the I/O APIC
% I5 c* I: L: ^) m! g+ R2 {& c& Dtested on the winXP, Pentium D Hyper-threading Enabled.
! \/ I# W( u" Q5 n8 N2 F+ T7 C, P; o2 X, g- B' }" y# @ `
0 |' L, s1 f8 w" O0 a1 y+ A* r
Summary :: Using the 8259a compatible PIC to be deliver the interrupt" P1 x/ _2 h6 s! g4 O# ^
signal by Delivery mode of the I/O APIC to be the ExtINT,% o, g2 X2 A5 @- ]
the interrupt related by the IRQ 1 able to be not refer4 G6 @* h8 |4 k0 ?1 G+ |# @
the I/O APIC's Redirection Table.& i b3 {; y/ z2 B0 A" G; G
+ b4 h8 }$ `6 n: Y# k3 }
- It is higher priority of the hooking than the direct
, e$ x+ R+ @, g" _% C( @modification of the I/O APIC's vector.
8 B/ g* L2 M& P8 z( I- The vector can be hidden on the thread getting the keyboard
. J' M3 T: P& m( Wvector from the I/O APIC.& |* C0 y3 M$ X/ X) q. C
8 |6 P4 C$ u4 `- V8 Q9 u6 z$ G
Flow ::
7 T+ F+ A( O4 x v# G1 W7 A; V$ }' ~7 Q: M
1. IRQ 1 Assert !!!
y7 w# M$ T& [+ x! w% Y, F2. The I/O APIC receives the signal and refers the I/O Redirection table., ]5 A8 Q0 }, T) n2 Y. [) k" T
3. Sending the signal from the destination Local APIC.
( }) W* a5 b1 p$ I( {. H8 i4. Local APIC pass the signal to the processor for its delivery mode ExtINT
6 q1 }) s/ c, n" h7 ~5. A processor receives the signal./ y' S9 N& f6 g; R7 |9 K
6. The processor Assert the INTA signal.
* t0 m* S) P1 A P" X2 T7. The I/O APIC acknowledged.7 c! q3 N4 |. k( g* |' w
8. The processor Assert the second INTA signal.
2 d1 O/ N5 J; q3 Q0 ~# e5 g9. The I/O APIC delivers the signal to the 8259a compatible PIC
( r: W; n2 [( f) {5 A) bfor ExtINT to its Delivery mode.
6 y8 B# R& V! C4 A# w% ?" J4 m$ \10. 8259a compatible PIC sends 2 bytes after second INTA pulse.: C0 e o v, x3 v9 |
11. The processor execute 2 bytes sended.
$ Z; R% _3 x j# v8 y12. our interrupt handler executed.. h' A4 f2 `& v9 l7 a9 n
, \& R* m0 I# k+ d
6 G1 v/ f" q7 H& O# rsourcecode and binary are available on the K* H: H+ n0 l( `
http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|