aguml
unread,May 29, 2020, 8:01:54 PM5/29/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CyC++ Buenos Aires
Buenas, estoy intentando que mi debugger se salte el nuevo truco que usan en Windows 10 para detectar al debugger. El código que usan es este:
void __stdcall _OutputDebugStringW(LPCWSTR lpOutputString)
{
char outputDebugStringBuffer[1000] = {0};
WideCharToMultiByte(CP_ACP, 0, lpOutputString, -1, outputDebugStringBuffer, sizeof(outputDebugStringBuffer), 0, 0);
ULONG_PTR args[4];
//unicode
args[0] = (ULONG_PTR)wcslen(lpOutputString) + 1;
args[1] = (ULONG_PTR)lpOutputString;
//ansi for compatibility
args[2] = (ULONG_PTR)wcslen(lpOutputString) + 1;
args[3] = (ULONG_PTR)outputDebugStringBuffer;
__try
{
RaiseException(0x4001000A, 0, 4, args);//DBG_PRINTEXCEPTION_WIDE_C
ShowMessageBox("DBG_PRINTEXCEPTION_WIDE_C -> Debugger detected");
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
ShowMessageBox("DBG_PRINTEXCEPTION_WIDE_C -> Debugger NOT detected");
}
}
Si hay un debugger no hay excepción y si no hay debugger si la hay y así es como detecta al debugger. La cosa es que necesito enviarle esa excepción para que vaya al lugar que me interesa pero no sé qué debo hacer para eso. Para en el evento de depuración OutputDebugString ¿Le envío la excepción EXCEPTION_EXECUTE_HANDLER? ¿Eso funcionaria? ¿Como hago que la aplicación reciba esa excepción y la maneje el?