Protect Your Privacy on MacOS

Posted by

·

In the age of surveillance capitalism, privacy has never been more important. With a little work, you can make major privacy gains. There are two primary phases to protecting your privacy on MacOS. First you need create a secure baseline. Second, you need an easy regular routine to clean your system. This post is inspired by a script that I put together to clear my MBP’s caches every week. But before we get into that, I’ll briefly review the baseline MacOS settings I enable to protect my privacy.

There are many guides to hardening MacOS. For the most in-depth guide please see @drduh’s macOS-Security-and-Privacy-Guide. But there are many, many other guides. Below are the steps that I utilize to initially secure my Macs:

  1. Turn on FileVault
  2. Enable Apple Lockdown
  3. Enable Apple Advanced Data Protection
  4. Enable iCloud Private Browsing
  5. Change your search engine settings
  6. Disable location settings (except for Find my Device)
  7. Configure Apple Messages to delete after 30 days (and any other messenger)
  8. Install 1password

After you have your baseline configuration, you need to spend a few minutes to regularly update your Mac and to clear sensitive data. Restarting your system clears any potential memory only threats. Removing caches and history minimizes the potential impact of a compromise. This process isn’t complicated. It essentially boils down to updating your Mac, running a script, and restarting. I recommend that everyone does this process regularly. Here’s my Weekly Routine:

  1. Review login items and launch daemons
  2. Update your Mac
  3. brew update && brew upgrade
  4. Run my privacy script
  5. Restart

My privacy script is largely derived from @drduh’s macOS-Security-and-Privacy-Guide. I took the most pertinent settings and put them into a bash script. I also downloaded most privacy and “clean my Mac” apps from the App Store and replaced their cleaning functionality. Primarily this script does several things, including:

  1. Deleting cli history
  2. Deleting system logs (when ran as root)
  3. Clearing browser caches and cookies
  4. Deleting finder history
  5. Deletes Caches
  6. Sets some secure configurations

Use at your own risk. I haven’t had problems, but the script may briefly cause problems to running apps. The deleted files are temporary and apps should restore to normal after you restart.

By following this process you limit web app tracking and minimize your locally cached data if your system is compromised or stolen.

For More Information:

  1. https://github.com/drduh/macOS-Security-and-Privacy-Guide
  2. https://dominicusin.github.io/2021/09/06/macOS-Security-and-Privacy-Guide.html
  3. https://gist.github.com/mwollenweber/563d78602a1f115778b1ded1754b9f8b
  4. https://www.hexnode.com/mobile-device-management/help/script-to-clear-cache-on-macos-devices/
  5. https://git.herrbischoff.com/awesome-macos-command-line/about/#security

mwollenweber Avatar

About the author

Matthew Wollenweber (@mwollenweber) is a security engineer with over 20 years experience in cybersecurity and software development. Matthew is passionate about analyzing real-world security problems as inspiration to build tools. His day job is security operations, incident response, and tool development. He is a progressive political organizer in New Orleans, a BJJ brown belt, and bulldog rescuer.