Thumbs upOpções de Detours Combat Arms

Posts 115 of 15 · Page 1 of 1
Opções de Detours Combat Arms
Opções de Detours Combat Arms

Com o tamanho do detour "const int len" = 10 é para funcionar em todos os Windows XP, Windows 7 e Windows 8.

Code:
void *DetourJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\xE9';
	*(DWORD*)(&src[1]) = (DWORD)(dst - src) - 5;
	for (int i = 5; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourJMP((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourNOPJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\x90';
	src[1] = '\xE9';
	*(DWORD*)(&src[2]) = (DWORD)(dst - src) - 6;
	for (int i = 6; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourNOPJMP((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourPUSHRET(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\x68';
	*(DWORD*)(&src[1]) = (DWORD)(dst);
	src[5] = '\xC3';
	for (int i = 6; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourPUSHRET((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourNOPNOPJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\x90';
	src[1] = '\x90';
	src[2] = '\xE9';
	*(DWORD*)(&src[3]) = (DWORD)(dst - src) - 7;
	for (int i = 7; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourNOPNOPJMP((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourPUSHPOPJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\x50';
	src[1] = '\x58';
	src[2] = '\xE9';
	*(DWORD*)(&src[3]) = (DWORD)(dst - src) - 7;
	for (int i = 7; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourPUSHPOPJMP((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourSTCJB(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\xF9';
	src[1] = '\x0F';
	src[2] = '\x82';
	*(DWORD*)(&src[3]) = (DWORD)(dst - src) - 7;
	for (int i = 7; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourSTCJB((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourCLCJNB(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\xF8';
	src[1] = '\x0F';
	src[2] = '\x83';
	*(DWORD*)(&src[3]) = (DWORD)(dst - src) - 7;
	for (int i = 7; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourCLCJNB((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourMOVJMP(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\xB8';
	*(DWORD*)(&src[1]) = (DWORD)(dst);
	src[5] = '\xFF';
	src[6] = '\xE0';
	for (int i = 7; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourMOVJMP((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Code:
void *DetourXORTESTJE(BYTE *src, const BYTE *dst, const int len)
{
	BYTE *jmp = (BYTE*)malloc(len + 5);
	DWORD dwBack;
	VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
	memcpy(jmp, src, len);
	jmp += len;
	jmp[0] = '\xE9';
	*(DWORD*)(jmp + 1) = (DWORD)(src + len - jmp) - 5;
	src[0] = '\x33';
	src[1] = '\xC0';
	src[2] = '\x85';
	src[3] = '\xC0';
	src[4] = '\x0F';
	src[5] = '\x84';
	*(DWORD*)(&src[6]) = (DWORD)(dst - src) - 10;
	for (int i = 10; i < len; i++) src[i] = 0x90;
	VirtualProtect(src, len, dwBack, &dwBack);
	return (jmp - len);
}

oPresent = (tPresent)DetourXORTESTJE((PBYTE) dwVTablePresent, (PBYTE) &Present, 10);
Créditos:
Azorbix / Gordon / Patrick / WE11ington[/QUOTE]
Talvez amanha já esteja detect Essas Detours

so mais a minha detours(CDetours) com umas 40 linhas .
Quote Originally Posted by Coder.Hu3 View Post
Talvez amanha já esteja detect Essas Detours

so mais a minha detours(CDetours) com umas 40 linhas .
Pode até ser, porem com essas detours ae se souber da para criar umas umas 4 ou 5 opções a mais!
só repostei !
Interessante, mas é só uma versão simplificada da cDetours(que eu não sei quem criou). Pode ver que tudo isso tem em bases com a do MMBOB (tem muito outros tipos de detours lá). A Detours PUSHRET tem na WhitBase v2 por exemplo.
Mas como vc disse, da pra fazer pequenas alterações nos OPCodes e deixar indetectável.

Poderia explicar por que com len = 10, a detours funciona em todos os SO @Cheetara ?
Quote Originally Posted by New - Hacker View Post
Poderia explicar por que com len = 10, a detours funciona em todos os SO @Cheetara ?
Não, não poderia!
ñ vi nada de diferente nessas detours "Cheetara" Good Job
Quote Originally Posted by _ReturnsBR_ View Post
ñ vi nada de diferente nessas detours "Cheetara" Good Job
Considere-se com problemas
AHHAHAHAHHAHAHHAHAHAHAHAH
Quote Originally Posted by Fellas1704 View Post
AHHAHAHAHHAHAHHAHAHAHAHAH
Bem down ...
legal fera e as ppekas kkkkkkkkkkkkk belo tópico xD
MS Detour 3.0
Problem solved
Quote Originally Posted by arun823 View Post
MS Detour 3.0
Problem solved


the remaining 5 cents is for you buy a candy in market.
Quote Originally Posted by luizimloko View Post




the remaining 5 cents is for you buy a candy in market.
LOL né que é mesmo mais tem um free..

microsoft research.png87 KB · 32 downloads
Quote Originally Posted by luizimloko View Post




the remaining 5 cents is for you buy a candy in market.
Que Treta kkkkkkkkkkkkk
Quote Originally Posted by luizimloko View Post




the remaining 5 cents is for you buy a candy in market.
Stop being poor.

Problem Solved
Posts 115 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?