Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the server sets Steamids to clients after the validation by Steam servers #1031

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Splatt581
Copy link

@Splatt581 Splatt581 commented May 13, 2024

This pr fixes the Steam App Ownership Ticket hijacking/spoofing vulnerability and related exploits. Now the server will sets the steamid from the ticket only after the client connection has been validated by the Steam servers. Before this, the client will be assigned STEAM_ID_PENDING (sid 0).

In fact, the GoldSrc server followed similar logic before the Steamworks updates.

@Splatt581
Copy link
Author

Splatt581 commented May 18, 2024

In a good way, we also needs to replace the SendUserConnectAndAuthenticate function with BeginAuthSession, which using in Source1/S2 engines. The SendUserConnectAndAuthenticate function is deprecated in the Steamworks SDK and has poor client auth ticket fields validation.

But for now in the local rebuild of rehlds, I have the the BeginAuthSession function returns k_EBeginAuthSessionResultInvalidTicket even with a valid auth ticket for appid 10.

@tupec
Copy link

tupec commented May 19, 2024

You can't spoof someone's ticket, there's a reason why - it's RSA signed with a private key. You can only reuse them (until the expiration, which is 21 days).

@Splatt581
Copy link
Author

You can't spoof someone's ticket, there's a reason why - it's RSA signed with a private key. You can only reuse them (until the expiration, which is 21 days).

That's right.

But in the future, attackers may obtain the private key or otherwise start signing tickets. GoldSrc game servers must be ready for this.

“Reusing” of a ticket not with the owner’s account has been the main exploit used by attackers for 10 years; by stealing a ticket from server admins (mostly using social engineering), they gain admin rights on the server.

There are also other exploits that allow you to hide your steam avatar in the scoreboard, as well as a complete bypass of the steamid ban via the banid engine command.

This pr fixes all currently known vulnerabilities with steam tickets on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants