Zombie Panic! Source

Zombie Panic! Source

View Stats:
Server Protection and Stability
As covered in our announcement of our upcoming 2013 Source Engine Build, we mentioned a game-breaking exploit within the engine that allows users to endlessly send data packets, either requesting information from the server or contain malformed data which will stress the CPU of the server in its attempt rebuild them, to any given servers, resulting in the CPU of the server locking up and the server crashing.

We have gathered all of the information regarding setting up, running and securing servers on ZP!S here. This to create a single place for support and troubleshooting in regards to defending against this exploit until we finally get rid of it by porting to the new engine.


The Different Methods of Attack


Attacks on the rcon port are not the only type of attacks that server owners have had to deal with. Below are listed the different types of attacks that server owners have been experiencing, with information on how to best prevent them or minimize their damage in the Defensive Meassures section below this section.

Rcon-spam-attacks

The main form of attack. With the use of the exploit within the code of the 2007 Source Engine , it can spam data packets to the rcon port of targetted servers, locking up their CPU and cause them to crash.

Server-delisting-attacks

Another method of attack allegedly developed to force out the server owners who actively fought back and resisted the main rcon attacks. After the initial crash as a result of the rcon-spam, the targetted server will be removed from the master server list, both in-game and in the Steam Server Browser, despite the server being back up and online.


DDoS-attacks

Probaly the most well known form of attack. It's same principle as the rcon attack. However, it is rarely able to take down a server if the security is set up well enough but it can cause short sessions of tremendous lag, causing inconvenience to the people playing.
--------------------------------------------------------------


Defensive Meassures



Rcon Attacks

There's two options you can chose from when it comes to securing your server from the rcon attacks;


Disable your server's rcon port

The downside to this solution is that you lose access to sites like SourceBans, GameTracker, GameMeme and similar services.


Install a collection of plugins a cvars that monitor and limit access to your servers RCON port

As the exploit is coded in the engine, these solution will not completly solve the issue but they will minimize the frequency and damage of the attacks.


The following plugins and cvars perfrom these tasks;

Sourcemod Plugins

Flood Checker [forums.alliedmods.net] - This plugin monitors and blocks overflow of commands and data requests being send to your server.

Rcon-Locker [forums.alliedmods.net] - This plugin fixes a lot of known rcon exploits.

Command Blocker [forums.alliedmods.net] - This plugins blocks certain client commands, that are not regarded as cheats, that can be used to lock your server CPU and crash it.


Metamod Plugins

D-FENS [forums.alliedmods.net] - This plugin blocks an attacker from downloading and uploading files to your server.

Various cvars to assist the above plugins


These variables, if edited, can help protect against the data packets that lock up the server CPU. Be aware that editing these should be done carefully and with thorough testing as a wrongful edit can cause the server to delist or experience lag and FPS drops. [wiki.alliedmods.net] They should be tailored to your own server and the game it's running on. You can research default Source server values here.

///// Server bullet-proofing // How2Stop Source Engine crashing // Cvars involving server queries and connection attempts //---------------------------- // Maximum queries per second to respond to from a single IP address. // Default = 3 sv_max_queries_sec 3 // Maximum queries per second to respond to from anywhere. // Default = 60 sv_max_queries_sec_global 60


To compliment D-FENS, you can set the server cvars for downloading/uploading to 0. You should only do this if you:

1.) Don't allow users to post sprays on the server.
2.) Are using fast download for things like maps, textures, and other files that users would need to play on your server.


// Allow clients to upload customizations files (ie: sprays) // 0 = off. // 1 = on. sv_allowupload 0 // Allow clients to download files from the server (ie: maps, textures, etc.) // NOTE: This does not affect fast download if you have it set up, it keeps users from download files from the server. // Do not turn this off if you are letting users download files directly from your server! // 0 = off. // 1 = on. sv_allowdownload 0

To make the performace of the Command Blocker plugin more reliable, the following commands should be typed into your server.cfg file once the plugin is installed:

sm_blockcommand ping sm_blockcommand groundlist sm_blockcommand mem_dump sm_blockcommand listmodels sm_blockcommand soundlist sm_blockcommand snd_restart
------------------------------------------------------------------

Delist Attacks

The only way to make your server reappear on the master list is through a restart or map change. After crashing, your server can be delisted within the next couple of minutes. After that time passes, there’s no risk of it getting delisted.
------------------------------------------------------------
DDos Attacks

In order to block these attacks, it is recommended that you host your server at a company that runs tight DDoS security.

Most server owners recommend NFOServers [www.nfoservers.com] because of their server security and customer support.
---------------------------------------------------------------
Setting Up and Running a Server

