Comment

Comment by stevenhuang

Before this article, I've always thought Spotify was an electron app (or something of the sort), so never bothered installing it. I was wondering why you didn't just open a Dev console and inject some JS :).

Regarding the Apple code signing requirement: is it the case then for all hooks of this sort that one is effectively required to be in the Developer program?

So I was curious if LD_PRELOAD is prevented from working, but seems there's a simple work around:

> On macOS there is an additional problem. Newer versions of macOS have a security subsystem called System Integrity Protection. For our purposes the problem is that it prevents injecting code via DYLD_INSERT_LIBRARIES (the macOS equivalent of LD_PRELOAD) into any binary in /bin, /sbin, /usr/bin and /usr/sbin.

> Luckily, there’s an easy workaround. Just create a new directory, copy all the binaries from /bin, /sbin, /usr/bin and /usr/sbin into that directory, and then add it to the start of your $PATH environment variable. Once the binaries are out of those special directories code injection works just fine, and since they’re only 100MB copying them is quite fast.

From https://www.datawire.io/code-injection-on-linux-and-macos/

parent stevenhuang 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton