More than half a year as passed since Hitcon’12 and as far as I know no one cared much about implementing some sort of detection/protection against this type of attack (correct me if I’m wrong :-)). As explained in Hitcon slides, this trick can be very useful to install backdoors and avoid the usual lame LaunchDaemons type of thing.
I did some massive cleanup to the original PoC that I had glued for Hitcon but it’s still a bit messy and definitely not “production” ready. It contains many “design” decisions that make it easily detectable but keep in mind it can be worked and improved a lot.
The goal here is to show how (easily) it can be done and improve detection/protection. History keeps repeating itself and while everyone is worried with 0days, stupid simple tricks are still very effective. We need to get rid of these first!
Code is available at github and also a zip at the end of the post.
This version only supports non-fat targets so you need to work on it if you want to make a cyberweapon out of it (ahhh, couldn’t resist to make the joke :P).
Link to the Hitcon slides in case you want to reread the concept.
Don’t forget to chown -R root:wheel to all apps in /Applications (very few give problems with this, at least protect the main binary and frameworks).