Raised This Month: $51 Target: $400
 12% 

CS:GO Server Crash Exploit


Post New Thread Reply   
 
Thread Tools Display Modes
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 06-21-2016 , 12:43   Re: CS:GO Server Crash Exploit
Reply With Quote #11

Quote:
Originally Posted by xeropw View Post
Found an extension that claims to block the invalid angles, albeit no bin, which means you must compile it yourself.
https://forums.alliedmods.net/showpo...7&postcount=24
And how? You test it? No updates last mounth.
ZASTRELIS is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 06-21-2016 , 12:54   Re: CS:GO Server Crash Exploit
Reply With Quote #12

I can see how cheater when killed another player shutdown my server. It's happened when he hasn't a large spray.

Last edited by ZASTRELIS; 06-21-2016 at 12:54.
ZASTRELIS is offline
xeropw
AlliedModders Donor
Join Date: Jun 2016
Old 06-21-2016 , 13:09   Re: CS:GO Server Crash Exploit
Reply With Quote #13

Quote:
Originally Posted by shavit View Post
untested plugin that *should* work

Code:
#include <sourcemod>
#include <sdktools>

// #define STOP // remove comment to block the usercmd instead of 'fixing' it

public Plugin myinfo =
{
	name = "fuck server crashers",
	author = "shavit",
	description = "should prevent viewangles crashes",
	version = "1.0",
	url = "http://github.com/shavitush"
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3])
{
	if(IsBadAngle(angles[0]) || IsBadAngle(angles[1]) || IsBadAngle(angles[2]))
	{
		#if defined STOP
		return Plugin_Stop;
		#else
		angles[0] = NormalizeAngle(angles[0]);
		angles[1] = NormalizeAngle(angles[1]);
		angles[2] = NormalizeAngle(angles[2]);

		return Plugin_Changed;
		#endif
	}

	return Plugin_Continue;
}

public bool IsBadAngle(float angle)
{
    return angle > 180.0 || angle < -180.0;
}

public float NormalizeAngle(float angle)
{
	float temp = angle;

	while(temp <= -180.0)
	{
		temp += 360.0;
	}

	while(temp > 180.0)
	{
		temp -= 360.0;
	}

	return temp;
}
So you're just clamping/normalizing angles then? Now since I am slightly unfamiliar with metamod and sourcemod
"inner workings", will a plugin block the server from broadcasting the change in said angles or is it better to do it
on the extension level?

Edit: I can write a small anti-exploit plugin if sourcemod does functionally block these changes.

Last edited by xeropw; 06-21-2016 at 13:13.
xeropw is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 06-21-2016 , 13:24   Re: CS:GO Server Crash Exploit
Reply With Quote #14

pls do something)
ZASTRELIS is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 06-21-2016 , 14:09   Re: CS:GO Server Crash Exploit
Reply With Quote #15

Quote:
Originally Posted by xeropw View Post
So you're just clamping/normalizing angles then? Now since I am slightly unfamiliar with metamod and sourcemod
"inner workings", will a plugin block the server from broadcasting the change in said angles or is it better to do it
on the extension level?

Edit: I can write a small anti-exploit plugin if sourcemod does functionally block these changes.
when i used to develop cheats, around 3 years ago i used a similar sourcemod plugin that blocks anti-aim by normalizing angles and it worked
__________________
retired
shavit is offline
xeropw
AlliedModders Donor
Join Date: Jun 2016
Old 06-21-2016 , 14:24   Re: CS:GO Server Crash Exploit
Reply With Quote #16

Quote:
Originally Posted by ZASTRELIS View Post
pls do something)
Try his angle normalization method.

