Haber, ahora ya estoy en casa, e intentado hacer practicas y tengo un fallo (ya sabia que lo tendria), aqui el codigo:
format PE native
entry DriverEntry
include 'INCLUDE\win32a.inc'
include 'INCLUDE\ddk\structs.inc'
include 'INCLUDE\ddk\ntddk.inc'
include 'INCLUDE\ddk\ntstatus.inc'
include 'INCLUDE\ddk\native_api.inc'
include 'INCLUDE\ddk\stuff.inc'
section '.c' code readable writeable executable
proc GetAddr n
mov eax, 4
mov ecx,[n]
mul ecx
mov ecx,[KeServiceDescriptorTable] ;LocaLizar KiServiceTable //Aqui el fallo
mov ecx,[ecx] ;KierviceTable
add eax,ecx
ret
endp
proc DriverEntry DriverObject, rp
push msg
call [DbgPrint]
call [IoGetCurrentProcess]
push eax
push msg3
call [DbgPrint]
push 7ah ; Numero de la funcion
call GetAddr
push eax
push msg4
call [DbgPrint]
mov eax,STATUS_SUCCESS
ret
endp
section '.d' data readable writeable
msg db 'Driver cargado',0
msg3 db 'Mi PID es: %Xh',0
msg4 db 'La direccion de zwopenprocess es: %Xh',0
data import
syslibrary ntoskrnl,'ntoskrnl.exe'
import ntoskrnl,DbgPrint,'DbgPrint',\
IoGetCurrentProcess,'IoGetCurrentProcess'
end data
section '.reloc' data fixups readable discardable
El fallo es en la linea que marque, se supone que se tiene que "declarar" o algo, no??? e estado mirando otros codigos aprecidos (
http://www.rohitab.com/discuss/index.php?showtopic=17892&mode=threaded&pid=10020467) y tampoco se declara....Sacame de dudas Mek