Long time ago the CoD 4 servers I was maintaining were being targeted by hackers that had found a new method to become unbannable on Call of Duty 4 servers.
The exploit was based on the fact that cracked Call of Duty 4 servers never verified user GUID’s and therefore allowed all players, even cracked, to connect. As the server skipped verifying GUIDs towards a master server, anything could be sent to the server, while the server itself was only prepared to get a 32 char hash in the range of 0123456789abcdef
.
This caused issues with external admin tools and banning players (which is done by GUID), because they in turn also only expected 0123456789abcdef
, and hackers were sending all kinds of russian/hebrew/random characters.
Solution
To solve this the servers had to be patched with a custom routine that validated player GUID’s to their normal format [0-9a-z]{32}
, and killed any connecting players not matching that.
Luckily, CoD4 is based on Quake 3 Arena which has an open source nowdays, so I found a pretty worthless function that normally validates if an IP is local or external, and overwrote it with my custom Assembly. =)
In short, it does:
- Validation of player GUIDs
- Use a special exception to allow for CoD4 master server listing, great for when you are running cracked servers