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

Bad server detection due to recent changes #364

Open
dadodasyra opened this issue Jan 5, 2025 · 3 comments
Open

Bad server detection due to recent changes #364

dadodasyra opened this issue Jan 5, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@dadodasyra
Copy link
Collaborator

We noticed some player complaining about no detection at all (#343) which was due to multiple UDP sockets (more than 25) opened while in normal operation SoT only opens 2 of them. One for matchmaking, one for game server.

This seems to be a concern since EasyAnticheat was implemented. (THIS DOESNT MEAN BETTERFLEET COULD BE FLAGGED /!\ I'm only stating that since easy anticheat is there we noticed some protocol changes. Betterfleet stays basically undetectable by an anticheat due to it's "passive" nature, it doesn't read nor touch to anything related to the game itself but as a VPN could do it "listens" for communication (without reading packet data itself))

After some digging it seems to happen randomly on some runtimes. Ive managed to reproduce the situation 2 times, one with 24 weird udp sockets and another time with 25 of them). By sniffing the traffic using wireshark it does seems to be some kind of installation to fetch ping from the player. Each socket gets a little bit of traffic from different IPs, owned by Steam itself. It does seems to be some kind of system like Steam Datagram Relay (SDR).
This could mean that Microsoft is currently working on a way to hide their servers ip using Steam relay servers. However, we're still able to detect the ip (moth manually and through betterfleet) and this ip is still owned by Microsoft so it's presumably the game server ip.

But this does mean something.

  1. If microsoft move to a system like SDR we would be 100% screwed
  2. We're having trouble detecting the IP when there's more than 2 connections because it has never been designed for. It tries on random port until it works, it can take some times, sometimes more than 30 secs.

Based on observations and a reddit thread of CSGO Devs SDR is mainly focused on "27015-27200" range. First we're assured that we won't get any false positives since SoT servers are not on the same range.
The game server local udp socket is still the next to last one from a powershell netstat command in this type of scenario.

We're still having trouble to figure it out when betterfleet was launched after the game was. We cannot differenciate between the main menu and the in game status because of the randomness nature of amount of udp sockets related to this SDR thing.
One way could be to dome some statistical work and try to check if the next to last one is close enough to other ones. If it is, it means we're in main menu (bcs SDR local ports are following each others).

In any case it does mean we need to use powershell more in this type of scenario, which seems like a pretty bad idea due to its performance issue.
Otherwise we could just warn the user that he needs to launch again his game..

@dadodasyra dadodasyra added the bug Something isn't working label Jan 5, 2025
@dadodasyra
Copy link
Collaborator Author

But this still seems to be an edge case. About 90% of the time I had only 1/2 sockets (like the old way).

@dadodasyra
Copy link
Collaborator Author

Here's some data that could be used later.

Case 1:

Main menu:

PS C:\WINDOWS\system32> Get-NetUDPEndpoint -OwningProcess 59772 | Select-Object

LocalAddress                             LocalPort
------------                             ---------
::                                       52238
0.0.0.0                                  64878
0.0.0.0                                  64877
0.0.0.0                                  64876
0.0.0.0                                  64874
0.0.0.0                                  64873
0.0.0.0                                  64872
0.0.0.0                                  64847
0.0.0.0                                  64846
0.0.0.0                                  64845
0.0.0.0                                  64844
0.0.0.0                                  64843
0.0.0.0                                  64842
0.0.0.0                                  64841
0.0.0.0                                  64840
0.0.0.0                                  64838
0.0.0.0                                  64815
0.0.0.0                                  64814
0.0.0.0                                  64813
0.0.0.0                                  64812
0.0.0.0                                  64811
0.0.0.0                                  64810
0.0.0.0                                  64809
0.0.0.0                                  64808
0.0.0.0                                  64807
0.0.0.0                                  58130

In game:

LocalAddress                             LocalPort
------------                             ---------
::                                       52238
0.0.0.0                                  64878
0.0.0.0                                  64877
0.0.0.0                                  64876
0.0.0.0                                  64874
0.0.0.0                                  64873
0.0.0.0                                  64872
0.0.0.0                                  64847
0.0.0.0                                  64846
0.0.0.0                                  64845
0.0.0.0                                  64844
0.0.0.0                                  64843
0.0.0.0                                  64842
0.0.0.0                                  64841
0.0.0.0                                  64840
0.0.0.0                                  64838
0.0.0.0                                  64815
0.0.0.0                                  64814
0.0.0.0                                  64813
0.0.0.0                                  64812
0.0.0.0                                  64811
0.0.0.0                                  64810
0.0.0.0                                  64809
0.0.0.0                                  64808
0.0.0.0                                  64807
0.0.0.0                                  59639
0.0.0.0                                  58130

Case 2:

Main menu:
PS C:\WINDOWS\system32> Get-NetUDPEndpoint -OwningProcess 64336 | Select-Object

LocalAddress                             LocalPort
------------                             ---------
::                                       55492
0.0.0.0                                  55108
0.0.0.0                                  55107
0.0.0.0                                  55106
0.0.0.0                                  55105
0.0.0.0                                  55104
0.0.0.0                                  55103
0.0.0.0                                  55102
0.0.0.0                                  55101
0.0.0.0                                  55100
0.0.0.0                                  55098
0.0.0.0                                  55097
0.0.0.0                                  55096
0.0.0.0                                  55095
0.0.0.0                                  55094
0.0.0.0                                  55093
0.0.0.0                                  55092
0.0.0.0                                  55091
0.0.0.0                                  55090
0.0.0.0                                  55089
0.0.0.0                                  55088
0.0.0.0                                  55087
0.0.0.0                                  55086
0.0.0.0                                  55085
0.0.0.0                                  55084
0.0.0.0                                  55083
0.0.0.0                                  53784

In game :

PS C:\WINDOWS\system32> Get-NetUDPEndpoint -OwningProcess 64336 | Select-Object

LocalAddress                             LocalPort
------------                             ---------
::                                       55492
0.0.0.0                                  55108
0.0.0.0                                  55107
0.0.0.0                                  55106
0.0.0.0                                  55105
0.0.0.0                                  55104
0.0.0.0                                  55103
0.0.0.0                                  55102
0.0.0.0                                  55101
0.0.0.0                                  55100
0.0.0.0                                  55098
0.0.0.0                                  55097
0.0.0.0                                  55096
0.0.0.0                                  55095
0.0.0.0                                  55094
0.0.0.0                                  55093
0.0.0.0                                  55092
0.0.0.0                                  55091
0.0.0.0                                  55090
0.0.0.0                                  55089
0.0.0.0                                  55088
0.0.0.0                                  55087
0.0.0.0                                  55086
0.0.0.0                                  55085
0.0.0.0                                  55084
0.0.0.0                                  55083
0.0.0.0                                  54282
0.0.0.0                                  53784

There's no issue going from in game to main menu, it does "rollback" correctly.

@dadodasyra
Copy link
Collaborator Author

It does seems like it's not fully implemented since the server ip is still a microsoft one and not a valve one so it should stay detectable by our tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants