[HL1/CS] Admin slowhacking
Alfred here, adding the list of filtering rules to the top of this bug so we can all track/understand the changes>
The following commands are blocked from a server running them on you if cl_filterstuffcmd is set (some are always blocked right now also)
alias connect retry set* bind unbund unbindall quit "restart" kill exit exec writecfg cl_filterstuffcmd ex_interp say developer timerefresh rate cd fps_max speak_enabled voice_enable setinfo sensitivity sys_ticrate removedemo volume mp3volume cl* gl_* m_* r_* hud_*
It's been known since a long time now that admins are able to send any commands to the clients, thus mess up their config. It's quite annoying to join a server and find out that all of your binds have been changed, etc. Servers can even open/close the players cd tray with the "cd" command. I don't want to download annoying sounds from servers, and I am setting cl_allowdownload to 0. Guess what? The server forces cl_allowdownload to 1 before it starts downloading the sounds.
The fix shouldn't be to make your config read only and restart the game every time this happens. Servers just shouldn't be able to execute any commands on the clients, as it's the case on Source engine. Only the few commands that are required for the game to work should be allowed to be executed.
Old: https://github.com/ValveSoftware/steam-for-linux/issues/1536
While I agree with this I think a fine line exists between what is slowhacking and what is just harmless and useful on many mods.
For example, I don't think blocking ALL commands from being executed by the server is the way to go as many of them are needed and very useful for multiple reasons, such as "echo" (to print useful information to the client, even help text, etc. and even AMX Mod X heavily uses console prints), commands such as "spk" that is used by countless mods as a way to play certain sounds to a certain player only, instead of emitting it from him (this is like telling default HL "hey, your HEV suit can no longer play any sound to you so don't expect to hear 'ammunition depleted' or 'vital signs critical' ever again").
Let's not blindly block every single thing and call it a day. Commands such as "connect", "bind", changing client settings, etc. I completely agree with. But breaking many mod features would be a bit too harsh.
A few commands could of course be whitelisted like "echo", as it's the case on the Source Engine. The majority just shouldn't.
There are a few other good reasons for allowing "connect"....
-
admin commands like "amx_send_to_kid_friendly_server {steamid}"
-
player initiated Say statements like "getsounds" which auto xfer the player to a sounds download server to download the latest custom sounds.
Having a confirmation pop-up might seem like a great idea, but that would probably be just as frustrating on an evil server (pop-up pop-up, pop-up, pop-up, ,,,,)
IMHO, the real trick is just not play on evil servers, and to accept your fate when you do.
not to mention that the EXTERMINATE COMMANDS makes some files to apear damaged and forces you to re install steam. :(
This has nothing to do with "connect", it's already blocked. Please don't talk about "connect" in this thread. There is already an other one about a legit redirection thing.
Other threads:
https://github.com/ValveSoftware/halflife/issues/268
https://github.com/ValveSoftware/halflife/issues/5
Okay, next release will disallow stuffing of: bind unbind cl_
Any chance for a serverside cl_minmodels enforcement?
Also: How about unbindall, alias, gl_, hud_ and m_ (just brainstorming here).
"cd" should be disallowed as well, it allows the admin to open the players CD tray. Why not disallow gl_ and m_ cvars as well?
EDIT: voice_ and r_ as well, maybe.
alias is already covered, unbindall will get picked up as well. I'll have a look over the gl_ and m_ vars to see if that makes sense too.
what about commands? quit fps_max exec exit ex_interp r_ disconnect say kill
+* -* commands
disconnect is a valid command to stuff, I'll look over the others.
Wouldn't a whitelist make more sense? :)
Nope, you don't want to know the horrendous code in the source 1 engine that enables that...
snapshot and screenshot should not be allowed to be executed at all. Even one time per second is too much. A server shouldn't need to call these commands.
These might need to be dissallowed as well:
_restart _setaddons_folder _setgamedir _sethdmodels _setrenderer _setvideomode
I think some anti-cheat clients take screenshots to check for cheats, but I'm not sure if it's done server side or client side.
Client screenshots are useless, most cheats already disable themselves when they see the screenshot command. It doesn't prove anything. If you're going to allow the server to execute the screenshot command then it should be allowed on the Source engine as well, and Valve developers didn't want to allow it here, I can't see why it would be on HL1.
All the _set commands are currently disabled, I'll add _restart to the set.
screenshot/snapshot needs something more subtle, let me think on that.
@MaxKorz Admins already have server chat logging on their side, the player shouldn't even need to provide that sort of proof himself.
What Egon-Splenger said. I don't want to join a server and find out it's taking screenshots without my permission.