Live data from Hacker News

Wayland Keylogger

github.com

61–70 of 121 posts

Re: Wayland Keylogger

#61
post #7

So, all the fuzz about Wayland security and how it is good security to kill window managers at will... comes out totally void.

Isn't one of the most popular Wayland clients a window manager? I'm confused.

There is no such thing as a window manager on Wayland. Everything is baked into one centralized "compositor". AFAIK some compositors like Weston offer a non-standardized plug-in interface that allows a 3rd party to implement a window manager as a shared object. But so far I haven't seen anybody use it.

Re: Wayland Keylogger

#62
post #54

Earlier quoted context omitted.

> giving an application access to the input system gives an application access to everything How do you figure? There are systems already (like Wayland) where default access to input only gives you input when the app is active, and entire different process is required for global hotkeys or key logging. There are no nice GUIs to manage that AFAIK, but this is not an impossible problem to solve anymore. > The same of c…

> How do you figure? There are systems already (like Wayland) where default access to input only gives you input when the app is active, and entire different process is required for global hotkeys or key logging. That's not what is commonly understood as access to the input system. > There are no nice GUIs to manage that AFAIK, but this is not an impossible problem to solve anymore. So long you be willing to live wit…

> That's not what is commonly understood as access to the input system.

Then most apps have no need to have access to the input system.

> So long you be willing to live with a walled garden environment where one's text editor either can't edit the files on one's system any more, or is given sufficient permissions to circumvent all of this regardless.

Sandboxing does not mean the OS cannot extend the sandbox on demand in response to user consent.

> You should `strace` a browser and be surprised that it constantly needs to read and write files from all over the system.

These should be enumerable.

> I would also be rather annoyed with a browser that can only save files in one folder rather than wherever it please me.

See above for sandbox extensions.

Re: Wayland Keylogger

#63
If you put a nice lock on your door and leave your window open, then a crook can still get in. Wayland is a nice lock. This "keylogger" depends on having arbitrary code execution as your user, outside of a sandbox. The same technique could be applied to backdoor literally anything. In other words, it requires being on the other side of an airtight hatch.

https://devblogs.microsoft.com/oldnewthing/20200318-00/?p=10...

Wayland does not allow programs to use the Wayland protocol to snoop on other programs. X11 does allow this. That's the key distinction. Wayland does nothing to prevent programs from snooping on each other using any of the other features of your operating system. Wayland is only one part of a secure system.

I wish we'd stop having this fucking keylogging discussion already.

Re: Wayland Keylogger

#64

The position of the Wayland project is that security isolation requires sandboxing. Otherwise, applications can do whatever you can do, including changing all your personal config files and scripts. The security considerations in Wayland are primarily aimed at not being a weak link undermining sandboxing efforts, which is the case with X11. Without sandboxing, writing to e.g. ~/.profile would in most cases be enough…

> The position of the Wayland project is that security isolation requires sandboxing.

which is not really a step forward since now I have do go and sandbox every app.

Re: Wayland Keylogger

#65

So, all the fuzz about Wayland security and how it is good security to kill window managers at will... comes out totally void.

yes but you're getting downvoted because HN doesn't like people actually realizing stuff.

Re: Wayland Keylogger

#66
post #12
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_…

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

There are like 10 weak points in the linux security model. Wayland plugs one of them but there are still a bunch of ways around it. Yes any program you install from the package manager can still see everything but wayland combined with flatpak and SELinux gets really close to a secure system similar to MacOS.

Re: Wayland Keylogger

#67
post #64

The position of the Wayland project is that security isolation requires sandboxing. Otherwise, applications can do whatever you can do, including changing all your personal config files and scripts. The security considerations in Wayland are primarily aimed at not being a weak link undermining sandboxing efforts, which is the case with X11. Without sandboxing, writing to e.g. ~/.profile would in most cases be enough…

> The position of the Wayland project is that security isolation requires sandboxing. which is not really a step forward since now I have do go and sandbox every app.

You don't have to, package maintainers and developers do. Flatpak gives them the tools to do this. Flatpak solves a lot of other problems like making program installs a user level task without touching the OS. Which is needed because in the future the OS will be an immutable image.

Re: Wayland Keylogger

#68

Earlier quoted context omitted.

> How do you figure? There are systems already (like Wayland) where default access to input only gives you input when the app is active, and entire different process is required for global hotkeys or key logging. That's not what is commonly understood as access to the input system. > There are no nice GUIs to manage that AFAIK, but this is not an impossible problem to solve anymore. So long you be willing to live wit…

> That's not what is commonly understood as access to the input system. Then most apps have no need to have access to the input system. > So long you be willing to live with a walled garden environment where one's text editor either can't edit the files on one's system any more, or is given sufficient permissions to circumvent all of this regardless. Sandboxing does not mean the OS cannot extend the sandbox on demand…

> Then most apps have no need to have access to the input system.

I never said as much; I simply said that giving them access to it is tantamount to giving them full access, and that many other such privileges also are.

Eventually, the list is so large that many applications need access to at least one thing from which they may escalate to full access.

> Sandboxing does not mean the OS cannot extend the sandbox on demand in response to user consent.

The point is that as soon as one have given the text editor consent to write to arbitrary text files on the system, one has given it full access as now it can edit the file that contains these permissions.

In the alternative, one has to grant it access to files, or directories, on an individual basis with every save, which is something users will quickly grow tired off, especially if it be configured to periodically save.

> These should be enumerable.

They are, and users will quickly complain that it becomes unworkable to grant access to each of these individually.

> See above for sandbox extensions.

I would also become annoyed very quickly if I had to give permissions again every time I wanted to save elsewhere.

And you didn't address the fact that if he browser have recursive write permissions to the `~/Downloads` folder, it can alter anything that any other application downloaded to it, and thus install whatever malware it wish in there.

What you want can work in theory, but few users would be willing to live with their the extreme reduction in quality of life and productivity, or walled garden that results from it.

Re: Wayland Keylogger

#69
post #2

Windows is arguably more secure because it has the secure desktop that isn’t controlled by user applications. Unfortunately it doesn’t help with all kinds of password entry.

So does Android , but the same security is what creates a “walled garden”. To limit what malicious software that runs as one's user can do, one must limit what the user can do, and that's exactly what they attempt to do. I personally præfer that the user be trusted to be wise enough to run software that he does not trust in a contained environment, and he be given the freedom to control his own environment as he plea…

>To limit what malicious software that runs as one's user can do, one must limit what the user can do

This is completely untrue. You can gain root access on Android and have full access to do anything while still keeping applications sandboxed. Limiting user freedoms is simply an extra thing that came with new mobile OSs.

Re: Wayland Keylogger

#70
post #65

So, all the fuzz about Wayland security and how it is good security to kill window managers at will... comes out totally void.

yes but you're getting downvoted because HN doesn't like people actually realizing stuff.

No one who understands wayland was under the delusion that wayland would protect against an application which has full access to your user directory. Wayland becomes secure when combined with an application sandbox using SELinux/flatpak. Previously you could sandbox the app and X would provide an escape.
Post reply on HN