Live data from Hacker News

Wayland Keylogger

github.com

91–100 of 121 posts

Re: Wayland Keylogger

#91
post #28

Earlier quoted context omitted.

The "user is the only security boundary" ship sailed long ago with, chroot, SELinux, AppArmor, Snap, Flatpak, namespacing. It will continue to be a bumpy ride retrofitting an ecosystem not made for the tighter boundaries but it's still the goal.

Many of those work by running processes under what is effectively a subuser. The problem with it is, that it works fine when one purely speak of being able to write and read from files, but the moment servers such as display servers or Pulsaudio and DBus come into play, the picture becomes more difficult. All of those technologies work on a simple binary level where the subuser has access to the socket, or it does no…

D-Bus is a special case because the protocol is not particularly complicated and the proxy can be used by any sandbox to implement various types of filtering on any other service that uses D-Bus. That's one of those things where if your application uses D-Bus to communicate with a service, you might just end up getting sandboxing support there "for free."

Pulseaudio is not getting much work these days, I believe the work currently is happening in Pipewire, which was built to have a fine-grained permission system that can work with any sandbox and is backwards-compatible with Pulseaudio.

I'm not sure how your IRC bouncer would work there, but presumably if you sandboxed that, it only needs to talk to the IRC socket and nothing else. For other obscure servers that have no concept of security, I'm not sure what can be done about that if nobody wants to modify them or replace them. You might just have to accept that they will need to run at elevated privileges and can clobber your system or home directory.

Re: Wayland Keylogger

#92

Earlier quoted context omitted.

Every day I become more and more of the opinion that Fedora/RHEL are the only distros that are actually worth using. I recently installed ubuntu server to see what it was like compared to fedora server and was shocked to see that the python package still links to python 2 (!) despite it already being officially discontinued. Fedora Silverblue/CoreOS look like a massive step in the right direction which no other mains…

> I recently installed ubuntu server to see what it was like compared to fedora server and was shocked to see that the python package still links to python 2 (!) despite it already being officially discontinued. How recently? Ubuntu 20.04 dropped python 2 completely.

Installed it in the second quarter of 2020 but I just checked my isos folder and it looks like I have ubuntu server 19.10. Good to see python 2 finally kicked out.

Re: Wayland Keylogger

#93
post #4

It’s pretty amazing that after all these years there is so little malware on Linux and in foss. The community really has somehow remained almost completely trustworthy. I don’t know of many other examples of that. Nobody trusts free as in beer software, but if it’s open source, we have barely had to even think about whether it’s safe or not because it has almost always been so - even tiny one-maintainer projects

>It’s pretty amazing that after all these years there is so little malware on Linux and in foss.

There's plenty of malware in Linux; it's just never called malware. I'm generally more wary of installing random software on a Linux box than I am on my personal macOS machine.

When I ssh into a customer's machine to discover a bitcoin miner that is definition of malware; and there have been plenty of exploits that involve shodan style scans that take advantage of server software with poor defaults.

Re: Wayland Keylogger

#94
post #60
post #12

Earlier quoted context omitted.

Forget it? It’s the main selling point of Wayland that keyloggers are impossible.

The main selling point of Wayland is the simplification of graphics pipeline > "The wayland tag line is "every frame is perfect", by which I mean that applications will be able to control the rendering enough that we'll never see tearing, lag, redrawing or flicker" -- Kristian Høgsberg, creator of Wayland [1] Input handling and related issues are mere afterthought in comparison. Besides that, this project is not real…

> a strained analogy, but this thing is akin to saying that "you can eavesdrop https" and then show ld_preload hooks for intercepting openssl calls.

Well, it would be fair game if it were popular to discuss how HTTPS helps against malicious local programs, like it is pretty popular with Wayland.

Re: Wayland Keylogger

#95
post #5

I do use Linux (almost) exclusively, but I'm well aware of the security limitations. Forget this keylogger. All you need is to somehow write a single line into .profile or .bashrc, which basically every executed program can do, and you own the user account. You can intercept every program with wrappers by changing PATH or adding desktop entries in .local/share/applications, extract all data from applications, use LD_…