Vertigo Gaming provides an excellent and in-depth wiki[www.vertigogaming.org] that aims to cover everything you need to know about setting up, running and securing a server. Still a work in progress.

Davidian Gaming has had a script[www.dropbox.com] developed that allows for players to rejoin any ZP!S server of their choice every few minutes. This was developed to combat the server attacks, automatically reconnecting idle players to the server so that the server would not appear at the bottom of the list when back online, thus guiding previous playing players back to the server.
--------------------------------------------------------------

This thread was made possible by the efforts of the following players and communities;

Silence
Janaz Leonheart
Violent Crimes

Vertigo Gaming
Convict Gaming
Davidian Gaming


---------------------------------------------------------------

If you have any questions in regards to hosting and securing your server, this is the place to ask. This thread is supposed to work as a combined effort to ride out the storm that is the server attacks until the new build gets rid of the exploit that is making it all possible.

< >
Showing 1-5 of 5 comments
I would also strongly suggest using the following plugin (or one similar in function, if you prefer) to people who run game servers:

Wiki page:
http://www.vertigogaming.org/wiki/index.php/IP_Scrubbing_Plugin

Source-code link/plugin:
https://github.com/Silenci0/IPScrubber


Unfortunately, persons of ill-repute and crass/childish behavior often use IP information to harrass, bully, DDoS, and/or cause trouble/harm to people IRL in various Source-based games. This plugin aims to make getting this information much harder by scrubbing the IP information upon connection to the game server, which stops it from being broadcast/echoed to other players. It will still log this information to the server logs, so server owners can still find a user's IP information if they need it. While it does not protect the server itself, it does protect the players that are playing on the server from some of the client-side commands that are used to obtain this information from the server.

To get the plugin to work, just download the plugin, drop it into your SM plugins folder on your server, restart the server (or do a map change), and it will begin working automatically. No cvars need editted for this, it just runs.

This plugin is a very general/generic plugin, so it can be used for other Source-based games that support Sourcemod, not just ZPS. The plugin is compiled against SM 1.7.3, so it should work for SM 1.7.3 and higher. The plugin is also presented "as-is", but if you want to make modifications/edits to it, don't trust the compiled version provided on the GitHub, or would rather compile the code yourself on your own version of SM, then feel free to download the plugin's source code for yourself and do so. Its licensed under the GNU public license, so its free and open to download and work on.
Nov 16, 2016 @ 6:43am 
Might be a great idea to just implement this into the game itself. But I do not think SDK 2013 has this vulnerability anymore, but if it still does, I will make sure to fix it, because this is a major flaw.

edit:
SDK 2013 still had this flaw, but its now fixed. So now this is built into 3.0.
Originally posted by BB2 JonnyBoy0719:
Might be a great idea to just implement this into the game itself. But I do not think SDK 2013 has this vulnerability anymore, but if it still does, I will make sure to fix it, because this is a major flaw.

edit:
SDK 2013 still had this flaw, but its now fixed. So now this is built into 3.0.

Yeah, the commands that do this are in most Source-based games, including some games on Source2013. The commands that are used for this were mainly for debugging long ago, so they are part of the core of most Source games, unfortunately.

If that stuff can be removed or if the broadcast/echo of the IP information by the server to game clients can be stopped, it would be a great thing. Putting an end to that kind of abuse is just good for everyone.
Nov 20, 2016 @ 3:01pm 
The following links will be of interest for server operators running Zombie Panic! Source servers under Linux. Please note that some of the tips won't be valid if you rent a dedicated server from a provider :

https://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers
http://www.tecmint.com/linux-server-hardening-security-tips/
https://www.cyberciti.biz/tips/linux-security.html
Here is another worthwhile plugin to install for security/administrative purposes. It is called SMAC (Sourcemod Anticheat): http://www.vertigogaming.org/wiki/index.php/SMAC_Plugin

That page has pretty much everything on it, but essentially, SMAC can be used to lock rcon, prevent the disconnect/reconnect spam, prevent command spam (ie: if a player is trying to run a specific client/serverside command to lag the server x amount of times in a second, it will kick/ban them depending on settings), prevent the use of certain unicode characters in player names that could cause issues for the server, and can prevent/detect several kinds of common aimbot/speedhack methods. There are also other things it can do with its modules if included, though only the ones listed on the page have been used/tested so far in ZPS. Refer to the plugin page and the associated wikipages for SMAC for more details.

The plugin was updated/modified to support ZPS, but be aware that you need to be careful when using plugins like this as misconfiguration can cause issues for your server and its players. Its a very useful and powerful plugin if configured properly, but not something you should just throw into your server and never look at again. Keep that in mind when using SMAC.
< >
Showing 1-5 of 5 comments
Per page: 1530 50