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

Protection for CSGO servers against DOS, Exploits, Lags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SilentBr
Veteran Member
Join Date: Jan 2009
Old 12-01-2015 , 10:26   Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #1

Hi mates

All my 5 CSGO servers are under attacks, I don't know what else to, I've tried everything that I know/searched.

A hacker is able to lag the servers and disconnect all players, but the server itself doesn't lag, I mean, there is no high traffic. I did check iftop and was everything ok, while all players were being disconnected, I stayed connect with another player (don't know why).

Since there is no high traffic, I think it's some exploits like the old and known CSS Exploit.

Here some things I do as protection:

-Allow rcon port only to trusted IPs
-Using smac plugins
-qchache_mm running
-Some iptables rules but I need improve it.

I'm so tired of those problems, months and months being attacked.

If someone know how protect servers against lags, exploits, disconnects and everything, please let me know. I will appreciate so much...

Thank you in advance.
SilentBr is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 12-01-2015 , 14:44   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #2

In for answers as well. I wish there was a mega thread for securing servers well.
__________________
sneaK is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 12-01-2015 , 15:11   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #3

Quote:
Originally Posted by blackhawk74 View Post
In for answers as well. I wish there was a mega thread for securing servers well.
There is a thread with a lot of iptables rules to protect the server, I can't search now because I'm at work, but all of those rules don't solve my problem, still disconnecting all players.

I am wondering if there is a dosp or another extension/plugin that protect the server against exploits.
SilentBr is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 12-01-2015 , 15:57   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #4

Have you triied to sniff network packets sent from your attacker ?
__________________
irepz is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 12-01-2015 , 16:19   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #5

Quote:
Originally Posted by irepz View Post
Have you triied to sniff network packets sent from your attacker ?
I have 12 servers running in my dedicated server. Those attacks doesn't generate high traffic, thats why I think is an exploit or something. So, it's impossible find his IP using iftop.

How can I know witch IP is from the attacker?
SilentBr is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 12-01-2015 , 18:06   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #6

I would probably code a plugin that adds all the players IP's, steam ids, server host and a timestamp to a database table each time they connect and use deductive reasoning to work out who is doing it.

I would use GetClientIP with a threaded query called in the OnClientPostAdminCheck event imo. If they arent crashing your server outright you should end up with a large number of client join logs and if X player is always joining Y server right before it is attacked you can probably narrow it down to a small handful of players quickly.

If there is no relation then the attack is probably either done from a large number of distinct accounts or a side channel attack like using hping to flood the game servers buffer on Z port or something similar. You might also try whitelisting players IPs from a website form? Personally I would use wireshark dumps and a small php/c program to get a breakdown of all the incoming packet source IPs and correlate them with the players in the actual game. If there is an outlier with a large number of packets who does not have a connection (yes, I know udp is connectionless) to your game you can *probably* add them to the iptables.

EDIT:
Upon further thought is it possible that the attacker is simply sending correctly formatted rst packets to the client connection port of the csgo server while spoofing IP? It would be fairly simple to craft such packets in either C or with almost any modern network accessing dev kit such as an arduino or raspberry pi. The only trouble would be finding the players IPs, having no knowledge of the CSGO server binaries network stack I cannot comment further on this line of thought
__________________

GZS Servers

Last edited by Puppetmaster; 12-01-2015 at 18:18. Reason: Thoughts
Puppetmaster is offline
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 12-01-2015 , 18:28   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #7

Quote:
Originally Posted by SilentBr View Post
There is a thread with a lot of iptables rules to protect the server, I can't search now because I'm at work, but all of those rules don't solve my problem, still disconnecting all players.

I am wondering if there is a dosp or another extension/plugin that protect the server against exploits.
And unfortunately that was mostly for Linux servers.
Nolongerinthegame is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 12-01-2015 , 19:38   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #8

Quote:
Originally Posted by Puppetmaster View Post
I would probably code a plugin that adds all the players IP's, steam ids, server host and a timestamp to a database table each time they connect and use deductive reasoning to work out who is doing it.

I would use GetClientIP with a threaded query called in the OnClientPostAdminCheck event imo. If they arent crashing your server outright you should end up with a large number of client join logs and if X player is always joining Y server right before it is attacked you can probably narrow it down to a small handful of players quickly.

If there is no relation then the attack is probably either done from a large number of distinct accounts or a side channel attack like using hping to flood the game servers buffer on Z port or something similar. You might also try whitelisting players IPs from a website form? Personally I would use wireshark dumps and a small php/c program to get a breakdown of all the incoming packet source IPs and correlate them with the players in the actual game. If there is an outlier with a large number of packets who does not have a connection (yes, I know udp is connectionless) to your game you can *probably* add them to the iptables.

EDIT:
Upon further thought is it possible that the attacker is simply sending correctly formatted rst packets to the client connection port of the csgo server while spoofing IP? It would be fairly simple to craft such packets in either C or with almost any modern network accessing dev kit such as an arduino or raspberry pi. The only trouble would be finding the players IPs, having no knowledge of the CSGO server binaries network stack I cannot comment further on this line of thought
My knowledge is limited, I would not know how to do that. Those informations you said are so advanced *-*

Quote:
Originally Posted by nelioneil View Post
And unfortunately that was mostly for Linux servers.
My servers are under linux ubuntu.
SilentBr is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 12-01-2015 , 21:42   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #9

Quote:
Originally Posted by SilentBr View Post
My knowledge is limited, I would not know how to do that. Those informations you said are so advanced *-*


My servers are under linux ubuntu.
Give me a while, Ill sort something out for you.
__________________

GZS Servers
Puppetmaster is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 12-01-2015 , 22:53   Re: Protection for CSGO servers against DOS, Exploits, Lags
Reply With Quote #10

Ok, Ive thrown a small plugin together for detecting when (by default) 8+ players timeout/dc during a single round. Its probably super unstable at the moment, Ill revise it when I get home.

https://forums.alliedmods.net/showthread.php?t=275511
__________________

GZS Servers
Puppetmaster 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 09:54.


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