Saltar al contenido
Underc0de /foro

[SRC] isDebugged

Iniciado por [L]ord [R]NA, Junio 20, 2013, 02:09:40 AM

Tema anterior - Siguiente tema

0 Miembros y 0 Visitantes están viendo este tema.

Avatar de [L]ord [R]NA
Junio 20, 2013, 02:09:40 AM Ultima modificación: Junio 20, 2013, 02:18:32 AM por [L]ord [R]NA
Función para verificar si un proceso esta siendo Debuggeado  8)

Los enlaces son solo para miembros. Registrate o iniciá sesión

Código: cpp
#include <windows.h>
#include <winternl.h>


typedef NTSTATUS (WINAPI *NtQueryInformationProc)(HANDLE, PROCESSINFOCLASS,PVOID,ULONG,PULONG);

bool isDebugged(HANDLE ProcessHandle)
{
PVOID deb = 0;
NTSTATUS status;

NtQueryInformationProc NtQueryInfo = (NtQueryInformationProc)GetProcAddress(LoadLibraryA("ntdll.dll"),"NtQueryInformationProcess");

status = NtQueryInfo(ProcessHandle,
(PROCESSINFOCLASS)7, //ProcessDebugPort
&deb,
sizeof(DWORD),
NULL);

if (status == STATUS_WAIT_0)
return (deb == 0);
else
return false;  

}
WhatsApp Telegram

¿Te quedó una duda sobre Códigos Fuentes?

Preguntala y te responde la comunidad (y el asistente Underc0de IA si nadie llega antes). Es gratis y tarda un minuto.

Ya tengo cuenta
Guardamos tu pregunta en este navegador: después de entrar la publicás con un clic.
Grupo de WhatsApp