Programm Unijectable machen/Prozesse schließen

05/13/2016 14:32 iArazGames#1
Hi, gibt es eine Möglichkeit ein Programm Uninjectable zu machen? Und wie kann man Prozesse automatisch schließen/sie einfrieren/unbenutzbar machen wenn das Programm geöffnet ist?

Mit freundlichen Grüßen,
Araz Games
05/13/2016 14:43 Shadow992#2
Quote:
Originally Posted by iArazGames View Post
Hi, gibt es eine Möglichkeit ein Programm Uninjectable zu machen? Und wie kann man Prozesse automatisch schließen/sie einfrieren/unbenutzbar machen wenn das Programm geöffnet ist?

Mit freundlichen Grüßen,
Araz Games
Google ist dein Freund...
Aber ich will mal nicht so sein:

Code:
BOOL GetProcessList( )
{
  HANDLE hProcessSnap;
  HANDLE hProcess;
  PROCESSENTRY32 pe32;
  DWORD dwPriorityClass;

  // Take a snapshot of all processes in the system.
  hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
  if( hProcessSnap == INVALID_HANDLE_VALUE )
  {   
    return( FALSE );
  }

  // Set the size of the structure before using it.
  pe32.dwSize = sizeof( PROCESSENTRY32 );

  // Retrieve information about the first process,
  // and exit if unsuccessful
  if( !Process32First( hProcessSnap, &pe32 ) )
  {   
    CloseHandle( hProcessSnap );  // clean the snapshot object
    return( FALSE );
  }

  // Now walk the snapshot of processes 
  do
  {  
    string str(pe32.szExeFile);

    if(str == "Das-Programm.exe") // put the name of your process you want to kill
    {
        TerminateMyProcess(pe32.th32ProcessID, 1);
    } 
  } while( Process32Next( hProcessSnap, &pe32 ) );

  CloseHandle( hProcessSnap );
  return( TRUE );
}

BOOL TerminateMyProcess(DWORD dwProcessId, UINT uExitCode)
{
    DWORD dwDesiredAccess = PROCESS_TERMINATE;
    BOOL  bInheritHandle  = FALSE;
    HANDLE hProcess = OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
    if (hProcess == NULL)
        return FALSE;

    BOOL result = TerminateProcess(hProcess, uExitCode);

    CloseHandle(hProcess);

    return result;
}
Source: [Only registered and activated users can see links. Click Here To Register...]

Uninjectable:
Einfach jegliche Eintrittspunkte aus der Datei entfernen, dadurch wird es praktisch unmöglich, ohne die Eintrittspunkte zu kennen (was ein dritter normalerweise nicht weiß) die Datei zu benutzen/injecten.
05/13/2016 16:09 Devsome#3
#close by request