Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 282 forks source link

Day 0 exploit regarding UnitIDs #323

Closed H-Park closed 4 years ago

H-Park commented 4 years ago

The difference of IDs between sequentially created units, regardless of which player created them, is 262144 (for probes) plus/minus 2. This can be used to determine how many units your opponent has created since you last created a unit, which can be used to detect ling rushes and among other things.

Proposed fix: have the protocol make a mapping between real unit id and a random tag, then interchange them where appropriate.

See discussion on the discord regarding this.

H-Park commented 4 years ago

Closing issue, made a duplicate issue on the proto repo, as this is a proto fix, not an API fix

https://github.com/Blizzard/s2client-proto/issues/161