Jump to content

[Quick Fix] Bloquear Etermgr


tierrilopes
 Share

Recommended Posts

Primeiramente, o binário disponibilizado aqui no fórum já bloqueia por defeito este unpacker.

Como medida adicional podem terminar o processo.

O processo adquire sempre um de dois nomes:

  • cmd.exe
  • conhost.exe

 

Não lhe é possível modificar esse valores para outros, por isso em combinação com o binário aqui disponibilizado isto chega para o bloquear.

 

Ir até ao ao ficheiro UserInterface/Locale.cpp:

 

Adicionar este include debaixo dos outros:

#include <tlhelp32.h>

 

Debaixo do include adicionado, colocar o seguinte código:
 

void TerminateProc_Func(char* ProcName){

PROCESSENTRY32 pe32;

HANDLE hSnapshot = NULL;

pe32.dwSize = sizeof(PROCESSENTRY32);

hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

if (Process32First(hSnapshot, &pe32)){

do{

if (strcmp(pe32.szExeFile, ProcName) == 0)

{

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);

TerminateProcess(hProcess, NULL);

}

} while (Process32Next(hSnapshot, &pe32));

}

if (hSnapshot != INVALID_HANDLE_VALUE)

CloseHandle(hSnapshot);

}

void TerminateProc(){

TerminateProc_Func("cmd.exe");

TerminateProc_Func("conhost.exe");

}

void Terminate_Scan(){

again:

TerminateProc();

Sleep(5000);

goto again; }

 

Procurar por:

void LocaleService_LoadConfig (const char *fileName)

{

 

Adicionar debaixo:

 

CreateThread(NULL, NULL, LPTHREAD_START_ROUTINE(Terminate_Scan), NULL, 0, 0);

 

NOTA: Caso utilizem um platform toolset com _xp, ao detectar o unpacker o cliente poderá não responder e encerrar-se. Para tal uma solução:

 

Solução (mudar toolset):

  1. Selecionar todos os projectos no visual studio
  2. Clique lado direito
  3. Properties
  4. Configuration Properties
  5. General
  6. Em Platform Toolset selecionar Visual Studio 2013 (v120)
  7. Clique lado direito no projecto e Rebuild All
Link to comment
Share on other sites

  • 1 year later...

I can write it in english to be easier without translate:

Go to file  UserInterface/Locale.cpp

Under the other includes add this:

#include <tlhelp32.h>

 

Under the include you just added, paste this code:

void TerminateProc_Func(char* ProcName){

PROCESSENTRY32 pe32;

HANDLE hSnapshot = NULL;

pe32.dwSize = sizeof(PROCESSENTRY32);

hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

if (Process32First(hSnapshot, &pe32)){

do{

if (strcmp(pe32.szExeFile, ProcName) == 0)

{

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID);

TerminateProcess(hProcess, NULL);

}

} while (Process32Next(hSnapshot, &pe32));

}

if (hSnapshot != INVALID_HANDLE_VALUE)

CloseHandle(hSnapshot);

}

void TerminateProc(){

TerminateProc_Func("cmd.exe");

TerminateProc_Func("conhost.exe");

}

void Terminate_Scan(){

again:

TerminateProc();

Sleep(5000);

goto again; }

Look for:

void LocaleService_LoadConfig (const char *fileName)

{

Add this bellow:

CreateThread(NULL, NULL, LPTHREAD_START_ROUTINE(Terminate_Scan), NULL, 0, 0);

 

Follow the tutorial just as it is described and you cant have errors on it, just follow EXACTLY as it is described.

I wont do it for you as tutorial exists for a reason.

Link to comment
Share on other sites

You're not understanding the tutorial properly, read this part again:

« Under the include you just added, paste this code: »

 

You're placing the code at end of the file, when you need to add it just after the include you added on the file.

Otherwise you will have that error, because you're calling a function before it was declared

Link to comment
Share on other sites

On 25/12/2017 at 6:06 PM, theoden1 said:

:(:(:(:(

You didnt replied so i guess you couldnt fix the issue.

The problem was that you were calling the function before defining it first.

In the tutorial i say to add the code after the "include", at the begining of the file, but you probably misread and added it at the bottom of the page.

In attachment its your fixed file, please compare both to understand what you did wrong.

 

Regards

Locale.cpp

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...