Rcon Authorization
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Rcon Authorization
I haven't poked around the rcon code very much yet but something has been bugging me for the past few days.
When I send an rcon command to a server without putting in the password first I get the "Bad Rcon Password" message back from the server.
When I enter the password then send the rcon command the server executes normally as expected.
What I'm wondering is, how does the server know that I'm the admin and that the other players are still not authorized to use the commands? Does it keep a tally on its side saying "ok, Silicone_Milk knows the password is = this string so commands from his ID are good for execution only for the current session. If he disconnects, he's no longer ok."
If this is the case, what keeps a determined individual from crafting some packets and claiming to be me (who has been authorized) so that the server is tricked into letting that person execute rcon commands as well?
When I send an rcon command to a server without putting in the password first I get the "Bad Rcon Password" message back from the server.
When I enter the password then send the rcon command the server executes normally as expected.
What I'm wondering is, how does the server know that I'm the admin and that the other players are still not authorized to use the commands? Does it keep a tally on its side saying "ok, Silicone_Milk knows the password is = this string so commands from his ID are good for execution only for the current session. If he disconnects, he's no longer ok."
If this is the case, what keeps a determined individual from crafting some packets and claiming to be me (who has been authorized) so that the server is tricked into letting that person execute rcon commands as well?
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Rcon Authorization
Nothing of the sort. Your client inserts the value of the rconpassword cvar in every rcon command you send.
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Rcon Authorization
Very interesting. Simpler than I could have imagined.
Thanks for the swift response Misantropia
Thanks for the swift response Misantropia
Re: Rcon Authorization
After all, it's a communication via udp, hence no session can be managed.
It's kind of odd that such a person like Silicon_Milke asks this kind of question.
It's kind of odd that such a person like Silicon_Milke asks this kind of question.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Rcon Authorization
Utter nonsense.a13n wrote:After all, it's a communication via udp, hence no session can be managed.
-
- Posts: 2237
- Joined: Sat Mar 12, 2005 10:49 pm
Re: Rcon Authorization
What do you mean by "such a person"?
Re: Rcon Authorization
Correct me, if I'm wrong.^misantropia^ wrote:Utter nonsense.
such a tech personSilicone_Milk wrote:What do you mean by "such a person"?

-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Rcon Authorization
Alright. You're wrong.a13n wrote:Correct me, if I'm wrong.
Re: Rcon Authorization
Well, its not really that hard to prove it really. Q3 only uses UDP for all communications with its clients. If it wasnt able to associate data with specific clients the game would be unworkable. See SV_PacketEvent() for how Q3 matches UDP packets up to clients in the game, therefore maintaining state for that client throughout the session (game).a13n wrote:Can you prove it?
It'd be fairly easy to modify q3 to work the way Silicone Milk thought - change it so that SVC_RemoteCommand does a similar thing with matching the netadr_t's, and if they're a client in the game you can easily mark them as an admin so that they dont need the correct password in the future. Its potentially a useful change to be able to tell who has rcon access - eg highlight them differently in the scoreboard (as CPMA does with referee status players, f.ex).
If you wanted, you could even extend it so that it maintains a session for non-client netadr_t's too, just maintain a list of "active rconners" (with timeouts etc), although SM's original post suggested he was assuming it was a special case for players on the server.
Re: Rcon Authorization
ouch!
apology for my stupidity
apology for my stupidity
