|
|
Keyboard Interrupt Hook using I/O APIC(ZT)- G) d" [/ C' s! |* N, D+ z
' A+ ?/ O; u. w& l; T1 [; |
Keyboard Interrupt Hook using I/O APIC$ _! N3 N& `# |3 f/ m7 j2 l
. l+ D6 @0 D( I- b7 U/ R% JBy: chpie8 T* I. N, w& [. T k4 O
Keyboard Interrupt Hooking by manipulating the I/O APIC4 }8 }! ?- H' ~! k* j
tested on the winXP, Pentium D Hyper-threading Enabled.
+ O7 Z4 g9 ?! L, D; q) e/ {4 B9 M. _3 H, z* p; Q: r) ^" a& e1 Z: N
) t4 T: J* e' X4 Z4 r% YSummary :: Using the 8259a compatible PIC to be deliver the interrupt* G7 _1 k, c; J& [. [- J
signal by Delivery mode of the I/O APIC to be the ExtINT,
& T" \9 B6 D1 o0 [% P0 Zthe interrupt related by the IRQ 1 able to be not refer9 _5 ~( {( i1 d9 r* B
the I/O APIC's Redirection Table.# o- u `: R' t( @* \5 |, H |, U/ E
. f' R- K# r+ u; B4 H" I4 t- It is higher priority of the hooking than the direct
4 B( B% w' u* s1 |) t i: R! lmodification of the I/O APIC's vector.
% l Q, N, @1 n- `' G3 ? C- The vector can be hidden on the thread getting the keyboard% l: Z8 f6 t- ^4 [+ K9 d
vector from the I/O APIC.% E+ T- n5 v. ~2 K3 y+ n5 F
6 w4 v9 s9 W/ U; M4 d9 p4 x) B" DFlow ::* d+ o, _5 h+ p2 D
/ p# k5 k% R* i0 N
1. IRQ 1 Assert !!!2 {6 B s- ~1 C w3 _! ^
2. The I/O APIC receives the signal and refers the I/O Redirection table.; e& N5 Q1 e! F% R% w3 E/ i
3. Sending the signal from the destination Local APIC.' H7 y$ j' c: m2 q: H4 q" ]
4. Local APIC pass the signal to the processor for its delivery mode ExtINT' {" X; y. g7 I% Y! i* M8 d
5. A processor receives the signal.
1 {. U0 Y9 H4 g# ]* H$ \6. The processor Assert the INTA signal.8 |4 ]5 Y' {8 |, @0 v
7. The I/O APIC acknowledged.. e- \+ |* \; [8 \' b3 j; B- u6 Z
8. The processor Assert the second INTA signal.7 a+ m g) l0 T) A/ `
9. The I/O APIC delivers the signal to the 8259a compatible PIC" T! S/ m7 |. r+ h# @" f
for ExtINT to its Delivery mode.
" g1 `9 U2 ^- W; W, M. x10. 8259a compatible PIC sends 2 bytes after second INTA pulse.
( W6 D2 O9 p- ~2 L$ \. E11. The processor execute 2 bytes sended.0 L# |4 t$ z' ]6 J+ x3 ^9 R) [: R0 Z
12. our interrupt handler executed.
Q4 m6 [ Q$ a5 W2 z
% u. D; `* f/ k* {8 J+ K1 W+ U6 h: m# a$ g: ]7 z7 H7 v
sourcecode and binary are available on the
/ U/ q. \' m: v; K4 ?http://www.rootkit.com/vault/chpie/apic_keyboard.zip |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入计匠网
×
|