Jump to content

Crossfire Xtrap Bypass


malfac009

Recommended Posts

This source from I2espect so all credits goes to him.

I just want to know how i may be able to update this to work on crossfire Philippines!

Thank-you more power on this forum. :)

#include <Windows.h>
#include <tlhelp32.h>
#include "detours.h"
#include <process.h> 
#include <wchar.h>
#include <stdlib.h>
#include "tchar.h"
#include "stdio.h"
#include "psapi.h"
#include <string>
#include <iostream>
#include <fstream>
using namespace std;
LPCTSTR lpFile_XTRAP;
// Values
typedef HMODULE (WINAPI *tLoadLibraryA)(LPCTSTR);
typedef HMODULE (WINAPI *tLoadLibraryExA)(LPCTSTR, HANDLE, DWORD);
typedef BOOL (WINAPI *tTerminateProcess)(HANDLE, UINT);
typedef VOID (WINAPI *tExitProcess)(UINT);
// Original Functions
tLoadLibraryA m_LoadLibraryAOrig = nullptr;
tLoadLibraryExA m_LoadLibraryExAOrig = nullptr;
tTerminateProcess m_TerminateProcessOrig = nullptr;
tExitProcess m_ExitProcessOrig = nullptr;
// Hooked LoadLibraryA
static HMODULE WINAPI HookedLoadLibraryA(LPCTSTR lpFileName)
{
	//cout << "LoadLibraryA : [" << lpFileName << "]" << endl;
	if(string(lpFileName).find("XTrapVa.dll") != string::npos)
	{
	lpFile_XTRAP = lpFileName;
	cout << "Blocked LoadLibraryA [" << lpFileName << "]" << endl;
	return (HMODULE)0xA0B1C2D3;
	}
	return m_LoadLibraryAOrig(lpFileName);
}
// Hooked LoadLibraryExA
static HMODULE WINAPI HookedLoadLibraryExA(LPCTSTR lpFileName, HANDLE hHandle, DWORD uk1)
{
	cout << "LoadLibraryExA : [" << lpFileName << "]" << endl;
	if(string(lpFileName).find("XTrapVa.dll") != string::npos)
	{
	cout << "Blocked LoadLibraryExA [" << lpFileName << "]" << endl;
	return (HMODULE)0xA0B1C2D3;
	}
	return m_LoadLibraryExAOrig(lpFileName, hHandle, uk1);
}
// Hooked ExitProcess
static BOOL WINAPI HookedTerminateProcess(HANDLE hProcess, UINT uExitCode)
{
	cout << "TerminateProcess Was Blocked" << endl;
	return false;
}
// Hooked ExitProcess
static VOID WINAPI HookedExitProcess(UINT uExitCode)
{
	cout << "ExitProcess Was Blocked : ExitCode = " << uExitCode << endl;
	return ;
}
// GetLastError String
// Main Function
void I2()
{
	AllocConsole();
	freopen("CONIN$", "r", stdin);
	freopen("CONOUT$", "w", stdout);

	DWORD TerminateProcessAddy = (DWORD)GetProcAddress(GetModuleHandle("Kernel32.dll"), "TerminateProcess");
	DWORD ExitProcessAddy = (DWORD)GetProcAddress(GetModuleHandle("Kernel32.dll"), "ExitProcess");	
	DWORD PostQuitMessageAddy = (DWORD)GetProcAddress(GetModuleHandle("User32.dll"), "PostQuitMessage");	
	DWORD LoadLibraryAAddy = (DWORD)GetProcAddress(GetModuleHandle("Kernel32.dll"), "LoadLibraryA");
	DWORD LoadLibraryExAAddy = (DWORD)GetProcAddress(GetModuleHandle("Kernel32.dll"), "LoadLibraryExA");

	cout << "TerminateProcess Addy : " << hex << uppercase << TerminateProcessAddy << endl;
	cout << "ExitProcess Addy : " << hex << uppercase << ExitProcessAddy << endl;

	m_ExitProcessOrig = (tExitProcess)DetourFunction((BYTE*)ExitProcessAddy, (BYTE*)HookedExitProcess);
	cout << " >> Detoured TerminateProcess : [" << hex << uppercase << ExitProcessAddy << "]" << endl;
	m_TerminateProcessOrig = (tTerminateProcess)DetourFunction((BYTE*)TerminateProcessAddy, (BYTE*)HookedTerminateProcess);
	cout << " >> Detoured ExitProcess : [" << hex << uppercase << TerminateProcessAddy << "]" << endl;
	m_LoadLibraryAOrig = (tLoadLibraryA)DetourFunction((BYTE*)LoadLibraryAAddy, (BYTE*)HookedLoadLibraryA);
	cout << " >> Detoured LoadLibraryA : [" << hex << uppercase << LoadLibraryAAddy << "]" << endl;
	/*m_LoadLibraryExAOrig = (tLoadLibraryExA)DetourFunction((BYTE*)LoadLibraryExAAddy, (BYTE*)HookedLoadLibraryExA);
	cout << " >> Detoured LoadLibraryExA : [" << hex << uppercase << LoadLibraryExAAddy << "]" << endl;*/
	//
	return;
	HMODULE XtrapVaDll = m_LoadLibraryAOrig("XTrapVa.dll");
	if(XtrapVaDll != NULL)
	{
		FreeLibraryAndExitThread(XtrapVaDll, 0);
		cout << "Just Free Library XTrapVa.dll" << endl;
	}
	else { cout << "XTrapVa.dll Wasn't Found ..." << endl; }
	return;
}
// Dll Main
extern "C" __declspec(dllexport)BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	switch (fdwReason)
	{
	case DLL_PROCESS_ATTACH:
		DisableThreadLibraryCalls(hinstDLL);
		CreateThread(0, 0, (LPTHREAD_START_ROUTINE)I2, 0, 0, 0);
		break;
	}
	return true;
}

 

  • Like 3
  • Love 3
Link to comment
Share on other sites

1 hour ago, Akashiya said:

Thanks for Sharing it here! I'm sure this will be useful for our Forum and for the user that wanted to be a Coder as well :). Although i don't know how to update it :( haha

Sure :) . btw. this bypass was originaly made to bypass Xtrap on Crossfire NA , so i'm here seeking if there are people know how to make it work on Crossfire PH, because it always cause me h4ck Tool Detected #__# or Disconnected to server #__#. !!  

Link to comment
Share on other sites

  • Administrator
On 10/4/2016 at 10:38 PM, malfac009 said:

Sure :) . btw. this bypass was originaly made to bypass Xtrap on Crossfire NA , so i'm here seeking if there are people know how to make it work on Crossfire PH, because it always cause me h4ck Tool Detected #__# or Disconnected to server #__#. !!  

Well i'm pretty sure @Asianism released a Xtrap Bypass for Crossfire PH here.. just check it if it's still working :d

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • Kaiii locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.

 

AdBlock Extension Detected!

depositphotos_220325684-stock-illustration-hand-holding-mobile-with-ad.jpg

 

Our website is made possible by displaying online Advertisements to our members.

Please disable AdBlock browser Extension first, to be able to use our Community.

You won't be able to access this page.

I've Disabled AdBlock