View previous topic :: View next topic |
Author |
Message |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Sat May 24, 2008 6:31 pm Post subject: Setting Privilege |
|
|
is there something wrong with this? the AdjustTokenToDebug() function was taken from Flyte's code in the other thread. i tried it to terminate system critical process like "services.exe" but it couldn't.
Code: |
#include <iostream>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
PROCESSENTRY32 pe32;
HANDLE hProcess = NULL;
bool GetProcessInfo( PROCESSENTRY32* pe, char szExeFile[] )
{
PROCESSENTRY32 proc32;
proc32.dwSize = sizeof( PROCESSENTRY32 );
HANDLE hSnapshot = NULL;
hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( Process32First( hSnapshot, &proc32 ))
{
do{
if( strcmp( proc32.szExeFile, szExeFile ) == 0 )
{
CloseHandle( hSnapshot );
memcpy( pe, &proc32, sizeof( PROCESSENTRY32 ));
return true;
}
}while( Process32Next( hSnapshot, &proc32 ));
}
CloseHandle( hSnapshot );
return false;
}
BOOL AdjustTokenToDebug()
{
LUID tLUID; HANDLE hToken; TOKEN_PRIVILEGES tTP, tTPOld;
DWORD lengthReturned; BOOL ret = TRUE;
if(LookupPrivilegeValue(NULL,SE_DEBUG_NAME,&tLUID)) {
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&hToken)) {
tTP.PrivilegeCount=1;
tTP.Privileges->Attributes=SE_PRIVILEGE_ENABLED;
tTP.Privileges->Luid.HighPart=tLUID.HighPart;
tTP.Privileges->Luid.LowPart=tLUID.LowPart;
if(!AdjustTokenPrivileges(hToken, 0,&tTP,sizeof(tTP),&tTPOld,&lengthReturned))
ret = FALSE;
CloseHandle(hToken);
} else ret = FALSE;
} else ret = FALSE;
return ret;
}
int main()
{
if( !AdjustTokenToDebug() )
cout << "Failed!\n";
if( !GetProcessInfo( &pe32, "services.exe" ))
cout << "Not found!\n";
hProcess = OpenProcess( PROCESS_TERMINATE, 0, pe32.th32ProcessID );
if( TerminateProcess( hProcess, 0 ))
cout << "Process Terminated!\n";
else
cout << "Failed to terminate\n";
if( hProcess != NULL )
CloseHandle( hProcess );
cin.sync();
cin.ignore();
return 0;
}
|
_________________
Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sat May 24, 2008 7:11 pm Post subject: |
|
|
Why would you want to terminate a system critical process...
|
|
Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat May 24, 2008 7:12 pm Post subject: |
|
|
I have no idea? Maybe a weird emergency o.o
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Sat May 24, 2008 10:28 pm Post subject: |
|
|
why wouldn't I??
oh the "services.exe" is just for testing but that's not actually my target.
my real target is an anti-cheat system that is running in system critical process that's what i want to terminate.
_________________
Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
Back to top |
|
 |
thephoneguy Grandmaster Cheater
Reputation: 1
Joined: 17 Mar 2007 Posts: 873
|
Posted: Sun May 25, 2008 12:03 am Post subject: |
|
|
yeah but im sure theres a server sided check to see if that anti cheat thing is there. beyond that the only good this can truly do is be a virus.
ps. your prolly talking about gamegaurd. there is a server sided check for that.
_________________
If you see me posting referring to an earlier conversation 9/10 times it was in the chatbox at baby .
 |
|
Back to top |
|
 |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Sun May 25, 2008 12:17 am Post subject: |
|
|
believe me, this is different from the gameguard that you know and does not have serverside check. i already did it but in a different way. I use Kaspersky anti-virus to terminate the running anti-cheat system because kaspersky detect it as trojan. And when the process is terminated im free to use Cheat Engine and any other hacks. that's why im trying to make this work out.
man, i hope somebody would reply with the right answer im looking for.
_________________
Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
Back to top |
|
 |
|