Ver Mensaje Individual
  #8  
Antiguo 21-05-2020
Avatar de aguml
aguml aguml is offline
Miembro
 
Registrado: may 2013
Posts: 885
Reputación: 11
aguml Va por buen camino
He visto un poco el código de Titán enginer y veo que inicializa de forma diferente CONTEXT:
Código PHP:
DBGContext.ContextFlags CONTEXT_ALL CONTEXT_FLOATING_POINT CONTEXT_EXTENDED_REGISTERS
Y para crear el proceso lo hace así:
Código PHP:
__declspec(dllexportvoidTITCALL InitDebugW(wchar_tszFileNamewchar_tszCommandLinewchar_tszCurrentFolder)
{
    
int DebugConsoleFlag NULL;

    if(
DebugDebuggingDLL)
    {
        
DebugConsoleFlag CREATE_NO_WINDOW CREATE_SUSPENDED;
    }
    else if(
engineRemoveConsoleForDebugee)
    {
        
DebugConsoleFlag CREATE_NO_WINDOW;
    }

    if(
engineEnableDebugPrivilege)
    {
        
EngineSetDebugPrivilege(GetCurrentProcess(), true);
        
DebugRemoveDebugPrivilege true;
    }
    
wchar_tszFileNameCreateProcess;
    
wchar_tszCommandLineCreateProcess;
    
std::wstring createWithCmdLine;
    if(
szCommandLine == NULL || !lstrlenW(szCommandLine))
    {
        
szCommandLineCreateProcess 0;
        
szFileNameCreateProcess szFileName;
    }
    else
    {
        
createWithCmdLine.push_back('\"');
        
createWithCmdLine.append(szFileName);
        
createWithCmdLine.push_back('\"');
        
createWithCmdLine.push_back(' ');
        
createWithCmdLine.append(szCommandLine);
        
szCommandLineCreateProcess = (wchar_t*)createWithCmdLine.c_str();
        
szFileNameCreateProcess 0;
    }
    if(
CreateProcessW(szFileNameCreateProcessszCommandLineCreateProcessNULLNULLfalseDEBUG_PROCESS DEBUG_ONLY_THIS_PROCESS DebugConsoleFlag CREATE_NEW_CONSOLENULLszCurrentFolder, &dbgStartupInfo, &dbgProcessInformation))
    {
        if(
engineEnableDebugPrivilege)
            
EngineSetDebugPrivilege(GetCurrentProcess(), false);
        
DebugAttachedToProcess false;
        
DebugAttachedProcessCallBack NULL;
        return &
dbgProcessInformation;
    }
    else
    {
        
DWORD lastError GetLastError();
        if(
engineEnableDebugPrivilege)
        {
            
EngineSetDebugPrivilege(GetCurrentProcess(), false);
            
DebugRemoveDebugPrivilege false;
        }
        
memset(&dbgProcessInformation0sizeof(PROCESS_INFORMATION));
        
SetLastError(lastError);
        return 
0;
    }

Veo que le da o le quita privilegios justo después de crear el proceso.
Responder Con Cita