I am developing a library called MemoryCryptor for macOS. Its purpose is to protect sensitive data of the calling process (including launchd daemons), e.g. user passwords and other secrets, from being written to disk or read directly by debuggers or malware. So, the first thing I need to clarify here is what you're threat model is and to what degree you're willing to trust the operating system itself. The problem here is that there's a spectrum of trust that runs from: If you trust the operating system, then the solution is fairly simple. As described here, if a process has Get task allow set to false, then the system will not allow any process to retrieve that processes task port. Without that port, there's no way for an app to gain access to another apps process, solving the issue. Are many other mechanism at work that reenforce and/or prevent other attack vectors, but the general answer here is that that standard system configuration makes ensures that one process cannot read the memory of another process
Topic:
Privacy & Security
SubTopic:
General