|
|
Keyboard Interrupt Hook using I/O APIC(ZT)
* R+ l0 T5 \( X0 g r2 i
* ^+ Y* M3 S2 iKeyboard Interrupt Hook using I/O APIC; c; h* I, H! P; m! p, O% F
% |1 Z5 m- H# c5 m7 D: s9 @1 U
By: chpie
# [3 O) t9 P/ _* gKeyboard Interrupt Hooking by manipulating the I/O APIC
& i3 V4 C* Z7 K+ T! U6 mtested on the winXP, Pentium D Hyper-threading Enabled.0 V9 {* r* [. A9 L4 E" R1 d
( l! R' A' |* t* k' ?/ t
3 Z* V! E7 D: F8 d, S/ hSummary :: Using the 8259a compatible PIC to be deliver the interrupt
, n& {, X2 ~! }5 [0 B S* xsignal by Delivery mode of the I/O APIC to be the ExtINT,
4 Y2 _" O u5 a" O. J6 |; o( C9 v( Vthe interrupt related by the IRQ 1 able to be not refer
3 R' P' n: v' t6 Q {0 Gthe I/O APIC's Redirection Table.
! t. U1 @3 D9 p+ ?+ i+ ]0 G- z
n6 ]$ V' E% o- I# H: {- It is higher priority of the hooking than the direct) {* c; i0 M' P3 o
modification of the I/O APIC's vector.* T9 E* B3 Y1 m& E4 K
- The vector can be hidden on the thread getting the keyboard
5 e6 n" j0 h# T: a# H8 m, z% Lvector from the I/O APIC./ w3 @! H! \" A! U* y4 Q9 L
- ^% @4 b- i7 y2 t0 zFlow ::
: D5 S3 r( K( M9 ]8 N$ P+ E: h! a
2 w- E: H3 H0 m- k& ^1 Z1. IRQ 1 Assert !!!5 ?' F5 r2 \7 P+ ~* a' Q
2. The I/O APIC receives the signal and refers the I/O Redirection table.
: s7 E5 Z9 P$ M/ z! U3. Sending the signal from the destination Local APIC.* N; f/ x3 w; u8 U; [8 R2 d6 N# s
4. Local APIC pass the signal to the processor for its delivery mode ExtINT/ m. }2 `: ?4 K* j# t: G
5. A processor receives the signal.7 @4 D/ g8 [* m, f. T
6. The processor Assert the INTA signal." `; x- i; l0 V3 @ G Q
7. The I/O APIC acknowledged.
8 `( p& k; w3 l" {7 c' ~' I8. The processor Assert the second INTA signal.2 C+ u8 ~2 W" D; c U, T# F
9. The I/O APIC delivers the signal to the 8259a compatible PIC M; {8 j4 {% k% p. z3 A/ X9 n
for ExtINT to its Delivery mode.
. \4 P6 l& q* A10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
. q# L6 g& G) `0 g3 K6 b11. The processor execute 2 bytes sended.& c7 m; G- e; V" v# g
12. our interrupt handler executed.2 i9 i8 A, a/ ?% w, `4 x/ F
5 o& Z9 p. j6 _
$ C8 Q% Y* J* i5 g* y" ]9 c5 D
sourcecode and binary are available on the
1 i( ]/ Y/ c/ o; D( rhttp://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|