i though its easy as it should be, but thanks to developers it isnt.
so, my problem is that im trying to replace interrupt function.
format pe native section '' readable writeable executable data import dd RVA ntoskrnl_table,0,0,RVA ntoskrnl_name,RVA ntoskrnl_table dd 0,0,0,0,0 end data ntoskrnl_table: DbgPrint dd RVA _DbgPrint dd 0 ntoskrnl_name db 'ntoskrnl.exe',0 _DbgPrint db 0,0,'DbgPrint',0 entry $ mov eax,[esp+4] mov dword [eax+52],DriverUnload sidt fword [idt] mov ecx,dword [idt+2] movzx eax,word [ecx+368+6] ;368 = 0x2e * 8 shl eax,16 mov ax,word [ecx+368+0] mov byte [eax],0xCF ;iret right after entry to `ISR` push eax push f call [DbgPrint] add esp,8 xor eax,eax retn 8 DriverUnload: retn 4 align 8 idt rf 1 f db '%p',0 section '' fixups discardable
this code get address of 0x2e isr and write under it iret instruction. 2 seconds later im getting reboot, not even a bsod.
mov use DS segment, so perhaps this is an issue. But i really dont think so, however... But i belive that default DS (0x10+0 = 0x10) is used, so? whats the issue here?
ok checked, DS = 0x23.
lets see...
0x20 = gdt dpl = 3
rpl in segment = 3
wtf -,-
push ds mov cx,0x10 mov ds,cx mov byte [eax],0xCF ;iret right after entry to `ISR` pop dsresult in reset.
0x10 = ring0 read/write, rpl = 0.
i give up, enlight me whats going on, now im laughting of someone who created this thing.
Edited by TkTech, 28 September 2009 - 10:09 PM.
Do. Not. Tripple post


Sign In
Create Account

Guest_h4x_*
Back to top









