halflife icon indicating copy to clipboard operation
halflife copied to clipboard

Connect command not entirely blocked

Open xPaw opened this issue 13 years ago • 46 comments

It is possible to by-pass it by sending carriage return byte. Like this: ;connect**CR**ip:port

xPaw avatar Feb 17 '13 09:02 xPaw

I think there might be even more special chars like that what can bypass this 'block'.

MPNumB avatar Feb 17 '13 10:02 MPNumB

@leon291 See #5

xPaw avatar Feb 18 '13 15:02 xPaw

These guys huh. "\n" and "\r" are going to be put on the not allowed list too.

alfred-valve avatar Feb 18 '13 19:02 alfred-valve

I haven't tested other bytes, but there is a possibility that it could be by-passed by using some other crazy char.

xPaw avatar Feb 18 '13 19:02 xPaw

Other values won't be tokenized properly and shouldn't turn into a valid connect command. That said, I am surprised that \n or \r worked either...

alfred-valve avatar Feb 18 '13 19:02 alfred-valve

@johndrinkwater suggested trying U+00A0 and it actually worked too. You should take another look, @alfred-valve.

xPaw avatar Feb 18 '13 19:02 xPaw

Boo. Okay, next release blocks some more variants but I need a bigger hammer it appears.

alfred-valve avatar Feb 18 '13 20:02 alfred-valve

Unsure how you’re parsing the strings, but unicode has character categories which should help to minimise the problem.

johndrinkwater avatar Feb 18 '13 21:02 johndrinkwater

Okay, next release should stop this, we will disallow chars < 32 or > 127 which were breaking our parser code.

alfred-valve avatar Feb 19 '13 22:02 alfred-valve

What about this command AMXX VIRUS ?

http://www.youtube.com/watch?v=bb3ealDSZ1c

lolzap avatar Feb 20 '13 14:02 lolzap

@lolzap If you can provide source code for this, then we can figure out what it does.

xPaw avatar Feb 20 '13 14:02 xPaw

] amx_clientcmd Player "echo "test"" test ] amx_clientcmd Player "echo "test тест"" Server tried to send invalid command:"echo "test тест" "

You are blocked all UTF chars from there. Please change the way you are doing that.

LevShisterov avatar Feb 22 '13 15:02 LevShisterov

@LevShisterov +1 And BTW connect is still not completely blocked:

CLIENT_COMMAND(plrEdict, "reconnect;connect 127.1.1.1:27015\n");

Connecting to 192.168.1.5:27016... Connection accepted by 192.168.1.5:27016 Connecting to 127.1.1.1:27015...

thecrock avatar Feb 22 '13 16:02 thecrock

nelzya-prosto-tak-vzyat-i-boromir-mem_11972799_orig_

theAsmodai avatar Feb 22 '13 16:02 theAsmodai

any news when this will be fixed and isn't there a way to purge them from the server browser ? ... they already filled the masterserver with fake/redirect servers again

i know they are showing with 0/0 players but a better solution would be to not get them at all in the browser :cactus:

aduzsardi avatar Feb 24 '13 07:02 aduzsardi

is there any work around we can use to allow for PUG mods to work with a .need command? we want to broadcast a message on our servers if theres players needed to get a 10 person PUG going. with the broadcast across servers (like in esea) people are able to type .join in chat and it will direct them to PUG server. but it keeps saying "Server tried to send invalid command:" is there a different way of doing this?

Posse1 avatar Feb 25 '13 03:02 Posse1

it's not blocked by the way , somebody already found a way to get arround this :smile: and he's not using "new line"

Connecting to 5.231.20.77:29004...
Connection accepted by 5.231.20.77:29004
Netchan_Clear() : reliable length not 0, reliable_sequence: 5, incoming_reliable_acknowledged: 1
Connecting to 188.241.87.133:27015...
Connection accepted by 188.241.87.133:27015
* Privilegii acordate

BUILD 5447 SERVER (0 CRC)
Server # 11
Serverinfo packet received.
Clearing memory
Remote host:  Cs7.SstarCS.Com
Spooling demo header.
"sv_cheats" changed to "0"
Verifying and downloading resources...
Using WAD File: halflife.wad
Using WAD File: cstrike.wad
Using WAD File: prodigy.wad
Texture load:  430.0ms
Setting up renderer...
SKY:  duskrt, duskbk, dusklf, duskft, duskup, duskdn, done
CL_SignonReply: 1
120.0 megabyte data cache
CL_SignonReply: 2
RuS!*#1-oko connected

aduzsardi avatar Feb 25 '13 05:02 aduzsardi

It would be useful @alexinno if you shared how people are getting around it ;) How are you able to connect to a 5447 server?

johndrinkwater avatar Feb 25 '13 13:02 johndrinkwater

that was sent to me , i don't know specifics ... all i know is that they added some junk arround the connect command in xRedirect amxx plugin , this is what i found ...

 client_cmd( id, ";reconnect;connect x.x.x.x:27015");

here http://forum.xhlds.com/viewtopic.php?f=6&t=1733&p=7950#p7947

aduzsardi avatar Feb 25 '13 13:02 aduzsardi

Guys, please stop reporting this bug until feature that allow xRedirect is released.

xRedirect is here since a long long time... :/

Freeman-51 avatar Feb 25 '13 15:02 Freeman-51