• Excrubulent@slrpnk.net
    link
    fedilink
    English
    arrow-up
    20
    ·
    1 year ago

    I am genuinely curious how anti-cheat works on an open source OS. I don’t know a whole lot about how it works to be honest, but is there no problem with cheaters being able to manipulate the entire stack down to the kernel level?

    Like I’m aware cheaters can decompile code so closed source isn’t necessarily that much better. Did I just answer my own question or is there more to it?

    • chaorace@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      16
      ·
      1 year ago

      I’ll do my best to explain:

      Firstly, not all code executed on an open source OS needs to be open source. For example: Epic Anti-Cheat, which comes with a Linux-compatible mode, is fully closed source. So right off the bat we’re going to put to bed the notion that somehow the platform of choice makes it easier for bad actors to pull apart and examine anticheat software.

      Secondly, yes, there is a problem with cheaters being able to hide from anticheats on Linux. This is because on Windows it’s relatively easy to run kernel-level code via drivers – this is why most anticheats require admin permission to install a monitoring driver before the game will run. The anticheat is effectively rootkitting your system in order to circumvent other rootkits that may be concealing epic cheatz.

      On GNU/Linux, almost all device drivers come prepackaged in the Linux kernel, so there’s no direct equivalent to the Windows approach of allowing users to install third-party code into the most protected rings of the OS. It’s still possible through the use of kernel modules (see NVIDIA drivers), but as evidenced by how annoying it is to use NVIDIA devices on Linux, this is a huge PITA for both the developer & the user to deal with.

      So that’s the rub. On Linux, anticheats just have to trust that the kernel isn’t lying. This has been a perpetual thorn in the side of developers like Google, who’d really really like it if they could prove beyond a shadow of a doubt that a given Android device is not rooted (see SafetyNet). Google’s solution to this has been to introduce hardware-backed attestation – basically a special hardware chip on the device that can prove that the kernel software has not been tainted in any way.

      • Barbarian@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        1 year ago

        I’m sure you agree with this, just wanted to add:

        It’s also true that the ease with which a program can interact with kernel level drivers in Windows opens up a whole host of potential exploits including but not limited to recording all internet traffic, all keystrokes, listing all files & programs, accessing memory of other programs and more. AAA client-side anticheats require some pretty incredible trust in the vendor to not be either evil or incompetent.

      • uis@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        This is because on Windows it’s relatively easy to run kernel-level code via drivers

        Buuut there is nothing stopping a person from using virtualization.

        • BURN@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          There’s generally other checks around virtualization. Both VMs and even dedicated KVMs result in triggering the AC generally

          • uis@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            1 year ago

            AC somehow aren’t triggered when virtualization is disabled in bios.

            Alternatively binary translation or custom processors.

            EDIT: there are some public info suggesting that most of detection caused by misconfiguration.

      • Excrubulent@slrpnk.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Right so on a technical level it is actually harder to do client side anti-cheat?

        Thanks for the information. That hardware backed attestation reminds me of Little Brother by Cory Doctorow, where hardware DRM was introduced and then forcibly deprecated when it was found to be vulnerable… so of course the vulnerable hardware was now worthless except on the black market where it was worthwhile to pirates because it was known to be already cracked.

    • uis@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I am geniunely curious how anti-cheat works on an PC with physical access, where user can plug their mouse loaded with cheats.

      For every malware anti-cheat there will be sandboxing cheat.

      • Excrubulent@slrpnk.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        That’s a good point. I realise my question partly plays into a misconception about the security of closed source software, that it’s somehow harder to mess with.

        I mean people are training neural nets to look at the screen and aimbot by modifying the mouse inputs, which is just an impossible thing to detect.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      This is why client-side anti-cheat is a terrible idea. It gives you the illusion of control, but really it doesn’t prevent a motivated party from cheating, and it opens up everyone else to kernel-level vulnerabilities when the anti-cheat software inevitably has a bug.

      Client side anti-cheat should merely discourage low effort attacks, and the real cheat detection should always be server side looking at patterns of behavior. Unfortunately, it’s a lot easier to reach for client side anti-cheat than build an effective server side anti-cheat.

      • Excrubulent@slrpnk.net
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        This is a really good answer, thanks! I like to imagine what a fully open-source future would look like and I imagine server-side anti cheat is the solution.

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 year ago

          I don’t think popular games will ever be fully open source, but our operating systems could be.

          I have very little proprietary software on my system outside of games, and it’s mostly limited to a handful of firmware blobs (e.g. GPU and WiFi firmware, CPU microcode, etc), with the clear exception bring browser DRM for streaming services. Everything proprietary on my system is sandboxed in some way, so I’m reasonably protected from most of that nonsense, but it’s still there and probably always will be.

          Having proprietary software isn’t the issue IMO, as long as I can sandbox it. I can’t sandbox kernel level anti-cheat, so I’m never going to install a game that requires it. That’s my line in the sand.

          • Barbarian@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            0
            ·
            1 year ago

            One thing that I hope becomes more common is open source game code + proprietary art, sound and narrative. Game devs, artists, writers, etc deserve to get paid for their work, and we deserve to know what’s running on our computers. The more game devs use open source engines, the closer we get.

            • tabular@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              1 year ago

              Maybe it’s because I am an amateur dev and not just a user but I like the freedom with assess that are creative commons and am put off when an open source game uses (edit) proprietary assests. Don’t see why they can’t get paid the same way open source dev would.