jueves, 22 de enero de 2009

[SRC] IsDbgCrss - Funcion para saber si estamos siendo 'debuggeados' [ASM]

; Funcion traducida por krackwar
; basada en la funcion de karcrack en Visual Basic
; Para detectar si estamos siendo ejecutados en el olly dbg 2.0 (Testeado en vista de 64 bits )
format pe gui
include 'win32a.inc'
call IsDbgCsrss
cmp eax,TRUE
je Verdad
push 0
call @f
db 'No lo estamos siendo :P',0
@@:
call @f
db 'No no estan debuggeando muahaha',0
@@:
invoke MessageBox,0
invoke ExitProcess,0
Verdad:
push 0
call @f
db 'Tamos siendo debuggeados',0
@@:
call @f
db 'O sierot lo tamos siendo :O',0
@@:
invoke MessageBox,0
invoke ExitProcess,0
IsDbgCsrss:
invoke CsrGetProcessId
invoke OpenProcess,PROCESS_ALL_ACCESS, 0,eax
cmp eax,0
je .Falso
mov eax,TRUE
jmp .Salir
.Falso:
mov eax,FALSE
jmp .Salir
.Salir:
ret
 
data import
library kernel32,'kernel32.dll',user32,'user32.dll',ntdll,'ntdll.dll'
 
include 'api/kernel32.inc'
include 'api/user32.inc'
import ntdll,CsrGetProcessId,'CsrGetProcessId'
end data

0 comentarios:

Publicar un comentario