(C++) CheckRemoteDebuggerPresent by Glacius

Sept. 26, 2020, midnight | 1 year, 9 months

Code

            #include "windows.h"
 
int main(void)
{
    BOOL HasDebugPort = FALSE;
 
    if (CheckRemoteDebuggerPresent(GetCurrentProcess(), &HasDebugPort))
    {
           ExitProcess(0); // Running in ring-3 debugger
    }
    // Running outside ring-3 debugger
    return 0;
        

Comment