0rp
September 4th, 2004, 15:33
hi,
i've written a driver, wich does detours like instrumenting of functions (it replaces the first 5+ byte with a jump to an own function..) in ring0
problems occur, if i hook interrupt 0x01 (debug trap) and this is weird, since the same technique works for int 0x2B (wich is heavily used)
this is what i'm currently trying:
i alloc with ExAllocPool(NonPaged) memory and copy my instrs, the saved original instrs and the jmp into it.
could there be a problem regarding different segements (and DPLs) between original handler code and my alloced code?
and why does it work for int 2B? is it because 2B ints are always traps and no faults ?
thx
i've written a driver, wich does detours like instrumenting of functions (it replaces the first 5+ byte with a jump to an own function..) in ring0
problems occur, if i hook interrupt 0x01 (debug trap) and this is weird, since the same technique works for int 0x2B (wich is heavily used)
this is what i'm currently trying:
Code:
jmp my instr 0 --------> my instr 0
original instr 2 <----. my instr 1
orginial instr 3 | my instr 2
orginial instr 4 | my instr 3
iretd | orginal instr 0
| original instr 1
'--- jmp original instr 2
i alloc with ExAllocPool(NonPaged) memory and copy my instrs, the saved original instrs and the jmp into it.
could there be a problem regarding different segements (and DPLs) between original handler code and my alloced code?
and why does it work for int 2B? is it because 2B ints are always traps and no faults ?
thx