Here's what you can put in your own custom extension:
PHP Code:
//Extension version
void NormalizeAngles(QAngle &angle)
{
    for(
int axis 0axis 3; ++axis)
    {
        while(
angle[axis] > 180.f)
        {
            
angle[axis] -= 360.f;
        }
 
        while(
angle[axis] < -180.f)
        {
            
angle[axis] += 360.f;
        }
    }

xeropw is offline
root88
Senior Member
Join Date: May 2016
Old 06-21-2016 , 20:32   Re: CS:GO Server Crash Exploit
Reply With Quote #17

Quote:
Originally Posted by shavit View Post
untested plugin that *should* work

Code:
#include <sourcemod>
#include <sdktools>

// #define STOP // remove comment to block the usercmd instead of 'fixing' it

public Plugin myinfo =
{
	name = "fuck server crashers",
	author = "shavit",
	description = "should prevent viewangles crashes",
	version = "1.0",
	url = "http://github.com/shavitush"
}

public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3])
{
	if(IsBadAngle(angles[0]) || IsBadAngle(angles[1]) || IsBadAngle(angles[2]))
	{
		#if defined STOP
		return Plugin_Stop;
		#else
		angles[0] = NormalizeAngle(angles[0]);
		angles[1] = NormalizeAngle(angles[1]);
		angles[2] = NormalizeAngle(angles[2]);

		return Plugin_Changed;
		#endif
	}

	return Plugin_Continue;
}

public bool IsBadAngle(float angle)
{
    return angle > 180.0 || angle < -180.0;
}

public float NormalizeAngle(float angle)
{
	float temp = angle;

	while(temp <= -180.0)
	{
		temp += 360.0;
	}

	while(temp > 180.0)
	{
		temp -= 360.0;
	}

	return temp;
}
Plugin won't fix this exploit.
__________________

Last edited by root88; 06-21-2016 at 20:33.
root88 is offline
xeropw
AlliedModders Donor
Join Date: Jun 2016
Old 06-21-2016 , 20:40   Re: CS:GO Server Crash Exploit
Reply With Quote #18

Got some more information. Apparently it is enough to send IN_ATTACK whilst setting the viewangles to crash the server. The server receives the IN_ATTACK request and the incredibly large viewangles and before any response can be done - patching the angles, skipping the cmd, or anything, the server is already crashed.
xeropw is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 06-21-2016 , 21:12   Re: CS:GO Server Crash Exploit
Reply With Quote #19

Quote:
Originally Posted by root88;
Code:
//Extension version
void NormalizeAngles(QAngle &angle)
{
    for(int axis = 0; axis < 3; ++axis)
    {
        while(angle[axis] > 180.f)
        {
            angle[axis] -= 360.f;
        }
 
        while(angle[axis] < -180.f)
        {
            angle[axis] += 360.f;
        }
    }
}

and what i must do with it?) Where NormalizeAngles func must be used?

Code:
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3]) {     if(IsBadAngle(angles[0]) || IsBadAngle(angles[1]) || IsBadAngle(angles[2]))     {         #if defined STOP         return Plugin_Stop;         #else         //angles[0] = NormalizeAngle(angles[0]);         angles[0] = NormalizeAngles(angles[0]);                 //angles[1] = NormalizeAngle(angles[1]);         angles[1] = NormalizeAngles(angles[1]);                 //angles[2] = NormalizeAngle(angles[2]);         angles[2] = NormalizeAngles(angles[2]);         return Plugin_Changed;         #endif     }     return Plugin_Continue; } public bool IsBadAngle(float angle) {     return angle > 180.0 || angle < -180.0; } void NormalizeAngles(QAngle &angle) {     for(int axis = 0; axis < 3; ++axis)     {         while(angle[axis] > 180.f)         {             angle[axis] -= 360.f;         }           while(angle[axis] < -180.f)         {             angle[axis] += 360.f;         }     } }

???

Last edited by ZASTRELIS; 06-21-2016 at 21:18.
ZASTRELIS is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-21-2016 , 23:29   Re: CS:GO Server Crash Exploit
Reply With Quote #20

Quote:
Originally Posted by root88 View Post
Plugin won't fix this exploit.
OnPlayerRunCmd is a prehook and should override / fix the exploit.

Edit: Sounds like removing IN_ATTACK on invalid angles will fix the exploit.

Edit2:

An angle of -10058801942080820000000000000000000
Adding 360 will still leave an invalid angle
__________________

Last edited by Neuro Toxin; 06-21-2016 at 23:35.
Neuro Toxin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode