The maximum security solution for playing Windows games on Arch
Hi fellow Arch Users!
I'm far from being a heavy gamer, but the opportunity to play some StarCraft Remastered with my friends come up once every 2 moths or so. Since I installed Arch on my computer, I just decline these opportunities, but I'd like to change that.
I know that Lutris is available on Arch and it has Blizzard games, but I have heard concerning things about these technologies, namely, once you have a compatibility layer for Windows programs, the system becomes vulnerable to Windows-based attacks, like ransomware, viruses, etc.
So I don't want to risk the integrity of my system for 2-3 hours of game playing per months, and looking for a safe option. The things I considered:
- Install Arch Linux a second time, on a separate partition where I'd install only the minimum things to run the game and just not mounting any other partitions that my primary system accesses, and use Lutris there.
- Install Arch Linux in a VM (QEMU or libvirt) with PCI passthrough for the graphics card, and use Lutris there.
- Install Windows in a VM with PCI passthrough and just play the games natively in the VM.
All above options are things I've never done before, so will require a lot of studying up on the topic, which I'm willing to do.
I'd be curious about the opinion of fellow Arch users on the topic. Also, bonus question: if I used a virtual machine with PCI passthrough, would I be able to do screen capture from the host system?
Thanks in advance!
About this post
- Posted
- Archived
- Score
- 8 · 100% up
- Kind
- Text
- ID
- ebafk4
32 comments
Deleted before we saved it.
What about this?
https://linuxscriptshub.com/wannacry2-0-ransomware-has-been-able-to-infect-linux-through-wine/
Deleted before we saved it.
This. Even if in theory one could write malicious software that propagates to a host linux system when running with wine, it is very unlikely. It would require exploiting both a windows vulnerability and a Linux vulnerability, and assuming that the former is also present in the wine implementation.
What windows malware would most likely do is compromise your wine prefix, nothing else. It would not go across prefix fs boundaries. It would not run at boot. Or more likely even, not work at all.
This is wrong.
First, by default, Wine installation sees whole file tree. Any app there can simply delete everything that user has access too.
Second, the scope of access of Wine apps is just a registru setting. Any app can use regedit to give itself more rights.
Third, when app is running, it can keylog and record Linux applications.
Fourth, if you are on an internal network (behind home router, for example), an app in Wine can attack other machines on the network.
I can go on.
I am not a security expert, but I was directed to this article.
https://linuxscriptshub.com/wannacry2-0-ransomware-has-been-able-to-infect-linux-through-wine/
There are ways how a malware can harm Linux installation. First of all, if you did not disable disk Z, it can still steal or damage your data. If you did, it can escape confinement if there are any outward links...
To sort out any problems, use bwrap. Honestly, I dodn't understand why have Linux if you never use bwrap.
Run like this:
bwrap --tmpfs $HOME --ro-bind $HOME/.Xauthority $HOME/.Xauthority commandand now command can not access your /home. Runbwrap --unshare-net commandand now command can not access Internet ( warning, though. There is something wrong in blocking Internet this way for Wine aplications. For example, WineASIO stops working too.')As long as he is playing trusted games, there should not be an issue. Running untrusted code on the other hand...
The very idea of good security, I think, is to get rid of outdated notion of "trusted/untrusted". Every software should be untrusted.
Maybe you can look into winepak. Winegames ready to play sandboxed into a flatpak
https://www.winepak.org/
https://github.com/winepak/
The amount of work you would need to understand pci-passthrough and all the tools, you could use to help other play Starcraft: Remastered with winepak.
I doubt the single game you install from a trusted source is going to have any malicious code in it, it's just as vulnerable as installing the game on windows or installing a Linux native version would be, don't run untrusted executables with wine and you'll be just fine
I think the point is; having WINE on his system opens up his system to all the vulnerabilities of Windows. If his computer happens to be on a compromised network with a primarily Windows virus, the chance of him becoming infected is increased by having WINE and the virus could spread to his personal files.
I suppose that's a risk, but since wine is just running one game not a whole os, unless the exploit can abuse the game it doesn't matter
I kinda unterstand your concern.
What I do, is switch to a different user without root privileges and run my proprietary software there. You could also do some fancy Snap/Flatpak Sandboxing thing, but good old user sandboxing just works without setup.
Your wine sandbox escaping thoughts are kinda paranoid, but I understand your concerns in general, e.g. your proprietary game may very well try to copy your private ssh keys or shit, that's why I just created a separate user for this.
Thank you, I am indeed paranoid a little concerning Wine, one of the first things before switching to Linux was the mantra of "Wine will bring you all the negative effect of Windows to Linux".
vfio is the only secure way of playing games under linux. All other solutions for graphics rendering are either slow or security nightmares.
You can just use lutris and not install wine through Pacman. Lutris comes with it's own wine builds thus it will start wine only for your game
Hmm, thank you for the suggestion, I'll look into it. The Arch package info page only lists wine as optional dependency, so I'm not sure how it works.
I can't really speak about security on the matter.
However, if you want to play windows games in a VM with VFIO, you should know that some people get their accounts banned. For this method and more details I would recommend the r/VFIO subreddit.
I still would recommend a dual boot as it requieres the smallest amount of setup and highest compatibility
If your Arch partition is encrypted, I really don't think you need to worry about security while dual booting, just backup regularly anyway cuz that is good practice
A youtuber I follow called hexdsl used lutris in a flatpak https://youtu.be/V92q-Xr1Ci8
My suggestion would be to make a second user in your current arch installation and use that one for your wine-related needs.
To a process running in wine it'll look like it has administrator privileges, without actually having to run it as root.
Anything that is able to escape from that user by means of a wine+Linux exploit would just as well be able to mount any of your remaining partitions and mess them up.
Deleted before we saved it.
If you're going to bother to dual boot or use a VM anyway... why not use Windows?
Well, I'd like to avoid Windows if possible. Multibooting with Windows brings in extra problems compared to a VM I don't want to deal with (screwing up bootloaders, not respecting non-NTFS partitions, etc).
I installed Windows 10 after Arch and it did not break anything! Even left systemd-boot as my default bootloader.