> relatively small target group Smaller than you imply as there is no standard Linux desktop for them to target. Not only are there multiple desktops, there are multiple systems for almost everything in Linux. Even seemingly ubiquitous things like .profile and .bashrc aren't everywhere as neither zsh nor fish use those. TLDR; I think the diversity of the Linux world also helps.

Is it really that diverse? If you just assume Linux=Ubuntu+bash, sure, you lose some users, but is it really a large part of them? (OTOH you definitely can't assume people run a supported version of Ubuntu and not something ridiculously old.)

Re: Wayland Keylogger

#96
post #55
post #47

Earlier quoted context omitted.

But bleargh, why do Wayland proponents always seem to bring up keyloggers? That’s icky.

Because the X11 protocol itself enables every X app to keylog every other app without any "hacks" involved, which is what this is. It's the difference between having a poor quality lock on your door and having no door at all.

The X11 protocol doesn't enable this, even if the most widely used X11 implementation does. An implementation could isolate clients by dropping events and returning blank rectangles for GetImage calls.

Re: Wayland Keylogger

#97
post #96
post #55

Earlier quoted context omitted.

Because the X11 protocol itself enables every X app to keylog every other app without any "hacks" involved, which is what this is. It's the difference between having a poor quality lock on your door and having no door at all.

The X11 protocol doesn't enable this, even if the most widely used X11 implementation does. An implementation could isolate clients by dropping events and returning blank rectangles for GetImage calls.

IMO the main problem there is that the UX around dropping events and returning blank rectangles is bad. We have the tools to design other protocols centered around a real security architecture that can communicate intent properly and doesn't need to return fake data.

Re: Wayland Keylogger

#98
post #57
post #5

I do use Linux (almost) exclusively, but I'm well aware of the security limitations. Forget this keylogger. All you need is to somehow write a single line into .profile or .bashrc, which basically every executed program can do, and you own the user account. You can intercept every program with wrappers by changing PATH or adding desktop entries in .local/share/applications, extract all data from applications, use LD_…

> I do believe that the path forward has to be Mac OS/Android/iOS style sandboxing No this would be exactly the wrong path. One of the major strengths of FOSS/Linux is the fact that there are multiple authorities checking the code for bugs and security issues. You usually have at least three stages: contributor -> release manager -> package maintainer. On some distribution you even have a dedicated security team. And…

And yet so many critical open source projects have had majorly serious security bugs that have gone undiscovered or unfixed FOR YEARS.

Despite the claims otherwise (with 0 proof), FOSS has next to no advantage in the security realm vs proprietary stuff. At the very least the security guaruntee you get from open source code, is that you have the ability to verify the code (and not pre-compiled binaries you get from the project's website) has no backdoor or otherwise malicious crap in it.

Re: Wayland Keylogger

#99
post #5

I do use Linux (almost) exclusively, but I'm well aware of the security limitations. Forget this keylogger. All you need is to somehow write a single line into .profile or .bashrc, which basically every executed program can do, and you own the user account. You can intercept every program with wrappers by changing PATH or adding desktop entries in .local/share/applications, extract all data from applications, use LD_…

I love the VS wrapper shoutout. It reminds me of VBA, which can do the same exact things inside excel sheets. I remember working at amazon there were a lot of programs where the entire software was hidden behind an excel sheet using this mechanic. It would literally just be a small Visual Basic wrapper that runs compiled code. It was literally because your end user wouldn't trust software you write unless it was either a web app or an excel sheet. So if it had to interact with excel sheets, why not shove it inside one?

Re: Wayland Keylogger

#100
post #11

Earlier quoted context omitted.

I'm not sure how it helps here. User-level access in enough, isn't it?

SELinux is more fine-grained than user-level access: it implements application-level access. Even if you, as a user, can access a file, an application working on your behalf cannot do so; same for launching applications.

Indeed, Russell Coker even has a public demo machine (I don't know if it still works) where anyone can log in as root/uid 0, and still can't do much useful due to the SELinux policies on the machine:

https://www.coker.com.au/selinux/play.html

Post reply on HN