Discord recognizes command line games

Posted Aug 11, 2018, 8:34 PM UTC

Posted Aug 11, 2018, 8:34 PM UTC
I posted about this to Discord's devs almost a year ago, got banned in the process (no pun intended). Their applications (desktop) also leak user data like mad without any notification to users. Everything you do in the app was reported back to some analytics company - we're talking simple mouse clicks / movement. (developer console will show you).
Discord is one hell of an evil company that wouldn't exist if not for paying twitch streamers to promote it. Don't get me started on the protocal itself being used as a ddos amplifier.
The issue being that there really isn't a single decent alternative that's free software that people want to use. Yes there's IRC, but good luck getting your non-techy friends to switch. And to be honest, none of the others work very well.
Even if they were perfect, vendor lock-in is a big thing.
Riot/Matrix?
Everything you do in the app was reported back to some analytics company
Nearly every piece of software for the last five years does this. It's called telemetry and it helps them to know what parts of the software gets used, where people have trouble, and tons of useful data that beta users never actually report on. It's not for some evil purpose.
Just because their "intention" isn't evil, doesn't mean that the process itself is right.
For example I don't care if someone wants to see where my mouse hovers when I'm on a certain website, they shouldn't know what website I'm on in the first place; unless I willingly tell them. I don't know why people are so stuck up on the intentions an abuse of privacy.
If there is a large potential for abuse (which is also financially motivated), it shouldn't be a feature. I don't know or care whether or not Discord is evil, but I do know that they have my information and can use it for some dubious shit.
Let me just know everyone of your phone presses to see which part of the operating system is the most useful! Great, now I know what you type and what your porn searches are. Let me now sell that information to the highest bidder. You don't see the problem?
Back in my student days, a score and a half ago, if I opened up a shell in emacs to play hack, rogue or (as shown) startrek, the processes weren’t identified as running those games.
What does discord show if you run something in an emacs shell call?
Of course there's a package for that.
Now I've seen everything.
No you haven't.
Deldo is a sex toy control and teledildonics mode for Emacs.
LOL I was also unaware of this.
seems that this emacs script hasn't been updated in years
Stop
You kids don't know what you've got these days.
Discord in the browser (rather than as an app) doesn't seem to have any such access. Thankfully.
I uninstalled discord for this reason. Now I use a shortcut that launches discord in a chromium window using the --app= argument.
As far as I saw in my gdpr data dump they don't store that info
Everything from tic tac toe to global thermonuclear war?
it just recognizes anything run in /usr/games as a game.
Beggars cant be choosers
(Edit: So what I meant by this was that Discord as a "new game store" doesn't have enough going for it to turn down content creators such-as CLI game creators. Therefore Discord -- the beggars cant be choosie right now.)
We aren't beggars. Discord can remove the Linux port for all we care.
[removed]
Want to see something spooky?
Go to Settings. Go to Games. Click
Add it!in the Game Activity section. Click the arrow dropdown. You can select any running user process, including local videos that are playing or pictures that are opened. Discord has access to everything you're doing. ;3If you use Discord from flatpak, you can simply deny it access to /proc and it won't see anything. (It's that way by default you have to give it permission to read from /proc manually if you want the game detection feature to work)
Maybe there is a way to do that with AppArmor / SELinux (disable read access to /proc for a particular app) without using snap / flatpak
That's interesting. I can do this on Discord as a Snap. Regardless of being a Snap, you must install it with classic permissions so it can interface with the system (e.g., to send files and... read /proc?) more than an usual Snap would (this is also true of other IM programs like Skype).
But I'm out of my depth as to how it reads processes. :p
Everything is in /proc, go in that directory and explore. Each process has a folder (named after it's PID), which contains everything there is to know about a process. Surely there's more info on the net about that (That's about all I know hehe)
Yes...
All programs like 'top' and 'ps' are are just front-ends to data stored in /proc.
For example...
A common design pattern for dealing with handing passwords to processes for automation is to setup the password as a environmental variable.
Something like this:
In this case 'command_line_client' program reads the password/shared secret from the 'API_KEY' environmental variable. This way when users run 'ps -ef' the password won't show up like it would if the password was a command line argument.
However you can still get the environment for processes by reading proc if you know the PID of the process and have read access to those files...
strings -n1 /proc/3018/environ
So if you have a Discord thingy running as your user and you have commands that use environmental variables for passwords or 'ssh-agent' or access your keyring or password manager in your user account as well... Then that Discord process has full access to all that stuff as well, unless it's strongly 'contained'.
But that is true for anything you run on your desktop. Google-chrome, your favorate game on Steam, Emacs, or whatever. Everything you run in your user account essentially has full access to everything you have access to as a user. This is not 100% true, but it's true enough.
Do a 'ls -ltr' on /proc/<pid> sometime and take the time to learn what each of those files are for. You can do all sorts of fun and useful things... like recover deleted files that are being held open by a procces. Getting the full list of command line arguments. All sorts of stuff.
By calling ptrace(2). If you install discord from the snap and watch your system log you will see it generates hundreds of apparmor errors every second when it repeatedly tries and fails to ptrace ssh-agent, which is not allowed for obvious reasons.
: o
You don't need flatpak / appwhatever:
That still wont' stop them from walking the filesystem. If you absolutely must use their clients run it in a vm or lxc.
Most programs were not programmed with the idea that MAC is a thing. So if they try to access files and can't then they usually either crap out or give some sort of misleading error message. This is one of the reasons why SELinux is such a challenge on Linux Desktop despite being around for well over a decade now.
On systems with 'target' selinux ruleset they really are more focused on network services then anything else (ie: Fedora/Redhat). When you execute programs locally on the desktop then most of them run pretty much unconfined.
So it is easier to simply deny the existence of files and data to begin with with manipulating file system namespaces then layer over it all with MAC. Of course /proc/ is a shitty example. Since /proc was just a dumping ground in Linux for so long it's really hard to divide up what is needed for a program versus what isn't. Partially opening up /proc is going to result in vulnerabilities for a long long time in strong container setups.
A much better example is /home.
However once you get things containerized then it makes doing MAC much easier. You can 'simply' set it up by default so that applications get full access to everything in the container and zero access to everything outside of it. So even if they manage to break out of the sandbox they can't do anything (assuming no kernel-level exploit was used, which can be used to by-pass MAC). In this way they are very complimentary technologies.
This is why on Android SELinux was adopted quickly and with little drama. Each application runs under it's own Unix user and in it's own Android sandbox and Unix group membership controls access to things like networking. Relatively easy to apply Mac rules to a environment that were the boundaries for applications are strongly defined from the ground up.
If you use Discord from flatpak, a few other things stop working too; for example, I can't open links in my browser. This is on XFCE with the GTK portal installed.
It does! But that's less spooky because htop is neither essentially a web client meant to broadcast what you do nor run by a company naturally pressurized to profit from your data.
Not that Discord does track and sell your porn consumption to advertisers even if it can in principle. R-right? D: (Probably not. Right.)
The fact that discord runs its front end on electron doesn't give it any more ability to broadcast data than a C program with the right imports. And if you don't want discord having the ability to see current processes than you shouldn't be running their desktop app but rather their website or their flatpak.
Electron does bring the exciting world of XSS attacks to the desktop, unless it has been carefully configured by each application.
Why
Have you seen the news about their game store? I'm feeling almost relieved...their monetization strategy seems much clearer now.
so is any process that is running with the same UID as you and isn't on a sandbox which is the OVERWHELMINGLY majority
And people still shit on Flatpak and Wayland saying they don't need to isolate processes.
People shit on Wayland because it is promoted as a replacement for X but not providing the featureset X has. People didn't shit on SSH when it replaced Telnet because SSH did what Telnet could, and more, securely.
Some legacy features simply are huge security holes. It makes sense to not include them.
Not every process needs to be isolated and the decision to isolate processes should be made by the user.
Wayland has nothing to do with this, as it doesn't prevent access to /proc in any way.
IIRC, Flatpak doesn't do it by default, either, and you can do it without Flatpak as well (see above).
Both are technologies with a lot of potential but if today you were to run a Flatpak-ed version of Discord under Wayland, it would do exactly the same thing.
Remember that mantra about the false sense of security ;-) ?
Wayland is not relevant in this specific case, but it adds to the isolation in other cases.
That's true of every single program running on Xorg. I've no doubt that Discord collects info, but this feature is not "spooky".
Mine usually says "Playing Outlook" or "Playing Firefox".
I was always change mine to "Playing with himself".
[removed]
Reminds me of the recent spotify GDPR fiasco. We'll see how much time until this turns out to be more than true.
From my gdpr data dump they don't store that info. Unless I'm blind