News for hackers. Stuff that matters.
Re:Wayland Keylogger by saagarjha on Saturday January 30, 2021 @09:01PM (#25975045)
> There's a reason that only a small minority of software can even run in such sandboxes

Again, it seems like you have not used macOS.

> Are you running your text editor, terminal, IRC bouncer, or audio server in such a sandbox?

What I am doing is not particularly relevant, given that I have needs that require me to run with SIP disabled (which, due to rather unfortunate design choices, means there are relatively trivial ways to escalate to root). However, there are many popular text editors that are sandboxed, for example the built-in TextEdit or CotEditor (which ships on the Mac App Store, to boot!). Terminals usually do not run in sandboxes for obvious reasons (although, many people are happy with the ones that run on iOS, so…). I don't run an IRC bouncer or audio server but I would certainly like it to run in sandbox, and can see a very clear way to have them do so.

> far more things they need access to that can escalate to full privileges quickly

The number of applications that need to do the things you mentioned are few are far between. I mean, honestly, does anything need to ptrace an arbitrary process other than a debugger? I think there is exactly one process on my computer that can edit PATH for my user…

> Do you frequently use your text editor to edit one file, and one file only?

Uh, is this not how you use a text editor?

> Give it access once to edit a script you wrote, now it owns the file; say it be malicious, it now changes the script so that next time it is executed, it allows for arbitrary code to run.

> Not to mention having used it once to edit the initialization or environment variable files and user profiles.

Yes, but again: user consent. If I give an app the ability to access a file, then it can access the file. If I don't, then it can't touch it. This is clearly better than "the app can do everything".

> In which case, it can exploit a race condition to replace a file that was created by something else immediately after the other software unlinks it to recreate it under the same name to trick the user.

> It can also then create a symbolic link to trick other applications and gain write permissions of files it shouldn't have since almost no software is secured against such symbolic link attacks.

Who said anything about this identity being tied to the filename, or even enforced by the application itself? Validation is done correctly in the kernel, of course.

There are no comments on this comment yet.