I'm a big fan of Patrick Wardle's free mac utilities but I noticed something odd
about LuLu recently. It seems that it only filters egress traffic when LuLu.app
is running. Since it normally runs as the local user rather than root, this
makes it somewhat trivial for malware to defeat as it can simply kill the
process and then connect to whatever it wants.
For some time I've been using a hand-rolled solution for touchID over ssh which
I previously blogged about. Up until recently it's been a somewhat
loosely-compiled scattering of config that wasn't really in a releasable form
but with a pending security talk on the horizon I thought it would be worth
tidying it up and making it releasable so I could mention it in my talk.
Egress filtering is an immensely powerful security control but it's not so
straightforward to do it well. If any malware manages to execute on your system
one of the first things it's likely going to try to do is call home and
establish a C2 channel. With effective egress filtering you can break this link
in the attack chain and stop it dead in its tracks.
TouchID on the mac is really cool. It's awesome being able to use it for sudo,
but I thought it would be even more awesome if it could be used to authenticate
sudo remotely over ssh.
I've made this work using touch2sudo - https://github.com/prbinu/touch2sudo
which is a simple binary that when executed will show a touchID authentication
18 Apr 2020 11:53 | macOS
I love Carbon Copy Cloner, it is an awesome piece of software. I frequently rave
about it to anyone who'll listen, it's so useful.
It does however seem to have been somewhat limited by the introduction of
Apple's new T2 security chip. I recently purchased one of the new 2020 Macbook
Airs - a great computer and my first mac with the T2 chip.
On a mac if you set Cylance's "local protection" to "system" it seems to
disallow all filesystem access to the CylanceSvc service's launchd plist file:
This access is completely denied even to the root user. At first glance this
9 Jul 2019 18:34 | apple | macOS
I recently had the logic board replaced in my 2017 Macbook Pro. I use the
awesome Carbon Copy Cloner to keep an image of my system as a bootable backup
which can then be easily restored when the machine is returned to me.
This time however I had some issues with iCloud Drive. After restoring the
backup I found it wasn't syncing. I tried the usual troubleshooting steps: turn
A while ago I posted about how sudo can be easily backdoored by dropping a fake
sudo script into the user's PATH:
Another attack vector for sudo is monitoring the process list for invocations of
Charles Proxy is a great mac application for debugging web services and
inspecting SSL traffic for any application on your machine.
In order to inspect the SSL traffic it needs to configure the system to use a
proxy so that it can capture the packets and use its custom root CA to decode
Another Hashicorp bug that I've been sitting on since late last year. This one
was exploitable only during the vagrant update process, or even if the user
typed "vagrant plugin update" and there was no pending update.
It was possible for a rogue process on the system to subvert the upgrade process
in a way the user was unlikely to notice in order to steal root privileges.
Another exploit for the now deprecated vagrant-vmware-fusion plugin. This one
only works if VMware Fusion is not installed which is an unlikely scenario.
However if this should occur then it's an easy root escalation so users should
This issue was reported to Hashicorp on 16/11/17. At first they claimed it was
low priority because it required local access, despite being a straight-to-root
escalation. Then they conceded that this wasn't reasonable and said it was high
priority and that they would address it.
It has taken until this week to get their fixes out, involving an entire rewrite
Last year I found a couple more privilege escalation vectors in Arq Backup
for Mac version 5.10. Both have now been fixed in the latest release.
The first is relatively simple - the arq_updater binary (which runs as root)
takes a path argument for the url to retrieve an Arq update from in the format
Arq.zip. We can simply specify an arbitrary path - eg file:///tmp/blah/Arq.zip -
It occurred to me recently that a lot of people probably use screen or tmux in
ways that leave an easy path to privilege escalation open. For example if you
start a screen session as your local user and then escalate to root inside the
screen session. As soon as you do that, anyone with access to the non-root
account can simply resume the screen session and immediately be root.
Recently I was working on a security issue in some other software that has yet
to be disclosed which created a rather interesting condition. As a non-root
user I was able to write to any file on the system that was not SIP-protected
but the resulting file would not be root-owned, even if it previously was.
This presented an interesting challenge for privilege escalation - how would you
I recently blogged about the prevalence of escalation hijack vulnerabilities
amongst macOS applications. One example of this is the latest version of Murus
firewall. By design it requires the user to authenticate every time in order to
obtain the access it needs to modify the firewall settings.
If a local attacker or malware is running as an admin user (ie has write access
VirtualBox is a virtualisation application written by Oracle that is quite popular
presumably because its free. I'm not a fan myself - if my mac locks up
completely or kernel panics it's usually because I've loaded the vbox kernel
extensions less than 10 minutes ago. I use VMware Fusion instead (which is fairly
expensive but IMO worth the money) and have a ritual whereby if I've had to load
the vbox kernel extensions for work-related reasons I will reboot the machine
With all the hype today about the blank-password root bug in High Sierra I
thought I'd write a quick post about escalation hihacking on macOS and how
common it is for software to be vulnerable to this.
Consider the case of malware gaining execution on a mac. This is pretty bad to
begin with but it's all the more worse if the malware obtains root access. Even
As well as the other bugs affecting Arq <= 5.9.6 there is also another issue
with the suid-root restorer binaries in Arq for Mac. There are three of them
and they are used to execute restores of backed up files from the various
After reversing the inter-app protocol I discovered that the path to the
Arq Backup from Haystack Software is a great application for backing up macs and
windows machines. Unfortunately versions of Arq for mac before 5.9.7 are
vulnerable to a local root privilege escalation exploit.
The updater binary has a "setpermissions" function which sets the suid bit and
root ownership on itself but it suffers from a race condition that allows you to
Another day, another root privesc bug in this plugin. Not quite so serious this
time - this one is only exploitable if the user has the plugin installed but
VMware Fusion *not* installed. This is a fairly unlikely scenario but it's a
straight to root privesc with no user interaction so isn't the kind of thing
that should be shipping with any software.
I recently blogged about how the installation process of version 5.0.0 of this
plugin could be hihacked by a local attacker or malware in order to escalate
privileges to root. Hashicorp pushed some mitigations for this issue fairly
quickly but unfortunately 5.0.1 is still exploitable with a slightly different
Sera is a free app for mac and iOS that lets you unlock your mac automatically
when your iphone is within a configured proximity.
Unfortunately to facilitate this it stores the users login password in their
home directory at:
After three CVEs and multiple exploits disclosed to Hashicorp they have finally
upped their game with this plugin. Now the previously vulnerable non-root-owned
ruby code that get executed as root by the sudo helper is no more and the sudo
helper itself is one static Go binary with tightly-controlled parameters that
can't (as far as I can tell) be exploited on its own.
24 Oct 2017 12:27 | macOS
Recently I had a recurring problem where I would see mdworker running at high
CPU every 5 minutes or so for no apparent reason. Internet searches reveal loads
of people with the same problem and lots of witchcrafty ways to try to resolve
it that often don't work.
This is how I fixed it. The problem seems to occur because *something* is
I've just discovered something totally batshit about sudo on macOS.
Spot the difference..
I've published several root privilege escalation bugs this year in various Mac
applications. I decided to see how difficult it would be to escalate privileges
on a machine without actually using an exploit. Having access to a local
account with sudo rights gives us an enormous attack surface for escalation.
Many of the dotfiles, which are nearly always user-writable for obvious reasons,
I have previously disclosed a couple of bugs in Hashicorp's
vagrant-vmware-fusion plugin for vagrant.
Unfortunately the 4.0.23 release which was supposed to fix the previous bug I
reported didn't address the issue, so Hashicorp quickly put out another release
- 4.0.24 - after that (but didn't update the public changelog on github).
InsomniaX by Andrew James - http://semaja2.net - is really handy if you want to
leave your macbook running with the lid closed.
Unfortunately back in June of this year a security vulnerability in the loader
binary was disclosed that allows the loading of any arbitrary kernel extension
as a non-root user.
During recent months I have published two CVEs documenting root privilege
escalation vulnerabilities in the Hashicorp vagrant-vmware-fusion plugin.
Version 4.0.24 is now released which addresses those bugs, but it still
depends on an suid root binary being present in order for vagrant to
communicate with VMWare.
A couple of weeks ago I disclosed a local root privesc in Hashicorp's
The initial patch they released was 4.0.21 which unfortunately contained a bug
I'm a big fan of Hashicorp but this is an awful bug to have in software of their
Their vagrant plugin for vmware fusion uses a product called Ruby Encoder to
protect their proprietary ruby code. It does this by turning the ruby code into
bytecode and executing it directly.
26 May 2017 08:10 | macOS
The new macbook pros are divisive in many ways, not least of which is the
reportedly less than stellar battery life compared to the previous generation.
I bought the escape version which has innately better battery life than the
touchbar version, but opted for the i7. My strategy in the past has always been
to max the spec as much as I can afford so the machine will last a long time but
this time around there isn't a huge difference in performance between the i5 and
I blogged about Cylance a couple of times earlier this year after testing their
endpoint security product CylancePROTECT on MacOS. I ended up deleting both
blog posts shortly after posting them because I was concerned about
inaccuracies in the original post and wanted to give Cylance a chance to
respond to the issues I raised.
sudolikeaboss is a neat little program that acts as a command-line interface to
1Password Pro, effectively giving you a way to use 1password with the terminal.
This is useful but it does come with a security tradeoff as any application
running in the context of the user can potentially steal passwords if 1password
is in an unlocked state.
With CVE-2017-7643 I disclosed a command injection vulnerablity in the KLoader
binary that ships with Proxifier <= 2.18.
Unfortunately 2.19 is also vulnerable to a slightly different attack that
yields the same result.
Proxifier 2.18 (also 2.17 and possibly some earlier version) ships with a
KLoader binary which it installs suid root the first time Proxifier is run. This
binary serves a single purpose which is to load and unload Proxifier's kernel
Unfortunately it does this by taking the first parameter passed to it on the
11 Dec 2016 13:11 | macOS
SuperDuper! from ShirtPocket software is fantastic backup utility. It lets you
create a full bootable clone of your mac that you can boot from any machine.
Not only is this a great way to backup your data but if your main machine dies
you can plug the backup drive into any mac, boot from it using the option key
at startup and be straight back into your environment.
strace is really useful on Linux for figuring out why some program isn't doing
what it should.
Not sure how many people know this but you can do the same thing on darwin
using dtruss, it's just no quite so obvious. Using this script: