Opened 4 years ago

Closed 4 years ago

#3552 closed defect (duplicate)

[PATCH] Prohibit sending commands for other players in rated games

Reported by: elexis Owned by:
Priority: Release Blocker Milestone:
Component: Core engine Keywords: patch
Cc: Patch:

Description (last modified by elexis)

Problem: Malicious users can send commands for other players in rated games.

This can be accomplished by abusing the developer overlay. It can be opened in rated games using one of the bugs (#3547, #3550, likely others) or by removing one check.

Release-blocker as it has been abused way too often by script-kiddies using proxies and making new accounts after being banned.

Implementation:

  • Defending against malicious clients/players: For rated games, the server must ignore commands for players that don't correspond to the client that sent them.

According to #3155, sending commands for other players without having cheats enabled should be allowed. That's why we check for rated games instead of cheats.

  • Defending against a malicious server (i.e. a host with a modified NetServer.cpp) is impossible without either using public/private-key crypto (and requiring everone to validate their public keys outside of 0 A.D.) or switching to a a p2p structure. Surely won't be addressed in this ticket.

Attachments (2)

t3552_prevent_commands_for_others_in_rated_games_v1.patch (1.6 KB) - added by elexis 4 years ago.
visual_replay_a18_megapatch_strict_server.patch (72.0 KB) - added by elexis 4 years ago.
see above.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 4 years ago by elexis

Description: modified (diff)

comment:2 Changed 4 years ago by elexis

Keywords: patch review added
Milestone: BacklogAlpha 19
Summary: Prohibit sending commands for other players in rated games[PATCH] Prohibit sending commands for other players in rated games

comment:3 Changed 4 years ago by elexis

This patch should prohibit the sending of all simulation commands for other players, which include:

  • unit commands (moving, attacking, deleting, ...)
  • building commands (queueing units, canceling queues, researching techs, ...)
  • send fake chat
  • letting others end the game
  • defeating other players
  • changing diplomacy

comment:4 Changed 4 years ago by elexis

Hotfix for a18.

Same as attachment:visual_replay_a18_megapatch.patch:ticket:9, but implements #3551 and #3552 for hosting to autoban players who attempt to use the developer overlay or send fake chat, no matter if the game is rated or not.

Changed 4 years ago by elexis

see above.

comment:5 Changed 4 years ago by Josh

Keywords: review removed

That patch contains way too many different changes and is not really reviewable. I saw code in there to limit the FPS in menus, and that is certainly not relevant here. Please break the patch down into separate tickets which can be added independently and then block this ticket on them.

comment:6 Changed 4 years ago by Josh

Optionally, a hard kill of the developer overlay and console for release may work short-term. (physically remove the supporting code)

comment:7 in reply to:  5 Changed 4 years ago by elexis

Keywords: review added

Replying to Josh:

That patch contains way too many different changes and is not really reviewable. I saw code in there to limit the FPS in menus, and that is certainly not relevant here. Please break the patch down into separate tickets which can be added independently and then block this ticket on them.

Sorry this patch is for alpha 18 and is not the one to be reviewed for this ticket!!!

You shall review this attachment:t3552_prevent_commands_for_others_in_rated_games_v1.patch

comment:8 Changed 4 years ago by leper

Partial dupe of #2676. Also only doing so for rated games seems like the wrong approach IMO.

comment:9 Changed 4 years ago by elexis

Keywords: review removed
Milestone: Alpha 19
Resolution: duplicate
Status: newclosed

Complete duplicate of #2676 actually.

Note: See TracTickets for help on using tickets.