Live data from Hacker News

Wayland Keylogger

github.com

111–120 of 121 posts

Re: Wayland Keylogger

#111
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.

Bash is like 70% of Linux users.

And can just check for .bashrc, .zshrc and whatever the popular shell uses.

The diversity argument is moot. If anything it just prevents software from being available on Linux due to small differences causing big inconvenience for business software authors to be worth the hassle. From security perspective, most of Linux desktop is Glibc + almost same set of base C libraries + SystemD + Sudo + GNOME/KDE whatever. Having 2-3 choices cover 95% is not a barrier for security exploits.

Rob Pike told in 2000 that Linux has put back computing. It's not exactly Linux but the so-called "community" with their luddite attitudes.

Linux Desktop is a cult.

Re: Wayland Keylogger

#112
post #30
post #18

Earlier quoted context omitted.

I would love to see a real permission system on Linux, where applications have to explicitly ask me before accessing things deemed important. It's never been a problem for me, but it would give me some comfort.

This was introduced in macOS at some point (Catalina release?) and I saw a whole bunch of people complain about the number of dialogues they had to go through. I really like it, though. New applications have to ask whether they can read/write from ~/Documents or ~/Pictures, or read contacts. I agree with you, and also wish something like this existed for modern Linux desktops.

Try flatpak with flatseal

The permissions are not interactive, you can set them once and forget.

Re: Wayland Keylogger

#113

Earlier quoted context omitted.

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…

Or they run in their own sandbox and so at worst an app can only clobber the ZNC server’s sandbox.

Re: Wayland Keylogger

#114
post #18

Earlier quoted context omitted.

I would love to see a real permission system on Linux, where applications have to explicitly ask me before accessing things deemed important. It's never been a problem for me, but it would give me some comfort.

I want to get notified every time a program performs any type of I/O system call. I want to see the parameters and the data being copied. I also want the opportunity to cancel the system call and even return fake results and data back to the program. I already use strace to understand what programs do but it would be great if I could also intercept these calls in real time. Just keep the program waiting until I appro…

This can be done with a FUSE server. By using filesystem namespaces, an app can then be restricted to just the view of the filesystem that this FUSE server exposes. Another possibility, at least for dynamically linked programs, would be to set LD_LIBRARY_PATH to force every system call through a wrapper.

Re: Wayland Keylogger

#115
post #76

Earlier quoted context omitted.

> It would also mean that no modern browser works any more since they need access to far more to even start up. You are thinking again about old-style permissions control -- like SELinux. Yes, they are not going to work well, as you cannot really deny .cache access. But this is not what we do in the modern system. You start a new mount namespace, and then mount a new tmpfs over /home. Then you bind-mount outside ~/.c…

And still. If I can upload some text document or private picture with a web-browser onto some web host, then that web browser can also send that picture anywhere else to spy on me. Unless I need to give it permission every time I wish to do something such as that, which would be very cumbersome. But yes, it's true that issues with the cache can be resolved with this, but not saving outside of a single file path, and…

> And still. If I can upload some text document or private picture with a web-browser onto some web host, then that web browser can also send that picture anywhere else to spy on me. Unless I need to give it permission every time I wish to do something such as that, which would be very cumbersome.

Now you are moving goalposts. Initially, you were discussing restrictions on the file system.

I concur that the current desktop security model is probably unfixable. All the tools to improve on it are here though. Android kinda solved it by restricting every app to its own assets and files by default. If the app needs more, it has to ask for permissions.

The problem with user approval for every single action is decision fatigue. It is already happening on Android: every app is asking for a ton of permissions. And it turns out that many of them are not granular enough. For example, Signal needs the numbers from the address book to find contacts, but nothing else. If I want that feature, I still have to give Signal access to the entire address book.

Re: Wayland Keylogger

#116

Earlier quoted context omitted.

Your responses make it seem like you have never used a sandboxed app on the Mac, as every single thing you have mentioned has significantly better solutions than you are suggesting as an alternative. Even if you haven't, the things that it doesn't aren't a stretch to come up with and I might as well just list them here: > Eventually, the list is so large that many applications need access to at least one thing from w…

> Your responses make it seem like you have never used a sandboxed app on the Mac, as every single thing you have mentioned has significantly better solutions than you are suggesting as an alternative. Even if you haven't, the things that it doesn't aren't a stretch to come up with and I might as well just list them here: There's a reason that only a small minority of software can even run in such sandboxes without f…

Text editors and all programs that can create executable files are huge special cases. Everything touched by them should be marked as "tainted" and should require explicit user blessing to leave their sandbox. Windows does something similar already with downloaded files.

Still, few programs need to change PATH, open arbitrary ports or ptrace other processes. These scenarios are so special that they should require explicit user approval. Also, apart from text editors, most programs don't ever need to access arbitrary files from the file system.

Android being locked down is a distributor's decision. They have average users in mind that might not ever need nor want to fiddle around on their system with a debugger and a text editor.

Re: Wayland Keylogger

#117
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

After dealing with hosting websites for paying customers on shared servers I'm not so sure that you can assume Linux is free of being targeted. Linux the OS may not be targeted, but Linux software like WordPress (and many others) is under constant attack. What is interesting is that the payload the hacker is trying to deliver often is not a rootkit - a bot node can run just fine as a user process on a Linux (or BSD)…

Linux would be targeted for sure if the exploits were easier to pull of. Because then the things you just described could be done to all the users on the system simultaneously.

Re: Wayland Keylogger

#118
post #85

Earlier quoted context omitted.

And still. If I can upload some text document or private picture with a web-browser onto some web host, then that web browser can also send that picture anywhere else to spy on me. Unless I need to give it permission every time I wish to do something such as that, which would be very cumbersome. But yes, it's true that issues with the cache can be resolved with this, but not saving outside of a single file path, and…

There was am academic system (whose name I unfortunately cannot recall now) which would hook up the "file open" dialog and run it from trusted mode. When a user would pick up a file, then the program would have access to it, and only it. This apparently worked pretty great for programs which needed only one file. It probably would not have worked as great for programs which do more advanced stuff, like IDEs which nee…

AFAIK UWP does this.

Re: Wayland Keylogger

#119

Earlier quoted context omitted.

What I’m getting at is that Wayland has better hardware acceleration only of compositing. It doesn’t seem to have any support for rendering shapes into pixels, even though that’s mostly why hardware accelerators were invented.

As far as I know, there is no technical reason why Wayland would have better hardware acceleration. Modern X11 compositors work on very similar principles. — the only difference is the Wayland protocol requires that there be such a compositor, and on X11 one is free to even use outdated server drawing calls that have not been used for decades.

But there is no reason for X11 to be in the picture, it does absolutely nothing other than adding another communication step between the client and the compositor.

Re: Wayland Keylogger

#120

One of my main gripes unfortunately Wayland does not function very well with accessibility software without elevated privileges. Areas include but not limited to : -simulated keyboard/mouse input (some progress recently with some composers) ability to inspect window attributes (e.g. window title, executable and handle) ability to manipulate windows (e.g. maximise, close, etc) Considerations do need to be made in the…

I doubt it has changed all that much, but an accessibility software need not be on the same privilege level than an ordinary one, so it is entirely possible to propose an accessibility extension to query basically everything and explicitly enable these methods for a specific program. Unfortunately accessibility softwares are not all that good on linux as far as I know.
Post reply on HN